Public Member Functions | Properties

VCInput Class Reference

Represents a single source of data used by a data consumer. More...

Inherits VCExtendedManagedObject.

List of all members.

Public Member Functions

(VCInputElement *) - element
 Retrive the element at (1,1) for this input.
(VCInputElement *) - elementAtRow:column:
 Retrieve the element for a specific row and column at this input.
(VCTimestamp *) - youngestDataTimestampInRun:
 Get the timestamp associated with the youngest data available in the specified run.
(VCTimestamp *) - oldestDataTimestampInRun:
 Get the timestamp associated with the oldest data available in the specified run.
(VCTimestamp *) - currentTimestamp
 Get the current timestamp for the source of this input.
(VCValue *) - currentValue
 Get the current value (value associated with the current timestamp) of the source for this input.
(VCValue *) - valueAtTime:forRun:
 Request the value at a specific time in a specific run.
(NSArray *) - count:forRun:fromTime:to:
 Request a set of values representing times evenly spaced between a start and stop.
(NSArray *) - count:forInterval:
 Request a set of values representing times evenly spaced within some interval ending at the current time for the source of this input.

Properties

NSString * inputName
 The name of the input.
int inputIndex
 The index of the input.
NSString * sourceName
 The name of the source for this input, or nil if the input is not currently connected.
NSString * path
 The path of the source for this input, or nil if the input is not currently connected.
NSDictionary * attributes
 A dictionary, providing key value (NSString, NSString) pairs of the attributes of the source for this input.
int dataType
 The data type of the source for this input.
int numberOfRows
 The number of rows that the source for this input reports. Note that this is only a hint- the source may still provide a value with a different number of rows.
int numberOfColumns
 The number of columns that the source for this input reports. Note that this is only a hint- the source may still provide a value with a different number of columns.
NSSet * elements
 The set of VCElement objects representing the individual elements of this input. If the data consumer has not indicated that it needs per-element configuration, this value will be nil.
VCInputSetinputSet
 The input set that this input has been placed in, if any.
NSString * units
 The units of the source of this input, or nill if the input is not currently connected.
BOOL isConnected
 Whether or not the input has been given a source (either a data point in a session or the output of another data consumer)

Detailed Description

A VCInput object rerpesents a single source of data used by a data consumer. Each data consumer has and manages its own set of inputs, and each input (eg, each line on a graph) will be represented by a distinct VCInput object. As with the data consumer controller's entity object, a VCInput object provides the capability to store and retrieve arbitrary key-value pairs as configuration data.

VCInput objects also provide the API necessary for retrieving current and historical data.


Member Function Documentation

- (NSArray *) count: (int)  numberOfPoints
forInterval: (VCInterval *)  interval 

Retrieve a set of historical values for the input in the current run. The values will be at evenly spaced timestamps (if possible) covering the interval ending with the current timestamp for the input.

Parameters:
numberOfPointsThe number of historical values that should be retrieved. The result will contain no more than this number of points, but may contain fewer if insufficient data is available.
intervalThe duration of time for which data should be retrieved. return If interval is nil, or the input's current timestamp is nil, returns nil. Otherwise, returns an NSArray containing VCValue objects representing the historical data values at times spaced throughout the interval. The points are arranged from oldest to youngest (chronologically increasing) order.
- (NSArray *) count: (int)  numberOfPoints
forRun: (unsigned)  runNumber
fromTime: (VCTimestamp *)  startT
to: (VCTimestamp *)  stop 

Retrieve a set of historical values for the input in the specified run. The values will be at evenly spaced timestamps (if possible) covering the period between the provided start and stop times.

Parameters:
numberOfPointsThe number of historical values that should be retrieved. The result will contain no more than this number of points, but may contain fewer if insufficient data is available.
runNumberThe run from which data should be retrieved. This should generally be the constant VCCurrentRun, to obey the user's current run selection.
startTThe oldest time for which data should be retrieved.
stopThe youngest time for which data should be retrieved. return Rreturns an NSArray containing VCValue objects representing the historical data values at times spaced throughout the startT to stop interval. The points are arranged from oldest to youngest (chronologically increasing) order.
- (VCTimestamp *) currentTimestamp

Retrieve the current timestamp for the source of the input. For inputs connected to session data points, the user can control the current timestamp via the Session Time Control; for inputs connected to processors, the processor determines the current timestep, generally based on the current timestamps of the inputs used to calculate the output.

Returns:
The current timestamp. If the input has no source, or the source has no data, returns nil.
- (VCValue *) currentValue

Retrieve the current value for the input; this is the value of the source of the input in the current run at the current timestamp. This is equivalent to calling valueAtTime:currentTimestamp forRun:VCCurrentRun, where currentTimestamp is the result of a call to currentTimestamp on this input.

Returns:
The current value. If the input has no source, or the input has no data, returns nil.
- (VCInputElement *) element

Retrieve the element (if it exists) for row 1, column 1. Equivalent to calling elementAtRow:1 column:1.

Returns:
If this input has elements, the element for (1,1) will be returned; otherwise returns nil.
- (VCInputElement *) elementAtRow: (int)  row
column: (int)  column 

Retreive the element (if it exists) for the specified row and column. Element row and column indices are 1-based, not 0-based, to match the indexing of matrices.

Parameters:
rowThe index of the row at which the element resides. Row indices are 1 based.
columnThe index of the column at which the element resides. Column indices are 1 based.
Returns:
If this input has elements, and has an element for (row,column), return that element. Otherwise, return nil.
- (VCTimestamp *) oldestDataTimestampInRun: (unsigned)  runNumber

Retrieve the timestamp of the youngest data available at the source of this input in a specific run.

Parameters:
runNumberThe run number for which the timestamp should be retrieved. Unless the data consumer independently handles managing run numbers, the constant VCCurrentRun should be passed in, allowing the display run to be managed globally by the user.
Returns:
The youngest (latest chronologically) timestamp available in the selected run, or nil if no data is availble for the selected run.
- (VCValue *) valueAtTime: (VCTimestamp *)  timestamp
forRun: (unsigned)  runNumber 

Retrieve the value of the input at a specific time in a specific run. This method is used to retrieve individual historical data points; for retrieving batches of historical data see count:forInterval: and count:forRun:fromTime:to:

Parameters:
timestampThe timestamp at which the value should be retrieved.
runNumberThe number of the run to find the value in. Most data consumers should pass VCCurrentRun to obey the user's current choice of run.
Returns:
The value that matches the provided timestamp and run, if such a value exists; otherwise nil.
- (VCTimestamp *) youngestDataTimestampInRun: (unsigned)  runNumber

Retrieve the timestamp of the youngest data available at the source of this input in a specific run.

Parameters:
runNumberThe run number for which the timestamp should be retrieved. Unless the data consumer independently handles managing run numbers, the constant VCCurrentRun should be passed in, allowing the display run to be managed globally by the user.
Returns:
The youngest (latest chronologically) timestamp available in the selected run, or nil if no data is availble for the selected run.

The documentation for this class was generated from the following files: