Constructor.
the datum stream ID
the datum timestamp, either as a Date
instance or a form suitable for constructing as new Date(ts)
Optional
iProps: number[]the instantaneous property values
Optional
aProps: number[]the accumulating property values
Optional
sProps: string[]the status property values
Optional
tags: string[] | Iterable<string>the tag values
Optional
meta: DatumStreamMetadata | DatumStreamMetadataRegistryoptional metadata to attach, or a metadata registry to resolve metadata based on the given streamId
Optional
Readonly
aThe accumulating property values.
Optional
Readonly
iThe instantaneous property values.
Optional
Readonly
metaAttached metadata.
Optional
Readonly
sThe status property values.
Readonly
streamThe stream ID.
Optional
Readonly
tagsThe tag values.
Readonly
tsThe timestamp.
The timestamp.
Attached metadata.
Get the property values for a given samples type.
the type of property values to return
the property values for the given type, or undefined if none available
Get this object as a standard JSON encoded string value.
This method returns the JSON form of the result of #toJsonObject().
Optional
registry: DatumStreamMetadataRegistrya stream metadata registry to encode as a registry-indexed stream datum
the JSON encoded string
Get this object as an array suitable for encoding into a standard stream datum JSON string.
This method can encode the datum into an array using one of two ways, depending on whether the registry
argument is provided.
When provided, the first array element will be the stream metadata index based on calling
indexOfMetadataStreamId().
Otherwise the first array element will be the stream ID itself.
For example if a registry is used, the resulting array might look like this:
[0, 1650667326308, 12326, null, 230.19719, 50.19501, 6472722]
while without a registry the array might look like this:
["7714f762-2361-4ec2-98ab-7e96807b32a6", 1650667326308, 12326, null, 230.19719, 50.19501, 6472722]
Optional
registry: DatumStreamMetadataRegistrya stream metadata registry to encode as a registry-indexed stream datum
the datum stream array object
Get this instance as a simple object.
The following basic properties will be set on the returned object:
streamId
- the stream IDdate
- the timestampsourceId
- the metadata source IDnodeId
or locationId
- either the node ID or location ID from the metadatatags
- any tags (as an Array)Beyond that, all instantaneous, accumulating, and status properties will be included. If duplicate property names exist between the different classifications, the first-available value will be used.
Optional
meta: DatumStreamMetadata | DatumStreamMetadataRegistrya metadata instance or metadata registry to encode the property names with;
falls back to the meta
class property if not provided
an object populated with all available properties
Static
fromParse a JSON string into a StreamDatum instance.
The JSON must be encoded the same way toJsonEncoding() does.
the JSON to parse
a metadata instance or metadata registry to decode with
the stream datum instance
Static
fromCreate a new module:domain~StreamDatum StreamDatum instance from an array parsed from a stream datum JSON string.
The array must have been parsed from JSON that was encoded the same way module:domain~StreamDatum#toJsonEncoding StreamDatum#toJsonEncoding() does.
the array parsed from JSON
a metadata instance or metadata registry to decode with
the stream datum instance
Generated using TypeDoc
A stream datum entity.
A stream datum is a datum without any metadata describing the datum property names. The instantantaneous, accumulating, and status property values are stored as the array fields
iProps
,aProps
, andsProps
. A DatumStreamMetadata object is required to associate names with these arrays.