Classes | Functions | Variables
rosbridge_library.internal.message_conversion Namespace Reference

Classes

class  FieldTypeMismatchException
 
class  InvalidMessageException
 
class  NonexistentFieldException
 

Functions

def _from_inst (inst, rostype)
 
def _from_list_inst (inst, rostype)
 
def _from_object_inst (inst, rostype)
 
def _to_binary_inst (msg)
 
def _to_inst (msg, rostype, roottype, inst=None, stack=[])
 
def _to_list_inst (msg, rostype, roottype, inst, stack)
 
def _to_object_inst (msg, rostype, roottype, inst, stack)
 
def _to_primitive_inst (msg, rostype, roottype, stack)
 
def _to_time_inst (msg, rostype, inst=None)
 
def extract_values (inst)
 
def get_encoder ()
 
def populate_instance (msg, inst)
 

Variables

 binary_encoder = None
 
 bson_only_mode = None
 
 list_braces = re.compile(r'\[[^\]]*\]')
 
list list_types = [list, tuple]
 
list primitive_types = [bool, int, float]
 
bool python2 = False
 
list ros_binary_types = ["uint8[]", "char[]"]
 
list ros_binary_types_list_braces
 
list ros_header_types = ["Header", "std_msgs/Header", "roslib/Header"]
 
list ros_primitive_types
 
list ros_time_types = ["time", "duration"]
 
dictionary type_map
 

Function Documentation

◆ _from_inst()

def rosbridge_library.internal.message_conversion._from_inst (   inst,
  rostype 
)
private

Definition at line 133 of file message_conversion.py.

◆ _from_list_inst()

def rosbridge_library.internal.message_conversion._from_list_inst (   inst,
  rostype 
)
private

Definition at line 162 of file message_conversion.py.

◆ _from_object_inst()

def rosbridge_library.internal.message_conversion._from_object_inst (   inst,
  rostype 
)
private

Definition at line 178 of file message_conversion.py.

◆ _to_binary_inst()

def rosbridge_library.internal.message_conversion._to_binary_inst (   msg)
private

Definition at line 212 of file message_conversion.py.

◆ _to_inst()

def rosbridge_library.internal.message_conversion._to_inst (   msg,
  rostype,
  roottype,
  inst = None,
  stack = [] 
)
private

Definition at line 187 of file message_conversion.py.

◆ _to_list_inst()

def rosbridge_library.internal.message_conversion._to_list_inst (   msg,
  rostype,
  roottype,
  inst,
  stack 
)
private

Definition at line 259 of file message_conversion.py.

◆ _to_object_inst()

def rosbridge_library.internal.message_conversion._to_object_inst (   msg,
  rostype,
  roottype,
  inst,
  stack 
)
private

Definition at line 275 of file message_conversion.py.

◆ _to_primitive_inst()

def rosbridge_library.internal.message_conversion._to_primitive_inst (   msg,
  rostype,
  roottype,
  stack 
)
private

Definition at line 249 of file message_conversion.py.

◆ _to_time_inst()

def rosbridge_library.internal.message_conversion._to_time_inst (   msg,
  rostype,
  inst = None 
)
private

Definition at line 225 of file message_conversion.py.

◆ extract_values()

def rosbridge_library.internal.message_conversion.extract_values (   inst)

Definition at line 120 of file message_conversion.py.

◆ get_encoder()

def rosbridge_library.internal.message_conversion.get_encoder ( )

Definition at line 87 of file message_conversion.py.

◆ populate_instance()

def rosbridge_library.internal.message_conversion.populate_instance (   msg,
  inst 
)
Returns an instance of the provided class, with its fields populated
according to the values in msg 

Definition at line 127 of file message_conversion.py.

Variable Documentation

◆ binary_encoder

rosbridge_library.internal.message_conversion.binary_encoder = None

Definition at line 84 of file message_conversion.py.

◆ bson_only_mode

rosbridge_library.internal.message_conversion.bson_only_mode = None

Definition at line 85 of file message_conversion.py.

◆ list_braces

rosbridge_library.internal.message_conversion.list_braces = re.compile(r'\[[^\]]*\]')

Definition at line 80 of file message_conversion.py.

◆ list_types

list rosbridge_library.internal.message_conversion.list_types = [list, tuple]

Definition at line 73 of file message_conversion.py.

◆ primitive_types

list rosbridge_library.internal.message_conversion.primitive_types = [bool, int, float]

Definition at line 57 of file message_conversion.py.

◆ python2

bool rosbridge_library.internal.message_conversion.python2 = False

Definition at line 58 of file message_conversion.py.

◆ ros_binary_types

list rosbridge_library.internal.message_conversion.ros_binary_types = ["uint8[]", "char[]"]

Definition at line 79 of file message_conversion.py.

◆ ros_binary_types_list_braces

list rosbridge_library.internal.message_conversion.ros_binary_types_list_braces
Initial value:
1 = [("uint8[]", re.compile(r'uint8\[[^\]]*\]')),
2  ("char[]", re.compile(r'char\[[^\]]*\]'))]

Definition at line 81 of file message_conversion.py.

◆ ros_header_types

list rosbridge_library.internal.message_conversion.ros_header_types = ["Header", "std_msgs/Header", "roslib/Header"]

Definition at line 78 of file message_conversion.py.

◆ ros_primitive_types

list rosbridge_library.internal.message_conversion.ros_primitive_types
Initial value:
1 = ["bool", "byte", "char", "int8", "uint8", "int16",
2  "uint16", "int32", "uint32", "int64", "uint64",
3  "float32", "float64", "string"]

Definition at line 75 of file message_conversion.py.

◆ ros_time_types

list rosbridge_library.internal.message_conversion.ros_time_types = ["time", "duration"]

Definition at line 74 of file message_conversion.py.

◆ type_map

dictionary rosbridge_library.internal.message_conversion.type_map
Initial value:
1 = {
2  "bool": ["bool"],
3  "int": ["int8", "byte", "uint8", "char",
4  "int16", "uint16", "int32", "uint32",
5  "int64", "uint64", "float32", "float64"],
6  "float": ["float32", "float64"],
7  "str": ["string"]
8  }

Definition at line 49 of file message_conversion.py.



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