sys::Obj sys::Virtual sys::Component driver::Device
public class Device
Models a device as a collection of I/O points. Provides access to child components of type Point or a subclass of it.
public App app
public property bool enable [config]
Whether the device is enabled.
public property bool fault
Whether the device is in fault.
public long lastUpTime
public DeviceNetwork net
public long nextPingTime
public long pingTime
public property int status
Status bitmask for device.
public void addPoint(Str name, int address, Type type)
Adds a point to this device.
public virtual override void execute()
Updates fault state, posts ping at appropriate time.
public Point getFirstPoint()
Gets first child component of type Point (or subclass). Returns null if no Point objects found.
public DeviceNetwork getNetwork()
Returns a reference to the parent network.
public Point getNextPoint(Point point)
Gets next child component after 'point' that is of type Point (or subclass). Returns null if end of child list is reached without finding one.
public Point getPoint(Type type, int address)
Gets point by type and address.
public virtual bool isDown()
Test down status flag.
public virtual void postPing()
Method invoked when time to ping device.
public virtual void setAoValue(int address, float value)
Callback to write a AO point value.
public virtual void setDoValue(int address, bool value)
Callback to write a DO point value.
public virtual void setDown(bool isDown)
Sets/clears the down status flag.
public virtual override void start()
Sets up pointers and timestamps.