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)
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.
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.
Get an immutable representation of this instance or throw NotImmutableErr if this object cannot be represented as an immutable:
Return a string representation of this object.
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.
This method called whenever an it-block is applied to an
object. The default implementation calls the function with this
,
and then returns this
.
Static
echoWrite 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.
Optional
x: JsObjStatic
enumStatic
enumStatic
equipStatic
hisStatic
makeStatic
matchReturn if a point value matches a given critera:
==
operatorExamples:
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
Static
pointUser level-8 manual auto (override release) of writable point. See pointWrite.
Static
pointEvaluate 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)
Static
pointStatic
pointUser level-1 manual auto (override release) of writable point. See pointWrite.
Static
pointUser level-1 manual override of writable point. See pointWrite.
Static
pointUser 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.
Static
pointStatic
pointSet the relinquish default value (level-17) of writable point. See pointWrite.
Static
pointReturn grid of thermistor table names as grid with one name
column
Static
pointSet 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
Static
pointReturn 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:
Static
toMap 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:
device
tag are mapped as themselvesdeviceRef
tag are mapped to their parent devicesite
are mapped to devices with parent siteRef
space
are mapped to devices with parent spaceRef
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
Static
toMap 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:
equip
tag are mapped as themselvesequipRef
tag are mapped to their parent equipsite
are mapped to equip with parent siteRef
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
Static
toGiven a site, space, equip, or point rec, get its occupied point. The following algorithm is used to lookup the occupied point:
If there are no matches or multiple ambiguous matches, then return null or raise an exception based on checked flag.
Optional
checked: booleanStatic
toMap 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:
point
tag are mapped as themselvessite
are mapped to points with parent siteRef
space
are mapped to points with parent spaceRef
equip
are mapped to points with parent equipRef
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
Static
toMap 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:
site
tag are mapped as themselvessiteRef
tag are mapped to their parent siteExamples:
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
Static
toMap 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:
space
tag are mapped as themselvesspaceRef
tag are mapped to their parent spacesite
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
Point module Axon functions