Module: Signals

The Signals modules provides an interface to access the values/signals encoded in CAN messages.
Source:

Classes

DatabaseService
Message
Signal

Methods

(inner) onChange(listener)

Keep track of listeners who want to be notified if this signal changes
Parameters:
Name Type Description
listener JS callback to get notification
Source:

(inner) onUpdate(listener)

Keep track of listeners who want to be notified if this signal updates
Parameters:
Name Type Description
listener JS callback to get notification
Source:

(inner) parseNetworkDescription(file)

Parameters:
Name Type Description
file string Path to KCD file to parse
Source:
Returns:
DB description to be used in DatabaseService

(inner) removeListener(listener)

Remove listener from signal onChange and/or onUpdate
Parameters:
Name Type Description
listener to be removed
Source:

(inner) send(msg_name)

Construct a CAN message and encode all related signals according the rules. Finally send the message to the bus.
Parameters:
Name Type Description
msg_name Name of the message to generate (indicate mux by append .MUX_VALUE in hex)
Source:

(inner) update(newValue)

Set new value of this signal. Any local registered clients will receive a notification. Please note, no CAN message is actually send to the bus (@see DatabaseServer::send)
Parameters:
Name Type Description
newValue bool | double | integer New value to set
Source: