|
||||||||
| 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.InstrumentService
The application framework is a semi-complete application, providing data and behavior which are common to all instrument services. To complete the implementation of a specific instrument service, the programmer extends the InstrumentService class, and implements or overrides several InstrumentService methods.
InstrumentService provides the following as built-in features:
Access to instrument serial port: InstrumentService contains a java.io.OutputStream for output to the instrument's CommPort, and a java.io.InputStream for input from the instrument's CommPort. Subclasses can use these stream objects to communicate with the instrument. Note that these objects should NOT be accessed from your subclass constructor, as they haven't been created yet at construction time.
Power management: Your subclass must implement methods initCommunicationPowerPolicy(), and initInstrumentPowerPolicy(), which should return one of the following values defined in interface org.mbari.isi.interfaces.Instrument: PowerPolicy.NEVER (for self-powered instruments), PowerPolicy.ALWAYS, or PowerPolicy.WHEN_SAMPLING. The subclass needn't do any further power management, as the base automatically manages instrument power through its DPA port based on the "power policy" specified by your subclass.
The base class provides default values for a number of attributes (member variables); see comments on the DEFAULT_ fields (below). These default values can be overridden using the "set" methods provided for each attribute (e.g. setMaxSampleTries()). For some attributes, no reasonable default value is known, and must be provided by your subclass. These values are specified by implementing the abstract "init" member functions defined by the base class (e.g. initCommunicationPowerPolicy()).
To implement a specific instrument service, complete the following steps:
1. Extend InstrumentService to create your service's subclass
2. Implement any abstract InstrumentService methods (see documentation below for specific methods)
3. If necessary, override base class initializeInstrument() method, where service- and instrument-specific initialization should be done. If necessary, change values of base class attributes here, using "set" methods provided.
4. If necessary, override other base class methods
5. If necessary, add any additional attributes/methods needed to implement your instrument's service.
public abstract class InstrumentService
| Field Summary | |
|---|---|
protected java.lang.String |
_defaultSampleScheduleName
Deprecated. Name of default sample schedule |
protected InstrumentServiceAttributes |
_instrumentAttributes
Deprecated. Basic instrument service attributes. |
protected DevicePacket |
_lastPacket
Deprecated. Most recent DataPacket sent (of any kind) |
protected SensorDataPacket |
_lastSensorDataPacket
Deprecated. Most recent SensorDataPacket sent |
protected static org.apache.log4j.Logger |
_log4j
Deprecated. Log4j logger |
protected DeviceMessagePacket |
_messagePacket
Deprecated. DeviceMessagePacket. |
protected FilteredDeviceLog |
_packetLog
Deprecated. Sensor log for persistent packet storage. |
protected long |
_recordType
Deprecated. |
protected java.util.Vector |
_schedules
Deprecated. ScheduleTask container (schedules) |
protected SensorDataPacket |
_sensorDataPacket
Deprecated. SensorDataPacket to be returned to clients. |
protected static long |
RECORDTYPE_DEFAULT
Deprecated. |
protected static long |
RECORDTYPE_METADATA
Deprecated. |
protected static long |
RECORDTYPE_UNDEFINED
Deprecated. Default record type |
| 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 | |
|---|---|
InstrumentService()
Deprecated. Constructor. |
|
| Method Summary | |
|---|---|
SensorDataPacket |
acquire(boolean logSample)
Deprecated. Acquire data sample from instrument, process it, and put data into output queue. |
SensorDataPacket |
acquireSample(boolean logPacket)
Deprecated. Acquire data sample from instrument, process it, log it, and return it to caller. |
void |
addDefaultPacketFilters(PacketFilter[] filters)
Deprecated. Add default packet filters for data retrieval. |
protected int |
addSchedule(ScheduleTask schedule,
boolean overwrite)
Deprecated. Add the specified schedule task. |
int |
addSchedule(java.lang.String name,
java.lang.String schedule,
boolean overwrite)
Deprecated. Add/replace instrument schedule |
void |
annotate(byte[] annotation)
Deprecated. Put annotation into device data stream. |
void |
cacheProperties(byte[] note)
Deprecated. Cache service properties on the node, such that current property values will be restored next time service is created on this node. |
protected void |
checkInputProperties(java.util.Properties properties)
Deprecated. Check that all specified properties are allowed to be set on-the-fly. |
void |
cleanupServiceState()
Deprecated. Do overhead tasks needed to clean up after sample cycle. |
void |
clearDefaultPacketFilters()
Deprecated. Clear default packet filters for data retrieval. |
void |
clearPropertiesCache(byte[] note)
Deprecated. Clear properties cache. |
protected abstract ScheduleSpecifier |
createDefaultSampleSchedule()
Deprecated. Return specifier for default sampling schedule. |
ScheduleTask |
createTask(java.lang.String name,
ScheduleSpecifier schedule,
ScheduleOwner owner)
Deprecated. createTask is a factory method to make new schedule tasks by name. |
void |
disableSamplingDiagnostics()
Deprecated. Disable sampling diagnostics. |
void |
disableSummary()
Deprecated. Disable data summary generation. |
void |
doScheduledTask(ScheduleTask task)
Deprecated. Execute the scheduled task, as part of ScheduleOwner implementation. |
void |
enableSamplingDiagnostics()
Deprecated. Enable sampling diagnostics. |
void |
enableSummary()
Deprecated. Enable data summary generation. |
java.util.Collection |
getAllSchedules()
Deprecated. Return a vector of ScheduleTask objects Part of ScheduleOwner interface. |
Device[] |
getChildren()
Deprecated. Return child Devices. |
protected PowerPolicy |
getCommunicationPowerPolicy()
Deprecated. Get instrument communication power policy. |
protected int |
getCurrentLimit()
Deprecated. Get power channel's current limit. |
PacketFilter[] |
getDefaultPacketFilters()
Deprecated. Get default packet filters for data retrieval. |
ScheduleTask |
getDefaultSampleSchedule()
Deprecated. Get the default schedule |
java.lang.String |
getDefaultSampleScheduleName()
Deprecated. Get default sample schedule name |
DevicePacketParser |
getDevicePacketParser()
Deprecated. NOTE: THis method should be overridden by classes who need a DevicePacketParser |
byte[] |
getFileBytes(java.lang.String file)
Deprecated. Get the contents of a file and return them as a byte array |
InstrumentBlock |
getInstrumentBlock()
Deprecated. |
protected PowerPolicy |
getInstrumentPowerPolicy()
Deprecated. Get instrument power policy. |
protected int |
getInstrumentStartDelay()
Deprecated. Get instrument startup time |
protected byte[] |
getInstrumentStateMetadata()
Deprecated. Get instrument- and service-specific metadata. |
SensorDataPacket |
getLastSample()
Deprecated. Get last sample packet. |
Location |
getLocation()
Deprecated. Return Location of device. |
protected int |
getMaxSampleBytes()
Deprecated. Get maximum number of bytes in a data sample read from instrument. |
protected int |
getMaxSampleTries()
Deprecated. Get maximum number of tries when retrieving sample from instrument. |
MetadataPacket |
getMetadata(byte[] cause,
int components,
boolean logPacket)
Deprecated. Create, return and optionally log a metadata packet |
protected MetadataPacket |
getMetadata(byte[] cause,
int components,
java.lang.String[] attributeNames,
boolean logPacket)
Deprecated. Create, return, and optionally log metadata packet; if service attributes are requested, then include only specified attributes. |
byte[] |
getMetadataPayload(int components,
java.lang.String[] attributeList)
Deprecated. Get requested metadata state components in a byte array containing serialized State and StateAttribute objects. |
DevicePacketSet |
getPackets(long startTime,
long stopTime)
Deprecated. Return all logged data packets having creation time within specified time window. |
DevicePacketSet |
getPackets(long startTime,
long stopTime,
PacketFilter[] filters,
boolean excludeStale)
Deprecated. Return all logged data packets having creation time within specified time window, that pass specified packet filters. |
Device |
getParent()
Deprecated. Return parent Device. |
PacketParser |
getParser()
Deprecated. Get instrument's parser. |
byte[] |
getPortDiagnostics(boolean logPacket)
Deprecated. Get diagnostics message from device's port and optionally log it. |
byte[] |
getPortDiagnosticsSummary(boolean logPacket)
Deprecated. Get diagnostics summary message from device's port and optionally log it. |
protected byte[] |
getPromptString()
Deprecated. Get instrument's "prompt" character(s). |
java.util.Vector |
getProperties()
Deprecated. Get Vector of instrument properties; each Vector element consists of byte array with form "key=value". |
byte[] |
getProperty(byte[] key)
Deprecated. Get value of specified service property. |
protected byte[] |
getSampleBuf()
Deprecated. Get raw sample buffer. |
byte[] |
getSampleSchedule()
Deprecated. Return byte-string representation of instrument sampling schedule. |
protected byte[] |
getSampleTerminator()
Deprecated. Get sample terminator |
protected long |
getSampleTimeout()
Deprecated. Get sampling timeout (millisec) |
ScheduleTask |
getSchedule(java.lang.String name)
Deprecated. Get a schedule by name |
Scheduler.ScheduleKey |
getScheduleKey()
Deprecated. Return the schedule key, as part of ScheduleOwner implementation. |
java.util.Vector |
getSchedules()
Deprecated. Return a vector of ScheduleTask objects Part of Instrument interface. |
byte[] |
getServiceCacheBytes()
Deprecated. Get Service Cache file, returned as a byte array |
byte[] |
getServicePropertiesBytes()
Deprecated. Get Service Properties file, returned as a byte array |
byte[] |
getServiceXMLBytes()
Deprecated. Get Service XML file, returned as a byte array |
protected abstract PowerPolicy |
initCommunicationPowerPolicy()
Deprecated. Return initial value of instrument communication power policy. |
protected abstract int |
initCurrentLimit()
Deprecated. Return initial value of DPA current limit (milliamp). |
void |
initialize(NodeProperties nodeProperties,
Parent parent,
InstrumentPort port,
ServiceSandBox sandBox,
java.lang.String serviceXMLPath,
java.lang.String servicePropertiesPath,
java.lang.String cachedServicePath)
Deprecated. Initialize service parameters. |
void |
initializeDriverDefaults()
Deprecated. Load defaults for member variables using abstract methods. |
protected void |
initializeInstrument()
Deprecated. Do instrument- and service-specific initialization. |
protected abstract PowerPolicy |
initInstrumentPowerPolicy()
Deprecated. Return initial value of instrument power policy. |
protected abstract int |
initInstrumentStartDelay()
Deprecated. Return initial value of instrument startup time in millisec. |
protected abstract int |
initMaxSampleBytes()
Deprecated. Return initial value for maximum number of bytes in a instrument data sample. |
protected abstract byte[] |
initPromptString()
Deprecated. Return initial value for instrument's "prompt" character. |
protected abstract byte[] |
initSampleTerminator()
Deprecated. Return initial value for instrument's sample terminator |
void |
initServiceState()
Deprecated. Do overhead tasks needed to prepare for sample cycle. |
protected void |
interruptSampling()
Deprecated. Interrupt any sampling threads. |
void |
logPacket(DevicePacket devicePacket)
Deprecated. Centralized packet logging logic |
protected void |
managePowerSleep()
Deprecated. Return instrument to lowest possible power state between samples |
protected void |
managePowerWake()
Deprecated. Prepare instrument for sampling; connect comms and turn on power. |
java.lang.Object |
parseDataPacket(SensorDataPacket packet)
Deprecated. Parse the SensorDataPacket, returning an Object of a type that can (presumably) be interpreted by the invoker. |
protected void |
postSample()
Deprecated. Called after sample has been acquired, processed and logged. |
int |
powerOff()
Deprecated. Turn off instrument power. |
protected void |
powerOffCallback()
Deprecated. Called after power is removed from instrument. |
int |
powerOn()
Deprecated. Turn on instrument power |
protected void |
powerOnCallback()
Deprecated. Called after power is applied to instrument; return when instrument is ready for use. |
void |
prepareToRun()
Deprecated. Initialize service and instrument. |
protected void |
prepareToSample()
Deprecated. Prepare the device for sampling; called before requestSample(). |
protected void |
printData(byte[] buf)
Deprecated. Print instrument data contained in input buffer. |
protected SensorDataPacket |
processSample(byte[] sample,
int nBytes)
Deprecated. Process raw sample bytes, return TimeStampedData object. |
protected int |
readSample(byte[] sample)
Deprecated. Read raw sample bytes from serial port into buffer, return number of bytes read. |
int |
removeAllSchedules()
Deprecated. Remove all schedules. |
int |
removeSchedule(java.lang.String taskName)
Deprecated. Remove the specified schedule. |
protected abstract void |
requestSample()
Deprecated. Request a data sample from instrument. |
void |
resetPortDiagnostics()
Deprecated. Reset port diagnostics. |
int |
resumeSchedule(java.lang.String schedule)
Deprecated. Resume specified schedule. |
boolean |
running()
Deprecated. Indicates if run() has been successful. |
void |
setAttributes(ServiceAttributes attributes)
Deprecated. Set the ServiceAttributes object for this service. |
void |
setClock()
Deprecated. Set device's clock to current time; can throw NotSupportedException. |
abstract void |
setClock(long epochMsecs)
Deprecated. Set device's clock; can throw NotSupportedException. |
protected void |
setCommunicationPowerPolicy(PowerPolicy policy)
Deprecated. Set instrument communication power policy. |
protected void |
setCurrentLimit(int milliamps)
Deprecated. Set power channel's current limit. |
void |
setDefaultSampleScheduleName(java.lang.String name)
Deprecated. Set default sample schedule name |
void |
setInstrumentBlock(InstrumentBlock instrumentBlock)
Deprecated. |
protected void |
setInstrumentPowerPolicy(PowerPolicy policy)
Deprecated. Set instrument power policy. |
protected void |
setInstrumentStartDelay(int millisec)
Deprecated. Set instrument startup time |
protected void |
setMaxSampleBytes(int maxBytes)
Deprecated. Set maximum number of bytes in a raw data sample read from instrument. |
protected void |
setMaxSampleTries(int maxTries)
Deprecated. Set maximum number of tries when retrieving sample from instrument. |
protected void |
setPromptString(byte[] promptString)
Deprecated. Set instrument's "prompt" character(s). |
void |
setProperty(byte[] propertyStrings,
byte[] unused)
Deprecated. Set value of specified instrument service properties. |
protected void |
setRecordType(long type)
Deprecated. Set _recordType field |
protected void |
setSampleTerminator(byte[] sampleTerminator)
Deprecated. Set sample terminator. |
protected void |
setSampleTimeout(long timeout)
Deprecated. Set sampling timeout (millisec). |
byte[] |
shutdown()
Deprecated. Stop the service. |
protected java.lang.String |
shutdownInstrument()
Deprecated. Perform any instrument-specific shutdown actions; subclasses can override; by default does nothing. |
long |
sleepingUntil(ScheduleTask task)
Deprecated. If execution thread of specified task is sleeping, return time at which it will resume; otherwise return 0. |
boolean |
summaryEnabled()
Deprecated. Return true if summary generation is enabled. |
void |
suspend()
Deprecated. Put service in SUSPEND state. |
int |
suspendSchedule(java.lang.String schedule)
Deprecated. Suspend the specified schedule. |
protected int |
sync(long delayMillis)
Deprecated. Sync default sample schedule |
int |
syncSchedule(java.lang.String schedule,
long delayMillis)
Deprecated. "Synchronize" specified schedule. |
protected void |
validateSample(byte[] _sampleBuf,
int nBytes)
Deprecated. This method can optionally be overriden so the sub-class can determines the validity of the sampled bytes. |
| 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.Device |
|---|
getCommPortName, getFrameworkVersion, getId, getName, getSamplingCount, getSamplingErrorCount, getSamplingRetryCount, getStatus, host, resume, test |
| Methods inherited from interface org.mbari.siam.distributed.DeviceServiceIF |
|---|
getName |
| Field Detail |
|---|
protected static org.apache.log4j.Logger _log4j
protected DeviceMessagePacket _messagePacket
protected SensorDataPacket _sensorDataPacket
protected SensorDataPacket _lastSensorDataPacket
protected DevicePacket _lastPacket
protected FilteredDeviceLog _packetLog
protected static final long RECORDTYPE_UNDEFINED
protected static final long RECORDTYPE_METADATA
protected static final long RECORDTYPE_DEFAULT
protected long _recordType
protected java.util.Vector _schedules
protected java.lang.String _defaultSampleScheduleName
protected InstrumentServiceAttributes _instrumentAttributes
| Constructor Detail |
|---|
public InstrumentService()
throws java.rmi.RemoteException
java.rmi.RemoteException| Method Detail |
|---|
public boolean running()
public void enableSamplingDiagnostics()
public void disableSamplingDiagnostics()
protected abstract PowerPolicy initInstrumentPowerPolicy()
protected abstract PowerPolicy initCommunicationPowerPolicy()
protected abstract int initInstrumentStartDelay()
protected abstract int initCurrentLimit()
protected abstract byte[] initSampleTerminator()
protected abstract byte[] initPromptString()
protected abstract int initMaxSampleBytes()
protected final byte[] getPromptString()
protected final void setPromptString(byte[] promptString)
promptString - instrument's prompt stringprotected final byte[] getSampleTerminator()
protected final void setSampleTerminator(byte[] sampleTerminator)
sampleTerminator - instrument sample termination stringprotected final long getSampleTimeout()
protected final void setSampleTimeout(long timeout)
throws RangeException
timeout - sampling timeout in millisec
RangeExceptionprotected final int getMaxSampleTries()
protected final void setMaxSampleTries(int maxTries)
throws RangeException
maxTries - maximum number of times to attempt sample retrieval; must be
greater than 0
RangeExceptionprotected final int getMaxSampleBytes()
protected final void setMaxSampleBytes(int maxBytes)
throws RangeException
maxBytes - maximum number of bytes in a raw sample
RangeExceptionprotected final byte[] getSampleBuf()
public final SensorDataPacket getLastSample()
throws NoDataException
getLastSample in interface InstrumentNoDataExceptionprotected final int getCurrentLimit()
protected final void setCurrentLimit(int milliamps)
throws RangeException
milliamps - current limit in milliamps
RangeExceptionprotected final PowerPolicy getInstrumentPowerPolicy()
public InstrumentBlock getInstrumentBlock()
public void setInstrumentBlock(InstrumentBlock instrumentBlock)
protected final void setInstrumentPowerPolicy(PowerPolicy policy)
protected final PowerPolicy getCommunicationPowerPolicy()
protected final void setCommunicationPowerPolicy(PowerPolicy policy)
protected final int getInstrumentStartDelay()
protected final void setInstrumentStartDelay(int millisec)
throws RangeException
millisec - instrument startup delay in milliseconds
RangeException
public void initializeDriverDefaults()
throws InitializeException
InitializeException
public final void prepareToRun()
throws InitializeException,
java.lang.InterruptedException
prepareToRun in interface DeviceprepareToRun in class DeviceServiceInitializeException
java.lang.InterruptedException
protected void prepareToSample()
throws java.lang.Exception
java.lang.Exceptionprotected void postSample()
public SensorDataPacket acquireSample(boolean logPacket)
throws NoDataException
acquireSample in interface InstrumentNoDataException
public void initServiceState()
throws NoDataException
NoDataExceptionpublic void cleanupServiceState()
public SensorDataPacket acquire(boolean logSample)
throws NoDataException
logSample - log data if true
NoDataExceptionprotected void managePowerWake()
managePowerWake in class DeviceServicepublic int powerOn()
powerOn in interface Deviceprotected void managePowerSleep()
managePowerSleep in class DeviceServicepublic int powerOff()
powerOff in interface Device
protected abstract void requestSample()
throws TimeoutException,
java.lang.Exception
TimeoutException
java.lang.Exception
protected int readSample(byte[] sample)
throws TimeoutException,
java.io.IOException,
java.lang.Exception
sample - output buffer
TimeoutException
java.io.IOException
java.lang.Exception
protected void validateSample(byte[] _sampleBuf,
int nBytes)
throws InvalidDataException
_sampleBuf - sample buffer containing data to validatenBytes - Number of bytes of data to validate
InvalidDataException - thrown if data is found to be invalid
protected SensorDataPacket processSample(byte[] sample,
int nBytes)
throws java.lang.Exception
sample - raw samplenBytes - number of bytes in raw sample
java.lang.Exception
public java.lang.Object parseDataPacket(SensorDataPacket packet)
throws InvalidDataException,
java.rmi.RemoteException
InvalidDataException
java.rmi.RemoteException
public byte[] getMetadataPayload(int components,
java.lang.String[] attributeList)
throws java.rmi.RemoteException,
InvalidPropertyException
java.rmi.RemoteException
InvalidPropertyException
public MetadataPacket getMetadata(byte[] cause,
int components,
boolean logPacket)
throws java.rmi.RemoteException
getMetadata in interface DevicegetMetadata in class DeviceServicejava.rmi.RemoteException
protected MetadataPacket getMetadata(byte[] cause,
int components,
java.lang.String[] attributeNames,
boolean logPacket)
throws java.rmi.RemoteException,
InvalidPropertyException
cause - components - attributeNames - logPacket -
java.rmi.RemoteException
InvalidPropertyException
public byte[] getFileBytes(java.lang.String file)
throws java.io.FileNotFoundException,
java.io.IOException,
java.lang.NullPointerException
java.io.FileNotFoundException
java.io.IOException
java.lang.NullPointerExceptionpublic byte[] getServiceXMLBytes()
public byte[] getServicePropertiesBytes()
public byte[] getServiceCacheBytes()
protected byte[] getInstrumentStateMetadata()
protected void initializeInstrument()
throws InitializeException,
java.lang.Exception
InitializeException
java.lang.Exception
public Location getLocation()
throws UnknownLocationException
getLocation in interface DevicegetLocation in class DeviceServiceUnknownLocationExceptionpublic void annotate(byte[] annotation)
annotate in interface Instrumentpublic final byte[] getSampleSchedule()
getSampleSchedule in interface Instrument
public Device getParent()
throws NoParentException
getParent in interface DeviceNoParentException
public Device[] getChildren()
throws NoChildrenException
getChildren in interface DeviceNoChildrenException
public void initialize(NodeProperties nodeProperties,
Parent parent,
InstrumentPort port,
ServiceSandBox sandBox,
java.lang.String serviceXMLPath,
java.lang.String servicePropertiesPath,
java.lang.String cachedServicePath)
throws MissingPropertyException,
InvalidPropertyException,
PropertyException,
InitializeException,
java.io.IOException,
gnu.io.UnsupportedCommOperationException
initialize in class DeviceServiceMissingPropertyException
InvalidPropertyException
PropertyException
InitializeException
java.io.IOException
gnu.io.UnsupportedCommOperationExceptionprotected void powerOnCallback()
protected void powerOffCallback()
public void suspend()
suspend in interface Devicesuspend in class DeviceService
public DevicePacketSet getPackets(long startTime,
long stopTime)
throws NoDataException
getPackets in interface InstrumentNoDataException
public DevicePacketSet getPackets(long startTime,
long stopTime,
PacketFilter[] filters,
boolean excludeStale)
throws NoDataException
getPackets in interface InstrumentNoDataExceptionpublic void clearDefaultPacketFilters()
clearDefaultPacketFilters in interface Instrumentpublic void addDefaultPacketFilters(PacketFilter[] filters)
addDefaultPacketFilters in interface Instrumentpublic PacketFilter[] getDefaultPacketFilters()
getDefaultPacketFilters in interface Instrument
public byte[] getProperty(byte[] key)
throws MissingPropertyException
getProperty in interface InstrumentMissingPropertyException
public final void setProperty(byte[] propertyStrings,
byte[] unused)
throws java.rmi.RemoteException,
InvalidPropertyException
setProperty in interface Instrumentjava.rmi.RemoteException
InvalidPropertyException
public void cacheProperties(byte[] note)
throws java.lang.Exception
cacheProperties in interface Instrumentjava.lang.Exception
public void clearPropertiesCache(byte[] note)
throws java.rmi.RemoteException,
java.lang.Exception
clearPropertiesCache in interface Instrumentjava.rmi.RemoteException
java.lang.Exception
protected void checkInputProperties(java.util.Properties properties)
throws InvalidPropertyException
InvalidPropertyExceptionpublic java.util.Vector getProperties()
getProperties in interface Instrument
protected abstract ScheduleSpecifier createDefaultSampleSchedule()
throws ScheduleParseException
ScheduleParseExceptionprotected int sync(long delayMillis)
protected void printData(byte[] buf)
public byte[] getPortDiagnostics(boolean logPacket)
throws java.rmi.RemoteException
getPortDiagnostics in interface Instrumentjava.rmi.RemoteExceptionprotected void setRecordType(long type)
public void logPacket(DevicePacket devicePacket)
public DevicePacketParser getDevicePacketParser()
public byte[] getPortDiagnosticsSummary(boolean logPacket)
throws java.rmi.RemoteException
getPortDiagnosticsSummary in interface Instrumentjava.rmi.RemoteExceptionpublic void resetPortDiagnostics()
resetPortDiagnostics in interface Instrument
public PacketParser getParser()
throws NotSupportedException
getParser in interface InstrumentNotSupportedException
public void setClock()
throws NotSupportedException
setClock in interface InstrumentNotSupportedException
public abstract void setClock(long epochMsecs)
throws NotSupportedException
setClock in interface InstrumentNotSupportedExceptionpublic final Scheduler.ScheduleKey getScheduleKey()
getScheduleKey in interface ScheduleOwnerpublic final void doScheduledTask(ScheduleTask task)
doScheduledTask in interface ScheduleOwner
public final java.util.Vector getSchedules()
throws java.rmi.RemoteException
getSchedules in interface Instrumentjava.rmi.RemoteExceptionpublic final java.util.Collection getAllSchedules()
getAllSchedules in interface ScheduleOwnerpublic ScheduleTask getDefaultSampleSchedule()
public ScheduleTask getSchedule(java.lang.String name)
public java.lang.String getDefaultSampleScheduleName()
public int addSchedule(java.lang.String name,
java.lang.String schedule,
boolean overwrite)
addSchedule in interface ScheduleOwnername - Schedule nameschedule - Representation of scheduleoverwrite - If true, replace existing schedule
protected int addSchedule(ScheduleTask schedule,
boolean overwrite)
public int removeAllSchedules()
removeAllSchedules in interface ScheduleOwnerpublic int removeSchedule(java.lang.String taskName)
removeSchedule in interface ScheduleOwnerpublic int suspendSchedule(java.lang.String schedule)
suspendSchedule in interface ScheduleOwnerpublic int resumeSchedule(java.lang.String schedule)
ScheduleOwner
resumeSchedule in interface ScheduleOwner
public int syncSchedule(java.lang.String schedule,
long delayMillis)
ScheduleOwner
syncSchedule in interface ScheduleOwnerpublic void setDefaultSampleScheduleName(java.lang.String name)
public ScheduleTask createTask(java.lang.String name,
ScheduleSpecifier schedule,
ScheduleOwner owner)
public final void setAttributes(ServiceAttributes attributes)
setAttributes in interface DeviceServiceIFsetAttributes in class DeviceServicepublic byte[] shutdown()
shutdown in interface Deviceshutdown in class DeviceServiceprotected void interruptSampling()
public long sleepingUntil(ScheduleTask task)
sleepingUntil in interface ScheduleOwner
protected java.lang.String shutdownInstrument()
throws java.lang.Exception
java.lang.Exceptionpublic void enableSummary()
enableSummary in interface Instrumentpublic void disableSummary()
disableSummary in interface Instrumentpublic boolean summaryEnabled()
summaryEnabled in interface Instrument
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||