5.3.1.20.1.2. cli.com.can_com.CANProcess
- class cli.com.can_com.CANProcess(name: str, control: ComControl, parameter: CanBusConfig)
Process for handling CAN bus communication. Manages low-level connections, sending, and receiving of CAN messages.
- __init__(name: str, control: ComControl, parameter: CanBusConfig) None
Initializes the CAN process.
- Parameters:
name (str) – Name of the process.
control (ComControl) – Communication control object.
parameter (CanBusConfig) – CAN bus configuration parameters.
Methods
__init__(name, control, parameter)Initializes the CAN process.
close()Close the Process object.
is_alive()Return whether process is alive
join([timeout])Wait until child process terminates
kill()Terminate process; sends SIGKILL signal or uses TerminateProcess()
run()Starts the CAN process: - Connects to the CAN bus - Starts a thread for sending messages - Receives CAN messages in the main thread
shutdown()Signals the process to shut down by setting the shutdown event.
start()Start child process
terminate()Terminate process; sends SIGTERM signal or uses TerminateProcess()
Attributes
authkeydaemonReturn whether process is a daemon
exitcodeReturn exit code of process or None if it has yet to stop
identReturn identifier (PID) of process or None if it has yet to start
namepidReturn identifier (PID) of process or None if it has yet to start
sentinelReturn a file descriptor (Unix) or handle (Windows) suitable for waiting for process termination.
controlparameter