Skip to content

lib-point 库参考 ​

原文: https://finproducts.atlassian.net/wiki/spaces/JIDD3/pages/34793882343/FIN+5.3.1+lib-point 中文整理基于 FIN 5.3.1

导读: 点历史化和可写支持

以下为 API 参考,保留英文以便对照源码;目录已列出(英文标题便于检索);概述已尽量中译。


目录(导读) ​

  • lib
  • meta
  • docs
  • tags
  • funcs
  • views
  • def
  • supertypes
  • Overview
  • Point Cur
  • Point Writes
  • Point His
  • His Collect
  • Enum Meta
  • Point Conversion
  • enumDef(id, checked: true)
  • enumDefs()
  • equipToPoints(equip)
  • hisCollectWriteAll(timeout: null)
  • matchPointVal(val, match)
  • pointAuto(point)
  • pointConvert(pt, convert, val)
  • pointDetails(point)
  • pointEmergencyAuto(point)
  • pointEmergencyOverride(point, val)
  • pointOverride(point, val, duration: null)
  • pointOverrideCommand(point, val, level, duration: null)
  • pointSetDef(point, val)
  • pointThermistorTables()
  • pointWrite(point, val, level, who: null, opts: null)
  • pointWriteArray(point)
  • toDevices(recs)
  • toEquips(recs)
  • toOccupied(rec, checked: true)
  • toPoints(recs)
  • toSites(recs)
  • toSpaces(recs)

概述(中译) ​

点历史化和可写支持


API 正文(英文) ​

docs ​

Overview • Point Cur • Point Writes • Point His • His Collect • Enum Meta • Point Conversion


tags ​

curTracksWriteWhen configured curVal automatically tracks changes to writeVal and curStatus is set to "ok"
enumMetaProject singleton record with enumeration name/code definitions
hisCollectCovEnables COV history collection of the curVal
hisCollectCovRateLimitRate limits the frequency for hisCollectCov
hisCollectIntervalEnables interval history collection of the curVal
hisCollectNAHistorize the NA value whenever the curVal is null or curStatus is not equal to "ok"
hisCollectWriteFreqThis tag configures how long to buffer collected history items in memory before flushing them to the historian
obsPointWritesSubscribe to writable point priority array updates - see docs
sitePointMarker tag applied to a point to indicate the point is site-wide

funcs ​

enumDefReturn definition of given enum def defined by enumMeta This call forces a refresh of the definitions
enumDefsReturn grid of current enum defs defined by enumMeta
equipToPointsGiven a equip record Dict, return a grid of its points
hisCollectWriteAllWrite all hisCollect items buffered in memory to the historian
matchPointValReturn if a point value matches a given critera
pointAutoUser level-8 manual auto (override release) of writable point
pointConvertEvaluate a point conversion
pointDetailsGet debug string for point including writables and his collection
pointEmergencyAutoUser level-1 manual auto (override release) of writable point
pointEmergencyOverrideUser level-1 manual override of writable point
pointOverrideUser level-8 manual override of writable point
pointOverrideCommandIssue a point override command based on current user's access control permissions
pointSetDefSet the relinquish default value (level-17) of writable point
pointThermistorTablesReturn grid of thermistor table names as grid with one name column
pointWriteSet a writable point's priority array value at the given level
pointWriteArrayReturn the current priority array state of a writable point
toDevicesMap a set of recs to to a grid of devices
toEquipsMap a set of recs to to a grid of equips
toOccupiedGiven a site, space, equip, or point rec, get its occupied point
toPointsMap a set of recs to to a grid of points
toSitesMap a set of recs to to a grid of sites
toSpacesMap a set of recs to to a grid of spaces

views ​

monitorEquipsMonitor the current value of points for selected equipment
monitorPointsMonitor the current value of selected points


def ​

curTracksWrite ​

When configured curVal automatically tracks changes to writeVal and curStatus is set to "ok". This tag is ignored if the current value is bound to connector.


meta ​

defcurTracksWrite
ismarker
liblib:point
tagOncur-point

supertypes ​

markerMarker labels a dict with typing information

