VSM C++ SDK
Vehicle Specific Modules SDK
ugcs::vsm::mavlink::Value_array< Char, size > Class Template Reference

Partial specialization for characters array so it can be conveniently used with string semantic. More...

#include <mavlink.h>

Public Member Functions

Charoperator[] (size_t index)
 Access operator. More...
 
size_t Get_length () const
 Get string length. More...
 
std::string Get_string () const
 Get string value for the characters array. More...
 
void Reset ()
 Reset all array values to UgCS default values (zeros for string). More...
 
bool operator== (const char *str)
 Compare with string. More...
 
bool operator!= (const char *str)
 Compare with string. More...
 
Value_arrayoperator= (const char *str)
 Assign string to the characters array. More...
 
Value_arrayoperator= (const std::string &str)
 Assign string to the characters array. More...
 

Detailed Description

template<size_t size>
class ugcs::vsm::mavlink::Value_array< Char, size >

Partial specialization for characters array so it can be conveniently used with string semantic.

Member Function Documentation

template<size_t size>
size_t ugcs::vsm::mavlink::Value_array< Char, size >::Get_length ( ) const
inline

Get string length.

In MAVLink character string may be NULL terminated or may not be if it fully occupies the array.

Returns
String length in bytes.
template<size_t size>
std::string ugcs::vsm::mavlink::Value_array< Char, size >::Get_string ( ) const
inline

Get string value for the characters array.

template<size_t size>
bool ugcs::vsm::mavlink::Value_array< Char, size >::operator!= ( const char *  str)
inline

Compare with string.

template<size_t size>
Value_array& ugcs::vsm::mavlink::Value_array< Char, size >::operator= ( const char *  str)
inline

Assign string to the characters array.

In case the string exceeds the array size it is truncated without terminated NULL character (as per MAVLink strings description).

Parameters
strString to assign.
template<size_t size>
Value_array& ugcs::vsm::mavlink::Value_array< Char, size >::operator= ( const std::string &  str)
inline

Assign string to the characters array.

In case the string exceeds the array size it is truncated without terminated NULL character (as per MAVLink strings description).

Parameters
strString to assign.
template<size_t size>
bool ugcs::vsm::mavlink::Value_array< Char, size >::operator== ( const char *  str)
inline

Compare with string.

template<size_t size>
Char& ugcs::vsm::mavlink::Value_array< Char, size >::operator[] ( size_t  index)
inline

Access operator.

template<size_t size>
void ugcs::vsm::mavlink::Value_array< Char, size >::Reset ( )
inline

Reset all array values to UgCS default values (zeros for string).


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