org.mbari.siam.distributed
Interface Instrument

All Superinterfaces:
Device, java.rmi.Remote
All Known Subinterfaces:
AquadoppIF, AquadoppIF, Environmental, GPS, NetworkSwitch, NobskaMAVS_IF, Power
All Known Implementing Classes:
AanderaaO2, ActiVideoServer, AggregateInstrumentService, AnalogInstrument, Aquadopp, Aquadopp, AxisCamera, BaseInstrumentService, CO2SubsystemMonitor, CompassKVHC100, ControlLoopService, CPUTempService, DataLogger, 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 Instrument
extends Device

An Instrument is a Device that can acquire data.

Author:
Tom O'Reilly

Field Summary
 
Fields inherited from interface org.mbari.siam.distributed.Device
ERROR, INITIAL, INSTRUMENT_STATE, MDATA_ALL, OK, SAFE, SAMPLING, SERVICE_ATTRIBUTES, SERVICE_CACHE, SERVICE_PROPERTIES, SERVICE_XML, SHUTDOWN, SLEEPING, SUSPEND, UNKNOWN
 
Method Summary
 SensorDataPacket acquireSample(boolean logPacket)
          Acquire SensorDataPacket, optionally write it to Instrument's log file, and return it to caller.
 void addDefaultPacketFilters(PacketFilter[] filters)
          Add default packet filters for data retrieval.
 void annotate(byte[] annotation)
          Append annotation to device data stream.
 void cacheProperties(byte[] note)
          Cache service properties on the "instrument host" node, such that current service property values will be restored next time service is created on current port of current node.
 void clearDefaultPacketFilters()
          Clear default packet filters for data retrieval.
 void clearPropertiesCache(byte[] note)
          Clear properties cache.
 void disableSummary()
          Disable data summary generation.
 void enableSummary()
          Enable generation of data summary.
 PacketFilter[] getDefaultPacketFilters()
          Get default packet filters for data retrieval.
 SensorDataPacket getLastSample()
          Get the most recently logged SensorDataPacket and return it to caller.
 DevicePacketSet getPackets(long startTime, long stopTime)
          Get all packets having time-tag within specified range.
 DevicePacketSet getPackets(long startTime, long stopTime, PacketFilter[] filters, boolean excludeStale)
          Get all packets having time-tag within specified range, filtered by specified filters; exclude "stale" packets older than service's "data shelf life".
 PacketParser getParser()
          Get instrument's data parser.
 byte[] getPortDiagnostics(boolean logPacket)
          Get diagnostics message from device's port and optionally log it.
 byte[] getPortDiagnosticsSummary(boolean logPacket)
          Get diagnostics summary message from device's port and optionally log it.
 java.util.Vector getProperties()
          Get Vector of instrument properties; each Vector element consists of byte array with form "key=value".
 byte[] getProperty(byte[] key)
          Get value of specified instrument service property.
 byte[] getSampleSchedule()
          Return byte-string representation of instrument sampling schedule.
 java.util.Vector getSchedules()
          Return byte-string representation of instrument schedules.
 void resetPortDiagnostics()
          Reset port diagnostics.
 void setClock()
          Set instrument's internal clock to current time.
 void setClock(long millisec)
          Set instrument's internal clock to specified time.
 void setProperty(byte[] keyEqualsValueStrings, byte[] unused)
          Set value of specified instrument service properties.
 boolean summaryEnabled()
          Return true if summary generation is enabled.
 
Methods inherited from interface org.mbari.siam.distributed.Device
getChildren, getCommPortName, getFrameworkVersion, getId, getLocation, getMetadata, getName, getParent, getSamplingCount, getSamplingErrorCount, getSamplingRetryCount, getStatus, host, powerOff, powerOn, prepareToRun, resume, shutdown, suspend, test
 

Method Detail

setClock

void setClock(long millisec)
              throws NotSupportedException,
                     java.rmi.RemoteException
Set instrument's internal clock to specified time. DEPRECATED - use setClock() with no arguments.

Throws:
NotSupportedException
java.rmi.RemoteException

setClock

void setClock()
              throws NotSupportedException,
                     java.rmi.RemoteException
Set instrument's internal clock to current time.

Throws:
NotSupportedException
java.rmi.RemoteException

acquireSample

SensorDataPacket acquireSample(boolean logPacket)
                               throws java.rmi.RemoteException,
                                      NoDataException
Acquire SensorDataPacket, optionally write it to Instrument's log file, and return it to caller.

Throws:
java.rmi.RemoteException
NoDataException

getLastSample

