Newer
Older
#include "Codec.hh"
class Base_Type;
class TTCN_Typedescriptor_t;
class TTCN_Buffer;
namespace LibItsGeoNetworking__TypesAndValues {
class GeoNetworkingPdu;
class HeaderTST;
class ExtendedHeader;
class DecodedPayload;
};
namespace LibItsSecurity__TypesAndValues {
unsigned char next_header;
unsigned char header_type;
unsigned int plLength_position;
unsigned int plLength;
Encoding_Context() { next_header = 0xff; header_type = 0xff; plLength_position = -1; plLength = -1; }
unsigned char next_header;
unsigned char header_type;
unsigned char header_sub_type;
unsigned int plLength;
std::vector<unsigned char> payload;
Decoding_Context() : payload{} { next_header = 0xff; header_type = 0xff; header_sub_type = 0xff; plLength = -1; }
class GeoNetworkingCodec : public Codec<LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu, LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu> {
Encoding_Context _ec;
Decoding_Context _dc;
int encode_ (const Base_Type& type, const TTCN_Typedescriptor_t& field_descriptor, TTCN_Buffer& encoding_buffer);
int encode_extendedHeader(const LibItsGeoNetworking__TypesAndValues::ExtendedHeader& u, TTCN_Buffer& encoding_buffer);
int encode_decodedPayload(const LibItsGeoNetworking__TypesAndValues::DecodedPayload& u, TTCN_Buffer& encoding_buffer);
int decode_ (Base_Type& type, const TTCN_Typedescriptor_t& field_descriptor, TTCN_Buffer& decoding_buffer);
int decode_headerTST(LibItsGeoNetworking__TypesAndValues::HeaderTST& u, TTCN_Buffer& decoding_buffer);
int decode_extendedHeader(LibItsGeoNetworking__TypesAndValues::ExtendedHeader& u, TTCN_Buffer& decodin_buffer);
GeoNetworkingCodec() : Codec<LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu, LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu>(), _ec(), _dc() { loggers::loggers::log("GeoNetworkingCodec::GeoNetworkingCodec(D) :%d ", _ec.next_header); };
virtual ~GeoNetworkingCodec() { loggers::loggers::log("GeoNetworkingCodec::~GeoNetworkingCodec"); };
int encode (const LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu& msg, OCTETSTRING& data);
int decode (const OCTETSTRING& data, LibItsGeoNetworking__TypesAndValues::GeoNetworkingPdu& msg);