|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectnet.java.jddac.common.fblock.Entity
net.java.jddac.jmdi.fblock.FunctionBlock
org.mbari.siam.distributed.measurement.SummarizerBlock
public abstract class SummarizerBlock
SummarizerBlock summarizes a series of Measurements. The summary is computed either on a specified schedule, or on every nth sample.
| Field Summary | |
|---|---|
static java.lang.String |
OpIdAddListener
|
static java.lang.String |
OpIdAddSample
|
static java.lang.String |
SCHEDULE_NAME
|
| Fields inherited from class net.java.jddac.jmdi.fblock.FunctionBlock |
|---|
BL_ACTIVE, BL_INACTIVE, BL_UNINITIALIZED, blockMajorState, blockModelNumber, blockVersion, FB_IDLE, FB_RUNNING, FB_STOPPED, functionBlockState, groupIds, META_TEDS, OpIdClear, OpIdConfigure, OpIdGetAllMetaData, OpIdGetBlockMajorState, OpIdGetFunctionBlockState, OpIdGetGroupIDs, OpIdGetMetaData, OpIdPause, OpIdResume, OpIdStart, pubPortsProperty, subPortsProperty |
| Fields inherited from class net.java.jddac.common.fblock.Entity |
|---|
description, instanceName, META_CLASS, META_NAME, META_OPERATIONS, objectProperties, OpIdGetAttribute, OpIdGetClassName, OpIdGetDescription, OpIdGetInstanceName, OpIdGetObjectProperties, OpIdGetOwningBlockObjectTag, OpIdSetAttribute, OpIdSetInstanceName, owningBlockObjectName, PerformInputArg, PerformResult |
| Constructor Summary | |
|---|---|
SummarizerBlock(int everyNthSample)
Create SummarizerBlock, generate summary on every nth sample. |
|
SummarizerBlock(ScheduleSpecifier schedule)
Create SummarizerBlock, generate summary on specified schedule. |
|
| Method Summary | |
|---|---|
void |
addListener(net.java.jddac.jmdi.fblock.FunctionBlock listener)
Add a "listener" F-Block; when the Summarizer computes a result, it will invoke each listener's perform() method. |
protected void |
addSample(SiamRecord record)
Add sample record to the summary. |
protected abstract void |
addSampleRecord(SiamRecord record)
Add specified sample record; subclass must implement. |
int |
addSchedule(java.lang.String name,
java.lang.String specifier,
boolean overwrite)
Add or replace schedule. |
abstract SiamRecord |
computeSummary()
Compute summary and return result in a Record. |
void |
doScheduledTask(ScheduleTask task)
Execute scheduled task, which is to compute summary. |
java.util.Collection |
getAllSchedules()
Return all owned schedules. |
Scheduler.ScheduleKey |
getScheduleKey()
Return unique owner ID. |
void |
goActive()
Set state to ACTIVE; if summary is generated on a schedule, this method activates the schedule timer. |
void |
notifySubscriber(short publicationID,
java.lang.String topic,
net.java.jddac.common.type.ArgArray payload)
Input data is received from publishers here. |
net.java.jddac.common.type.ArgArray |
perform(java.lang.String operationID,
net.java.jddac.common.type.ArgArray input)
This is the F-block's public "client-server" interface method. |
int |
removeAllSchedules()
Remove all schedules. |
int |
removeSchedule(java.lang.String name)
Remove specified schedule. |
abstract void |
resetSummary()
Reset summary results. |
int |
resumeSchedule(java.lang.String name)
Resume specified schedule. |
void |
setSchedule(ScheduleSpecifier schedule)
Summarize on specified schedule. |
long |
sleepingUntil(ScheduleTask task)
If execution thread of specified task is sleeping, return time at which it will resume; otherwise return 0. |
void |
summarizeEveryNthSample(int everyNthSample)
Summarize on every nth sample. |
int |
suspendSchedule(java.lang.String name)
Suspend specified schedule.Return integer code defined by Scheduler. |
int |
syncSchedule(java.lang.String name,
long delay)
"Synchronize" specified schedule. |
| Methods inherited from class net.java.jddac.jmdi.fblock.FunctionBlock |
|---|
clear, configure, destroy, destroyDeferredThread, getBlockMajorState, getBlockModelNumber, getBlockVersion, getEntityMetaData, getFunctionBlockState, getGroupIDs, getPubIDFromName, getSubIDFromName, initialize, pause, publish, publishDeferred, reset, resume, setGroupIDs, start |
| Methods inherited from class net.java.jddac.common.fblock.Entity |
|---|
addOpTableMeta, getDescription, getInstanceName, getObjectProperties, getObjectPropery, getOwningBlockObjectName, setDescription, setInstanceName, setObjectProperties, setObjectProperty, setOwningBlockObjectName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SCHEDULE_NAME
public static final java.lang.String OpIdAddSample
public static final java.lang.String OpIdAddListener
| Constructor Detail |
|---|
public SummarizerBlock(ScheduleSpecifier schedule)
throws ScheduleParseException
ScheduleParseExceptionpublic SummarizerBlock(int everyNthSample)
| Method Detail |
|---|
public final void summarizeEveryNthSample(int everyNthSample)
public final void setSchedule(ScheduleSpecifier schedule)
throws ScheduleParseException
ScheduleParseException
public void goActive()
throws net.java.jddac.common.exception.OpException
goActive in class net.java.jddac.jmdi.fblock.FunctionBlocknet.java.jddac.common.exception.OpExceptionpublic final Scheduler.ScheduleKey getScheduleKey()
getScheduleKey in interface ScheduleOwnerpublic final java.util.Collection getAllSchedules()
getAllSchedules in interface ScheduleOwnerpublic final void doScheduledTask(ScheduleTask task)
doScheduledTask in interface ScheduleOwner
public int addSchedule(java.lang.String name,
java.lang.String specifier,
boolean overwrite)
addSchedule in interface ScheduleOwner
public int syncSchedule(java.lang.String name,
long delay)
syncSchedule in interface ScheduleOwnerpublic int removeAllSchedules()
removeAllSchedules in interface ScheduleOwnerpublic int removeSchedule(java.lang.String name)
removeSchedule in interface ScheduleOwnerpublic int suspendSchedule(java.lang.String name)
suspendSchedule in interface ScheduleOwnerpublic int resumeSchedule(java.lang.String name)
resumeSchedule in interface ScheduleOwner
public net.java.jddac.common.type.ArgArray perform(java.lang.String operationID,
net.java.jddac.common.type.ArgArray input)
throws net.java.jddac.common.exception.OpException,
java.lang.Exception
perform in class net.java.jddac.jmdi.fblock.FunctionBlocknet.java.jddac.common.exception.OpException
java.lang.Exception
protected final void addSample(SiamRecord record)
throws java.lang.Exception
java.lang.Exception
public final void notifySubscriber(short publicationID,
java.lang.String topic,
net.java.jddac.common.type.ArgArray payload)
throws net.java.jddac.common.exception.OpException
notifySubscriber in interface net.java.jddac.jmdi.service.SubscriberCallbacknotifySubscriber in class net.java.jddac.jmdi.fblock.FunctionBlocknet.java.jddac.common.exception.OpExceptionpublic final long sleepingUntil(ScheduleTask task)
sleepingUntil in interface ScheduleOwnerpublic void addListener(net.java.jddac.jmdi.fblock.FunctionBlock listener)
protected abstract void addSampleRecord(SiamRecord record)
throws java.lang.Exception
java.lang.Exceptionpublic abstract SiamRecord computeSummary()
public abstract void resetSummary()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||