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

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