Global Namespace

Overview

// namespaces

namespace callback_internal;
    namespace callback_internal::Callback_forced_args_helper;
namespace std;
namespace ugcs;
    namespace ugcs::vsm;
        namespace ugcs::vsm::callback_internal;
        namespace ugcs::vsm::internal;
        namespace ugcs::vsm::java_internals;
        namespace ugcs::vsm::mavlink;
            namespace ugcs::vsm::mavlink::internal;
        namespace ugcs::vsm::param_setter_internal;
        namespace ugcs::vsm::sockets;

// structs

struct glob_t;

// classes

class Adsb_vehicle;

// global functions

Bo_value(T value = 0);
Bo_value& operator = (T value);
operator T () const;
T Get() const;
static T Get(const void* buffer);
static void Set(void* buffer, const T value);
__BEGIN_DECLS int glob __P((const char*, int, int(*)(const char*, int), glob_t*));
void globfree __P((glob_t*));
Value(T value = initial_value);
Value& operator = (T value);
operator T () const;
T Get() const;
constexpr Field_type_id Get_type_id();
void Reset();
bool Is_reset() const;
TValue& operator [] (size_t index);
size_t Get_length() const;
std::string Get_string() const;
bool operator == (const char* str);
bool operator != (const char* str);
Value_array& operator = (const char* str);
Value_array& operator = (const std::string& str);

// macros

#define ASSERT_IMPL(cond_str)
#define CREATE_COMMIT_SCOPE

#define DEFINE_CALLBACK_BUILDER( \
    __name, \
    __types, \
    __values \
    )

#define DEFINE_CALLBACK_BUILDER_TEMPLATE( \
    __name, \
    __template, \
    __types, \
    __values \
    )

#define DEFINE_COMMON_CLASS( \
    __class_name, \
    ... \
    )

#define DEFINE_DEFAULT_VSM_NAME
#define DEFINE_VSM_NAME(x)

#define DEVICE_LOG( \
    level_, \
    vehicle_, \
    fmt_, \
    ... \
    )

#define DEVICE_LOG_DBG( \
    vehicle_, \
    fmt_, \
    ... \
    )

#define DEVICE_LOG_ERR( \
    vehicle_, \
    fmt_, \
    ... \
    )

#define DEVICE_LOG_INF( \
    vehicle_, \
    fmt_, \
    ... \
    )

#define DEVICE_LOG_WRN( \
    vehicle_, \
    fmt_, \
    ... \
    )

#define FD_SETSIZE
#define GLOB_ABEND
#define GLOB_ALTDIRFUNC
#define GLOB_APPEND
#define GLOB_BRACE
#define GLOB_DOOFFS
#define GLOB_ERR
#define GLOB_MAGCHAR
#define GLOB_MARK
#define GLOB_NOCHECK
#define GLOB_NOMAGIC
#define GLOB_NOSORT
#define GLOB_NOSPACE
#define GLOB_QUOTE
#define GLOB_TILDE
#define INVALID_SOCKET
#define INVALID_SOCKET

#define JAVA_DEF_METHOD_SELECTOR( \
    __type, \
    __name \
    )

#define JAVA_EXCEPTION_CHECK(__env)
#define LINE_TERMINATOR
#define LINE_TERMINATOR
#define LOG
#define LOG_DBG

#define LOG_DEBUG( \
    msg, \
    ... \
    )

#define LOG_ERR

#define LOG_ERROR( \
    msg, \
    ... \
    )

#define LOG_INFO( \
    msg, \
    ... \
    )

#define LOG_WARN

#define LOG_WARNING( \
    msg, \
    ... \
    )

#define M_PI
#define M_PI_2
#define PATH_SEPARATOR
#define PATH_SEPARATOR
#define SOCKET_ERROR
#define SOCKET_ERROR

#define VEHICLE_LOG( \
    level_, \
    vehicle_, \
    fmt_, \
    ... \
    )

