Skip to content

lib-sedona 库参考 ​

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

导读: Sedona Sox 连接器

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


目录(导读) ​

  • lib
  • meta
  • docs
  • tags
  • funcs
  • views
  • Overview
  • Connectors
  • Points
  • Manifests
  • sedonaPing(conn)
  • sedonaReadComp(conn, compId)
  • sedonaSyncCur(points)
  • sedonaWrite(conn, addr, val)

概述(中译) ​

Sedona Sox 连接器


API 正文(英文) ​

docs ​

Overview • Connectors • Points • Manifests


tags ​

sedonaConnSedona Sox connector to a remote device
sedonaConnRefUsed on a proxy point to reference its parent sedonaConn
sedonaCurSedona address to use for current value subscritions
sedonaPointPoint which synchronizes data via a Sedona connector
sedonaWriteSedona address to use for writing

funcs ​

sedonaPingDeprecated - use connPing()
sedonaReadCompSynchronously read the current state of the component identified by the given component identifier
sedonaSyncCurDeprecated - use connSyncCur()
sedonaWriteSynchronously write a property

views ​

sedonaManifestsManage the local database of Sedona manifest files

lib sedona ​

Overview ​

This library provides a connector for the Sedona Sox protocol. Sox is a binary UDP protocol for comminication to controllers which run the Sedona Framework control engine.

The sedona connector provides the following features:

  • Learn support to walk the remote device component tree
  • COV subscription to any component property
  • Writable support to any component property

Connectors ​

Sedona client connectors are configured with the following tags:

  • conn: required marker tag
  • sedonaConn: required marker tag
  • uri: formatted as "sox://host:port" such as "sox://192.168.1.88:1876"
  • username: user name for authentication
  • password: must have password stored in password db for connector's record id

After the first ping the following meta data tags are available:

  • sedonaVersion
  • sedonaPlatform

Points ​

Points use the following tags:

  • sedonaPoint: required marker tag
  • sedonaConnRef: associated connector
  • sedonaCur: address to subscribe for curVal
  • sedonaWrite: address to write for a local writable point

The address strings are formatted as "compId.slot". An example address might be "4.out" where the compId is the component's integer identifier and slot is the string name.

Manifests ​

Sedona connectors require a manifest XML file for each kit used by the remote devices. Manifests are stored under in the var/etc directory using this naming convention:

{var}/etc/sedona/manifests/{kit}/{kit}-{checksum.xml}

For example the "math" kit manifest with a checksum of "c22b255c" would be stored in the following file:

{var}/etc/sedona/manifest/math/math-c22b255c.xml

If running SkySpark, then manifests may be managed under the Sedona Manifests view under the Connectors app.



def ​

func:sedonaPing ​

sedonaPing(conn) ​

Deprecated - use connPing()


meta ​

admin✓
deffunc:sedonaPing
deprecated✓
isfunc
liblib:sedona
namesedonaPing

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:sedonaReadComp ​

sedonaReadComp(conn, compId) ​

Synchronously read the current state of the component identified by the given component identifier.


meta ​

admin✓
deffunc:sedonaReadComp
isfunc
liblib:sedona
namesedonaReadComp

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:sedonaSyncCur ​

sedonaSyncCur(points) ​

Deprecated - use connSyncCur()


meta ​

admin✓
deffunc:sedonaSyncCur
deprecated✓
isfunc
liblib:sedona
namesedonaSyncCur

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:sedonaWrite ​

sedonaWrite(conn, addr, val) ​

Synchronously write a property


meta ​

admin✓
deffunc:sedonaWrite
isfunc
liblib:sedona
namesedonaWrite

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

sedonaConn ​

Sedona Sox connector to a remote device.


meta ​

connFeatures
defsedonaConn
iconsedona
isconn
liblib:sedona

usage ​

sedonaConn  conn

supertypes ​

markerMarker labels a dict with typing information
entityTop-level dicts with a unique identifier
connConnector for communication to a remote system

tags ​

