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

MapemCodec.hh
Go to the documentation of this file.
1 #ifndef MAPEMCODEC_H
2 #define MAPEMCODEC_H
3
4 #include "Codec.hh"
5 #include "per_code.hh"
6 #include "Params.hh"
7
8 #include "LibItsMapemSpatem_TestSystem.hh"
9
10 class MapemPDUCodec : public per_code <MAPEM__PDU__Descriptions::MAPEM>
11 {
12 public:
13 explicit MapemPDUCodec() { };
14 virtual int encode (const MAPEM__PDU__Descriptions::MAPEM& sapem, BITSTRING& data);
15 virtual int decode (const BITSTRING& data, MAPEM__PDU__Descriptions::MAPEM&);
16 };
17
18 class MapemCodec : public Codec<MAPEM__PDU__Descriptions::MAPEM, MAPEM__PDU__Descriptions::MAPEM>
19 {
20 MapemPDUCodec asnCodec;
21
22 public:
23 explicit MapemCodec() : Codec<MAPEM__PDU__Descriptions::MAPEM, MAPEM__PDU__Descriptions::MAPEM>(), asnCodec() { };
24 virtual ~MapemCodec() { };
25
26 virtual int encode (const MAPEM__PDU__Descriptions::MAPEM& sapem, OCTETSTRING& data);
27 virtual int decode (const OCTETSTRING& data, MAPEM__PDU__Descriptions::MAPEM&, Params* params = NULL);
28 };
29
30 #endif
MapemCodec::MapemCodec
MapemCodec()
Definition: MapemCodec.hh:23
MapemPDUCodec
Definition: MapemCodec.hh:10
MapemCodec::asnCodec
MapemPDUCodec asnCodec
Definition: MapemCodec.hh:20
per_code.hh
Header file for TITAN message to ASN.1 PER message codec.
Params.hh
Header file for the parameter dictionary.
MapemPDUCodec::encode
virtual int encode(const MAPEM__PDU__Descriptions::MAPEM &sapem, BITSTRING &data)
Encode TITAN message into ASN.1 PER message.
Definition: MapemCodec.cc:35
MapemPDUCodec::MapemPDUCodec
MapemPDUCodec()
Definition: MapemCodec.hh:13
Codec
Declare TITAN class.
Definition: Codec.hh:25
per_code
Declare asn1c class.
Definition: per_code.hh:27
Params
This class provides basic functionalities for an ITS dictionary.
Definition: Params.hh:21
MapemPDUCodec::decode
virtual int decode(const BITSTRING &data, MAPEM__PDU__Descriptions::MAPEM &)
Decode ASN.1 PER message into TITAN message.
Definition: MapemCodec.cc:40
MapemCodec::~MapemCodec
virtual ~MapemCodec()
Definition: MapemCodec.hh:24
MapemCodec
Definition: MapemCodec.hh:18
Codec.hh
Header file for ITS abstract codec definition.