Signals¶
EnumSignal¶
-
class
canlib.kvadblib.
EnumSignal
(db, message, sh, name=None, type=None, byte_order=None, mode=None, size=None, scaling=ValueScaling(factor=1, offset=0), limits=None, unit=None, comment=None, enums={})[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.
-
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
..
-
byte_order
¶ Get the signal byte order encoding.
Type: SignalByteOrder
-
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.
-
limits
¶ Get message min and max values
Type: ValueLimits
-
mode
¶
-
name
¶ Get the signal name.
Type: str
-
qualified_name
¶ Get the qualified signal name.
Returns database, message and signal names separated by dots.
Type: str
-
scaling
¶ Get the signals factor and offset
Type: ValueScaling
-
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.
-
type
¶ Get the signal representation type.
Type: SignalType
-
unit
¶ Get the signal unit
Type: str
-