lib point ​

Overview ​

The point library is used to manage the standard functionality of point records that model sensors, commands, and setpoints. Important features of this library are management of the 16-level priority array for writable points and local history collection.

Point Cur ​

The term cur indicates synchronization of a point's current real-time value. By real-time we typically mean freshness within the order of of a few seconds. By convention a fooCur tag is used to configure the address used by the connector for current value synchronization. If a point has a real-time current value, then it must be annotated with the cur marker tag.

The following transient tags are used to model the current value and status:

  • curVal: current value of the point as Number, Bool, or Str
  • curStatus: ok, stale, down, fault, disabled, unknown, remoteDown, remoteFault, remoteDisabled, or remoteUnknown
  • curErr: error message if curStatus indicated error
  • additional details such as last ok/fail times, curErr stack trace, etc are available in the connector app via the "Details" command

If the point's connector is not in the "ok" state, then it inherits its error state for curStatus.

Because the current value might be changing several times a second, the tags above are managed transiently. This means they are not written to disk, nor persisted between server restarts. Changes to these tags are written to Folio using transient diffs.

The current value of points are synchronized one of two ways:

  • one-time synchronization is made using the connectors fooSyncCur() function
  • the point is added to a watch

Watches indicate an ongoing, live subscription of the point. Depending on the remote system this might involve an actual subscription over the network protocol. But for simpler protocols which only support polling, this means frequent polling of the point until its watch expires.

Point Writes ​

Writable points allow for control an output point or setpoint in a remote system via a connector. Writable points are modeled on the BACnet 16-level priority array with a relinquish default which effectively acts as level 17.

Any point rec can be turned into a writable point by adding the writable tag. Writable points should be cmd or sp points (never sensor points). Writable points must be mapped to a connector to actually command anything. By convention a fooWrite tag is used to configure the writable address.

The following levels have special behavior:

  • Level 1: highest priority reserved for emergency overrides
  • Level 8: manual override with ability to set timer to expire back to auto
  • Default: implicitly acts as level 17 for relinquish default

The priority array provides for contention resolution when many different control applications are vying for control of a given point. Low level applications like scheduling typically control levels 14, 15, or 16. Then users can override at level 8. But a higher levels like 2 to 7 can be used to trump a user override (for example a demand response energy routine that requires higher priority).

The effective value to write is resolved by starting at level 1 and working down to relinquish default to find the first non-null value. It is possible for all levels to be null, in which case the overall write output is null (which in turn may be auto/null to another system). Anytime a null value is written to a priority level, we say that level has been set to auto or released (this allows the next highest level to take command of the output).

Whenever the priority array's effective value is modified, then the following tags are transiently updated:

  • writeVal: this is the current "winning" value of the priority array, or if this tag is missing then the winning value is null
  • writeLevel: number from 1 to 17 indicate the winning priority array level
  • writeStatus: status of the connector's ability to write the last value: ok, disabled, down, fault. The special status "unbound" indicates a writable point that is not bound to an actual connector
  • writeErr: indicates the error message if writeStatus is error condition

Because the write value might be changing several times a second, the tags above are managed transiently. This means they are not written to disk, nor persisted between server restarts. Changes to these tags are written to Folio using transient diffs. They are recalculated on reboot.

Level 1, level 8, and default are special in that they are persistent. Changes to these levels will persist their value in Folio using the tags write1, write8, and writeDef. Timed overrides are not persistent. All other priority levels are transient - it is expected that control applications rewrite these levels on reboot.

The following Axon functions are used to write points:

  • pointEmergencyOverride()
  • pointEmergencyAuto()
  • pointOverride()
  • pointAuto()
  • pointSetDef()

There is also a pointWrite() function which allows forced writing to any level. But in general user interfaces should restrict access to the functions above to ensure users stick with levels 1, 8, and relinquish default. The pointWriteArray() function is used to read the current state of a point's write array.

The functions above all require the admin user permission. User interfaces should use the pointOverrideCommand() function. This function allows the framework to grant override permissions to specific points. In SkySpark this is configured with the pointOverrideAccess tag (not supported in Haxall).

