EcuNodeCAN
Summary
Represents an RBS CAN ECU node object.
- Methods
- Properties
- Events
Structure
- class EcuNodeCAN
- disable(message: str)
Disables a message of the ecu.
- Parameters
message (
str
) – message can be message_name or message_id. Examples: "ST_ENERG_GEN", "*"(this is to indicate that this applies to all messages of the ECU.)
- enable(message: str)
Enables a message of the ecu.
- Parameters
message (
str
) – message can be message_name or message_id. Examples: "ST_ENERG_GEN", "*"(this is to indicate that this applies to all messages of the ECU.)
- get_value(message: str) IDictionary
Gets the values of the signals of the specified message of the ecu.
- Parameters
message (
str
) – The path to the message. Examples: "ST_ENERG_GEN".- Returns
The values of the signals of the specified message
- Return type
IDictionary
- get_value(message: str, signal: str) int
Gets the value of a specific signal of a message of the ecu.
- reset() bool
Resets the ECU.
- Returns
True
if the operation was successful,False
otherwise.- Return type
- reset_value(message: str = None, signal: str = None)
Resets the value of a specific message/signal of the ecu to the default value.
- Parameters
message (
str
) – [optional] The path to the message. Examples: "ST_ENERG_GEN", "*"(this is to indicate that this applies to all messages of the ECU.) .empty orNone
means the entire messages of the ECU will be reset.signal (
str
) – [optional] The name of the signal, empty orNone
means all the signals values of the message will be reset.
- set_value(message: str, value: IDictionary)
Sets the value of (a) signal(s) of the message to a specific value.
- Parameters
message (
str
) – The path to the message. Examples: "ST_ENERG_GEN", "*"(this is to indicate that this applies to all messages of the ECU.)value (
IDictionary
) – The value of the signal(s) to be set,None
means default value.
- set_value(message: str, signal: str, value: int or None)
Sets the value of the signal of the specified message to a specific value.
- Parameters
- signal(signalName: str) SignalValue
Gets a signal by its name.
- Parameters
signalName (
str
) – The name of the signal.- Returns
Signal value.
- Return type
- signal(message: str, signalName: str) SignalValue
Gets a signal by message and signal name.
- Parameters
- Returns
Signal value.
- Return type
- start()
Starts the ECU
- stop()
Stops the ECU.
- trigger(message: str)
Triggers an enabled transmitted message of the ecu to send a message.
- Parameters
message (
str
) – message is message_id_or_name
- @on_reset_ecu
Event is triggered when the capture of Ethernet ECU RBS is reset.
- @on_start
Event is triggered when the capture of Ethernet ECU RBS is started.
- @on_stop
Event is triggered when the capture of Ethernet ECU RBS is stopped.
- @on_value_changed(sender: object, e: ValueChangedArgsMsg)
Gets the new value , old value, message id, message name when we set value of signal(s).
- Parameters
sender (
object
) – The source of the event.e (
ValueChangedArgsMsg
) – An object that contains the event data.