@haxall/haxall
    Preparing search index...

    Class EcobeeDispatch

    ConnDispatch provides an implementation for all callbacks. A subclass is created by each connector to implement the various callbacks and store mutable state. All dispatch callbacks are executed within the parent Conn actor. See docHaxall::CustomConns#connDispatch.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    type$: Type

    Methods

    • Force this connector closed.

      Parameters

      Returns this

    • Return a negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified object:

      this < that   =>  <0
      this == that => 0
      this > that => >0

      This method may also be accessed via the < <= <=> >= and > shortcut operators. If not overridden the default implementation compares the toStr representations. Also see docLang.

      Examples:

      3.compare(8)  =>  -1
      8.compare(3) => 1
      8.compare(8) => 0
      3 <=> 8 => -1 // shortcut for 3.compare(8)

      Parameters

      Returns number

    • Parent connector

      Returns Conn

    • Runtime database

      Returns Folio

    • Display name

      Returns string

    • Compare this object to the specified for equality. This method may be accessed via the == and != shortcut operators. If not overridden the default implementation compares for reference equality using the === operator. If this method is overridden, then hash() must also be overridden such that any two objects which return true for equals() must return the same value for hash(). This method must accept null and return false.

      Parameters

      Returns boolean

    • Return a unique hashcode for this object. If a class overrides hash() then it must ensure if equals() returns true for any two objects then they have same hash code.

      Returns number

    • Return if there is one or more points currently in watch.

      Returns boolean

    • Record id

      Returns Ref

    • Return if this Obj is immutable and safe to share between threads:

      • an instance of a const class
      • the result of toImmutable on List, Map, or Buf
      • a Func object may or may not be immutable - see sys::Func.
      • other instances are assumed mutable and return false

      Returns boolean

    • Parent library

      Returns ConnLib

    • Log for this connector

      Returns Log

    • Callback to handle close of the connection.

      Returns void

    • Callback when conn record is removed

      Returns void

    • Callback when conn record is updated

      Returns void

    • Callback made periodically every few seconds to handle background tasks.

      Returns void

    • Callback to handle learn tree navigation. This method should return a grid where the rows are either navigation elements to traverse or points to map. The learn tag is used to indicate a row which may be "dived into" to navigate the remote system's tree. The learn value is passed back to this function to get the next level of the tree. A null arg should return the root of the learn tree.

      Also see ConnLib.onLearn which provides the top-level callback for learn. If your learn implementation does not require an open connection, then use the ConnLib level callback. By default that callback will dispatch a message to Conn actor, perform open, and then invoke this callback.

      The following tags should be used to indicate points to map:

      • dis: display name for navigation (required for all rows)
      • point: marker indicating point (1 or more fooCur/His/Write)
      • fooPoint: marker
      • fooCur: address if object can be mapped for cur real-time sync
      • fooWrite: address if object can be mapped for writing
      • fooHis: address if object can be mapped for history sync
      • kind: point kind type if known
      • unit: point unit if known
      • hisInterpolate: if point is known to be collected as COV
      • enum: if range of bool or multi-state is known
      • any other known tags to map to the learned points

      Parameters

      Returns Grid

    • Callback to handle opening the connection. Raise DownErr or FaultErr if the connection failed. This callback is always called before operations such as onPing.

      Returns void

    • Callback to handle ping of the connector. Return custom status tags such as device version, etc to store on the connector record persistently. If there are version tags which should be removed then map those tags to Remove.val. If ping fails then raise exception and the connector will be automatically closed.

      Returns Dict

    • Callback when point is added to this connector

      Parameters

      Returns void

    • Callback when point is removed from this connector

      Parameters

      Returns void

    • Callback when point record is updated

      Parameters

      Returns void

    • Callback to poll a bucket of points with the same tuning config. Default implementation calls onSyncCur. This callback is only used if the Conn.pollMode is configured as "buckets".

      Parameters

      Returns void

    • Callback made periodically for manual polling. This callback is only invoked if Conn.pollMode is configured as "manual". The frequency of the callback is determined by Conn.pollFreq. Use pointsWatched to list of points currently being watched.

      Returns void

    • Callback to handle custom actor messages

      Parameters

      Returns JsObj

    • Callback when one or more points are taken out of watch mode.

      Parameters

      Returns void

    • Callback when one or more points are put into watch mode. All the points are guaranteed to return true for isCurEnabled

      Parameters

      Returns void

    • Open the connector. The connection will linger open based on the configured linger timeout, then automatically close. If the connector fails to open, then raise an exception.

      Returns this

    • Get the point managed by this connector via its point rec id.

      Parameters

      • id: Ref
      • Optionalchecked: boolean

      Returns ConnPoint

    • Current version of the record. This dict only represents the current persistent tags. It does not track transient changes such as connStatus.

      Returns Dict

    • Set the Conn.data value. The value must be immutable.

      Parameters

      Returns void

    • Get an immutable representation of this instance or throw NotImmutableErr if this object cannot be represented as an immutable:

      • if type is const, return this
      • if already an immutable List, Map, Buf, or Func return this
      • if a List, then attempt to perform a deep clone by calling toImmutable on all items
      • if a Map, then attempt to perform a deep clone by calling toImmutable on all values (keys are already immutable)
      • some Funcs can be made immutable - see sys::Func
      • if a Buf create immutable copy, see sys::Buf
      • any other object throws NotImmutableErr

      Returns Readonly<this>

    • Return a string representation of this object.

      Returns string

    • Debug tracing for this connector

      Returns ConnTrace

    • Trap a dynamic call for handling. Dynamic calls are invoked with the -> shortcut operator:

      a->x        a.trap("x", null)
      a->x() a.trap("x", null)
      a->x = b a.trap("x", [b])
      a->x(b) a.trap("x", [b])
      a->x(b, c) a.trap("x", [b, c])

      The default implementation provided by Obj attempts to use reflection. If name maps to a method, it is invoked with the specified arguments. If name maps to a field and args.size is zero, get the field. If name maps to a field and args.size is one, set the field and return args[0]. Otherwise throw UnknownSlotErr.

      Parameters

      Returns JsObj

    • Get the Type instance which represents this object's class. Also seeType.of or Pod.of.

      Returns Type

    • This method called whenever an it-block is applied to an object. The default implementation calls the function with this, and then returns this.

      Parameters

      • f: (arg0: this) => void

      Returns this

    • Write x.toStr to standard output followed by newline. If x is null then print "null". If no argument is provided then print an empty line.

      Parameters

      Returns void