BTPCodec.hh
Go to the documentation of this file.
#ifndef BTPCODEC_H
#define BTPCODEC_H
#include "Codec.hh"
#include "Params.hh"
class Base_Type;
class TTCN_Typedescriptor_t;
class TTCN_Buffer;
namespace LibItsBtp__TestSystem {
class BtpReq;
class BtpInd;
}
namespace LibItsBtp__TypesAndValues {
class BtpPacket;
}
class BTPCodec: public Codec <
LibItsBtp__TypesAndValues::BtpPacket,
LibItsBtp__TypesAndValues::BtpPacket>
{
int encode_ (const Base_Type& type, const TTCN_Typedescriptor_t& field_descriptor, TTCN_Buffer& encoding_buffer);
int decode_ (Base_Type& type, const TTCN_Typedescriptor_t& field_descriptor, TTCN_Buffer& decoding_buffer);
public:
enum BtpType { btpA, btpB };
BTPCodec() : Codec<LibItsBtp__TypesAndValues::BtpPacket, LibItsBtp__TypesAndValues::BtpPacket>() { _type = BTPCodec::btpA; };
virtual ~BTPCodec() { };
virtual int encode (const LibItsBtp__TypesAndValues::BtpPacket&, OCTETSTRING& data);
virtual int decode (const OCTETSTRING& data, LibItsBtp__TypesAndValues::BtpPacket&, Params* params = NULL);
inline void set_btp_type(const BTPCodec::BtpType p_btp_type) { _type = p_btp_type; };
private:
BtpType _type;
};
#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.