Codec< TPDUEnc, TPDUDec > Class Template Referenceabstract

Declare TITAN class. More...

`#include <Codec.hh>`

## Public Member Functions

| Codec ()
| Reference to Params stack. More...
virtual | ~Codec ()
| Default destructor . More...
virtual int | encode (const TPDUEnc &p_message, OCTETSTRING &p_data)=0
| Encode typed message into an octet string. More...
virtual int | decode (const OCTETSTRING &p_, TPDUDec &p_message, Params *p_params=NULL)=0
| Encode typed message into an octet string format. More...

## Protected Attributes

Params * | _params

## Detailed Description

### template<typename TPDUEnc, typename TPDUDec>
class Codec< TPDUEnc, TPDUDec >

Declare TITAN class.

This class provides the interface for all ITS codecs, include UT and AC codecs

## Constructor & Destructor Documentation

## Codec()

template<typename TPDUEnc, typename TPDUDec>

Codec< TPDUEnc, TPDUDec >::Codec | ( |  | ) |

inlineexplicit

Reference to Params stack.

Default constructor

Todo:
  Remove logs

## ~Codec()

template<typename TPDUEnc, typename TPDUDec>

Codec< TPDUEnc, TPDUDec >::~Codec | ( |  | ) |

inlinevirtual

Default destructor .

Todo:
  Remove logs

## Member Function Documentation

## decode()

template<typename TPDUEnc, typename TPDUDec>

int Codec< TPDUEnc, TPDUDec >::decode | ( | const OCTETSTRING & | p_,
|  | TPDUDec & | p_message,
|  | Params * | p_params = `NULL`
| ) |  |

pure virtual

Encode typed message into an octet string format.

Parameters

  [in] | p_data | The message in its octet string
  [out] | p_message | The decoded typed message

Returns
  0 on success, -1 otherwise

Implemented in GeoNetworkingCodec, UpperTesterCamCodec, UpperTesterDenmCodec, UpperTesterGnCodec, UpperTesterIvimCodec, UpperTesterSremSsemCodec, UpperTesterMapemSpatemCodec, DENMCodec, BTPCodec, CAMCodec, EtsiTs103097Codec_Certificate, EtsiTs103097Codec_Data, EtsiTs103097Codec_ToBeSignedCertificate, EtsiTs103097Codec_ToBeSignedData, IVIMCodec, HttpCodec, MapemCodec, SpatemCodec, SremCodec, and SsemCodec.

## encode()

template<typename TPDUEnc, typename TPDUDec>

int Codec< TPDUEnc, TPDUDec >::encode | ( | const TPDUEnc & | msg,
|  | OCTETSTRING & | data
| ) |  |

pure virtual

Encode typed message into an octet string.

Parameters

  [in] | p_message | The typed message to be encoded
  [out] | p_data | The encoding result

Returns
  0 on success, -1 otherwise

Implemented in GeoNetworkingCodec, UpperTesterCamCodec, UpperTesterDenmCodec, UpperTesterGnCodec, UpperTesterIvimCodec, UpperTesterSremSsemCodec, UpperTesterMapemSpatemCodec, DENMCodec, BTPCodec, CAMCodec, EtsiTs103097Codec_Certificate, EtsiTs103097Codec_Data, EtsiTs103097Codec_ToBeSignedCertificate, EtsiTs103097Codec_ToBeSignedData, IVIMCodec, HttpCodec, MapemCodec, SpatemCodec, SremCodec, and SsemCodec.

## Member Data Documentation

## _params

template<typename TPDUEnc, typename TPDUDec>

Params* Codec< TPDUEnc, TPDUDec >::_params

protected

The documentation for this class was generated from the following file:

- /home/vagrant/TriesAndDelete/etsi_its/framework/include/Codec.hh