org.mbari.siam.distributed
Interface Device

All Superinterfaces:
java.rmi.Remote
All Known Subinterfaces:
AquadoppIF, AquadoppIF, Environmental, GPS, Instrument, MMCProxy, NetworkSwitch, NMCProxy, NobskaMAVS_IF, Platform, Power, Sensor
All Known Implementing Classes:
AanderaaO2, ActiVideoServer, AggregateInstrumentService, AnalogInstrument, Aquadopp, Aquadopp, AxisCamera, BaseInstrumentService, CO2SubsystemMonitor, CompassKVHC100, ControlLoopService, CPUTempService, DataLogger, DeviceService, DigitalInputService, DigiWorkhorseADCP, DummyInstrument, DummySummarizer, ElmoLouver, ElmoService, ElmoThruster, Environmental, ESWPump, GarminGPS, GashoundSubsystem, HeaveSensor, HydroRad, InstrumentService, ISUS2, M3dmGx1, McLaneProfiler, mdTest, Medusa, Metsys, MotorControl, MSP430, NobskaMAVS, Ocr3000, PhDigital, PolledInstrumentService, PowerCan, PowerSwitch, Pump, PumpedSeabird, PumpUser, SAMI, SatlanticISUS, SBE16plus, SBE18, SBE19plus, SBE37, SBE52MP, ScaledAnalog, ScheduledISUS, Seabird, SeaBird37im, Seahorse, Sensoray518, SerialAdc, Shmoo, ShmooInstrumentService, SimulatedVector, SimulatedVector, SineDummyInstrument, SmartStar, SOON, StreamingInstrumentService, StreamingSBE19, TerminalInstrumentService, ValveService, VarDummyInstrument, Vector, Vector, WaveSensor, WetLabsECO, WetLabsTriplet, WhoiAsimet, WorkhorseADCP, Ysi

public interface Device
extends java.rmi.Remote

Interface to a device that can be remotely controlled.

Author:
Tom O'Reilly

Field Summary
static int ERROR
          Device status; error occurred
static int INITIAL
          Device status; initializing
static int INSTRUMENT_STATE
          Metadata update modes
static int MDATA_ALL
           
static int OK
          Device status; all is well
static int SAFE
          Device status; safe mode
static int SAMPLING
          Device status; acquiring sample
static int SERVICE_ATTRIBUTES
           
static int SERVICE_CACHE
           
static int SERVICE_PROPERTIES
           
static int SERVICE_XML
           
static int SHUTDOWN
          Device status; shutting down
static int SLEEPING
          Device status; sleeping
static int SUSPEND
          Device status; sampling disabled
static int UNKNOWN
          Device status; unknown
 
Method Summary
 Device[] getChildren()
          Return child Devices.
 byte[] getCommPortName()
          Get name of host port for this device.
 byte[] getFrameworkVersion()
          Get framework version.
 long getId()
          Unique identifier for device instance
 Location getLocation()
          Return Location of device.
 MetadataPacket getMetadata(byte[] cause, int components, boolean logPacket)
          Get device metadata packet.
 byte[] getName()
          Name of device service class.
 Device getParent()
          Return parent Device.
 int getSamplingCount()
           
 int getSamplingErrorCount()
          Return sampling error count
 int getSamplingRetryCount()
           
 int getStatus()
          Get device status.
 java.net.InetAddress host()
          Return InetAddress of device service host.
 int powerOff()
          Turn device power off.
 int powerOn()
          Turn device power on.
 void prepareToRun()
          Run the device.
 void resume()
          Put service in OK state.
 byte[] shutdown()
          Shut down the service; release all associated resources; returns optional human-readable message
 void suspend()
          Put service in SUSPEND state.
 int test()
          Run device's self-test routine.
 

Field Detail

INSTRUMENT_STATE

static final int INSTRUMENT_STATE
Metadata update modes

See Also:
Constant Field Values

SERVICE_XML

static final int SERVICE_XML
See Also:
Constant Field Values

SERVICE_ATTRIBUTES

static final int SERVICE_ATTRIBUTES
See Also:
Constant Field Values

SERVICE_PROPERTIES

static final int SERVICE_PROPERTIES
See Also:
Constant Field Values

