Functions | Variables
pyuavcan_v0.introspect Namespace Reference

Functions

def _to_json_compatible_object_impl (obj)
 
def _to_yaml_impl (obj, indent_level=0, parent=None, name=None, uavcan_type=None)
 
def to_json_compatible_object (obj)
 
def to_yaml (obj)
 
def value_to_constant_name (struct, field_name, keep_literal=False)
 

Variables

 blue
 
 certificate_of_authenticity
 
 getset = pyuavcan_v0.protocol.param.GetSet.Response()
 
 green
 
 info = pyuavcan_v0.protocol.GetNodeInfo.Response(name='legion')
 
 lcmd = pyuavcan_v0.equipment.indication.SingleLightCommand(light_id=123)
 
 lights = pyuavcan_v0.equipment.indication.LightsCommand()
 
 node = pyuavcan_v0.make_node('vcan0', node_id=42)
 
 red
 

Function Documentation

◆ _to_json_compatible_object_impl()

def pyuavcan_v0.introspect._to_json_compatible_object_impl (   obj)
private

Definition at line 21 of file introspect.py.

◆ _to_yaml_impl()

def pyuavcan_v0.introspect._to_yaml_impl (   obj,
  indent_level = 0,
  parent = None,
  name = None,
  uavcan_type = None 
)
private

Definition at line 114 of file introspect.py.

◆ to_json_compatible_object()

def pyuavcan_v0.introspect.to_json_compatible_object (   obj)
This function returns a representation of a UAVCAN structure (message, request, or response), or
a DSDL entity (array or primitive), or a UAVCAN transfer, as a structure easily able to be
transformed into json or json-like serialization
Args:
    obj:            Object to convert.

Returns: structure which can easily be transformed into a json-like serialization

Definition at line 77 of file introspect.py.

◆ to_yaml()

def pyuavcan_v0.introspect.to_yaml (   obj)
This function returns correct YAML representation of a UAVCAN structure (message, request, or response), or
a DSDL entity (array or primitive), or a UAVCAN transfer, with comments for human benefit.
Args:
    obj:            Object to convert.

Returns: Unicode string containing YAML representation of the object.

Definition at line 203 of file introspect.py.

◆ value_to_constant_name()

def pyuavcan_v0.introspect.value_to_constant_name (   struct,
  field_name,
  keep_literal = False 
)
This function accepts a UAVCAN struct (message, request, or response), and a field name; and returns
the name of constant or bit mask that match the value. If no match could be established, the literal
value will be returned as is.
Args:
    struct:         UAVCAN struct to work with
    field_name:     Name of the field to work with
    keep_literal:   Whether to include the input integer value in the output string

Returns: Name of the constant or flags if match could be detected, otherwise integer as is.

Definition at line 236 of file introspect.py.

Variable Documentation

◆ blue

pyuavcan_v0.introspect.blue

Definition at line 341 of file introspect.py.

◆ certificate_of_authenticity

pyuavcan_v0.introspect.certificate_of_authenticity

Definition at line 334 of file introspect.py.

◆ getset

pyuavcan_v0.introspect.getset = pyuavcan_v0.protocol.param.GetSet.Response()

Definition at line 350 of file introspect.py.

◆ green

pyuavcan_v0.introspect.green

Definition at line 340 of file introspect.py.

◆ info

pyuavcan_v0.introspect.info = pyuavcan_v0.protocol.GetNodeInfo.Response(name='legion')

Definition at line 333 of file introspect.py.

◆ lcmd

pyuavcan_v0.introspect.lcmd = pyuavcan_v0.equipment.indication.SingleLightCommand(light_id=123)

Definition at line 338 of file introspect.py.

◆ lights

pyuavcan_v0.introspect.lights = pyuavcan_v0.equipment.indication.LightsCommand()

Definition at line 337 of file introspect.py.

◆ node

pyuavcan_v0.introspect.node = pyuavcan_v0.make_node('vcan0', node_id=42)

Definition at line 398 of file introspect.py.

◆ red

pyuavcan_v0.introspect.red

Definition at line 339 of file introspect.py.



uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:04