Sedona

driver::Device


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.


app

public App app

enable

public property bool enable [config]

Whether the device is enabled.

fault

public property bool fault

Whether the device is in fault.

lastUpTime

public long lastUpTime

net

public DeviceNetwork net

nextPingTime

public long nextPingTime

pingTime

public long pingTime

status

public property int status

Status bitmask for device.

addPoint

public void addPoint(Str name, int address, Type type)

Adds a point to this device.

execute

public virtual override void execute()

Updates fault state, posts ping at appropriate time.

getFirstPoint

public Point getFirstPoint()

Gets first child component of type Point (or subclass). Returns null if no Point objects found.

getNetwork

public DeviceNetwork getNetwork()

Returns a reference to the parent network.

getNextPoint

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.

getPoint

public Point getPoint(Type type, int address)

Gets point by type and address.

isDown

public virtual bool isDown()

Test down status flag.

postPing

public virtual void postPing()

Method invoked when time to ping device.

setAoValue

public virtual void setAoValue(int address, float value)

Callback to write a AO point value.

setDoValue

public virtual void setDoValue(int address, bool value)

Callback to write a DO point value.

setDown

public virtual void setDown(bool isDown)

Sets/clears the down status flag.

start

public virtual override void start()

Sets up pointers and timestamps.