SERVICE_CACHE

static final int SERVICE_CACHE
See Also:
Constant Field Values

MDATA_ALL

static final int MDATA_ALL
See Also:
Constant Field Values

OK

static final int OK
Device status; all is well

See Also:
Constant Field Values

ERROR

static final int ERROR
Device status; error occurred

See Also:
Constant Field Values

INITIAL

static final int INITIAL
Device status; initializing

See Also:
Constant Field Values

SHUTDOWN

static final int SHUTDOWN
Device status; shutting down

See Also:
Constant Field Values

SUSPEND

static final int SUSPEND
Device status; sampling disabled

See Also:
Constant Field Values

SAMPLING

static final int SAMPLING
Device status; acquiring sample

See Also:
Constant Field Values

SLEEPING

static final int SLEEPING
Device status; sleeping

See Also:
Constant Field Values

SAFE

static final int SAFE
Device status; safe mode

See Also:
Constant Field Values

UNKNOWN

static final int UNKNOWN
Device status; unknown

See Also:
Constant Field Values
Method Detail

getName

byte[] getName()
               throws java.rmi.RemoteException
Name of device service class.

Throws:
java.rmi.RemoteException

getId

long getId()
           throws java.rmi.RemoteException
Unique identifier for device instance

Throws:
java.rmi.RemoteException

prepareToRun

void prepareToRun()
                  throws java.rmi.RemoteException,
                         InitializeException,
                         java.lang.InterruptedException
Run the device.

Throws:
java.rmi.RemoteException
InitializeException
java.lang.InterruptedException

powerOff

int powerOff()
             throws java.rmi.RemoteException
Turn device power off.

Throws:
java.rmi.RemoteException

powerOn

int powerOn()
            throws java.rmi.RemoteException
Turn device power on.

Throws:
java.rmi.RemoteException

getStatus

int getStatus()
              throws java.rmi.RemoteException
Get device status.

Throws:
java.rmi.RemoteException

getSamplingErrorCount

int getSamplingErrorCount()
                          throws java.rmi.RemoteException
Return sampling error count

Throws:
java.rmi.RemoteException

getSamplingCount

int getSamplingCount()
                     throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getSamplingRetryCount

int getSamplingRetryCount()
                          throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

test

int test()
         throws java.rmi.RemoteException
Run device's self-test routine.

Throws:
java.rmi.RemoteException

getParent

Device getParent()
                 throws NoParentException,
                        java.rmi.RemoteException
Return parent Device.

Throws:
NoParentException
java.rmi.RemoteException

getChildren

Device[] getChildren()
                     throws NoChildrenException,
                            java.rmi.RemoteException
Return child Devices.

Throws:
NoChildrenException
java.rmi.RemoteException

host

java.net.InetAddress host()
                          throws java.rmi.RemoteException,
                                 java.net.UnknownHostException
Return InetAddress of device service host.

Throws:
java.rmi.RemoteException
java.net.UnknownHostException

getLocation

Location getLocation()
                     throws java.rmi.RemoteException,
                            UnknownLocationException
Return Location of device.

Throws:
java.rmi.RemoteException
UnknownLocationException

getMetadata

MetadataPacket getMetadata(byte[] cause,
                           int components,
                           boolean logPacket)
                           throws java.rmi.RemoteException
Get device metadata packet.

Throws:
java.rmi.RemoteException

getCommPortName

byte[] getCommPortName()
                       throws java.rmi.RemoteException
Get name of host port for this device.

Throws:
java.rmi.RemoteException

getFrameworkVersion

byte[] getFrameworkVersion()
                           throws java.rmi.RemoteException
Get framework version.

Throws:
java.rmi.RemoteException

suspend

void suspend()
             throws java.rmi.RemoteException
Put service in SUSPEND state. Release resources (e.g. serial port) for use by other applications.

Throws:
java.rmi.RemoteException

resume

void resume()
            throws java.rmi.RemoteException
Put service in OK state. Re-acquire resources (e.g. serial port).

Throws:
java.rmi.RemoteException

shutdown

byte[] shutdown()
                throws java.rmi.RemoteException
Shut down the service; release all associated resources; returns optional human-readable message

Throws:
java.rmi.RemoteException


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.