public class DataTurbine extends LimitedFiringSource
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
Parameter |
actorModeInputParam
Actor mode
|
Parameter |
blockTimeoutParam
The amount of time (ms) to wait for data to become available.
|
static java.lang.String |
CHANNEL_NAMES_OUTPUT_PORT
channelNames - This output port outputs all of the filtered (non-metric)
channel names.
|
PortParameter |
dataTurbineAddressInputParam
The URL to the DataTurbine Server
|
PortParameter |
durationPortParam
The duration of the request.
|
PortParameter |
outputChannelPortParam
The name of the channel to output through the specifiedChannel output port
|
java.lang.String |
outputRecOfArrays |
Parameter |
outputRecordOfArrays
Format of output datapoint and timestamp pairs: Record of 2 Arrays, or an
Array of X Records.
|
boolean |
paddingOn |
Parameter |
referenceInputParam
For Subscribe mode: Any of "newest", "oldest", "absolute", "next", or
"previous".
|
static java.lang.String |
SINKMODE_MONITOR |
static java.lang.String |
SINKMODE_REQUEST |
static java.lang.String |
SINKMODE_SUBSCRIBE |
Parameter |
sinkModeInputParam
Sink mode.
|
PortParameter |
startTimePortParam
Start time for Request or Subscribe modes. seconds or Date: yyyy-MM-dd HH:mm:ss
|
Parameter |
tryToPad
Will attempt to identify and pad gappy data with pairs of timestamps and
nils.
|
boolean |
willPad
padding is not always possible.
|
static java.lang.String |
ZEROTIME |
_firingCountLimit, _iterationCount, firingCountLimit
_triggered, output, trigger
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
DataTurbine(CompositeEntity container,
java.lang.String name)
Construct a DataTurbine source with the given container and name.
|
Modifier and Type | Method and Description |
---|---|
void |
attributeChanged(Attribute attribute)
Reconfigure actor when certain attributes change.
|
java.lang.Object |
clone(Workspace workspace)
Clone the actor into the specified workspace.
|
java.util.Vector<java.lang.Object> |
doPadding(java.util.Vector<java.lang.Object> timeAndDataVector,
java.lang.String chanTypeName) |
java.util.Vector<java.lang.Object> |
fillGaps(java.util.Vector<java.lang.Object> timeAndDataVector) |
void |
fire()
Send the token in the value parameter to the output.
|
java.lang.String |
getRBNBClientName()
Get the name of this DataTurbine client.
|
java.lang.String |
getServer()
Get the server name and port string.
|
com.rbnb.sapi.ChannelMap |
getUserChannelMap(java.lang.String[] requestedChannels)
Return a channel map that contains only channels with duration >=0 and
that were requested.
|
long |
guessSamplingRate(java.util.Vector<java.lang.Object> timeAndDataVector) |
boolean |
openDataTurbine()
Open connection to DataTurbine server.
|
void |
outputChannelNames()
Output the channel names through the CHANNEL_NAMES_OUTPUT_PORT
as an ArrayToken.
|
void |
outputData(com.rbnb.sapi.ChannelMap cmap)
Push the data out the output ports.
|
void |
outputNils(TypedIOPort port)
Output nils for a given port.
|
java.util.Vector<java.lang.Object> |
padGaps(long sampleInterval,
int numMissing,
java.util.Vector<java.lang.Object> timeAndDataVector) |
void |
preinitialize()
Reset the stop requested boolean.
|
void |
stop()
The director told us to stop firing immediately.
|
void |
wrapup()
Do nothing except invoke the wrapup() methods of any
objects that have been registered with addInitializable().
|
initialize, postfire
_customTypeConstraints, prefire
_containedTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stopFire, terminate
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, stopFire, terminate
addInitializable, removeInitializable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public static final java.lang.String ZEROTIME
public static final java.lang.String SINKMODE_MONITOR
public static final java.lang.String SINKMODE_REQUEST
public static final java.lang.String SINKMODE_SUBSCRIBE
public PortParameter dataTurbineAddressInputParam
public Parameter actorModeInputParam
public PortParameter outputChannelPortParam
public Parameter blockTimeoutParam
public Parameter sinkModeInputParam
public PortParameter startTimePortParam
public PortParameter durationPortParam
public static final java.lang.String CHANNEL_NAMES_OUTPUT_PORT
public Parameter referenceInputParam
public Parameter outputRecordOfArrays
public Parameter tryToPad
public java.lang.String outputRecOfArrays
public boolean paddingOn
public boolean willPad
public DataTurbine(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
name
- The name of this actor.IllegalActionException
- If the entity cannot be contained by the proposed
container.NameDuplicationException
- If the container already has an actor with this name.public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class Source
IllegalActionException
- If it is thrown by the send() method sending out the
token.public void preinitialize() throws IllegalActionException
preinitialize
in interface Initializable
preinitialize
in class AtomicActor<TypedIOPort>
IllegalActionException
- Not thrown in this base class.public void stop()
stop
in interface Executable
stop
in class AtomicActor<TypedIOPort>
public com.rbnb.sapi.ChannelMap getUserChannelMap(java.lang.String[] requestedChannels) throws com.rbnb.sapi.SAPIException
com.rbnb.sapi.SAPIException
public java.lang.String getServer()
public java.lang.String getRBNBClientName()
public void outputChannelNames()
public void outputData(com.rbnb.sapi.ChannelMap cmap) throws IllegalActionException
ChannelMap
- IllegalActionException
public java.util.Vector<java.lang.Object> doPadding(java.util.Vector<java.lang.Object> timeAndDataVector, java.lang.String chanTypeName)
timeAndDataVector
- chanTypeName
- public java.util.Vector<java.lang.Object> fillGaps(java.util.Vector<java.lang.Object> timeAndDataVector)
public long guessSamplingRate(java.util.Vector<java.lang.Object> timeAndDataVector)
public java.util.Vector<java.lang.Object> padGaps(long sampleInterval, int numMissing, java.util.Vector<java.lang.Object> timeAndDataVector)
public void outputNils(TypedIOPort port)
TypedIOPort
- portpublic boolean openDataTurbine() throws com.rbnb.sapi.SAPIException, IllegalActionException
com.rbnb.sapi.SAPIException
IllegalActionException
public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class LimitedFiringSource
attribute
- The changed Attribute.IllegalActionException
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class TypedAtomicActor
workspace
- The workspace for the new object.java.lang.CloneNotSupportedException
- If a derived class contains
an attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void wrapup() throws IllegalActionException
AtomicActor
wrapup
in interface Initializable
wrapup
in class AtomicActor<TypedIOPort>
IllegalActionException
- Not thrown in this base class.