AP&C API Reference
Public Member Functions | Protected Member Functions | Properties | List of all members
Apac.Monitoring.Reading Class Reference

A basic type to hold reading values from real-world sensors. More...

Inheritance diagram for Apac.Monitoring.Reading:

Public Member Functions

delegate decimal RawDataHandler (byte[] rawData)
 A delegate used to process binary data from a reading, which comes in the form of a byte[]. More...
 
 Reading (DateTime stamp, MeasurementSource source, byte[] rawData, RawDataHandler handler)
 Initializes a new instance of the Reading class. More...
 
 Reading (MeasurementSource source, byte[] rawData, RawDataHandler handler)
 Initializes a new instance of the Reading class. More...
 
 Reading (MeasurementSource source, decimal value)
 Initializes a new instance of the Reading class. More...
 
void GetObjectData (SerializationInfo info, StreamingContext context)
 Populates a T:System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object. More...
 
Reading Clone ()
 Clones this instance. More...
 

Protected Member Functions

 Reading ()
 Initializes a new instance of the Reading class. More...
 
 Reading (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the Reading class. More...
 
virtual Reading OnClone ()
 Signals when Clone() has been called.. More...
 

Properties

DateTime Timestamp [get, protected set]
 Gets or sets the timestamp. More...
 
string TimestampISO [get]
 Gets the timestamp in ISO string form. More...
 
int Bucket [get]
 Gets the bucket, which is the number of the five minute period in which the timestamp falls. There are 12 buckets in an hour, 288 buckets in a day. More...
 
int Offset [get]
 Gets the offset into the bucket. More...
 
MeasurementSource Source [get, protected set]
 Gets or sets the source. More...
 
MeasurementMapping Map [get, set]
 Gets or sets the mapping associated with the measurement. More...
 
decimal Value [get, protected set]
 Gets (or sets for subclasses) the value of the measurement as received by the source or as modified by the compiler. More...
 
byte[] RawData [get]
 Gets the raw data used to create this reading (if any). Components providing raw data to readings must also provide a delegate to convert that data into decimal. More...
 

Detailed Description

A basic type to hold reading values from real-world sensors.

Constructor & Destructor Documentation

◆ Reading() [1/5]

Apac.Monitoring.Reading.Reading ( )
inlineprotected

Initializes a new instance of the Reading class.

◆ Reading() [2/5]

Apac.Monitoring.Reading.Reading ( DateTime  stamp,
MeasurementSource  source,
byte[]  rawData,
RawDataHandler  handler 
)
inline

Initializes a new instance of the Reading class.

Parameters
stampThe stamp.
sourceThe source.
rawDataThe raw data.
handlerThe handler.

◆ Reading() [3/5]

Apac.Monitoring.Reading.Reading ( MeasurementSource  source,
byte[]  rawData,
RawDataHandler  handler 
)
inline

Initializes a new instance of the Reading class.

Parameters
sourceThe source.
rawDataThe raw data.
handlerThe handler.

◆ Reading() [4/5]

Apac.Monitoring.Reading.Reading ( MeasurementSource  source,
decimal  value 
)
inline

Initializes a new instance of the Reading class.

Parameters
sourceThe source.
valueThe value.

◆ Reading() [5/5]

Apac.Monitoring.Reading.Reading ( SerializationInfo  info,
StreamingContext  context 
)
inlineprotected

Initializes a new instance of the Reading class.

Parameters
infoThe info.
contextThe context.

Member Function Documentation

◆ Clone()

Reading Apac.Monitoring.Reading.Clone ( )
inline

Clones this instance.

Returns
Returns a clone of this instance.

◆ GetObjectData()

void Apac.Monitoring.Reading.GetObjectData ( SerializationInfo  info,
StreamingContext  context 
)
inline

Populates a T:System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.

Parameters
infoThe T:System.Runtime.Serialization.SerializationInfo to populate with data.
contextThe destination (see T:System.Runtime.Serialization.StreamingContext) for this serialization.
Exceptions
T:System.Security.SecurityExceptionThe caller does not have the required permission.

◆ OnClone()

virtual Reading Apac.Monitoring.Reading.OnClone ( )
inlineprotectedvirtual

Signals when Clone() has been called..

Returns
Returns a clone of this instance.

◆ RawDataHandler()

delegate decimal Apac.Monitoring.Reading.RawDataHandler ( byte[]  rawData)

A delegate used to process binary data from a reading, which comes in the form of a byte[].

Parameters
rawDataThe raw data.
Returns
Returns a processed value of type decimal.

Property Documentation

◆ Bucket

int Apac.Monitoring.Reading.Bucket
get

Gets the bucket, which is the number of the five minute period in which the timestamp falls. There are 12 buckets in an hour, 288 buckets in a day.

◆ Map

MeasurementMapping Apac.Monitoring.Reading.Map
getset

Gets or sets the mapping associated with the measurement.

The map.

◆ Offset

int Apac.Monitoring.Reading.Offset
get

Gets the offset into the bucket.

◆ RawData

byte [] Apac.Monitoring.Reading.RawData
get

Gets the raw data used to create this reading (if any). Components providing raw data to readings must also provide a delegate to convert that data into decimal.

◆ Source

MeasurementSource Apac.Monitoring.Reading.Source
getprotected set

Gets or sets the source.

The source.

◆ Timestamp

DateTime Apac.Monitoring.Reading.Timestamp
getprotected set

Gets or sets the timestamp.

The timestamp.

◆ TimestampISO

string Apac.Monitoring.Reading.TimestampISO
get

Gets the timestamp in ISO string form.

◆ Value

decimal Apac.Monitoring.Reading.Value
getprotected set

Gets (or sets for subclasses) the value of the measurement as received by the source or as modified by the compiler.

The value.


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