Point His ​

Points which are historized are annotated with the his marker tag. Any point may be historized in one of two ways:

  • conn sync: if the remote system supports its own data logging facilities, then the point's connector should implement history synchronization
  • collect: the point history may be be collected locally using COV or interval sampling

The following tags are used to model the current value and status:

  • hisStatus: ok, down, fault, disabled, pending, syncing, unknown
  • hisErr: error message if hisStatus indicated error
  • additional details such as last ok/fail times, hisErr stack trace, etc are available in the connector app via the "Details" command

If the point's connector is not in the "ok" state, then it inherits its error state for hisStatus. History synchronization is performed using the connSyncHis() function which must be manually scheduled using the task lib.

His Collect ​

Many remote systems may not support local historization of their data points. Or even when supported it may not be enabled for the desired points. In these cases, you can setup history collection locally in the Haxall server. Local collection requires that the a connector (or some application) is updating the curVal tag.

History collection is setup in two ways:

  • hisCollectCov: setups up change of value collection
  • hisCollectInterval: setups up interval sample collection

You can combine these tags to perform both COV and interval collection. A recommended practice is to setup bool/enum/ and numeric setpoints using COV, but also with an interval of 1day. For sampled numeric sensor values an interval of 1min to 15min is recommended with a COV tolerance to log rapid swings in the data.

The following tags may be used to tune local history collection:

  • hisCollectNA: used to log NA when status is not "ok"
  • hisCollectCovRateLimit: used to throttle rapidly changing data
  • hisCollectWriteFreq: used to buffer items in RAM before flushing to Folio

IMPORTANT NOTE: it is always preferable to use remote collection with history synchronization instead of local collection when possible. Remote collection has the following advantages:

  • is always more efficient
  • ensures no data is lost during network outages
  • is much easier to tune since increasing the sync frequency does not result in data loss

Enum Meta ​

Connectors communicating with remote systems often use integer codes instead of string names for enumerated points. The mappings between string names and integer codes is managed by a singleton record with the enumMeta marker tag. Each string tag defines an enum definition. The name of the tag defines the enum identifier. The value is a string formatted as a Zinc grid with a name and code column.

Here is an example:

dis:"Enum Definitions"
enumMeta
switchState:
  ver:"3.0"
  name,code
  "off",0
  "on",1
speed:
  ver:"3.0"
  name,code
  "unknown",-1
  "off",0
  "slow",1
  "fast",2

The record is annotated with the enumMeta marker tag. There should only be one record in each project with this tag. In our example above there are two enum defs named "switchState" and "speed". We can use these names with point conversion as follows:

// convert 0 to "off", 1 to "slow" and 2 to "fast"
enumNumberToStr(speed)

// convert "off" to 0, "slow" to 1, and "fast" to 2
enumStrToNumber(speed)

A given name or given code may be double mapped, in which case the first mapping is defined as the normalized mapping. Consider this example:

// definition grid
ver:"3.0"
name,code
"alpha",0
"alpha",1
"beta",99
"gamma",99

// the mappings from the grid above are defined as follows
alpha  =>  0
beta   =>  99
gamma  =>  99
0      =>  alpha
1      =>  alpha
99     =>  beta

An enum definition may also be used to map to/from string/booleans. When mapping from a name to a boolean, any non-zero code is mapped as true and zero code as false. The first non-zero and zero name/code pair defines the mapping from boolean to string. For example:

// definition grid
ver:"3.0"
name,code
off,0
disabled,0
slow,1
fast,2

// mappings for booleans
off       =>  false
disabled  =>  false
slow      =>  true
fast      =>  true
false     =>  off    // first zero code
true      =>  slow   // first non-zero code

The following functions may be used to query the enum definitions in effect:

  • enumDefs(): query the list of enum defs defined by enumMeta
  • enumDef(): query name/code mapping of a specific enum def

Point Conversion ​