SensorDataPacket getLastSample()
                               throws java.rmi.RemoteException,
                                      NoDataException
Get the most recently logged SensorDataPacket and return it to caller.

Throws:
java.rmi.RemoteException
NoDataException

annotate

void annotate(byte[] annotation)
              throws java.rmi.RemoteException
Append annotation to device data stream.

Throws:
java.rmi.RemoteException

getSampleSchedule

byte[] getSampleSchedule()
                         throws java.rmi.RemoteException
Return byte-string representation of instrument sampling schedule.

Throws:
java.rmi.RemoteException

getSchedules

java.util.Vector getSchedules()
                              throws java.rmi.RemoteException
Return byte-string representation of instrument schedules.

Throws:
java.rmi.RemoteException

getPackets

DevicePacketSet getPackets(long startTime,
                           long stopTime)
                           throws java.rmi.RemoteException,
                                  NoDataException
Get all packets having time-tag within specified range.

Throws:
java.rmi.RemoteException
NoDataException

getPackets

DevicePacketSet getPackets(long startTime,
                           long stopTime,
                           PacketFilter[] filters,
                           boolean excludeStale)
                           throws java.rmi.RemoteException,
                                  NoDataException
Get all packets having time-tag within specified range, filtered by specified filters; exclude "stale" packets older than service's "data shelf life".

Throws:
java.rmi.RemoteException
NoDataException

addDefaultPacketFilters

void addDefaultPacketFilters(PacketFilter[] filters)
                             throws java.rmi.RemoteException
Add default packet filters for data retrieval.

Throws:
java.rmi.RemoteException

clearDefaultPacketFilters

void clearDefaultPacketFilters()
                               throws java.rmi.RemoteException
Clear default packet filters for data retrieval.

Throws:
java.rmi.RemoteException

getDefaultPacketFilters

PacketFilter[] getDefaultPacketFilters()
                                       throws java.rmi.RemoteException
Get default packet filters for data retrieval.

Throws:
java.rmi.RemoteException

getProperty

byte[] getProperty(byte[] key)
                   throws java.rmi.RemoteException,
                          MissingPropertyException
Get value of specified instrument service property.

Throws:
java.rmi.RemoteException
MissingPropertyException

setProperty

void setProperty(byte[] keyEqualsValueStrings,
                 byte[] unused)
                 throws java.rmi.RemoteException,
                        InvalidPropertyException
Set value of specified instrument service properties. First argument consists of one or more 'key=value' pairs. Each key=value pair is separated from the next pair by newline ('\n'). Note that second argument is currently unused.

Throws:
java.rmi.RemoteException
InvalidPropertyException

getProperties

java.util.Vector getProperties()
                               throws java.rmi.RemoteException
Get Vector of instrument properties; each Vector element consists of byte array with form "key=value".

Throws:
java.rmi.RemoteException

cacheProperties

void cacheProperties(byte[] note)
                     throws java.rmi.RemoteException,
                            java.lang.Exception
Cache service properties on the "instrument host" node, such that current service property values will be restored next time service is created on current port of current node.

Throws:
java.rmi.RemoteException
java.lang.Exception

clearPropertiesCache

void clearPropertiesCache(byte[] note)
                          throws java.rmi.RemoteException,
                                 java.lang.Exception
Clear properties cache.

Throws:
java.rmi.RemoteException
java.lang.Exception

getPortDiagnostics

byte[] getPortDiagnostics(boolean logPacket)
                          throws java.rmi.RemoteException
Get diagnostics message from device's port and optionally log it.

Throws:
java.rmi.RemoteException

resetPortDiagnostics

void resetPortDiagnostics()
                          throws java.rmi.RemoteException
Reset port diagnostics.

Throws:
java.rmi.RemoteException

getPortDiagnosticsSummary

byte[] getPortDiagnosticsSummary(boolean logPacket)
                                 throws java.rmi.RemoteException
Get diagnostics summary message from device's port and optionally log it.

Throws:
java.rmi.RemoteException

getParser

PacketParser getParser()
                       throws java.rmi.RemoteException,
                              NotSupportedException
Get instrument's data parser.

Throws:
java.rmi.RemoteException
NotSupportedException

enableSummary

void enableSummary()
                   throws java.rmi.RemoteException
Enable generation of data summary.

Throws:
java.rmi.RemoteException

disableSummary

void disableSummary()
                    throws java.rmi.RemoteException
Disable data summary generation.

Throws:
java.rmi.RemoteException

summaryEnabled

boolean summaryEnabled()
                       throws java.rmi.RemoteException
Return true if summary generation is enabled.

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.