solarnetwork-api-core
    Preparing search index...

    Class DatumStreamMetadata

    Metadata about a datum stream.

    Implements

    Index

    Constructors

    • Constructor.

      Parameters

      • streamId: string

        the stream ID

      • zone: string

        the time zone ID

      • kind: DatumStreamType

        the stream type

      • objectId: number

        the node or location ID

      • sourceId: string

        the source ID

      • OptionaliNames: string[]

        the instantaneous property name array

      • OptionalaNames: string[]

        the accumulating property name array

      • OptionalsNames: string[]

        the status property name array

      Returns DatumStreamMetadata

    Accessors

    Methods

    • Get the property names for a given samples type.

      Parameters

      • samplesType: DatumSamplesType

        the type of property names to return; Tag is not supported

      Returns undefined | string[]

      the property names for the given type, or undefined if none available

    • Get this object as a standard JSON encoded string value.

      An example result looks like this:

      {
      "streamId": "7714f762-2361-4ec2-98ab-7e96807b32a6",
      "zone": "Pacific/Auckland",
      "kind": "n",
      "objectId": 123,
      "sourceId": "/power/1",
      "i": ["watts", "current", "voltage", "frequency"],
      "a": ["wattHours"]
      }

      Returns string

      the JSON encoded string

    • Create a new location datum stream metadata instance.

      Parameters

      • streamId: string

        the stream ID

      • zone: string

        the time zone ID

      • locationId: number

        the location ID

      • sourceId: string

        the source ID

      • OptionaliNames: string[]

        the instantaneous property name array

      • OptionalaNames: string[]

        the accumulating property name array

      • OptionalsNames: string[]

        the status property name array

      Returns DatumStreamMetadata

      the new metadata instance

    • Create a new node datum stream metadata instance.

      Parameters

      • streamId: string

        the stream ID

      • zone: string

        the time zone ID

      • nodeId: number

        the node ID

      • sourceId: string

        the source ID

      • OptionaliNames: string[]

        the instantaneous property name array

      • OptionalaNames: string[]

        the accumulating property name array

      • OptionalsNames: string[]

        the status property name array

      Returns DatumStreamMetadata

      the new metadata instance