Point conversions are used to convert between the representations of external systems and the normalized local representations. They are used by the connector framework with the curConvert, writeConvert, and hisConvert tags. Use cases include:

  • mathematical conversions of raw modbus registers
  • type conversions
  • enum mappings between string/number and string/boolean
  • sensor voltage resets
  • sensor thermistor tables
  • unit conversion from fieldbus devices

You can test conversions via the pointConvert() function.

Examples:

// multiply raw value by 100
* 100

// multiply raw value by 100 and add 75
* 100 + 75

// convert °C to °F
°C => °F

// replace unit without conversion like 'as()' Axon function
as(°F)

// raise to the power of given exponent
pow(-1)

// reset 5-10 to 0-100
reset(5, 10, 0, 100)

// thermistor table; run pointThermistorTables() for full list
thermistor(10k-2)

// invert bool true -> false, vice versa
invert()

// swap endianness of unsigned two byte integer
u2SwapEndian()

// swap endianness of unsigned four byte integer
u4SwapEndian()

// zero to false, non-zero to true
numberToBool()

// parsing and formatting numbers
strToNumber()              // checked defaults to true
strToNumber(true)          // throws exception is not valid number
strToNumber(false)         // evaluates to null if not a valid number
hexToNumber()              // parse hex string
numberToStr()              // convert number to a string
numberToHex()              // convert number to a hex string

// bool functions
boolToNumber()            // convert false to 0 and true to 1
boolToNumber(2, 4)        // convert false to 2 and true to 4

// string functions
lower()                    // convert string to lowercase (ASCII only)
upper()                    // convert string to uppercsae (ASCII only)
strReplace('x', '_')       // replace "x" with "_"
strReplace(' ', '')        // replace space with the empty string

// enumeration conversions where 'x' is tag on enumMeta; if 'x' is
// "self" then use 'enum' tag on the record itself to map zero based ordinals
enumStrToNumber(x)         // checked defaults to true
enumStrToNumber(x,true)    // throws exception is mapping not defined
enumStrToNumber(x,false)   // evaluates to null if mapping not defined
enumNumberToStr(x)
enumStrToBool(x)
enumBoolToStr(x)

// elvis operator will pass thru non-null values, or
// convert null to given value
?: true                   // non-null value or Bool true
?: false                  // non-null value or Bool false
?: NA                     // non-null value or NA
?: 123                    // non-null value or Number 123
?: foo                    // non-null value or Str "foo"
strToNumber(false) ?: 0   // parse as number or 0 as fallback

Formal grammar for convert tags:

<conv>    :=  <expr> <expr>*
<expr>    :=  <math> | <bit> | <elvis> | <unit> | <func>

<math>    :=  <add> | <sub> | <mul> | <div>
<add>     :=  "+" <float>
<sub>     :=  "-" <float>
<mul>     :=  "*" <float>
<div>     :=  "/" <float>

<bit>     :=  <and> | <or> | <xor> | <shiftr> | <shiftl>
<and>     :=  "&" <int>
<or>      :=  "|" <int>
<xor>     :=  "^" <int>
<shiftr>  :=  ">>" <int>
<shiftl>  :=  "<<" <int>

<elvis>   := "?:" <literal>
<unit>    :=  <from> "=>" <to>

<func>    :=  <id> "(" <args> ")"
<args>    :=  <arg> ("," <arg>)*

<literal> := "true" | "false" | <float> | <str>

Functions:

as(unit)
invert()
pow(exp)
min(limit)
max(limit)
reset(inLo, inHi, outLo, outHi)
thermistor(table-name)
u2SwapEndian()
u4SwapEndian()
numberToBool()
strToNumber(checked)
hexToNumber(checked)
numberToStr()
numberToHex()
lower()
upper()
strReplace(from, to)
enumStrToNumber(enumDef, checked)
enumStrToBool(enumDef, checked)
enumNumberToStr(enumDef, checked)
enumBoolToStr(enumDef)

Note that multiple conversions can be piped together by separating them with a space. They are always evaluated left to right (there is no precedence for math operators).



def ​

enumMeta ​

Project singleton record with enumeration name/code definitions. See point.


meta ​

defenumMeta
ismarker
liblib:point

supertypes ​

markerMarker labels a dict with typing information


