|
||||||||
| 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.StreamingInstrumentService
org.mbari.siam.devices.seabird.streamingSBE19.StreamingSBE19
public class StreamingSBE19
Instrument service for Seabird SBE19plus in profile mode (MP command)
| Nested Class Summary | |
|---|---|
class |
StreamingSBE19.SBE19Attributes
Service attributes. |
class |
StreamingSBE19.SBE19DevicePacketParser
|
| Nested classes/interfaces inherited from class org.mbari.siam.core.StreamingInstrumentService |
|---|
StreamingInstrumentService.Attributes |
| Field Summary | |
|---|---|
protected DevicePacketParser |
_devicePacketParser
|
protected TurbidityEventDetector |
_eventDetector
|
protected byte[] |
_getCalCmd
|
protected byte[] |
_getPrompt
|
protected byte[] |
_getStatusInfo
|
protected int |
_maxCalBytes
|
protected int |
_maxStatusBytes
|
protected byte[] |
cmdbuf
Scratch buffer for sending commands |
protected int[] |
FIELD_WIDTHS
Widths of temperature, conductivity, pressure, volt1, volt2, volt3, and volt4 fields |
protected static int |
MAX_SAMPLE_BYTES
|
protected int |
N_FIELDS
Number of fields in a SBE record (temperature, conductivity, pressure, volt1, volt2, volt3, volt4) |
| Fields inherited from class org.mbari.siam.core.StreamingInstrumentService |
|---|
_shutdown, _subsampleInterval, _suspend |
| 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 | |
|---|---|
StreamingSBE19()
Parser used to convert SensorDataPackets into SiamRecords that can be consumed by the SummaryBlock |
|
| Method Summary | |
|---|---|
protected ScheduleSpecifier |
createDefaultSampleSchedule()
Return specifier for default sampling schedule. |
DevicePacketParser |
getDevicePacketParser()
Get instruments' DevicePacketParser, which returns JDDAC records. |
protected byte[] |
getInstrumentStateMetadata()
Get device's notion of its state: a Seabird status packet. |
PacketParser |
getParser()
Return CTD packet parser. |
protected void |
getPrompt()
Try to get instrument prompt |
protected boolean |
getPrompt(int retries)
Try to get prompt. |
SerialPortParameters |
getSerialPortParameters()
Return parameters to use on serial port. |
protected float |
getTransmisChannel(java.lang.String sample)
|
protected PowerPolicy |
initCommunicationPowerPolicy()
Return initial value of instrument power policy. |
protected int |
initCurrentLimit()
Return initial value of DPA current limit. |
protected void |
initializeInstrument()
Initialize the Instrument This means to set all initial settings - This section for one time only instrument settings |
protected PowerPolicy |
initInstrumentPowerPolicy()
Return initial value of instrument power policy. |
protected int |
initInstrumentStartDelay()
Return initial value of instrument startup time in millisec. |
protected int |
initMaxSampleBytes()
Return initial value for maximum number of bytes in a instrument data sample. |
protected byte[] |
initPromptString()
Return initial value for instrument's "prompt" character. |
protected byte[] |
initSampleTerminator()
Return initial value for instrument's sample terminator |
protected boolean |
isStreaming()
Return true if instrument is streaming. |
protected SensorDataPacket |
processSample(byte[] sample,
int nBytes)
Process latest acquired sample. |
protected int |
readSample(byte[] sample)
Read an instrument sample |
void |
sendCommand(java.lang.String cmd)
Method to send a command and wait for the prompt. |
void |
sendCommand(java.lang.String cmd,
long timeout)
Method to send a command and wait for the prompt. |
void |
sendCommandConfirm(java.lang.String cmd)
Method to send a command for which the SBE-19 requires confirmation. |
void |
setClock()
Set Seabird's clock. |
protected java.lang.String |
shutdownInstrument()
Make sure to terminate measurement mode - it is "bad" to disconnect power while in measurement mode. |
protected void |
startStreaming()
Put instrument into streaming mode |
protected void |
stopStreaming()
Stop streaming |
int |
test()
Self-test routine; This does nothing in the Aquadopp driver |
protected boolean |
validateRecord(byte[] dataPoint,
int nBytes)
Internal routine to determine whether an individual data point is valid. |
| Methods inherited from class org.mbari.siam.core.StreamingInstrumentService |
|---|
acquire, acquireFromStream, doneAcquiring, doScheduledTask, resume, setAttributes, shutdown, suspend |
| 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, 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 TurbidityEventDetector _eventDetector
protected byte[] cmdbuf
protected byte[] _getPrompt
protected byte[] _getStatusInfo
protected byte[] _getCalCmd
protected int _maxStatusBytes
protected int _maxCalBytes
protected static final int MAX_SAMPLE_BYTES
protected DevicePacketParser _devicePacketParser
protected final int N_FIELDS
protected final int[] FIELD_WIDTHS
| Constructor Detail |
|---|
public StreamingSBE19()
throws java.rmi.RemoteException
java.rmi.RemoteException| Method Detail |
|---|
protected byte[] initPromptString()
initPromptString in class BaseInstrumentServiceprotected byte[] initSampleTerminator()
initSampleTerminator 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 BaseInstrumentServiceprotected int initMaxSampleBytes()
initMaxSampleBytes in class BaseInstrumentService
protected void initializeInstrument()
throws InitializeException,
java.lang.Exception
initializeInstrument in class StreamingInstrumentServiceInitializeException
java.lang.Exception
protected void getPrompt()
throws TimeoutException,
java.io.IOException,
java.lang.NullPointerException,
java.lang.Exception
TimeoutException
java.io.IOException
java.lang.NullPointerException
java.lang.Exceptionprotected boolean getPrompt(int retries)
public void sendCommand(java.lang.String cmd,
long timeout)
throws TimeoutException,
java.lang.NullPointerException,
java.io.IOException,
java.lang.Exception
TimeoutException
java.lang.NullPointerException
java.io.IOException
java.lang.Exception
public void sendCommand(java.lang.String cmd)
throws TimeoutException,
java.lang.NullPointerException,
java.io.IOException,
java.lang.Exception
TimeoutException
java.lang.NullPointerException
java.io.IOException
java.lang.Exception
public void sendCommandConfirm(java.lang.String cmd)
throws TimeoutException,
java.lang.NullPointerException,
java.io.IOException,
java.lang.Exception
TimeoutException
java.lang.NullPointerException
java.io.IOException
java.lang.Exception
public SerialPortParameters getSerialPortParameters()
throws gnu.io.UnsupportedCommOperationException
getSerialPortParameters in class DeviceServicegnu.io.UnsupportedCommOperationException
protected void stopStreaming()
throws java.lang.Exception
stopStreaming in class StreamingInstrumentServicejava.lang.Exceptionprotected boolean isStreaming()
isStreaming in class StreamingInstrumentService
protected void startStreaming()
throws java.lang.Exception
startStreaming in class StreamingInstrumentServicejava.lang.Exceptionpublic void setClock()
setClock in interface InstrumentsetClock in class BaseInstrumentService
protected ScheduleSpecifier createDefaultSampleSchedule()
throws ScheduleParseException
createDefaultSampleSchedule in class BaseInstrumentServiceScheduleParseExceptionprotected byte[] getInstrumentStateMetadata()
getInstrumentStateMetadata in class BaseInstrumentServicepublic PacketParser getParser()
getParser in interface InstrumentgetParser in class BaseInstrumentService
public DevicePacketParser getDevicePacketParser()
throws NotSupportedException
BaseInstrumentService
getDevicePacketParser in class BaseInstrumentServiceNotSupportedExceptionpublic int test()
test in interface Device
protected boolean validateRecord(byte[] dataPoint,
int nBytes)
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 float getTransmisChannel(java.lang.String sample)
throws java.lang.NumberFormatException
java.lang.NumberFormatException
protected SensorDataPacket processSample(byte[] sample,
int nBytes)
throws java.lang.Exception
processSample in class BaseInstrumentServicesample - raw samplenBytes - number of bytes in raw sample
java.lang.Exception
protected java.lang.String shutdownInstrument()
throws java.lang.Exception
shutdownInstrument in class BaseInstrumentServicejava.lang.Exception
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||