Signals¶
EnumSignal¶
- class canlib.kvadblib.EnumSignal(db, message, sh, name=None, type=None, byte_order=None, mode=None, size=None, scaling=None, limits=None, unit=None, comment=None, enums=None)[source]¶
Database signal of type enum, holds meta data about a signal.
Changed in version 1.17: default settings byte_order=SignalByteOrder.INTEL and mode=SignalMultiplexMode.SIGNAL chaged to None.
- property enums¶
Signal enum definition dictionary
- Type
dict
Signal¶
- class canlib.kvadblib.Signal(db, message, sh, name=None, type=None, byte_order=None, mode=None, representation=None, size=None, scaling=None, limits=None, unit=None, comment=None)[source]¶
Database signal, holds meta data about a signal
- bind(frame=None)[source]¶
Bind this signal to a frame
Creates a new BoundSignal object representing this signal bound to the given Frame object, or a new Frame object if
frame
isNone
..
- property byte_order¶
Get the signal byte order encoding.
- Type
- property comment¶
Get the signal comment.
- Type
str
- data_from(can_data, phys=None, raw=None)[source]¶
Convert a raw or physical value into CAN data bytes.
- get_attribute_value(name)[source]¶
Return attribute value
If the attribute is not set on the signal, we return the attribute definition default value.
- property limits¶
Get message min and max values
- Type
- property mode¶
- property name¶
Get the signal name.
- Type
str
- property qualified_name¶
Get the qualified signal name.
Returns database, message and signal names separated by dots.
- Type
str
- property scaling¶
Get the signals factor and offset
- Type
- set_attribute_value(name, value)[source]¶
Set value of attribute ‘name’ on signal.
If no attribute called ‘name’ is set on signal, attach a signal attribute from the database attribute definition first.
- property type¶
Get the signal representation type.
- Type
- property unit¶
Get the signal unit
- Type
str