def ​

func:enumDef ​

enumDef(id, checked: true) ​

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


meta ​

deffunc:enumDef
isfunc
liblib:point
nameenumDef

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:enumDefs ​

enumDefs() ​

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


meta ​

deffunc:enumDefs
isfunc
liblib:point
nameenumDefs

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:equipToPoints ​

equipToPoints(equip) ​

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.


meta ​

deffunc:equipToPoints
isfunc
liblib:point
nameequipToPoints
overridable✓

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:hisCollectWriteAll ​

hisCollectWriteAll(timeout: null) ​

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


meta ​

admin✓
deffunc:hisCollectWriteAll
isfunc
liblib:point
namehisCollectWriteAll

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:matchPointVal ​

matchPointVal(val, match) ​

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

meta ​

deffunc:matchPointVal
isfunc
liblib:point
namematchPointVal

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:pointAuto ​

pointAuto(point) ​

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


meta ​

admin✓
deffunc:pointAuto
isfunc
liblib:point
namepointAuto

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:pointConvert ​

pointConvert(pt, convert, val) ​

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)

meta ​

deffunc:pointConvert
isfunc
liblib:point
namepointConvert

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:pointDetails ​

pointDetails(point) ​

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)

meta ​

deffunc:pointDetails
isfunc
liblib:point
namepointDetails

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:pointEmergencyAuto ​

pointEmergencyAuto(point) ​

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


meta ​

admin✓
deffunc:pointEmergencyAuto
isfunc
liblib:point
namepointEmergencyAuto

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:pointEmergencyOverride ​

pointEmergencyOverride(point, val) ​

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


meta ​

admin✓
deffunc:pointEmergencyOverride
isfunc
liblib:point
namepointEmergencyOverride

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:pointOverride ​

pointOverride(point, val, duration: null) ​

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().


meta ​

admin✓
deffunc:pointOverride
isfunc
liblib:point
namepointOverride

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:pointOverrideCommand ​

pointOverrideCommand(point, val, level, duration: null) ​

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


meta ​

deffunc:pointOverrideCommand
isfunc
liblib:point
namepointOverrideCommand

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:pointSetDef ​

pointSetDef(point, val) ​

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


meta ​

admin✓
deffunc:pointSetDef
isfunc
liblib:point
namepointSetDef

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:pointThermistorTables ​

pointThermistorTables() ​

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


meta ​

deffunc:pointThermistorTables
isfunc
liblib:point
namepointThermistorTables

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:pointWrite ​

pointWrite(point, val, level, who: null, opts: null) ​

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


meta ​

admin✓
deffunc:pointWrite
isfunc
liblib:point
namepointWrite

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:pointWriteArray ​

pointWriteArray(point) ​

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

meta ​

deffunc:pointWriteArray
isfunc
liblib:point
namepointWriteArray

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:toDevices ​

toDevices(recs) ​

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

meta ​

deffunc:toDevices
isfunc
liblib:point
nametoDevices

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:toEquips ​

toEquips(recs) ​

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

meta ​

deffunc:toEquips
isfunc
liblib:point
nametoEquips

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:toOccupied ​

toOccupied(rec, checked: true) ​

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.


meta ​

deffunc:toOccupied
isfunc
liblib:point
nametoOccupied

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:toPoints ​

toPoints(recs) ​

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

meta ​

deffunc:toPoints
isfunc
liblib:point
nametoPoints

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:toSites ​

toSites(recs) ​

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

meta ​

deffunc:toSites
isfunc
liblib:point
nametoSites

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:toSpaces ​

toSpaces(recs) ​

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

meta ​

deffunc:toSpaces
isfunc
liblib:point
nametoSpaces

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

hisCollectCov ​

Enables COV history collection of the curVal. The tag value must be Marker to collect on any change. Or if the point is Numeric, then the value may be a Number which indicates the tolerance a point must change before logged.

COV collection is rate throttled using a limit determined as follows:

  • use hisCollectCovRateLimit if configured
  • if a numeric with hisCollectInterval, then never collect faster than 1/10 of the interval or 1min (whichever is lower)
  • if a numeric without hisCollectInterval then use 1min as rate limit
  • fallback to 1sec rate limit for non-numerics

