SomeIpMessageEncoder
- class mtf.libs.mtf_pybinder.SomeIpMessageEncoder
SomeIp message encoder class
- __init__(*args, **kwargs)
- __new__(**kwargs)
- static create_encoder(*args, **kwargs)
Overloaded function.
create_encoder(data_type: mtf.libs.mtf_pybinder.mtf_someip_datatypes.BaseDataType) -> mtf.libs.mtf_pybinder.SomeIpMessageEncoder
Create an encoder for a SomeIp DataType
create_encoder(parameters: dict[int, mtf.libs.mtf_pybinder.mtf_someip_datatypes.ServiceParameter]) -> mtf.libs.mtf_pybinder.SomeIpMessageEncoder
Create an encoder for a SomeIp parameters
- encode(self: mtf.libs.mtf_pybinder.SomeIpMessageEncoder, values: dict[str, str | float | int | int] = {}, encoding_attributes: dict[str, mtf.libs.mtf_pybinder.TlvEncodingAttributes] = {}) list[int]
Encode values into a payload taking into considering the encoding attributes, a default value will be used for available simple members if no value is given, the given values will be casted to the member type if possible e.g if the given value is of type string while the member type of an integral type an empty payload will be returned, E2E protection will not be considered!
- get_datatype_or_params(self: mtf.libs.mtf_pybinder.SomeIpMessageEncoder) mtf.libs.mtf_pybinder.mtf_someip_datatypes.BaseDataType | dict[int, mtf.libs.mtf_pybinder.mtf_someip_datatypes.ServiceParameter]
- static try_get_encoder(service_name_or_id: int | str, message_name_or_id: int | str, input_parameters: bool = True) mtf.libs.mtf_pybinder.SomeIpMessageEncoder | None
Try getting a message decoder for specific SomeIp message. It returns None if this message does not exist.