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

UpperTesterMapemSpatemCodec.hh
Go to the documentation of this file.
1 #ifndef UPPERTESTERMAPEMSPATEMCODEC_H
2 #define UPPERTESTERMAPEMSPATEMCODEC_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 LibItsMapemSpatem__TypesAndValues {
15 class UtMapemSpatemResults;
16 class UtMapemEventInd;
17 class UtSpatemEventInd;
18 }
19
20 class UpperTesterMapemSpatemCodec: public Codec <
21 Record_Type,
22 Record_Type>
23 {
24 const unsigned char c_utMapemSpatemInitialize = 0x00;
25 const unsigned char c_utMapemSpatemInitializeResult = 0x01;
26 const unsigned char c_utMapemSpatemTrigger = 0xAB;
27 const unsigned char c_utMapemSpatemTriggerResult = 0xAC;
28 const unsigned char c_utMapemEventInd = 0xAF;
29 const unsigned char c_utSpatemEventInd = 0xB0;
30
31 int encode_ (const Base_Type& type, const TTCN_Typedescriptor_t& field_descriptor, TTCN_Buffer& encoding_buffer);
32
33 public:
34 UpperTesterMapemSpatemCodec() : Codec<Record_Type, Record_Type>() { };
35 virtual ~UpperTesterMapemSpatemCodec() { };
36
37 virtual int encode (const Record_Type&, OCTETSTRING& data);
38 virtual int decode (const OCTETSTRING& data, Record_Type&, Params* params = NULL);
39 std::unique_ptr<Base_Type> decode (const OCTETSTRING& data, Params* params = NULL);
40
41 private:
42 int decode (const OCTETSTRING& data, LibItsMapemSpatem__TypesAndValues::UtMapemSpatemResults& msg, Params* params = NULL);
43 int decode (const OCTETSTRING& data, LibItsMapemSpatem__TypesAndValues::UtMapemEventInd& msg, Params* params = NULL);
44 int decode (const OCTETSTRING& data, LibItsMapemSpatem__TypesAndValues::UtSpatemEventInd& msg, Params* params = NULL);
45 };
46 #endif
LibItsMapemSpatem__TypesAndValues
Definition: UpperTesterMapemSpatemCodec.hh:14
UpperTesterMapemSpatemCodec::~UpperTesterMapemSpatemCodec
virtual ~UpperTesterMapemSpatemCodec()
Definition: UpperTesterMapemSpatemCodec.hh:35
Params.hh
Header file for the parameter dictionary.
Codec
Declare TITAN class.
Definition: Codec.hh:25
UpperTesterMapemSpatemCodec::UpperTesterMapemSpatemCodec
UpperTesterMapemSpatemCodec()
Definition: UpperTesterMapemSpatemCodec.hh:34
Params
This class provides basic functionalities for an ITS dictionary.
Definition: Params.hh:21
Codec.hh
Header file for ITS abstract codec definition.
UpperTesterMapemSpatemCodec
Definition: UpperTesterMapemSpatemCodec.hh:20