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

UpperTesterCamCodec.hh
Go to the documentation of this file.
1 #ifndef UpperTesterCamCODEC_H
2 #define UpperTesterCamCODEC_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 LibItsCam__TypesAndValues {
15 class UtCamTrigger;
16 class UtCamResults;
17 class UtCamEventInd;
18 }
19
20 class UpperTesterCamCodec: public Codec <
21 Record_Type,
22 Record_Type>
23 {
24 const unsigned char c_utCamInitialize = 0x00;
25 const unsigned char c_utCamInitializeResult = 0x01;
26 const unsigned char c_utCamChangePosition = 0x02;
27 const unsigned char c_utCamChangePositionResult = 0x03;
28 const unsigned char c_utCamChangeCurvature = 0x30;
29 const unsigned char c_utCamChangeSpeed = 0x31;
30 const unsigned char c_utCamSetAccelerationStatus = 0x32;
31 const unsigned char c_utCamSetExteriorLightsStatus = 0x33;
32 const unsigned char c_utCamChangeHeading = 0x34;
33 const unsigned char c_utCamSetDriveDirection = 0x35;
34 const unsigned char c_utCamChangeYawRate = 0x36;
35 const unsigned char c_utCamSetStationType = 0x39;
36 const unsigned char c_utCamSetVehicleRole = 0x3a;
37 const unsigned char c_utCamSetEmbarkationStatus = 0x3b;
38 const unsigned char c_utCamSetPtActivation = 0x3c;
39 const unsigned char c_utCamSetDangerousGoods = 0x3d;
40 const unsigned char c_utCamSetLightBarSirene = 0x3f;
41 const unsigned char c_utCamTriggerResult = 0x21;
42 const unsigned char c_utCamEventInd = 0x23;
43
44 int encode_ (const Base_Type& type, const TTCN_Typedescriptor_t& field_descriptor, TTCN_Buffer& encoding_buffer);
45
46 public:
47 UpperTesterCamCodec() : Codec<Record_Type, Record_Type>() { };
48 virtual ~UpperTesterCamCodec() { };
49
50 virtual int encode (const Record_Type&, OCTETSTRING& data);
51 int encode (const LibItsCam__TypesAndValues::UtCamTrigger&, OCTETSTRING& data);
52 virtual int decode (const OCTETSTRING& data, Record_Type&, Params* params = NULL);
53 std::unique_ptr<Base_Type> decode (const OCTETSTRING& data, Params* params = NULL);
54
55 private:
56 int decode (const OCTETSTRING& data, LibItsCam__TypesAndValues::UtCamResults& msg, Params* params = NULL);
57 int decode (const OCTETSTRING& data, LibItsCam__TypesAndValues::UtCamEventInd& msg, Params* params = NULL);
58 };
59 #endif
LibItsCam__TypesAndValues
Definition: UpperTesterCamCodec.hh:14
Params.hh
Header file for the parameter dictionary.
UpperTesterCamCodec
Definition: UpperTesterCamCodec.hh:20
Codec
Declare TITAN class.
Definition: Codec.hh:25
UpperTesterCamCodec::UpperTesterCamCodec
UpperTesterCamCodec()
Definition: UpperTesterCamCodec.hh:47
Params
This class provides basic functionalities for an ITS dictionary.
Definition: Params.hh:21
Codec.hh
Header file for ITS abstract codec definition.
UpperTesterCamCodec::~UpperTesterCamCodec
virtual ~UpperTesterCamCodec()
Definition: UpperTesterCamCodec.hh:48