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

UpperTesterGnCodec.hh
Go to the documentation of this file.
1 #ifndef UpperTesterGnCODEC_H
2 #define UpperTesterGnCODEC_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 LibItsGeoNetworking__TypesAndValues {
15 class UtGnResults;
16 class UtGnEventInd;
17 }
18
19 class UpperTesterGnCodec: public Codec <
20 Record_Type,
21 Record_Type>
22 {
23 const unsigned char c_utGnInitialize = 0x00;
24 const unsigned char c_utGnInitializeResult = 0x01;
25 const unsigned char c_utGnChangePosition = 0x02;
26 const unsigned char c_utGnChangePositionResult = 0x03;
27 const unsigned char c_utGnTriggerResult = 0x41;
28 const unsigned char c_utGnTrigger_GeoUnicast = 0x50;
29 const unsigned char c_utGnTrigger_GeoBroadcast = 0x51;
30 const unsigned char c_utGnTrigger_GeoAnycast = 0x52;
31 const unsigned char c_utGnTrigger_Shb = 0x53;
32 const unsigned char c_utGnTrigger_Tsb = 0x54;
33
34 int encode_ (const Base_Type& type, const TTCN_Typedescriptor_t& field_descriptor, TTCN_Buffer& encoding_buffer);
35
36 public:
37 UpperTesterGnCodec() : Codec<Record_Type, Record_Type>() { };
38 virtual ~UpperTesterGnCodec() { };
39
40 virtual int encode (const Record_Type&, OCTETSTRING& data);
41 virtual int encode (const Base_Type&, OCTETSTRING& data);
42 virtual int decode (const OCTETSTRING& data, Record_Type&, Params* params = NULL);
43 virtual std::unique_ptr<Base_Type> decode (const OCTETSTRING& data, Params* params = NULL);
44
45 private:
46 int decode (const OCTETSTRING& data, LibItsGeoNetworking__TypesAndValues::UtGnResults& msg, Params* params = NULL);
47 int decode (const OCTETSTRING& data, LibItsGeoNetworking__TypesAndValues::UtGnEventInd& msg, Params* params = NULL);
48 };
49 #endif
LibItsGeoNetworking__TypesAndValues
Definition: geonetworking_layer.hh:32
Params.hh
Header file for the parameter dictionary.
Codec
Declare TITAN class.
Definition: Codec.hh:25
UpperTesterGnCodec
Definition: UpperTesterGnCodec.hh:19
Params
This class provides basic functionalities for an ITS dictionary.
Definition: Params.hh:21
UpperTesterGnCodec::UpperTesterGnCodec
UpperTesterGnCodec()
Definition: UpperTesterGnCodec.hh:37
UpperTesterGnCodec::~UpperTesterGnCodec
virtual ~UpperTesterGnCodec()
Definition: UpperTesterGnCodec.hh:38
Codec.hh
Header file for ITS abstract codec definition.