SWDataNode

Base class for a data node

- Methods -

*new( ident, maxs )
Create a new data node with ID ident and maxs slots

- Identifier and label -

id ( )
The unique ID of the node
key ( )
The label of the node
key_ ( )
Set the label of the node (done internally when a mapping is added with the method add of SWDataNetwork

- Slots and data -

slots ( )
Retrieve the array of slots of the node
data_ ( indata )
Set the data to each slot. This multiplies the indata with the scaling factor scale, sets it to the instance variable data, and then sets each slot with its value. Also sets the lasttime the data was set. Performs the action defined for the node (each slot will perform its own action as well).
data ( )
An array with the data of the slots. These values do not have the further scaling and mapping which happens in the slot itself. So only the scaling of the node is applied.
value ( )
Same as data.
scale ( )
scale_ ( )
The scaling factor for the data
setLastTime ( )
sets the last time the node
lasttime ( )
The last time the node was updated
elapsed ( )
Get the elapsed time since the last time the node received new data.

- Actions -

action ( )
action_ ( )
Function to be performed each time the data is set
restartAction ( )
restartAction_ ( )
Function to be performed when the elapsed time since the lasttime is larger than the worrytime of the network

- Bus support -

createBus ( s )
create a DataBus for the node on the server
freeBus ( )
free the Bus on the server
bus_ ( )
Set the bus for this node. Do this when e.g. the data for this node is generated from a control bus on the server (such as by an SWBusNode). In that case the DataBus is not used. This also means that the scale factor will not be used for the data on the bus.
bus ( )
Return either the Bus object from the DataBus, or the bus that had been set for this node.
databus_ ( )
databus ( )
The instance of DataBus for this node. A DataBus updates the data on the control bus on a regular time interval.
kr ( )
JITLib support. This creates the bus (if not already present) and provides an In.kr around the bus.

- Debugging and monitoring -

debug_ ( onoff )
print debugging messages for each slot
monitor ( onoff )
Monitor the data in a plot. This uses the GNUPlot to plot the data and the interface class GNUPlot and BusMonitor, which can be found in the GNUPlot quark.
monitorClose ( )
Cleans up the monitor (closing the pipe to GNUPlot).
busmonitor ( )
Reference to the BusMonitor instance for monitoring the node.




Marije Baalman 2009-03-16