dotbot.adapter module
Module containing classes for interfacing with the DotBot gateway.
-
class dotbot.adapter.DotBotSimulatorAdapter(simulator_init_state_path='simulator_init_state.toml')[source]
Bases: SimulatorAdapterBase
Class used to interface with the dotbot simulator.
- Parameters:
simulator_init_state_path (str)
-
create_simulator(on_frame_received)[source]
Create the simulator instance.
- Parameters:
on_frame_received (callable)
-
class dotbot.adapter.GatewayAdapterBase[source]
Bases: ABC
Base class for interface adapters.
-
abstract close()[source]
Close the interface.
-
abstract send_payload(destination, payload)[source]
Send payload to the interface.
- Parameters:
destination (int)
payload (Payload)
-
abstract async start(on_frame_received)[source]
Initialize the interface.
- Parameters:
on_frame_received (callable)
-
class dotbot.adapter.MarilibCloudAdapter(host, port, use_tls, network_id)[source]
Bases: GatewayAdapterBase
Class used to interface with Marilib.
- Parameters:
host (str)
port (int)
use_tls (bool)
network_id (int)
-
close()[source]
Close the interface.
-
send_payload(destination, payload)[source]
Send payload to the interface.
- Parameters:
destination (int)
payload (Payload)
-
async start(on_frame_received)[source]
Initialize the interface.
- Parameters:
on_frame_received (callable)
-
class dotbot.adapter.MarilibEdgeAdapter(port, baudrate, verbose=False)[source]
Bases: GatewayAdapterBase
Class used to interface with Marilib.
- Parameters:
port (str)
baudrate (int)
verbose (bool)
-
close()[source]
Close the interface.
-
send_payload(destination, payload)[source]
Send payload to the interface.
- Parameters:
destination (int)
payload (Payload)
-
async start(on_frame_received)[source]
Initialize the interface.
- Parameters:
on_frame_received (callable)
-
class dotbot.adapter.SailBotSimulatorAdapter[source]
Bases: SimulatorAdapterBase
Class used to interface with the sailbot simulator.
-
create_simulator(on_frame_received)[source]
Create the simulator instance.
- Parameters:
on_frame_received (callable)
-
class dotbot.adapter.SerialAdapter(port, baudrate)[source]
Bases: GatewayAdapterBase
Class used to interface with the serial port.
- Parameters:
port (str)
baudrate (int)
-
close()[source]
Close the interface.
-
on_byte_received(byte)[source]
- Parameters:
byte (bytes)
-
send_payload(destination, payload)[source]
Send payload to the interface.
- Parameters:
destination (int)
payload (Payload)
-
async start(on_frame_received)[source]
Initialize the interface.
- Parameters:
on_frame_received (callable)
-
class dotbot.adapter.SimulatorAdapterBase[source]
Bases: GatewayAdapterBase
Base class used to interface with the simulator.
-
close()[source]
Close the interface.
-
abstract create_simulator(_byte_received)[source]
Create the simulator instance.
- Parameters:
_byte_received (callable)
-
send_payload(destination, payload)[source]
Send payload to the interface.
- Parameters:
destination (int)
payload (Payload)
-
async start(on_frame_received)[source]
Initialize the interface.
- Parameters:
on_frame_received (callable)