# 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={})

  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.

  `add_enum_definition`(enums)

    Add enums dictionary to definition.

  `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)

  Database signal, holds meta data about a signal

  `add_node`(node)

    Add receiving node to signal.

  `attributes`()

    Return a generator over all signal attributes.

  `bind`(frame=None)

    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` is `None`..

  `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)

    Convert a raw or physical value into CAN data bytes.

  `delete_attribute`(name)

    Delete attribute from signal.

  `get_attribute_value`(name)

    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`

  `nodes`()

    Return a generator over all receiving nodes of the signal.

  `phys_from`(can_data)

    Return signals physical value from data

  `qualified_name`

    Get the qualified signal name.

    Returns database, message and signal names separated by dots.

    Type: | `str`

  `raw_from`(can_data)

    Return signals raw value from data

  `remove_node`(node)

    Remove receiving node from signal.

  `scaling`

    Get the signals factor and offset

    Type: | `ValueScaling`

  `set_attribute_value`(name, value)

    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.

  `size`

    Get the signals startbit and length

    Type: | `ValueSize`

  `type`

    Get the signal representation type.

    Type: | `SignalType`

  `unit`

    Get the signal unit

    Type: | `str`

## ValueLimits

class `canlib.kvadblib.``ValueLimits`(min, max)
  `max`

    Alias for field number 1

  `min`

    Alias for field number 0

## ValueScaling

class `canlib.kvadblib.``ValueScaling`(factor, offset)
  `factor`

    Alias for field number 0

  `offset`

    Alias for field number 1

## ValueSize

class `canlib.kvadblib.``ValueSize`(startbit, length)
  `length`

    Alias for field number 1

  `startbit`

    Alias for field number 0