org.mbari.jddac
Class StatsBlock
java.lang.Object
net.java.jddac.common.fblock.Entity
net.java.jddac.jmdi.fblock.FunctionBlock
org.mbari.jddac.RelayBlock
org.mbari.jddac.AggregationBlock
org.mbari.jddac.StatsBlock
- All Implemented Interfaces:
- java.io.Serializable, net.java.jddac.common.util.ConfigurationInterface, net.java.jddac.jmdi.service.SubscriberCallback
public class StatsBlock
- extends AggregationBlock
Aggregates Records and/or Measurements for statistical analysis. Use as:
StatsBlock b = new StatsBlock();
b.addFilter(someFilter);
b.addAcceptedVariableName("AVariableNameToProcess");
b.addChild(someBlockToHandleOutput);
// Add some records
b.addArgArray(someArgArray1);
b.addArgArray(someArgArray2);
b.doStats();
You can add Child FunctionBLocks that listen for OpIdProcessRecord
- Author:
- brian
- See Also:
- Serialized Form
| 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 |
|
Method Summary |
void |
addAcceptedVariableName(java.lang.String variableName)
|
boolean |
addChild(net.java.jddac.jmdi.fblock.FunctionBlock child)
Children added to this function will only recieve ArgArrays that result
from the statistical processing. |
boolean |
addFunction(net.java.jddac.common.type.ArgArray argArray)
You are not allowed to add functions to this block. |
void |
doStats()
Calling this method causes Stats to be executed on the samples that have
been collected |
java.lang.String[] |
listAcceptedVariableNames()
|
net.java.jddac.common.type.ArgArray |
perform(java.lang.String server_operation_id,
net.java.jddac.common.type.ArgArray server_input_arguments)
Overridden method only adds logging. |
void |
removeAcceptedVariableName(java.lang.String variableName)
|
| Methods inherited from class org.mbari.jddac.AggregationBlock |
addArgArray, addFilter, addNewArgArrayListener, clear, getArgArrays, getFilters, getNewArgArrayListeners, getSamples, removeFilter, removeNewArgArrayListener, size |
| Methods inherited from class net.java.jddac.jmdi.fblock.FunctionBlock |
configure, destroy, destroyDeferredThread, getBlockMajorState, getBlockModelNumber, getBlockVersion, getEntityMetaData, getFunctionBlockState, getGroupIDs, getPubIDFromName, getSubIDFromName, goActive, initialize, notifySubscriber, 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 |
OpIdDoStats
public static final java.lang.String OpIdDoStats
- See Also:
- Constant Field Values
OpIdProcessRecord
public static final java.lang.String OpIdProcessRecord
- See Also:
- Constant Field Values
StatsBlock
public StatsBlock()
addChild
public boolean addChild(net.java.jddac.jmdi.fblock.FunctionBlock child)
- Children added to this function will only recieve ArgArrays that result
from the statistical processing.
- Overrides:
addChild in class RelayBlock
- Parameters:
child - A CHild FunctionBlock to handle results. The child should
process events with ID = OpIdProcessRecord- See Also:
NumberStatsFunction,
MutableIntegerArrayStatsFunction
addFunction
public boolean addFunction(net.java.jddac.common.type.ArgArray argArray)
- You are not allowed to add functions to this block. Calling this method
does nothing.
- Overrides:
addFunction in class RelayBlock
- Parameters:
argArray - An ArgArray containing the needed keys-value pairs- See Also:
IFunction
perform
public net.java.jddac.common.type.ArgArray perform(java.lang.String server_operation_id,
net.java.jddac.common.type.ArgArray server_input_arguments)
throws java.lang.Exception,
net.java.jddac.common.exception.OpException
- Overridden method only adds logging. It does not change the super methods
implementation.
- Overrides:
perform in class AggregationBlock
- Throws:
java.lang.Exception
net.java.jddac.common.exception.OpException
doStats
public void doStats()
- Calling this method causes Stats to be executed on the samples that have
been collected
addAcceptedVariableName
public void addAcceptedVariableName(java.lang.String variableName)
removeAcceptedVariableName
public void removeAcceptedVariableName(java.lang.String variableName)
listAcceptedVariableNames
public java.lang.String[] listAcceptedVariableNames()
Copyright © 2003 MBARI.
The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.