#define VEHICLE_LOG_DBG( \
    vehicle_, \
    fmt_, \
    ... \
    )

#define VEHICLE_LOG_ERR( \
    vehicle_, \
    fmt_, \
    ... \
    )

#define VEHICLE_LOG_INF( \
    vehicle_, \
    fmt_, \
    ... \
    )

#define VEHICLE_LOG_WRN( \
    vehicle_, \
    fmt_, \
    ... \
    )

#define VERIFY( \
    x, \
    expected \
    )

#define VSM_BSWAP16(x)
#define VSM_BSWAP32(x)
#define VSM_BSWAP64(x)

#define VSM_DEFINE_DERIVED_EXCEPTION( \
    __base_class, \
    __exc_class \
    )

#define VSM_DEFINE_EXCEPTION( \
    __exc_class, \
    ... \
    )

#define VSM_DEF_BO_CONV(type_size)

#define VSM_EXCEPTION( \
    __exc_class, \
    __msg, \
    ... \
    )

#define VSM_PARAM_EXCEPTION( \
    __exc_class, \
    __param, \
    __msg, \
    ... \
    )

#define VSM_SYS_EXCEPTION( \
    __msg, \
    ... \
    )

#define _LOG_WRITE_MSG( \
    level, \
    msg, \
    ... \
    )

#define _VSM_DEF_BO_CONV( \
    type_size, \
    type_name \
    )

#define __JAVA_CONCAT( \
    x, \
    y \
    )

#define __JAVA_CONCAT_( \
    x, \
    y \
    )

#define __PACKED
#define __UNPACK_PARAMS(...)
#define __UNUSED
#define __VSM_BO_INT(type_size)
#define __VSM_BO_UINT(type_size)

Detailed Documentation

Global Functions

Bo_value(T value = 0)

Construct value.

Parameters:

value

Value in host byte order.

Bo_value& operator = (T value)

Assign new value.

Parameters:

value

Value in host byte order.

operator T () const

Cast to underlying type.

Returns:

Value in host byte order.

T Get() const

Get the value of underlying type.

Returns:

Value in host byte order.

static T Get(const void* buffer)

Interpret byte buffer as a storage for underlying type and return host byte order value.

Caller is responsible for the size of the input buffer.

Parameters:

buffer

Input buffer with original value.

Returns:

Value in host byte order.

static void Set(void* buffer, const T value)

Save value given in host order to byte buffer.

Caller is responsible for the size of the buffer.

Parameters:

buffer

Output buffer to save value to.

value

value in host byte order.

Construct value.

Parameters:

value

Value in host byte order.

Assign new value.

Parameters:

value

Value in host byte order.

Cast to underlying type.

Returns:

Value in host byte order.

Get the value of underlying type.

Returns:

Value in host byte order.

Get type ID for this value.

Reset to default value used in UgCS as a “not present” indication.

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

Reset all array values to UgCS default values.

Check, if the field is reset.

Access operator.

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.

Get string value for the characters array.

Compare with string.

Compare with string.

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:

str

String to assign.

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:

str

String to assign.

Macros

#define ASSERT_IMPL(cond_str)

Assertion action which is done when assertion fires.

Parameters:

cond_str

Stringified condition expression.

#define DEFINE_CALLBACK_BUILDER(__name, __types, __values)

Define callback builder function.

Use when forced arguments required. Usage example:

DEFINE_CALLBACK_BUILDER(Make_data_handler,
                        (ugcs::vsm::Io_result, ugcs::vsm::Io_buffer::Ptr),
                        (ugcs::vsm::Io_result::OK, nullptr));

Parameters:

__name

Name for a created function.

__types

Types of forced arguments (parenthesis-enclosed comma-separated list).

__values

Initial values for the forced arguments (parenthesis-enclosed comma-separated list).

#define DEFINE_CALLBACK_BUILDER_TEMPLATE(__name, __template, __types, __values)

The same as DEFINE_CALLBACK_BUILDER, but allows specifying additional template parameters for builders which arguments depend on templates.

