ETSI STF525 / Internal Testing test suite This project provides an internal testing test suite and its associated Test Adapter/Codec

UpperTesterIvimCodec.hh
Go to the documentation of this file.
1 #ifndef UpperTesterIvimCODEC_H
2 #define UpperTesterIvimCODEC_H
3
4 #include <memory>
5
6 #include "Codec.hh"
7 #include "Params.hh"
8
9 class Base_Type;
10 class Record_Type;
11 class TTCN_Typedescriptor_t;
12 class TTCN_Buffer;
13
14 namespace LibItsIvim__TypesAndValues {
15 class UtIvimResults;
16 class UtIvimEventInd;
17 }
18
19 class UpperTesterIvimCodec: public Codec <
20 Record_Type,
21 Record_Type>
22 {
23 const unsigned char c_utIvimInitialize = 0x00;
24 const unsigned char c_utIvimInitializeResult = 0x01;
25 const unsigned char c_utIvimTrigger = 0xA4;
26 const unsigned char c_utIvimTriggerResult = 0xA5;
27 const unsigned char c_utIvimUpdate = 0xA6;
28 const unsigned char c_utIvimUpdateResult = 0xA7;
29 const unsigned char c_utIvimTermination = 0xA8;
30 const unsigned char c_utIvimTerminationResult = 0xA9;
31 const unsigned char c_utIvimEventInd = 0xAA;
32
33 int encode_ (const Base_Type& type, const TTCN_Typedescriptor_t& field_descriptor, TTCN_Buffer& encoding_buffer);
34
35 public:
36 UpperTesterIvimCodec() : Codec<Record_Type, Record_Type>() { };
37 virtual ~UpperTesterIvimCodec() { };
38
39 virtual int encode (const Record_Type&, OCTETSTRING& data);
40 virtual int decode (const OCTETSTRING& data, Record_Type&, Params* params = NULL);
41 std::unique_ptr<Base_Type> decode (const OCTETSTRING& data, Params* params = NULL);
42
43 private:
44 int decode (const OCTETSTRING& data, LibItsIvim__TypesAndValues::UtIvimResults& msg, Params* params = NULL);
45 int decode (const OCTETSTRING& data, LibItsIvim__TypesAndValues::UtIvimEventInd& msg, Params* params = NULL);
46 };
47 #endif
UpperTesterIvimCodec
Definition: UpperTesterIvimCodec.hh:19
UpperTesterIvimCodec::UpperTesterIvimCodec
UpperTesterIvimCodec()
Definition: UpperTesterIvimCodec.hh:36
UpperTesterIvimCodec::~UpperTesterIvimCodec
virtual ~UpperTesterIvimCodec()
Definition: UpperTesterIvimCodec.hh:37
LibItsIvim__TypesAndValues
Definition: UpperTesterIvimCodec.hh:14
Params.hh
Header file for the parameter dictionary.
Codec
Declare TITAN class.
Definition: Codec.hh:25
Params
This class provides basic functionalities for an ITS dictionary.
Definition: Params.hh:21
Codec.hh
Header file for ITS abstract codec definition.