|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.mbari.siam.core.DeviceService
org.mbari.siam.core.BaseInstrumentService
org.mbari.siam.core.PolledInstrumentService
org.mbari.siam.devices.isus2.ISUS2
public class ISUS2
Satlantic ISUS-2 instrument service, as operated in TRIGGERED mode. Compatible with ISUS firmware version 2.7.1. This instrument serial interface is menu-driven, resulting in some tricky state transitions. States include:
- Ready: instrument awake, ready to accept single-letter commands - InMenu: instrument awake, in main menu mode - Asleep: instrument is sleeping - Sampling: instrument is awake, aquiring samples - Charging: instrument is waking up
| Field Summary | |
|---|---|
protected org.mbari.siam.devices.isus2.ISUS2.Attributes |
_attributes
|
protected byte[] |
_buffer
|
protected byte[] |
_frameBuffer
|
| Fields inherited from class org.mbari.siam.core.BaseInstrumentService |
|---|
_defaultSamplerTask, _defaultSampleScheduleName, _errorCache, _instrumentAttributes, _lastPacket, _lastSensorDataPacket, _maxSampleBytes, _messagePacket, _nPowerRequests, _nWakeRequests, _packetLog, _recordType, _running, _samplerWakeupTime, _scheduleKey, _schedules, _sensorDataPacket, _turbinator, MAX_BASE_RECORDTYPE, RECORDTYPE_DEFAULT, RECORDTYPE_METADATA, RECORDTYPE_UNDEFINED |
| Fields inherited from class org.mbari.siam.core.DeviceService |
|---|
_fromDevice, _instrumentPort, _nodeProperties, _parentNode, _regEntry, _sandBox, _serviceCachePath, _serviceName, _servicePropertiesPath, _serviceXMLPath, _toDevice, CACHED_PROPERTIES_FILENAME, PROPERTIES_FILENAME, XML_FILENAME |
| Fields inherited from class java.rmi.server.RemoteObject |
|---|
ref |
| 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 |
| Constructor Summary | |
|---|---|
ISUS2()
Required constructor. |
|
| Method Summary | |
|---|---|
protected void |
configureInstrument()
Put instrument in correct mode. |
protected ScheduleSpecifier |
createDefaultSampleSchedule()
Return specifier for default sampling schedule. |
protected void |
doCommand(java.lang.String cmd,
java.lang.String response)
|
protected void |
doCommand(java.lang.String cmd,
java.lang.String response,
int maxTries,
int timeoutMsec)
Method to send commands to the Workhorse; makes every attempt to communicate with the unit by a process of resetting, flushing input buffer and resending. |
protected void |
exitMainMenu()
Exit main menu |
protected byte[] |
getInstrumentStateMetadata()
Return metadata from device. |
SerialPortParameters |
getSerialPortParameters()
Return parameters to use on serial port. |
protected void |
gotoMainMenu()
Put instrument in "main menu mode" |
protected void |
gotoReady()
Go to "ready" state |
protected PowerPolicy |
initCommunicationPowerPolicy()
Return initial value of communication power policy. |
protected int |
initCurrentLimit()
Specify current limit in increments of 120 mA upto 11880 mA. |
protected void |
initializeInstrument()
Initialize the device. |
protected PowerPolicy |
initInstrumentPowerPolicy()
Return initial value of instrument power policy. |
protected int |
initInstrumentStartDelay()
Specify startup delay (millisec) |
protected int |
initMaxSampleBytes()
Specify maximum bytes in raw sample. |
protected byte[] |
initPromptString()
Specify prompt string. |
protected byte[] |
initSampleTerminator()
Return sample terminator |
protected boolean |
inMenu()
Return true if in menu mode. |
protected int |
readSample(byte[] sample)
Read raw sample bytes from serial port into buffer, return number of bytes read. |
protected void |
requestSample()
Request a data sample. |
void |
setClock()
Set device's clock to current time; can throw NotSupportedException. |
protected void |
setDeviceClock()
Set device clock to current time; assumes current instrument state accepts 'T' command. |
protected java.lang.String |
shutdownInstrument()
Return message regarding power-cycling. |
protected void |
stopSampling()
Get instrument out of sampling mode. |
int |
test()
For some reason, this method is required by the framework |
protected void |
waitForCharge()
Wait for instrument to complete charging |
| Methods inherited from class org.mbari.siam.core.PolledInstrumentService |
|---|
acquire, doScheduledTask, setAttributes |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
|---|
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
|---|
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
|---|
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.mbari.siam.distributed.Instrument |
|---|
acquireSample, addDefaultPacketFilters, annotate, cacheProperties, clearDefaultPacketFilters, clearPropertiesCache, disableSummary, enableSummary, getDefaultPacketFilters, getLastSample, getPackets, getPackets, getParser, getPortDiagnostics, getPortDiagnosticsSummary, getProperties, getProperty, getSampleSchedule, getSchedules, resetPortDiagnostics, setClock, setProperty, summaryEnabled |
| 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 |
| Methods inherited from interface org.mbari.siam.distributed.DeviceServiceIF |
|---|
getName |
| Methods inherited from interface org.mbari.siam.core.ScheduleOwner |
|---|
addSchedule, getAllSchedules, getScheduleKey, removeAllSchedules, removeSchedule, resumeSchedule, sleepingUntil, suspendSchedule, syncSchedule |
| Field Detail |
|---|
protected org.mbari.siam.devices.isus2.ISUS2.Attributes _attributes
protected byte[] _frameBuffer
protected byte[] _buffer
| Constructor Detail |
|---|
public ISUS2()
throws java.rmi.RemoteException
java.rmi.RemoteException| Method Detail |
|---|
protected byte[] initSampleTerminator()
initSampleTerminator in class BaseInstrumentServiceprotected byte[] initPromptString()
initPromptString in class BaseInstrumentServiceprotected int initCurrentLimit()
initCurrentLimit in class BaseInstrumentServiceprotected PowerPolicy initInstrumentPowerPolicy()
initInstrumentPowerPolicy in class BaseInstrumentServiceprotected PowerPolicy initCommunicationPowerPolicy()
initCommunicationPowerPolicy in class BaseInstrumentServiceprotected int initInstrumentStartDelay()
initInstrumentStartDelay in class BaseInstrumentServicepublic int test()
test in interface Deviceprotected int initMaxSampleBytes()
initMaxSampleBytes in class BaseInstrumentService
public SerialPortParameters getSerialPortParameters()
throws gnu.io.UnsupportedCommOperationException
getSerialPortParameters in class DeviceServicegnu.io.UnsupportedCommOperationException
protected void initializeInstrument()
throws InitializeException,
java.lang.Exception
initializeInstrument in class BaseInstrumentServiceInitializeException
java.lang.Exception
protected void configureInstrument()
throws java.lang.Exception
java.lang.Exception
protected void gotoMainMenu()
throws java.lang.Exception
java.lang.Exception
protected void exitMainMenu()
throws java.lang.Exception
java.lang.Exceptionprotected boolean inMenu()
protected byte[] getInstrumentStateMetadata()
getInstrumentStateMetadata in class BaseInstrumentService
protected void requestSample()
throws java.io.IOException
requestSample in class PolledInstrumentServicejava.io.IOException
protected int readSample(byte[] sample)
throws TimeoutException,
java.io.IOException,
java.lang.Exception
readSample in class BaseInstrumentServicesample - output buffer
TimeoutException
java.io.IOException
java.lang.Exception
protected void waitForCharge()
throws java.lang.Exception
java.lang.Exception
protected void doCommand(java.lang.String cmd,
java.lang.String response)
throws java.lang.Exception
java.lang.Exception
protected void doCommand(java.lang.String cmd,
java.lang.String response,
int maxTries,
int timeoutMsec)
throws java.lang.Exception
cmd - Command string to send
java.lang.Exception - thrown if the method fails to send the command.
protected void stopSampling()
throws java.lang.Exception
java.lang.Exception
protected ScheduleSpecifier createDefaultSampleSchedule()
throws ScheduleParseException
createDefaultSampleSchedule in class PolledInstrumentServiceScheduleParseException
public void setClock()
throws NotSupportedException
setClock in interface InstrumentsetClock in class BaseInstrumentServiceNotSupportedException
protected void setDeviceClock()
throws java.lang.Exception
java.lang.Exception
protected java.lang.String shutdownInstrument()
throws java.lang.Exception
shutdownInstrument in class BaseInstrumentServicejava.lang.Exception
protected void gotoReady()
throws java.lang.Exception
java.lang.Exception
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||