DUNE: Uniform Navigational Environment  2.4.2
DUNE::IMC::MessageList< Type > Class Template Reference

Detailed Description

template<typename Type>
class DUNE::IMC::MessageList< Type >

Message list.

Public Types

typedef std::vector< Type * >
::const_iterator 
const_iterator
 

Public Member Functions

 MessageList (void)
 
 MessageList (const MessageList &other)
 
 ~MessageList (void)
 
void setParent (const Message *parent)
 
void clear (void)
 
size_t size (void) const
 
const_iterator begin (void) const
 
const_iterator end (void) const
 
void push_back (const Type &msg)
 
void push_back (const Type *msg)
 
unsigned getSerializationSize (void) const
 
MessageListoperator= (const MessageList &other)
 
bool operator== (const MessageList &other) const
 
bool operator!= (const MessageList &other) const
 
uint16_t serialize (uint8_t *bfr) const
 
uint16_t deserialize (const uint8_t *bfr, uint16_t &bfr_len)
 
uint16_t reverseDeserialize (const uint8_t *bfr, uint16_t &bfr_len)
 
void toJSON (std::ostream &os, const char *label, unsigned nindent, char prefix= ',') const
 
void setTimeStamp (double value)
 
void setSource (uint16_t value)
 
void setSourceEntity (uint8_t value)
 
void setDestination (uint16_t value)
 
void setDestinationEntity (uint8_t value)
 

Member Typedef Documentation

template<typename Type>
typedef std::vector<Type*>::const_iterator DUNE::IMC::MessageList< Type >::const_iterator

Constructor & Destructor Documentation

template<typename Type>
DUNE::IMC::MessageList< Type >::MessageList ( void  )
inline

Default constructor.

template<typename Type>
DUNE::IMC::MessageList< Type >::MessageList ( const MessageList< Type > &  other)
inline

Copy constructor.

Copy the contents of other to this instance.

Parameters
[in]othermessage.
template<typename Type>
DUNE::IMC::MessageList< Type >::~MessageList ( void  )
inline

Default destructor.

Member Function Documentation

template<typename Type>
const_iterator DUNE::IMC::MessageList< Type >::begin ( void  ) const
inline

Return an iterator referring to the first element in the list container.

Returns
iterator.
template<typename Type>
void DUNE::IMC::MessageList< Type >::clear ( void  )
inline

All the elements of the list are deleted: their destructors are called, and then they are removed from the vector container, leaving the container with a size of 0.

Referenced by DUNE::IMC::MessageList< DUNE::IMC::PathPoint >::~MessageList().

template<typename Type>
uint16_t DUNE::IMC::MessageList< Type >::deserialize ( const uint8_t *  bfr,
uint16_t &  bfr_len 
)
inline

Deserialize message from byte buffer.

Parameters
[in]bfrbuffer.
[in]bfr_lenbuffer size.
Returns
amount of deserialized bytes.
template<typename Type>
const_iterator DUNE::IMC::MessageList< Type >::end ( void  ) const
inline

Returns an iterator referring to the past-the-end element in the list container.

Returns
iterator.
template<typename Type>
unsigned DUNE::IMC::MessageList< Type >::getSerializationSize ( void  ) const
inline

Retrieve the amount of bytes needed to serialize the object.

Returns
amount of bytes needed for serialization.

Referenced by DUNE::IMC::MessageList< DUNE::IMC::PathPoint >::serialize().

template<typename Type>
bool DUNE::IMC::MessageList< Type >::operator!= ( const MessageList< Type > &  other) const
inline

Compare two instances for inequality.

Parameters
[in]otherobject to compare.
Returns
true if objects are not equal, false otherwise.
template<typename Type>
MessageList& DUNE::IMC::MessageList< Type >::operator= ( const MessageList< Type > &  other)
inline

Assignment operator.

Replace the contents of 'this' instance with the contents of 'other'.

Parameters
[in]othermessage.
Returns
reference to this object.
template<typename Type>
bool DUNE::IMC::MessageList< Type >::operator== ( const MessageList< Type > &  other) const
inline

Compare two instances for equality.

Parameters
[in]otherobject to compare.
Returns
true if objects are equal, false otherwise.
template<typename Type>
void DUNE::IMC::MessageList< Type >::push_back ( const Type &  msg)
inline

Add a new element at the end of the list, after its current last element.

The content of this new element is initialized to a copy of 'msg'.

Parameters
[in]msgmessage.

Referenced by DUNE::Parsers::PlanConfigParser::parse(), DUNE::Parsers::PlanConfigParser::parseActions(), and DUNE::IMC::MessageList< DUNE::IMC::PathPoint >::push_back().

template<typename Type>
void DUNE::IMC::MessageList< Type >::push_back ( const Type *  msg)
inline

Add a new element at the end of the list, after its current last element.

The content of this new element is initialized to 'msg'.

Parameters
[in]msgpointer to message.
template<typename Type>
uint16_t DUNE::IMC::MessageList< Type >::reverseDeserialize ( const uint8_t *  bfr,
uint16_t &  bfr_len 
)
inline
template<typename Type>
uint16_t DUNE::IMC::MessageList< Type >::serialize ( uint8_t *  bfr) const
inline

Serialize instance.

Parameters
[in]bfrbuffer.
Returns
amount of bytes used.
template<typename Type>
void DUNE::IMC::MessageList< Type >::setDestination ( uint16_t  value)
inline
template<typename Type>
void DUNE::IMC::MessageList< Type >::setDestinationEntity ( uint8_t  value)
inline
template<typename Type>
void DUNE::IMC::MessageList< Type >::setParent ( const Message parent)
inline

Set the parent of the message list.

This object will be used to synchronize the header fields of the messages in the list.

Parameters
[in]parentmessage list parent.
template<typename Type>
void DUNE::IMC::MessageList< Type >::setSource ( uint16_t  value)
inline
template<typename Type>
void DUNE::IMC::MessageList< Type >::setSourceEntity ( uint8_t  value)
inline
template<typename Type>
void DUNE::IMC::MessageList< Type >::setTimeStamp ( double  value)
inline
template<typename Type>
size_t DUNE::IMC::MessageList< Type >::size ( void  ) const
inline

Retrieve the number of elements in this list.

Returns
number of elements in the list.

Referenced by DUNE::IMC::MessageList< DUNE::IMC::PathPoint >::operator==().

template<typename Type>
void DUNE::IMC::MessageList< Type >::toJSON ( std::ostream &  os,
const char *  label,
unsigned  nindent,
char  prefix = ',' 
) const
inline
Collaboration diagram for DUNE::IMC::MessageList< Type >:
Collaboration graph