JMACS

org.jmacs
Interface IDi.IDriver

Enclosing interface:
IDi

public static interface IDi.IDriver

device-interface (DI) driver. Implementations are not required to be thread-safe.


Nested Class Summary
static interface IDi.IDriver.IClient
          wishes to be able to do all of the things which an IDi.IDriver.ISampler, IDi.IDriver.ISubscriber and IDi.IDriver.IControl can do.
static interface IDi.IDriver.IContext
          driver context.
static interface IDi.IDriver.IControl
          wishes to be able to send commands to other DIs.
static interface IDi.IDriver.ISampler
          wishes to be able to request the status of another DI.
static interface IDi.IDriver.ISubscriber
          wishes to be able to request to receive status samples from other DIs automatically.
 
Method Summary
 Serializable executeCmd(Serializable cmd, boolean control, String diName)
          executes cmd.
 Serializable getStatus()
          samples the device's status at regular intervals.
 

Method Detail

executeCmd

Serializable executeCmd(Serializable cmd,
                        boolean control,
                        String diName)
                        throws Exception
executes cmd.

Parameters:
control - true if client has control (as opposed to monitor-only) access
diName - fully-qualified name of the client DI, or null if called from a UI client
Returns:
may be null. See IResultHandler.
Throws:
Exception - See IExceptionHandler.

getStatus

Serializable getStatus()
samples the device's status at regular intervals. Samples (when serialised) may not exceed the payload of a single DatagramPacket.

Returns:
Result will be deemed not to have changed if == previous result. Must be non-null, otherwise the device interface will be deemed fatally broken.
Throws:
RuntimeException - The device interface will be deemed fatally broken.

JMACS

jmacs.org