Vanetza
 
Loading...
Searching...
No Matches
vanetza::asn1::asn1c_per_wrapper< T > Class Template Reference
Inheritance diagram for vanetza::asn1::asn1c_per_wrapper< T >:

Public Types

using base = asn1c_wrapper_common< T >
 
typedef T asn1c_type
 

Public Member Functions

ByteBuffer encode () const
 
bool decode (const ByteBuffer &buffer)
 
bool decode (ByteBuffer::const_iterator begin, ByteBuffer::const_iterator end)
 
bool decode (const void *buffer, std::size_t len)
 
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 validate () const
 
bool validate (std::string &error) const
 
void swap (asn1c_wrapper_common &other) noexcept
 

Protected Attributes

asn1c_type * m_struct
 
asn_TYPE_descriptor_t & m_type
 

Detailed Description

template<class T>
class vanetza::asn1::asn1c_per_wrapper< T >

Definition at line 119 of file asn1c_wrapper.hpp.

Member Typedef Documentation

◆ asn1c_type

template<class T >
typedef T vanetza::asn1::asn1c_wrapper_common< T >::asn1c_type
inherited

Definition at line 41 of file asn1c_wrapper.hpp.

◆ base

template<class T >
using vanetza::asn1::asn1c_per_wrapper< T >::base = asn1c_wrapper_common<T>

Definition at line 122 of file asn1c_wrapper.hpp.

Member Function Documentation

◆ content() [1/2]

template<class T >
asn1c_type * vanetza::asn1::asn1c_wrapper_common< T >::content ( )
inlineinherited

Definition at line 74 of file asn1c_wrapper.hpp.

◆ content() [2/2]

template<class T >
const asn1c_type * vanetza::asn1::asn1c_wrapper_common< T >::content ( ) const
inlineinherited

Definition at line 73 of file asn1c_wrapper.hpp.

◆ decode() [1/3]

template<class T >
bool vanetza::asn1::asn1c_per_wrapper< T >::decode ( ByteBuffer::const_iterator  begin,
ByteBuffer::const_iterator  end 
)
inline

Definition at line 144 of file asn1c_wrapper.hpp.

◆ decode() [2/3]

template<class T >
bool vanetza::asn1::asn1c_per_wrapper< T >::decode ( const ByteBuffer &  buffer)
inline

Try to decode ASN.1 struct from byte buffer

Parameters
bufferinput data
Returns
true if decoding has been successful

Definition at line 139 of file asn1c_wrapper.hpp.

◆ decode() [3/3]

template<class T >
bool vanetza::asn1::asn1c_per_wrapper< T >::decode ( const void *  buffer,
std::size_t  len 
)
inline

Definition at line 149 of file asn1c_wrapper.hpp.

◆ encode()

template<class T >
ByteBuffer vanetza::asn1::asn1c_per_wrapper< T >::encode ( ) const
inline

Encode ASN.1 struct into byte buffer

Returns
byte buffer containing serialized ASN.1 struct

Definition at line 129 of file asn1c_wrapper.hpp.

◆ operator*() [1/2]

template<class T >
asn1c_type & vanetza::asn1::asn1c_wrapper_common< T >::operator* ( )
inlineinherited

Definition at line 67 of file asn1c_wrapper.hpp.

◆ operator*() [2/2]

template<class T >
const asn1c_type & vanetza::asn1::asn1c_wrapper_common< T >::operator* ( ) const
inlineinherited

Definition at line 69 of file asn1c_wrapper.hpp.

◆ operator->() [1/2]

template<class T >
asn1c_type * vanetza::asn1::asn1c_wrapper_common< T >::operator-> ( )
inlineinherited

Definition at line 68 of file asn1c_wrapper.hpp.

◆ operator->() [2/2]

template<class T >
const asn1c_type * vanetza::asn1::asn1c_wrapper_common< T >::operator-> ( ) const
inlineinherited

Definition at line 70 of file asn1c_wrapper.hpp.

◆ size()

template<class T >
std::size_t vanetza::asn1::asn1c_per_wrapper< T >::size ( ) const
inline

Get size of encoded ASN.1 struct

Returns
size in bytes

Definition at line 158 of file asn1c_wrapper.hpp.

◆ swap()

template<class T >
void vanetza::asn1::asn1c_wrapper_common< T >::swap ( asn1c_wrapper_common< T > &  other)
inlinenoexceptinherited

Swap ASN.1 wrapper content

Parameters
otherwrapper

Definition at line 100 of file asn1c_wrapper.hpp.

◆ validate() [1/2]

template<class T >
bool vanetza::asn1::asn1c_wrapper_common< T >::validate ( ) const
inlineinherited

Check ASN.1 constraints

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

Definition at line 81 of file asn1c_wrapper.hpp.

◆ validate() [2/2]

template<class T >
bool vanetza::asn1::asn1c_wrapper_common< 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 91 of file asn1c_wrapper.hpp.

Member Data Documentation

◆ m_struct

template<class T >
asn1c_type* vanetza::asn1::asn1c_wrapper_common< T >::m_struct
protectedinherited

Definition at line 107 of file asn1c_wrapper.hpp.

◆ m_type

template<class T >
asn_TYPE_descriptor_t& vanetza::asn1::asn1c_wrapper_common< T >::m_type
protectedinherited

Definition at line 108 of file asn1c_wrapper.hpp.


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