Vanetza
Loading...
Searching...
No Matches
vanetza::asn1::r1::Cpm Class Reference
Inheritance diagram for vanetza::asn1::r1::Cpm:

Public Types

using base
typedef CPM_t asn1c_type

Public Member Functions

ByteBuffer encode () const
bool decode (const ByteBuffer &buffer)
std::size_t size () const
asn1c_type & operator* ()
const asn1c_type & operator* () const
asn1c_type * operator-> ()
const asn1c_type * operator-> () const
const asn1c_type * content () const
asn1c_type * content ()
bool operator== (const asn1c_wrapper_common &rhs) const
bool operator!= (const asn1c_wrapper_common &rhs) const
bool validate () const
bool validate (std::string &error) const
int compare (const asn1c_wrapper_common &other) const
int print () const
int print (FILE *stream) const
void swap (asn1c_wrapper_common &other) noexcept

Protected Attributes

asn1c_type * m_struct
asn_TYPE_descriptor_t & m_type

Detailed Description

Definition at line 17 of file cpm.hpp.

Member Typedef Documentation

◆ asn1c_type

typedef CPM_t vanetza::asn1::asn1c_wrapper_common< CPM_t >::asn1c_type
inherited

Definition at line 47 of file asn1c_wrapper.hpp.

◆ base

using vanetza::asn1::asn1c_per_wrapper< CPM_t >::base
inherited

Definition at line 169 of file asn1c_wrapper.hpp.

Constructor & Destructor Documentation

◆ Cpm()

vanetza::asn1::r1::Cpm::Cpm ( )
inline

Definition at line 20 of file cpm.hpp.

Member Function Documentation

◆ compare()

int vanetza::asn1::asn1c_wrapper_common< CPM_t >::compare ( const asn1c_wrapper_common & other) const
inlineinherited

Compare ASN.1 types

Parameters
otherOther ASN.1 type to compare with
Returns
0 if equal, <0 if other is "greater", >0 if other is "smaller"

Definition at line 119 of file asn1c_wrapper.hpp.

◆ content() [1/2]

asn1c_type * vanetza::asn1::asn1c_wrapper_common< CPM_t >::content ( )
inlineinherited

Definition at line 82 of file asn1c_wrapper.hpp.

◆ content() [2/2]

const asn1c_type * vanetza::asn1::asn1c_wrapper_common< CPM_t >::content ( ) const
inlineinherited

Definition at line 81 of file asn1c_wrapper.hpp.

◆ decode()

bool vanetza::asn1::asn1c_per_wrapper< CPM_t >::decode ( const ByteBuffer & buffer)
inlineinherited

Try to decode ASN.1 struct from byte buffer

Parameters
bufferinput data
Returns
true if decoding has been successful

Definition at line 186 of file asn1c_wrapper.hpp.

◆ encode()

ByteBuffer vanetza::asn1::asn1c_per_wrapper< CPM_t >::encode ( ) const
inlineinherited

Encode ASN.1 struct into byte buffer

Returns
byte buffer containing serialized ASN.1 struct

Definition at line 176 of file asn1c_wrapper.hpp.

◆ operator!=()

bool vanetza::asn1::asn1c_wrapper_common< CPM_t >::operator!= ( const asn1c_wrapper_common & rhs) const
inlineinherited

Definition at line 89 of file asn1c_wrapper.hpp.

◆ operator*() [1/2]

asn1c_type & vanetza::asn1::asn1c_wrapper_common< CPM_t >::operator* ( )
inlineinherited

Definition at line 75 of file asn1c_wrapper.hpp.

◆ operator*() [2/2]

const asn1c_type & vanetza::asn1::asn1c_wrapper_common< CPM_t >::operator* ( ) const
inlineinherited

Definition at line 77 of file asn1c_wrapper.hpp.

◆ operator->() [1/2]

asn1c_type * vanetza::asn1::asn1c_wrapper_common< CPM_t >::operator-> ( )
inlineinherited

Definition at line 76 of file asn1c_wrapper.hpp.

◆ operator->() [2/2]

const asn1c_type * vanetza::asn1::asn1c_wrapper_common< CPM_t >::operator-> ( ) const
inlineinherited

Definition at line 78 of file asn1c_wrapper.hpp.

◆ operator==()

bool vanetza::asn1::asn1c_wrapper_common< CPM_t >::operator== ( const asn1c_wrapper_common & rhs) const
inlineinherited

Definition at line 85 of file asn1c_wrapper.hpp.

◆ print() [1/2]

int vanetza::asn1::asn1c_wrapper_common< CPM_t >::print ( ) const
inlineinherited

Print ASN.1 type to standard output

Returns
0 on success, -1 on error

Definition at line 128 of file asn1c_wrapper.hpp.

◆ print() [2/2]

int vanetza::asn1::asn1c_wrapper_common< CPM_t >::print ( FILE * stream) const
inlineinherited

Print ASN.1 type to some file stream

Parameters
streamOutput stream
Returns
0 on success, -1 on error

Definition at line 138 of file asn1c_wrapper.hpp.

◆ size()

std::size_t vanetza::asn1::asn1c_per_wrapper< CPM_t >::size ( ) const
inlineinherited

Get size of encoded ASN.1 struct

Returns
size in bytes

Definition at line 205 of file asn1c_wrapper.hpp.

◆ swap()

void vanetza::asn1::asn1c_wrapper_common< CPM_t >::swap ( asn1c_wrapper_common & other)
inlinenoexceptinherited

Swap ASN.1 wrapper content

Parameters
otherwrapper

Definition at line 147 of file asn1c_wrapper.hpp.

◆ validate() [1/2]

bool vanetza::asn1::asn1c_wrapper_common< CPM_t >::validate ( ) const
inlineinherited

Check ASN.1 constraints

Parameters
error(optional) copy of error message
Returns
true if valid

Definition at line 99 of file asn1c_wrapper.hpp.

◆ validate() [2/2]

bool vanetza::asn1::asn1c_wrapper_common< CPM_t >::validate ( std::string & error) const
inlineinherited

Check ASN.1 constraints

Parameters
errorError message if any constraint failed
Returns
true if valid

Definition at line 109 of file asn1c_wrapper.hpp.

Member Data Documentation

◆ m_struct

asn1c_type* vanetza::asn1::asn1c_wrapper_common< CPM_t >::m_struct
protectedinherited

Definition at line 154 of file asn1c_wrapper.hpp.

◆ m_type

asn_TYPE_descriptor_t& vanetza::asn1::asn1c_wrapper_common< CPM_t >::m_type
protectedinherited

Definition at line 155 of file asn1c_wrapper.hpp.


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