|
||||||||
| 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.mclane.McLaneProfiler
public class McLaneProfiler
| Field Summary |
|---|
| 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 | |
|---|---|
McLaneProfiler()
|
|
| Method Summary | |
|---|---|
protected ScheduleSpecifier |
createDefaultSampleSchedule()
Return specifier for default sampling schedule. |
java.lang.String |
getFileListPath()
|
protected byte[] |
getInstrumentStateMetadata()
Get instrument 'metadata' from device itself. |
java.lang.String |
getLocalStorageDirectory()
|
SerialPortParameters |
getSerialPortParameters()
Subclass should return serial port parameters to use on port. |
protected PowerPolicy |
initCommunicationPowerPolicy()
Return initial value of instrument communication power policy. |
protected int |
initCurrentLimit()
Specify current limit in increments of 120 mA upto 11880 mA. |
java.lang.String |
initializeFileList()
Initialize file list to persist an index of downloaded files Creates the file if it does not already exist. |
void |
initializeInstrument()
Do instrument- and service-specific initialization. |
java.lang.String |
initializeLocalStorageDirectory()
create mclane directory on local file system, as necessary |
protected PowerPolicy |
initInstrumentPowerPolicy()
Return initial value of instrument power policy. |
protected int |
initInstrumentStartDelay()
Specify startup delay (millisec) |
protected int |
initMaxSampleBytes()
Return maximum number of bytes in a instrument data sample. |
protected byte[] |
initPromptString()
Return instrument's "prompt" characters. |
protected byte[] |
initSampleTerminator()
Return instrument's sample terminator characters. |
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 from instrument. |
void |
setClock(long epochMsecs)
Set device's clock to specified time. |
static java.lang.String[] |
split(java.lang.String stringToSplit,
java.lang.String stringToSplitOn)
how on earth did java make it to 1.3 without a split function? this one is probably pretty inneficient, but it should get the job done |
int |
test()
Run device's self-test routine. |
java.io.File |
transferFile(java.lang.String fileName)
This method will download the file specified by the given fileName from xmodem specified. |
| 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 |
| Constructor Detail |
|---|
public McLaneProfiler()
throws java.rmi.RemoteException
java.rmi.RemoteException| Method Detail |
|---|
protected PowerPolicy initInstrumentPowerPolicy()
BaseInstrumentService
initInstrumentPowerPolicy in class BaseInstrumentServiceprotected PowerPolicy initCommunicationPowerPolicy()
BaseInstrumentService
initCommunicationPowerPolicy in class BaseInstrumentServiceprotected int initInstrumentStartDelay()
initInstrumentStartDelay in class BaseInstrumentServiceprotected int initCurrentLimit()
initCurrentLimit in class BaseInstrumentServiceprotected byte[] initSampleTerminator()
BaseInstrumentService
initSampleTerminator in class BaseInstrumentServiceprotected byte[] initPromptString()
BaseInstrumentService
initPromptString in class BaseInstrumentServiceprotected int initMaxSampleBytes()
BaseInstrumentService
initMaxSampleBytes in class BaseInstrumentService
protected void requestSample()
throws TimeoutException,
java.lang.Exception
PolledInstrumentService
requestSample in class PolledInstrumentServiceTimeoutException
java.lang.Exception
protected int readSample(byte[] sample)
throws TimeoutException,
java.io.IOException,
java.lang.Exception
BaseInstrumentService
readSample in class BaseInstrumentServicesample - output buffer
TimeoutException
java.io.IOException
java.lang.Exceptionprotected byte[] getInstrumentStateMetadata()
BaseInstrumentService
getInstrumentStateMetadata in class BaseInstrumentService
public java.io.File transferFile(java.lang.String fileName)
throws java.lang.Exception,
java.io.IOException
fileName from xmodem specified. Because of
the XModem implementation, the download will execute asynchronously. To
allow for synchronous interaction with this method, a call to
this.notifyAll is made when the download is complete.
Therefore, you can make a call to wait() after calling
transferFile and when the download is complete, the
wait ing thread will be notified.
fileName -
java.io.IOException
java.lang.Exception
public static java.lang.String[] split(java.lang.String stringToSplit,
java.lang.String stringToSplitOn)
stringToSplit - stringToSplitOn -
protected ScheduleSpecifier createDefaultSampleSchedule()
throws ScheduleParseException
PolledInstrumentService
createDefaultSampleSchedule in class PolledInstrumentServiceScheduleParseException
public void setClock(long epochMsecs)
throws NotSupportedException
BaseInstrumentService
setClock in interface InstrumentsetClock in class BaseInstrumentServiceNotSupportedExceptionpublic SerialPortParameters getSerialPortParameters()
DeviceService
getSerialPortParameters in class DeviceServicepublic void initializeInstrument()
BaseInstrumentService
initializeInstrument in class BaseInstrumentService
public int test()
throws java.rmi.RemoteException
Device
test in interface Devicejava.rmi.RemoteExceptionpublic java.lang.String initializeFileList()
public java.lang.String initializeLocalStorageDirectory()
public java.lang.String getLocalStorageDirectory()
public java.lang.String getFileListPath()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||