JMACS

org.jmacs.pd
Interface IDevice

All Known Implementing Classes:
ProxyDevice

public interface IDevice

programmable device.

Version:
$Id: IDevice.java 797 2006-07-14 15:03:11Z rob $
Author:
Rob Dickens

Nested Class Summary
static interface IDevice.IConstants
          constants.
static interface IDevice.IDriver
          driver.
static interface IDevice.IStatus
          status.
 
Field Summary
static Byte STOP_PROGRAM
          command to stop any program that might be running.
 
Method Summary
 Serializable executeCmd(Serializable cmd)
          executes cmd.
 IProgInfo getProgInfo()
          returns program info.
 Serializable getStatus()
          returns device status as of last boundary.
 IStatusEtc getStatusEtc()
          returns device status + program info as of last boundary.
 void startProgram(IProgram prog)
          starts running prog.
 void stopProgram()
          stops any program that might be running.
 void subscribe(boolean b)
          causes the status to be obtained automatically.
 

Field Detail

STOP_PROGRAM

static final Byte STOP_PROGRAM
command to stop any program that might be running.

Method Detail

executeCmd

Serializable executeCmd(Serializable cmd)
                        throws DiDriverException,
                               ClientDiException
executes cmd.

Throws:
DiDriverException
ClientDiException

startProgram

void startProgram(IProgram prog)
                  throws ClientDiException
starts running prog. Any existing program is stopped.

Throws:
ClientDiException

stopProgram

void stopProgram()
                 throws ClientDiException
stops any program that might be running.

Throws:
ClientDiException

getStatus

Serializable getStatus()
                       throws ClientDiException
returns device status as of last boundary.

Throws:
ClientDiException

getProgInfo

IProgInfo getProgInfo()
                      throws ClientDiException
returns program info.

Throws:
ClientDiException

getStatusEtc

IStatusEtc getStatusEtc()
                        throws ClientDiException
returns device status + program info as of last boundary.

Throws:
ClientDiException

subscribe

void subscribe(boolean b)
               throws ClientDiException
causes the status to be obtained automatically. Calls to getStatus() etc. will then return the cached sample, or null if this is no longer up to date (i.e. older than two sampling periods).

Throws:
ClientDiException

JMACS

jmacs.org