EcuNodePDU
Summary
Represents an RBS PDU ECU node object.
- Methods
- Properties
- Events
Structure
- class EcuNodePDU
- 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". For MTF nodes, this refers to the name of the frame's topic- 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.). For MTF nodes, this refers to the name of the frame's topicvalue (
IDictionary
) – The value of the signal(s) to be set,None
means default value for nodes other than MQTT and MTF nodes.
- 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
message (
str
) – The path to the message. Examples: "ST_ENERG_GEN", "*"(this is to indicate that this applies to all messages of the ECU.). For MTF nodes, this refers to the name of the frame's topicsignal (
str
) – The name of the signal to be set,None
means default value for nodes other than MQTT and MTF nodes.value (
int
or None) – The value of the signal to be set,None
means default value for nodes other than MQTT and MTF nodes.
- signal(signalName: str) SignalValue
Gets a signal by its name.
- Parameters
signalName (
str
) – The name of the signal. For MTF nodes, this refers to the name of the topic- 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
- start_ecu_in_container_mode(qinq_vlan: uint32 or None = None)
- Starts the ECU in container mode.
Container mode requires from the user to enable Container PDUs. Once this condition is satisfied, each contained PDU is added into its container if it should be sent, i.e. contained PDU's cycle is respected.
- Parameters
qinq_vlan (
uint32
or None) – Qinq Vlan if needed.
- 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. For MTF nodes, this refers to the name of the frame's topic
- @on_reset_ecu
Event is triggered when the capture of ECU RBS is reset.
- @on_start
Event is triggered when the capture of ECU RBS is started.
- @on_stop
Event is triggered when the capture of 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.