@haxall/haxall
    Preparing search index...

    Class PointFuncs

    Point module Axon functions

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    type$: Type

    Methods

    • 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

    • 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 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

    • 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

    • 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

    • Return definition of given enum def defined by enumMeta This call forces a refresh of the definitions.

      Parameters

      • id: string
      • Optionalchecked: boolean

      Returns Grid

    • Return grid of current enum defs defined by enumMeta. This call forces a refresh of the definitions.

      Returns Grid

    • Given a equip record Dict, return a grid of its points. If this function is overridden you MUST NOT use an XQuery to resolve points; this function must return local only points.

      Parameters

      Returns Grid

    • Write all hisCollect items buffered in memory to the historian. Block until complete or until timeout exceeded.

      Parameters

      Returns JsObj

    • Parameters

      • ...args: unknown[]

      Returns PointFuncs

    • Return if a point value matches a given critera:

      • match any values which are equal via == operator
      • zero matches false (0% ==> false)
      • non-zero matches true (not 0% ==> true)
      • numerics can be matches with range
      • match can be a function which takes the value

      Examples:

      matchPointVal(false, false)     >>  true
      matchPointVal(0, false) >> true
      matchPointVal(33, false) >> false
      matchPointVal(33, true) >> true
      matchPointVal(33, 0..40) >> true
      matchPointVal(90, 0..40) >> false
      matchPointVal(4) x => x.isEven >> true

      Parameters

      Returns boolean

    • User level-8 manual auto (override release) of writable point. See pointWrite.

      Parameters

      Returns JsObj

    • Evaluate a point conversion. First parameter is point to test (anything accepted by toRec) or null to use empty dict.

      Examples:

      pointConvert(null, "+ 2 * 10", 3)
      pointConvert(null, "hexToNumber()", "ff")
      pointConvert(null, "°C => °F", 20°C)

      Parameters

      Returns JsObj

    • Get debug string for point including writables and his collection. The argument is anything acceptable by toRec(). The result is returned as a plain text string.

      Examples:

      read(dis=="My Point").pointDetails
      pointDetails(@2b80f96a-820a4f1a)

      Parameters

      Returns string

    • User level-1 manual auto (override release) of writable point. See pointWrite.

      Parameters

      Returns JsObj

    • User level-1 manual override of writable point. See pointWrite.

      Parameters

      Returns JsObj

    • User level-8 manual override of writable point. If duration is specified it must be a number with unit of time that indicates how long to put the point into override. After the duration expires, the point is set back to auto (null). See pointWrite.

      Parameters

      Returns JsObj

    • Issue a point override command based on current user's access control permissions

      Parameters

      Returns JsObj

    • Set the relinquish default value (level-17) of writable point. See pointWrite.

      Parameters

      Returns JsObj

    • Return grid of thermistor table names as grid with one name column

      Returns Grid

    • Set a writable point's priority array value at the given level. The point may be any value accepted by toRec. Level must be 1 to 17 (where 17 represents def value). The who parameter is a string which represent debugging information about which user or application is writing to this priorirty array level. If who is omitted, then the current user's display string is used

      Parameters

      Returns JsObj

    • Return the current priority array state of a writable point. The point may be any value accepted by toRec. The result is returned grid with following columns:

      • level: number from 1 - 17 (17 is default)
      • levelDis: human description of level
      • val: current value at level or null
      • who: who last controlled the value at this level

      Parameters

      Returns Grid

    • Map a set of recs to to a grid of devices. The recs parameter may be any value accepted by toRecList(). Return empty grid if no mapping is found. The following mappings are supported:

      • recs with device tag are mapped as themselves
      • recs with deviceRef tag are mapped to their parent device
      • recs with site are mapped to devices with parent siteRef
      • recs with space are mapped to devices with parent spaceRef
      • recs with equip are mapped to devices with parent equipRef

      Examples:

      read(site).toDevices      // return children devices within site
      read(space).toDevices // return children devices within space
      read(equip).toDevices // return children devices within equip
      read(point).toDevices // return point's parent device

      Parameters

      Returns Grid

    • Map a set of recs to to a grid of equips. The recs parameter may be any value accepted by toRecList(). Return empty grid if no mapping is found. The following mappings are supported:

      • recs with equip tag are mapped as themselves
      • recs with equipRef tag are mapped to their parent equip
      • recs with site are mapped to equip with parent siteRef
      • recs with space are mapped to equip with parent spaceRef

      Examples:

      read(site).toEquips      // return children equip within site
      read(space).toEquips // return children equip within space
      read(equip).toEquips // return equip itself
      read(point).toEquips // return point's parent equip

      Parameters

      Returns Grid

    • Given a site, space, equip, or point rec, get its occupied point. The following algorithm is used to lookup the occupied point:

      1. Try to find in equip or parent of nested equip
      2. Try to find in space or parent of nested spaces
      3. Try to find in site if site if tagged as sitePoint

      If there are no matches or multiple ambiguous matches, then return null or raise an exception based on checked flag.

      Parameters

      • rec: JsObj
      • Optionalchecked: boolean

      Returns Dict

    • Map a set of recs to to a grid of points. The recs parameter may be any value accepted by toRecList(). Return empty grid if no mapping is found. The following mappings are supported:

      • recs with point tag are mapped as themselves
      • recs with site are mapped to points with parent siteRef
      • recs with space are mapped to points with parent spaceRef
      • recs with equip are mapped to points with parent equipRef
      • recs with device are mapped to points with parent deviceRef

      Examples:

      read(site).toPoints      // return children points within site
      read(space).toPoints // return children points within space
      read(equip).toPoints // return children points within equip
      read(device).toPoints // return children points within device

      Parameters

      Returns Grid

    • Map a set of recs to to a grid of sites. The recs parameter may be any value accepted by toRecList(). Return empty grid if no mapping is found. The following mappings are supported:

      • recs with site tag are mapped as themselves
      • recs with siteRef tag are mapped to their parent site

      Examples:

      read(site).toSites     // return site itself
      read(space).toSites // return space's parent site
      read(equip).toSites // return equip's parent site
      read(point).toSites // return point's parent site

      Parameters

      Returns Grid

    • Map a set of recs to to a grid of spaces. The recs parameter may be any value accepted by toRecList(). Return empty grid if no mapping is found. The following mappings are supported:

      • recs with space tag are mapped as themselves
      • recs with spaceRef tag are mapped to their parent space
      • recs with site are mapped to spaces with parent siteRef

      Examples:

      read(site).toSpaces      // return children spaces within site
      read(equip).toSpaces // return equip's parent space
      read(point).toSpaces // return point's parent space
      read(space).toSpaces // return space itself

      Parameters

      Returns Grid