clearpath_config.platform.can module

class clearpath_config.platform.can.CANAdapter(type_: str)

Bases: object

TYPES = {'physical': <class 'clearpath_config.platform.can.PhysicalCANAdapter'>, 'serial': <class 'clearpath_config.platform.can.SerialCANAdapter'>, 'virtual': <class 'clearpath_config.platform.can.VirtualCANAdapter'>}
class clearpath_config.platform.can.CANAdapterConfig(config: dict = {})

Bases: object

DEFAULTS = {'a200': [], 'a300': [{'baud': 's8', 'can_dev': 'vcan0', 'port': 11412, 'serial_dev': '/dev/ttycan0', 'type': 'virtual'}, {'baud': 's5', 'can_dev': 'vcan1', 'port': 11413, 'serial_dev': '/dev/ttycan1', 'type': 'virtual'}], 'dd100': [{'baud': 's8', 'can_dev': 'vcan0', 'port': 11412, 'serial_dev': '/dev/ttycan0', 'type': 'virtual'}], 'dd150': [{'baud': 's8', 'can_dev': 'vcan0', 'port': 11412, 'serial_dev': '/dev/ttycan0', 'type': 'virtual'}], 'do100': [{'baud': 's8', 'can_dev': 'vcan0', 'port': 11412, 'serial_dev': '/dev/ttycan0', 'type': 'virtual'}], 'do150': [{'baud': 's8', 'can_dev': 'vcan0', 'port': 11412, 'serial_dev': '/dev/ttycan0', 'type': 'virtual'}], 'generic': [], 'j100': [], 'r100': [{'baud': 's8', 'can_dev': 'vcan0', 'port': 11412, 'serial_dev': '/dev/ttycan0', 'type': 'virtual'}], 'w200': []}
VCAN0_DEFAULT = {'baud': 's8', 'can_dev': 'vcan0', 'port': 11412, 'serial_dev': '/dev/ttycan0', 'type': 'virtual'}
VCAN1_DEFAULT = {'baud': 's5', 'can_dev': 'vcan1', 'port': 11413, 'serial_dev': '/dev/ttycan1', 'type': 'virtual'}
property config
get_all() List[PhysicalCANAdapter]
update(serial_number: bool = False) None
class clearpath_config.platform.can.CANAdapterListConfig

Bases: ListConfig[PhysicalCANAdapter, str]

class clearpath_config.platform.can.CANBridge(interface: str = 'can0', enable_can_fd: bool = False, interval: float = 0.01, use_bus_time: bool = False, filters: str = '0:0', auto_configure: bool = True, auto_activate: bool = True, topic_rx: str = 'can0/rx', topic_tx: str = 'can0/tx', timeout: float = 5.0, transition_attempts: int = 3)

Bases: object

AUTO_ACTIVATE = 'auto_activate'
AUTO_CONFIGURE = 'auto_configure'
DEFAULTS = {'auto_activate': True, 'auto_configure': True, 'enable_can_fd': False, 'filters': '0:0', 'interface': 'can0', 'interval': 0.01, 'timeout': 5.0, 'topic_rx': 'can0/rx', 'topic_tx': 'can0/tx', 'transition_attempts': 3, 'use_bus_time': False}
ENABLE_CAN_FD = 'enable_can_fd'
FILTERS = 'filters'
INTERFACE = 'interface'
INTERVAL = 'interval'
TIMEOUT = 'timeout'
TOPIC_RX = 'topic_rx'
TOPIC_TX = 'topic_tx'
TRANSITION_ATTEMPTS = 'transition_attempts'
USE_BUS_TIME = 'use_bus_time'
from_dict(d: dict) None
property interface: str
to_dict() dict
class clearpath_config.platform.can.CANBridgeConfig(config: dict = {})

Bases: object

A300_DEFAULT = [{'auto_activate': True, 'auto_configure': True, 'enable_can_fd': False, 'filters': '0:0', 'interface': 'vcan0', 'interval': 0.01, 'timeout': 5.0, 'transition_attempts': 3, 'use_bus_time': False}]
DEFAULTS = {'a200': [], 'a300': [{'auto_activate': True, 'auto_configure': True, 'enable_can_fd': False, 'filters': '0:0', 'interface': 'vcan0', 'interval': 0.01, 'timeout': 5.0, 'transition_attempts': 3, 'use_bus_time': False}], 'dd100': [{'auto_activate': True, 'auto_configure': True, 'enable_can_fd': False, 'filters': '0:0', 'interface': 'vcan0', 'interval': 0.01, 'timeout': 5.0, 'transition_attempts': 3, 'use_bus_time': False}], 'dd150': [{'auto_activate': True, 'auto_configure': True, 'enable_can_fd': False, 'filters': '0:0', 'interface': 'vcan0', 'interval': 0.01, 'timeout': 5.0, 'transition_attempts': 3, 'use_bus_time': False}], 'do100': [{'auto_activate': True, 'auto_configure': True, 'enable_can_fd': False, 'filters': '0:0', 'interface': 'vcan0', 'interval': 0.01, 'timeout': 5.0, 'transition_attempts': 3, 'use_bus_time': False}], 'do150': [{'auto_activate': True, 'auto_configure': True, 'enable_can_fd': False, 'filters': '0:0', 'interface': 'vcan0', 'interval': 0.01, 'timeout': 5.0, 'transition_attempts': 3, 'use_bus_time': False}], 'generic': [], 'j100': [], 'r100': [{'auto_activate': True, 'auto_configure': True, 'enable_can_fd': False, 'filters': '0:0', 'interface': 'vcan0', 'interval': 0.01, 'timeout': 5.0, 'transition_attempts': 3, 'use_bus_time': False}], 'w200': []}
SINGLE_VCAN_DEFAULT = [{'auto_activate': True, 'auto_configure': True, 'enable_can_fd': False, 'filters': '0:0', 'interface': 'vcan0', 'interval': 0.01, 'timeout': 5.0, 'transition_attempts': 3, 'use_bus_time': False}]
property config
get_all() List[CANBridge]
update(serial_number: bool = False) None
class clearpath_config.platform.can.CANBridgeListConfig

Bases: ListConfig[CANBridge, str]

class clearpath_config.platform.can.PhysicalCANAdapter(can_dev: str = 'vcan0', baud: str = 's8')

Bases: object

BAUD = 'baud'
CAN_DEV = 'can_dev'
DEFAULT = {'baud': 's8', 'can_dev': 'vcan0'}
TYPE = 'physical'
property baud: str
property can_dev: str
from_dict(d: dict) None
to_dict() dict
class clearpath_config.platform.can.SerialCANAdapter(can_dev: str = 'vcan0', baud: str = 's8', serial_dev: str = '/dev/ttycan0')

Bases: PhysicalCANAdapter

DEFAULT = {'serial_dev': '/dev/ttycan0'}
SERIAL_DEV = 'serial_dev'
TYPE = 'serial'
from_dict(d: dict) None
property serial_dev: str
to_dict() dict
class clearpath_config.platform.can.VirtualCANAdapter(can_dev: str = 'vcan0', baud: str = 's8', serial_dev: str = '/dev/ttycan0', port: int = 11412)

Bases: SerialCANAdapter

DEFAULT = {'port': 11412}
PORT = 'port'
TYPE = 'virtual'
from_dict(d: dict) None
property port: int
to_dict() dict