Functions | Variables
rosbridge_library.internal.cbor_conversion Namespace Reference

Functions

def extract_cbor_values (msg)
 

Variables

list BOOL_ARRAY_TYPES = ['bool[]']
 
list BOOL_TYPES = ['bool']
 
list BYTESTREAM_TYPES = ['uint8[]', 'char[]']
 
list FLOAT_TYPES = ['float32', 'float64']
 
list INT_TYPES = ['byte', 'char', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64']
 
list LIST_TYPES = [list, tuple]
 
 PYTHON2 = sys.version_info < (3, 0)
 
list STRING_TYPES = ['string']
 
dictionary TAGGED_ARRAY_FORMATS
 
list TIME_TYPES = ['time', 'duration']
 

Function Documentation

◆ extract_cbor_values()

def rosbridge_library.internal.cbor_conversion.extract_cbor_values (   msg)
Extract a dictionary of CBOR-friendly values from a ROS message.

Primitive values will be casted to specific Python primitives.

Typed arrays will be tagged and packed into byte arrays.

Definition at line 37 of file cbor_conversion.py.

Variable Documentation

◆ BOOL_ARRAY_TYPES

list rosbridge_library.internal.cbor_conversion.BOOL_ARRAY_TYPES = ['bool[]']

Definition at line 18 of file cbor_conversion.py.

◆ BOOL_TYPES

list rosbridge_library.internal.cbor_conversion.BOOL_TYPES = ['bool']

Definition at line 16 of file cbor_conversion.py.

◆ BYTESTREAM_TYPES

list rosbridge_library.internal.cbor_conversion.BYTESTREAM_TYPES = ['uint8[]', 'char[]']

Definition at line 19 of file cbor_conversion.py.

◆ FLOAT_TYPES

list rosbridge_library.internal.cbor_conversion.FLOAT_TYPES = ['float32', 'float64']

Definition at line 14 of file cbor_conversion.py.

◆ INT_TYPES

list rosbridge_library.internal.cbor_conversion.INT_TYPES = ['byte', 'char', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64']

Definition at line 13 of file cbor_conversion.py.

◆ LIST_TYPES

list rosbridge_library.internal.cbor_conversion.LIST_TYPES = [list, tuple]

Definition at line 12 of file cbor_conversion.py.

◆ PYTHON2

rosbridge_library.internal.cbor_conversion.PYTHON2 = sys.version_info < (3, 0)

Definition at line 4 of file cbor_conversion.py.

◆ STRING_TYPES

list rosbridge_library.internal.cbor_conversion.STRING_TYPES = ['string']

Definition at line 15 of file cbor_conversion.py.

◆ TAGGED_ARRAY_FORMATS

dictionary rosbridge_library.internal.cbor_conversion.TAGGED_ARRAY_FORMATS
Initial value:
1 = {
2  'uint16[]': (69, '<{}H'),
3  'uint32[]': (70, '<{}I'),
4  'uint64[]': (71, '<{}Q'),
5  'byte[]': (72, '{}b'),
6  'int8[]': (72, '{}b'),
7  'int16[]': (77, '<{}h'),
8  'int32[]': (78, '<{}i'),
9  'int64[]': (79, '<{}q'),
10  'float32[]': (85, '<{}f'),
11  'float64[]': (86, '<{}d'),
12 }

Definition at line 23 of file cbor_conversion.py.

◆ TIME_TYPES

list rosbridge_library.internal.cbor_conversion.TIME_TYPES = ['time', 'duration']

Definition at line 17 of file cbor_conversion.py.



rosbridge_library
Author(s): Jonathan Mace
autogenerated on Fri Oct 21 2022 02:45:18