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

UpperTesterDenmCodec.hh
Go to the documentation of this file.
1 #ifndef UpperTesterDenmCODEC_H
2 #define UpperTesterDenmCODEC_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 LibItsDenm__TypesAndValues {
15 class UtDenmResults;
16 class UtDenmEventInd;
17 }
18
19 class UpperTesterDenmCodec: public Codec <
20 Record_Type,
21 Record_Type>
22 {
23 const unsigned char c_utDenmInitialize = 0x00;
24 const unsigned char c_utDenmInitializeResult = 0x01;
25 const unsigned char c_utDenmChangePosition = 0x02;
26 const unsigned char c_utDenmChangePositionResult = 0x03;
27 const unsigned char c_utDenmChangePseudonym = 0x04;
28 const unsigned char c_utDenmChangePseudonymResult = 0x05;
29 const unsigned char c_utDenmTrigger = 0x10;
30 const unsigned char c_utDenmTriggerResult = 0x11;
31 const unsigned char c_utDenmUpdate = 0x12;
32 const unsigned char c_utDenmUpdateResult = 0x13;
33 const unsigned char c_utDenmTermination = 0x14;
34 const unsigned char c_utDenmTerminationResult = 0x15;
35 const unsigned char c_utDenmEventInd = 0x17;
36
37 int encode_ (const Base_Type& type, const TTCN_Typedescriptor_t& field_descriptor, TTCN_Buffer& encoding_buffer);
38
39 public:
40 UpperTesterDenmCodec() : Codec<Record_Type, Record_Type>() { };
41 virtual ~UpperTesterDenmCodec() { };
42
43 virtual int encode (const Record_Type&, OCTETSTRING& data);
44 virtual int decode (const OCTETSTRING& data, Record_Type&, Params* params = NULL);
45 std::unique_ptr<Base_Type> decode (const OCTETSTRING& data, Params* params = NULL);
46
47 private:
48 int decode (const OCTETSTRING& data, LibItsDenm__TypesAndValues::UtDenmResults& msg, Params* params = NULL);
49 int decode (const OCTETSTRING& data, LibItsDenm__TypesAndValues::UtDenmEventInd& msg, Params* params = NULL);
50 };
51 #endif
Params.hh
Header file for the parameter dictionary.
UpperTesterDenmCodec::~UpperTesterDenmCodec
virtual ~UpperTesterDenmCodec()
Definition: UpperTesterDenmCodec.hh:41
Codec
Declare TITAN class.
Definition: Codec.hh:25
Params
This class provides basic functionalities for an ITS dictionary.
Definition: Params.hh:21
UpperTesterDenmCodec::UpperTesterDenmCodec
UpperTesterDenmCodec()
Definition: UpperTesterDenmCodec.hh:40
LibItsDenm__TypesAndValues
Definition: UpperTesterDenmCodec.hh:14
Codec.hh
Header file for ITS abstract codec definition.
UpperTesterDenmCodec
Definition: UpperTesterDenmCodec.hh:19