Parameters:

__name

See DEFINE_CALLBACK_BUILDER

__template

Additional template parameters (parenthesis-enclosed comma-separated list).

__types

See DEFINE_CALLBACK_BUILDER

__values

See DEFINE_CALLBACK_BUILDER

#define DEFINE_COMMON_CLASS(__class_name, ...)

Use this macro to define some common attributes for a class.

Parameters:

__class_name

Name for the class being defined.

Name of the class used as a template parameter when deriving from std::enable_shared_from_this.

#define DEVICE_LOG(level_, vehicle_, fmt_, ...)

Convenience vehicle logging macro.

Vehicle should be given by value (no copies will be made).

#define DEVICE_LOG_DBG(vehicle_, fmt_, ...)

Different level convenience vehicle logging macros.

Vehicle should be given by value (no copies will be made).

#define LINE_TERMINATOR

Characters sequence used as line terminator in text streams.

#define LINE_TERMINATOR

Characters sequence used as line terminator in text streams.

#define LOG

Short name.

#define LOG_DBG

Short name.

#define LOG_DEBUG(msg, ...)

Write debug message to the application log.

#define LOG_ERR

Short name.

#define LOG_ERROR(msg, ...)

Write error message to the application log.

#define LOG_INFO(msg, ...)

Write informational message to the application log.

#define LOG_WARN

Short name.

#define LOG_WARNING(msg, ...)

Write warning message to the application log.

#define PATH_SEPARATOR

Symbol used as file-system path separator on a target platform.

#define PATH_SEPARATOR

Symbol used as file-system path separator on a target platform.

#define VEHICLE_LOG(level_, vehicle_, fmt_, ...)

Convenience vehicle logging macro.

Vehicle should be given by value (no copies will be made).

#define VEHICLE_LOG_DBG(vehicle_, fmt_, ...)

Different level convenience vehicle logging macros.

Vehicle should be given by value (no copies will be made).

#define VERIFY(x, expected)

Evaluate in release, but don’t compare.

#define VSM_BSWAP16(x)

Swap bytes in 16-bits integer value.

#define VSM_BSWAP32(x)

Swap bytes in 32-bits integer value.

#define VSM_BSWAP64(x)

Swap bytes in 64-bits integer value.

#define VSM_DEFINE_DERIVED_EXCEPTION(__base_class, __exc_class)

Define custom derived exception.

Parameters:

__base_class

Type of base exception class.

__exc_class

Name for new exception type.

#define VSM_DEFINE_EXCEPTION(__exc_class, ...)

Define custom exception type.

Parameters:

__exc_class

Name for new exception type.

Parameter type can be specified as second argument.

See also:

Param_exception

#define VSM_EXCEPTION(__exc_class, __msg, ...)

Throw VSM exception instance.

Parameters:

__exc_class

Exception class name.

__msg

Formatted description message.

Message format parameters.

#define VSM_PARAM_EXCEPTION(__exc_class, __param, __msg, ...)

Throw VSM exception instance with parameter.

Parameters:

__exc_class

Exception class name.

__param

Parameter value.

__msg

Formatted description message.

Message format parameters.

#define VSM_SYS_EXCEPTION(__msg, ...)

Throw VSM system exception - i.e.

the one caused by system call failure. Special handling is required because system error code might be overwritten by exception allocation functions, so it must be taken as soon as possible.

Parameters:

__msg

Descriptive message of the failure context.

Message format parameters.

#define _LOG_WRITE_MSG(level, msg, ...)

Write message to log.

For internal usage only.

#define __PACKED

Pack structure or class, i.e.

do not allow the compiler to insert paddings for members alignment.

#define __UNPACK_PARAMS(...)

Internal helper for unpacking parenthesis-enclosed parameters lists.

#define __UNUSED

Use with unused arguments if you like to declare that it is not (yet) used a the function.

#define __VSM_BO_INT(type_size)

Definitions for byte order conversions for all integer types.