Also see point.


meta ​

defhisCollectCov
ismarker, number
liblib:point
tagOnhis-point

supertypes ​

markerMarker labels a dict with typing information
valData value type
scalarScalar is an atomic value kind
numberInteger or floating point numbers annotated with an optional unit


def ​

hisCollectCovRateLimit ​

Rate limits the frequency for hisCollectCov. When configured COV logging will never log any faster than this frequency. For example if set to 10sec, then the historian will log no faster than every 10sec even if the underlying data is changing every second.


meta ​

defhisCollectCovRateLimit
isduration
liblib:point
tagOnhis-point

supertypes ​

valData value type
scalarScalar is an atomic value kind
numberInteger or floating point numbers annotated with an optional unit
durationNumber with a unit of time


def ​

hisCollectInterval ​

Enables interval history collection of the curVal. The value must be a duration Number with a "sec", "min," or "hr" unit:

  • if secondly, then must be divisible evenly into a 60sec minute
  • if minutely, then must be evenly divisible into a 60min hour
  • if hourly, then must be evenly divisible into a 24hr day

Also see point.


meta ​

defhisCollectInterval
defVal1min
isduration
liblib:point
maxVal1day
minVal1sec
tagOnhis-point

supertypes ​

valData value type
scalarScalar is an atomic value kind
numberInteger or floating point numbers annotated with an optional unit
durationNumber with a unit of time


def ​

hisCollectNA ​

Historize the NA value whenever the curVal is null or curStatus is not equal to "ok". If this marker is omitted, then no value is logged in this sitaution. This behavior may be changed on for the entire project by adding this tag as a point setting.


meta ​

defhisCollectNA
ismarker
liblib:point
tagOnhis-point

supertypes ​

markerMarker labels a dict with typing information


def ​

hisCollectWriteFreq ​

This tag configures how long to buffer collected history items in memory before flushing them to the historian. If this tag is missing, then collected items are immediately flushed to the historian and to disk. But when this tag is configured with a duration number, items are be buffered in memory and then written to the historian in batch. Batch writes enable more efficient compression of the history data and allows you to tune how often data is fsync'ed to disk.


meta ​

defhisCollectWriteFreq
isduration
liblib:point
tagOnhis-point

supertypes ​

valData value type
scalarScalar is an atomic value kind
numberInteger or floating point numbers annotated with an optional unit
durationNumber with a unit of time


def ​

obsPointWrites ​

Subscribe to writable point priority array updates - see docs


meta ​

defobsPointWrites
isobsRecs
liblib:point

supertypes ​

markerMarker labels a dict with typing information
observableObservable subscription - see docs
obsRecsBase class for observables on database records

tags ​

obsFilterFilter string to define the record data set observed


def ​

sitePoint ​

Marker tag applied to a point to indicate the point is site-wide. For example an occupied point that models the occupancy of the entire building should be tagged as a sitePoint.


meta ​

defsitePoint
ismarker
liblib:point

supertypes ​

markerMarker labels a dict with typing information


def ​

view:monitorEquips ​

Monitor the current value of points for selected equipment


meta ​

appNamemonitor
defview:monitorEquips
disKeyui::equips
iconview
isview
liblib:point
order100

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:      { inherit:"table" }
equips:    { var input kind:"Ref<equip>[]" navSelAny share }
equipType: { var input kind:"Symbol" share uiInput:"ui::ChoiceInput" of:^equip defVal:^equip }
menu:      { action:"uiContextMenu" }
data:      { expr:"monitorEquips({{equips}}, {{equipType}})" }


def ​

view:monitorPoints ​

Monitor the current value of selected points


meta ​

appNamemonitor
defview:monitorPoints
disKeyui::points
iconview
isview
liblib:point

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:   { inherit:"table" }
points: { var input kind:"Ref<anyPoint>[]" navSelAny share }
menu:   { action:"uiContextMenu" }
data:   { expr:"monitorPoints({{points}})" }