|
||||||||
| 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.phDigital.PhDigital
public class PhDigital
PhDigital implements a PolledInstrumentService for a digital pH sensor.
| Nested Class Summary | |
|---|---|
class |
PhDigital.PhDigitalAttributes
Configurable PhDigital service attributes. |
| Field Summary | |
|---|---|
protected PhDigital.PhDigitalAttributes |
_attributes
|
protected boolean |
_lastResult
|
protected int |
_PHDIGITAL_CURRENT_LIMIT
|
protected int |
_PHDIGITAL_INSTRUMENT_START_DELAY
|
protected int |
_PHDIGITAL_MAX_SAMPLE_BYTES
|
protected int |
_PHDIGITAL_MAX_SAMPLE_TRIES
|
protected java.lang.String |
_PHDIGITAL_PROMPT_STRING
|
protected java.lang.String |
_PHDIGITAL_SAMPLE_TERMINATOR
|
protected long |
_PHDIGITAL_SAMPLE_TIMEOUT
Digital pH sample timeout in milliseconds |
protected boolean[] |
_readResults
|
protected byte[] |
_requestSample
|
protected byte[] |
_requestSampleEcho
|
protected double |
_temperature
Locally used temperature (typically acquired from other service, but defaults to attribute) |
static double |
K
|
static double |
KELVIN_OFFSET_TO_CELSIUS
|
| 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 | |
|---|---|
PhDigital()
Zero-arg constructor. |
|
| Method Summary | |
|---|---|
protected ScheduleSpecifier |
createDefaultSampleSchedule()
Return specifier for default sampling schedule. |
void |
dataCallback(DevicePacket sensorData,
PacketParser.Field[] fields)
dataCallback from the Temperature device |
PacketParser |
getParser()
Return a PacketParser. |
SerialPortParameters |
getSerialPortParameters()
Return parameters to use on serial port. |
protected PowerPolicy |
initCommunicationPowerPolicy()
required by BaseInstrumentService |
protected int |
initCurrentLimit()
required by BaseInstrumentService |
protected void |
initializeInstrument()
Initialize the sensor/driver. |
protected PowerPolicy |
initInstrumentPowerPolicy()
required by BaseInstrumentService |
protected int |
initInstrumentStartDelay()
required by BaseInstrumentService |
protected int |
initMaxSampleBytes()
required by BaseInstrumentService |
protected byte[] |
initPromptString()
required by BaseInstrumentService |
protected byte[] |
initSampleTerminator()
required by BaseInstrumentService |
protected void |
postSample()
postSample() checks for excessive failed reads, and shuts down the service if the failure count exceeds the maxFails attribute. |
protected void |
prepareToSample()
Get rid of any cruft before sampling. |
protected int |
readSample(byte[] sample)
Override readSample() in base class. |
protected void |
requestSample()
Request a sample. |
void |
resume()
Override resume() to clear failure counter. |
void |
serviceRegisteredCallback(RegistryEntry entry)
Callback for InstrumentDataListener interface, called when the Temperature service is registered with the InstrumentRegistry |
int |
test()
Self-test not implemented. |
| 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, getPortDiagnostics, getPortDiagnosticsSummary, getProperties, getProperty, getSampleSchedule, getSchedules, resetPortDiagnostics, setClock, 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, 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 byte[] _requestSample
protected byte[] _requestSampleEcho
protected long _PHDIGITAL_SAMPLE_TIMEOUT
protected int _PHDIGITAL_MAX_SAMPLE_TRIES
protected int _PHDIGITAL_MAX_SAMPLE_BYTES
protected int _PHDIGITAL_CURRENT_LIMIT
protected int _PHDIGITAL_INSTRUMENT_START_DELAY
protected java.lang.String _PHDIGITAL_PROMPT_STRING
protected java.lang.String _PHDIGITAL_SAMPLE_TERMINATOR
protected PhDigital.PhDigitalAttributes _attributes
protected boolean[] _readResults
protected boolean _lastResult
public static final double KELVIN_OFFSET_TO_CELSIUS
public static final double K
protected double _temperature
| Constructor Detail |
|---|
public PhDigital()
throws java.rmi.RemoteException
java.rmi.RemoteException| Method Detail |
|---|
public void serviceRegisteredCallback(RegistryEntry entry)
serviceRegisteredCallback in interface InstrumentDataListener
public void dataCallback(DevicePacket sensorData,
PacketParser.Field[] fields)
dataCallback in interface InstrumentDataListenersensorData - - SensorDataPacket that instrument loggedfields - - Result of passing sensorData to PacketParser.parseFields()
if registered DeviceService is an instanceof BaseInstrumentService. Else null.public int test()
test in interface Device
protected ScheduleSpecifier createDefaultSampleSchedule()
throws ScheduleParseException
createDefaultSampleSchedule in class PolledInstrumentServiceScheduleParseExceptionprotected PowerPolicy initInstrumentPowerPolicy()
initInstrumentPowerPolicy in class BaseInstrumentServiceprotected PowerPolicy initCommunicationPowerPolicy()
initCommunicationPowerPolicy in class BaseInstrumentServiceprotected int initMaxSampleBytes()
initMaxSampleBytes in class BaseInstrumentServiceprotected byte[] initPromptString()
initPromptString in class BaseInstrumentServiceprotected byte[] initSampleTerminator()
initSampleTerminator in class BaseInstrumentServiceprotected int initCurrentLimit()
initCurrentLimit in class BaseInstrumentServiceprotected int initInstrumentStartDelay()
initInstrumentStartDelay in class BaseInstrumentService
public SerialPortParameters getSerialPortParameters()
throws gnu.io.UnsupportedCommOperationException
getSerialPortParameters in class DeviceServicegnu.io.UnsupportedCommOperationException
protected void initializeInstrument()
throws InitializeException,
java.lang.Exception,
RangeException
initializeInstrument in class BaseInstrumentServiceInitializeException
java.lang.Exception
RangeException
protected void prepareToSample()
throws java.lang.Exception
prepareToSample in class BaseInstrumentServicejava.lang.Exception
protected void requestSample()
throws java.lang.Exception
requestSample in class PolledInstrumentServicejava.lang.Exception
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.Exceptionprotected void postSample()
postSample in class BaseInstrumentServicepublic void resume()
resume in interface Deviceresume in class BaseInstrumentService
public PacketParser getParser()
throws NotSupportedException
getParser in interface InstrumentgetParser in class BaseInstrumentServiceNotSupportedException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||