pamoja for TypeScript - v0.2.0
    Preparing search index...

    Class Profile

    A named, ready-to-run node assembled from pamoja capabilities.

    Index
    • Creates a profile of the program's own from its parts, with no description and no presentation.

      Parameters

      • name: string

        a stable, human-readable name, such as raised-bed-drip.

      • topic: string

        the topic each reading is published to.

      • control: profile.ControlPolicy

        the control policy; only the fields belonging to its kind are read, and cooling and rising are false unless given.

      • power: profile.PowerScheduleSettings

        how often the node samples as the battery drains.

      Returns profile.Profile

      when the control lacks a field its kind needs, a custom kind is empty, built in, or has a parameter named kind, a schedule's seconds are not a whole number, or the profile is one no node could run, such as a hysteresis of zero or intervals that shorten as the battery drains.

    • get description(): string | null

      What the profile is for, in the words its manifest carries, or null.

      Returns string | null

    • Builds the decision logic this profile describes.

      Each call builds a new controller, so keep the one it returns for the life of the node: one built again for each reading forgets whether its output was on and what the reading before was.

      Returns profile.Controller

      when the profile names a custom control kind, which no built-in controller decides.

    • A copy of this profile that says what it reads.

      Parameters

      • quantity: string

        the quantity its control decides on, such as temperature.

      • unit: string

        the unit its numbers are in, such as celsius.

      Returns profile.Profile

      when the quantity or unit is not lowercase words joined by underscores.