Goby3  3.1.5a
2024.05.23
goby::middleware::MarshallingScheme Struct Reference

Enumeration and helper functions for marshalling scheme identification. More...

#include <goby/middleware/marshalling/interface.h>

Public Types

enum  MarshallingSchemeEnum {
  ALL_SCHEMES = -2, NULL_SCHEME = -1, CSTR = 0, PROTOBUF = 1,
  DCCL = 2, CXX_OBJECT = 5, MAVLINK = 6, JSON = 7
}
 Marshalilng schemes implemented in Goby. More...
 

Static Public Member Functions

static std::string to_string (int e)
 Convert a known marshalling scheme to a human-readable string or an unknown scheme to the string representation of its numeric value. More...
 
static int from_string (const std::string &s)
 Convert from a string to a marshalling scheme id. More...
 

Detailed Description

Enumeration and helper functions for marshalling scheme identification.

Definition at line 45 of file interface.h.

Member Enumeration Documentation

◆ MarshallingSchemeEnum

Marshalilng schemes implemented in Goby.

Enumerator
ALL_SCHEMES 
NULL_SCHEME 
CSTR 
PROTOBUF 
DCCL 
CXX_OBJECT 
MAVLINK 
JSON 

Definition at line 48 of file interface.h.

Member Function Documentation

◆ from_string()

static int goby::middleware::MarshallingScheme::from_string ( const std::string &  s)
inlinestatic

Convert from a string to a marshalling scheme id.

Parameters
sstring representation of marshalling scheme, e.g. "PROTOBUF" or "450"
Returns
integer representation (e.g. 1 or 450).

Definition at line 77 of file interface.h.

◆ to_string()

static std::string goby::middleware::MarshallingScheme::to_string ( int  e)
inlinestatic

Convert a known marshalling scheme to a human-readable string or an unknown scheme to the string representation of its numeric value.

Parameters
eMarshalling scheme id to convert
Returns
Marshalling scheme as string (e.g. "PROTOBUF" if e == 1 or "450" if e == 450)

Definition at line 67 of file interface.h.


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