actorTimeoutTimeout for messages send to the connector's actor thread
connErrError message associated when connStatus indicates an error condition
connLingerLinger timeout used to keep a connector open
connOpenRetryFreqDuration used for connector open retries
connPingFreqDuration used to configure the auto-ping feature on a given connector
connStateCurrent connection state of a connector as one of the predefined strings
connStatusCurrent status of a connector as one of the predefined strings See Connectors
connTuningRefReference to a tuning configuration defined by a connTuning rec
disDisplay name for an entity
disabledIndicates the entity is in a disabled state
idDefines the unique identifier of an entity in system using a ref value type
passwordManages password which is hashed/stored to the password store
uriUniversal resource identifier
usernameUsername for an authentication account


def ​

sedonaConnRef ​

Used on a proxy point to reference its parent sedonaConn


meta ​

defsedonaConnRef
isref
liblib:sedona
ofsedonaConn
tagOnsedonaPoint

supertypes ​

valData value type
scalarScalar is an atomic value kind
refReference to an entity


def ​

sedonaCur ​

Sedona address to use for current value subscritions. Formatted as "compId.slot".


meta ​

defsedonaCur
isstr
liblib:sedona
tagOnsedonaPoint

supertypes ​

valData value type
scalarScalar is an atomic value kind
strUnicode string of characters


def ​

sedonaPoint ​

Point which synchronizes data via a Sedona connector.


meta ​

defsedonaPoint
isconnPoint
liblib:sedona

usage ​

sedonaPoint  point

supertypes ​

markerMarker labels a dict with typing information
entityTop-level dicts with a unique identifier
pointData point such as a sensor or actuator
connPointPoint associated with a connector for data synchronization with a remote system

tags ​

connTuningRefReference to a tuning configuration defined by a connTuning rec
curSupports current value
curCalibrationCalibration value to apply to adjust the value read from the connector before updating curVal
curConvertConversion to apply when reading curVal from connector
disDisplay name for an entity
disMacroDisplay name using macro syntax
disabledIndicates the entity is in a disabled state
enumDefines an eumeration of string key names
equipRefReference to equip which contains this entity
ghgFactorHisIdentifies point record with interval emission factor data that the Greenhouse Gas Emission Engine uses to calculate emissions
hisSupports historization of data
hisConvertConversion to apply when reading history data from connector
idDefines the unique identifier of an entity in system using a ref value type
kindKind name used to identity a value data type
maxValInclusive maximum for a numeric value
minValInclusive minimum for a numeric value
navNameNavigation name commonly used with disMacro to create computed display strings
pointFunctionClassifies the point as a sensor, command, or setpoint
pointQuantityQuantity the point senses or controls
pointSubjectWhat the point senses or controls
sedonaConnRefUsed on a proxy point to reference its parent sedonaConn
sedonaCurSedona address to use for current value subscritions
sedonaWriteSedona address to use for writing
siteRefReference to site which contains the entity
spaceRefReference to space which contains this entity
systemRefReference to system
tzTimezone identifier from standard timezone database
unitUnit identifier from standard unit database
writableSupports writing data
writeConvertConversion to apply when writing writeVal to the connector


def ​

sedonaWrite ​

Sedona address to use for writing. Formatted as "compId.slot".


meta ​

defsedonaWrite
isstr
liblib:sedona
tagOnsedonaPoint

supertypes ​

valData value type
scalarScalar is an atomic value kind
strUnicode string of characters


def ​

view:sedonaManifests ​

Manage the local database of Sedona manifest files


meta ​

admin✓
appNameconn
defview:sedonaManifests
disSedona Manifests
iconview
isview
liblib:sedona

supertypes ​

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

src ​

view:   { inherit:"table" }
upload: { disKey:"ui::upload" upload multi action:"sedonaKitManifestUpload" }
debug:  { disKey:"ui::view" action:"sedonaKitManifestView"  select }
delete: { disKey:"ui::delete" action:"sedonaDeleteKitManifests" select multi confirm:{dis:"Delete manifests?" details:"This will permanently delete the files from manifest directory."}}
data:   { expr:"sedonaKitManifests()" }