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

BTPCodec.hh
Go to the documentation of this file.
1 #ifndef BTPCODEC_H
2 #define BTPCODEC_H
3
4 #include "Codec.hh"
5 #include "Params.hh"
6
7 class Base_Type;
8 class TTCN_Typedescriptor_t;
9 class TTCN_Buffer;
10
11 namespace LibItsBtp__TestSystem {
12 class BtpReq;
13 class BtpInd;
14 }
15
16 namespace LibItsBtp__TypesAndValues {
17 class BtpPacket;
18 }
19
20 class BTPCodec: public Codec <
21 LibItsBtp__TypesAndValues::BtpPacket,
22 LibItsBtp__TypesAndValues::BtpPacket>
23 {
24 int encode_ (const Base_Type& type, const TTCN_Typedescriptor_t& field_descriptor, TTCN_Buffer& encoding_buffer);
25
26 int decode_ (Base_Type& type, const TTCN_Typedescriptor_t& field_descriptor, TTCN_Buffer& decoding_buffer);
27
28 public:
29 enum BtpType { btpA, btpB };
30 BTPCodec() : Codec<LibItsBtp__TypesAndValues::BtpPacket, LibItsBtp__TypesAndValues::BtpPacket>() { _type = BTPCodec::btpA; };
31 virtual ~BTPCodec() { };
32
33 virtual int encode (const LibItsBtp__TypesAndValues::BtpPacket&, OCTETSTRING& data);
34 virtual int decode (const OCTETSTRING& data, LibItsBtp__TypesAndValues::BtpPacket&, Params* params = NULL);
35
36 inline void set_btp_type(const BTPCodec::BtpType p_btp_type) { _type = p_btp_type; };
37
38 private:
39 BtpType _type;
40 };
41
42 #endif
LibItsBtp__TestSystem
Definition: BtpPort.cc:14
BTPCodec
Definition: BTPCodec.hh:20
BTPCodec::set_btp_type
void set_btp_type(const BTPCodec::BtpType p_btp_type)
Definition: BTPCodec.hh:36
BTPCodec::btpA
Definition: BTPCodec.hh:29
Params.hh
Header file for the parameter dictionary.
LibItsBtp__TypesAndValues
Definition: BTPCodec.hh:16
BTPCodec::BtpType
BtpType
Definition: BTPCodec.hh:29
Codec
Declare TITAN class.
Definition: Codec.hh:25
Params
This class provides basic functionalities for an ITS dictionary.
Definition: Params.hh:21
BTPCodec::~BTPCodec
virtual ~BTPCodec()
Definition: BTPCodec.hh:31
BTPCodec::BTPCodec
BTPCodec()
Definition: BTPCodec.hh:30
Codec.hh
Header file for ITS abstract codec definition.