外观
trendExt 扩展参考
原文: https://finproducts.atlassian.net/wiki/spaces/JIDD3/pages/34793947293/FIN+5.3.1+trendExt 中文整理基于 FIN 5.3.1
导读: 本页为 FIN 扩展
trendExt的 API 参考文档。
以下为 API 参考,保留英文以便对照源码;目录已列出(英文标题便于检索);概述已尽量中译。
目录(导读)
- classes
- enums
- Slot Details
- CMD_CANCEL
- CMD_NEXT_ATTRIBUTE_MESSAGE_NUMBER
- CMD_NEXT_OVERVIEW_MESSAGE_NUMBER
- CMD_RETRIEVE
- CMD_START
- CMD_STOP
- parseReceivedAttributesStringToList
- ALARM
- ATTRIBUTE
- NETWORK
- OVERVIEW
- PLING
- TEXT
- UNKNOWN
- UNSURE
- UTILITY
- X_19
- ZED
- asStr
- fromNum
- fromStr
- label
- number
- vals
- EINC
- IQ_3
- IQ_4
- IQ_EYE
- IQ_VIEW
- IQ_VIEW_3INC
- NXIP
- TOPS
- VIQ_3
- _3XTEND_3INC_L
- ACK
- CLEAR
- CREATE
- NAK
- READ
- REPLY
- SYN
- WRITE
- WRITE_NO_REPLY
- destination
- equals
- getCncCommsType
- getDestinationLan
- getDestinationOutstation
- getProtocolString
- getSourceOutstation
- make
- makeFromInStream
- msgClass
- source
- t1
- t2
- t3
- toStr
- validateType
- x1
- x2
- BEL
- CNC_HEADER_LENGTH
- CNC_MAX_CONTINUATION_MESSAGE_LENGTH
- CNC_MAX_MESSAGE_LENGTH
- CNC_TCP_RESPONSE_TIMEOUT_DEFAULT
- CNC_TCP_RESPONSE_TIMEOUT_MAXIMUM
- CNC_TCP_RESPONSE_TIMEOUT_MINIMUM
- CR
- DEFAULT_PLOT_DATA_PRECISION
- ENQ
- EOT
- ETX
- EXT_ADDR
- FF
- IP_CONFIGURATION_UDP_PORT
- IQ4_OVERVIEW_RESPONSE_LENGTH
- MAX_CNC_MESSAGE_NUMBER
- MIN_CNC_MESSAGE_NUMBER
- NOT_IN_USE_ADDRESS_255S
- NUL
- PIN_BYTES_LENGTH
- PLOT_RECORD_TYPE_ANALOGUE
- PLOT_RECORD_TYPE_DIGITAL
- PLOT_RECORD_TYPE_LOG_STATUS
- PLOT_RECORD_TYPE_TIME_CHANGE
- RS
- SI
- SO
- STX
- TREND_TO_FANTOM_UNIT_MAP
- UDP_BROADCAST_ADDRESS
- UDP_DISCOVERY_HEADER
- UDP_DISCOVERY_MESSAGE_MIN_SIZE
- WILDCARD_ADDRESS
- discoverable
- getDiscoveryParameters
- getParameterType
- getUnitsParameter
- getValueParameterLetter
- getValueParameterType
- iq2ToModNumDefault
- letter
- name
- numbered
- parameters
- properties
- NULL
- getTrendValueTypeEnum
- lookUps
- maxLen
- property
- range
- readWrite
- unit
- valueType
- vcncDiscovery
- …(其余标题见英文正文)
API 正文(英文)
| CncDeviceTypeEnum | | | CncMsgClassEnum | | | IpConfigMsgCodeEnum | | | TrendDeviceTypeEnum | | | TrendValueTypeEnum | |
ActorCommands
const class ActorCommands : Obj
Fields
| CMD_CANCEL | |
| CMD_NEXT_ATTRIBUTE_MESSAGE_NUMBER | |
| CMD_NEXT_OVERVIEW_MESSAGE_NUMBER | |
| CMD_RETRIEVE | |
| CMD_START | |
| CMD_STOP |
Slot Details
CMD_CANCEL
const static Str CMD_CANCEL := "CANCEL"
CMD_NEXT_ATTRIBUTE_MESSAGE_NUMBER
const static Str CMD_NEXT_ATTRIBUTE_MESSAGE_NUMBER := "NEXT_ATTR_NUM"
CMD_NEXT_OVERVIEW_MESSAGE_NUMBER
const static Str CMD_NEXT_OVERVIEW_MESSAGE_NUMBER := "NEXT_OVRVW_NUM"
CMD_RETRIEVE
const static Str CMD_RETRIEVE := "RETRIEVE"
CMD_START
const static Str CMD_START := "START"
CMD_STOP
const static Str CMD_STOP := "STOP"
AttributeMessageSupport
class AttributeMessageSupport : Obj
Converts Trend attributes into a processable form.
Methods
| parseReceivedAttributesStringToList |
Slot Details
parseReceivedAttributesStringToList
static ModuleParameterValues[] parseReceivedAttributesStringToList(Str msgBody)
CncCommsTypeEnum
@Serializable { simple=true } enum class CncCommsTypeEnum : Enum
Enum
| UNKNOWN | |
| UNSURE | |
| PLING | |
| ALARM | |
| NETWORK | |
| TEXT | |
| ATTRIBUTE | |
| OVERVIEW | |
| UTILITY | |
| X_19 | |
| ZED |
Constructors
| fromStr | Return the CncCommsTypeEnum instance for the specified name. |
Fields
| label | |
| number | |
| vals | List of CncCommsTypeEnum values indexed by ordinal |
Methods
| asStr | |
| fromNum |
Slot Details
ALARM
const static CncCommsTypeEnum ALARM := ...
ATTRIBUTE
const static CncCommsTypeEnum ATTRIBUTE := ...
NETWORK
const static CncCommsTypeEnum NETWORK := ...
OVERVIEW
const static CncCommsTypeEnum OVERVIEW := ...
PLING
const static CncCommsTypeEnum PLING := ...
TEXT
const static CncCommsTypeEnum TEXT := ...
UNKNOWN
const static CncCommsTypeEnum UNKNOWN := ...
UNSURE
const static CncCommsTypeEnum UNSURE := ...
UTILITY
const static CncCommsTypeEnum UTILITY := ...
X_19
const static CncCommsTypeEnum X_19 := ...
ZED
const static CncCommsTypeEnum ZED := ...
asStr
static Str asStr(Int num)
fromNum
static CncCommsTypeEnum fromNum(Int num)
fromStr
static new fromStr(Str name, Bool checked := true)
Return the CncCommsTypeEnum instance for the specified name. If not a valid name and checked is false return null, otherwise throw ParseErr.
label
const Str label
number
const Int number
vals
const static CncCommsTypeEnum[] vals := ...
List of CncCommsTypeEnum values indexed by ordinal
CncDeviceTypeEnum
@Serializable { simple=true } enum class CncDeviceTypeEnum : Enum
Enum
| UNKNOWN | |
| EINC | |
| VIQ_3 | |
| IQ_3 | |
| IQ_VIEW | |
| IQ_VIEW_3INC | |
| _3XTEND_3INC_L | |
| NXIP | |
| IQ_EYE | |
| TOPS | |
| IQ_4 |
Constructors
| fromStr | Return the CncDeviceTypeEnum instance for the specified name. |
Fields
| number | |
| vals | List of CncDeviceTypeEnum values indexed by ordinal |
Methods
| fromNum |
Slot Details
EINC
const static CncDeviceTypeEnum EINC := ...
IQ_3
const static CncDeviceTypeEnum IQ_3 := ...
IQ_4
const static CncDeviceTypeEnum IQ_4 := ...
IQ_EYE
const static CncDeviceTypeEnum IQ_EYE := ...
IQ_VIEW
const static CncDeviceTypeEnum IQ_VIEW := ...
IQ_VIEW_3INC
const static CncDeviceTypeEnum IQ_VIEW_3INC := ...
NXIP
const static CncDeviceTypeEnum NXIP := ...
TOPS
const static CncDeviceTypeEnum TOPS := ...
UNKNOWN
const static CncDeviceTypeEnum UNKNOWN := ...
VIQ_3
const static CncDeviceTypeEnum VIQ_3 := ...
_3XTEND_3INC_L
const static CncDeviceTypeEnum _3XTEND_3INC_L := ...
fromNum
static CncDeviceTypeEnum fromNum(Int num)
fromStr
static new fromStr(Str name, Bool checked := true)
Return the CncDeviceTypeEnum instance for the specified name. If not a valid name and checked is false return null, otherwise throw ParseErr.
number
const Int number
vals
const static CncDeviceTypeEnum[] vals := ...
List of CncDeviceTypeEnum values indexed by ordinal
CncMsgClassEnum
@Serializable { simple=true } enum class CncMsgClassEnum : Enum
Enum
| UNKNOWN | |
| WRITE_NO_REPLY | |
| WRITE | |
| ACK | |
| READ | |
| REPLY | |
| NAK | |
| SYN | |
| CLEAR | |
| CREATE |
Constructors
| fromStr | Return the CncMsgClassEnum instance for the specified name. |
Fields
| label | |
| number | |
| vals | List of CncMsgClassEnum values indexed by ordinal |
Methods
| asStr | |
| fromNum |
Slot Details
ACK
const static CncMsgClassEnum ACK := ...
CLEAR
const static CncMsgClassEnum CLEAR := ...
CREATE
const static CncMsgClassEnum CREATE := ...
NAK
const static CncMsgClassEnum NAK := ...
READ
const static CncMsgClassEnum READ := ...
REPLY
const static CncMsgClassEnum REPLY := ...
SYN
const static CncMsgClassEnum SYN := ...
UNKNOWN
const static CncMsgClassEnum UNKNOWN := ...
WRITE
const static CncMsgClassEnum WRITE := ...
WRITE_NO_REPLY
const static CncMsgClassEnum WRITE_NO_REPLY := ...
asStr
static Str asStr(Int num)
fromNum
static CncMsgClassEnum fromNum(Int num)
fromStr
static new fromStr(Str name, Bool checked := true)
Return the CncMsgClassEnum instance for the specified name. If not a valid name and checked is false return null, otherwise throw ParseErr.
label
const Str label
number
const Int number
vals
const static CncMsgClassEnum[] vals := ...
List of CncMsgClassEnum values indexed by ordinal
CncTcpMessageHeader
const class CncTcpMessageHeader : Obj
Constructors
| make | |
| makeFromInStream |
Fields
| destination | |
| msgClass | |
| source | |
| t1 | |
| t2 | |
| t3 | |
| x1 | |
| x2 |
Methods
| equals | |
| getCncCommsType | |
| getDestinationLan | |
| getDestinationOutstation | |
| getProtocolString | |
| getSourceOutstation | |
| toStr | |
| validateType |
Slot Details
destination
const Int destination
equals
virtual override Bool equals(Obj? o)
getCncCommsType
CncCommsTypeEnum getCncCommsType()
getDestinationLan
Int getDestinationLan()
getDestinationOutstation
Int getDestinationOutstation()
getProtocolString
Str getProtocolString()
getSourceOutstation
Int getSourceOutstation()
make
new make(Int destination, Int source, Int t1, Int t2, Int t3, Int msgClass, Int x1 := 48, Int x2 := 48)
makeFromInStream
new makeFromInStream(InStream in)
msgClass
const Int msgClass
source
const Int source
t1
const Int t1
t2
const Int t2
t3
const Int t3
toStr
virtual override Str toStr()
validateType
Void validateType()
x1
const Int x1
x2
const Int x2
Consts
const class Consts : Obj
Fields
Slot Details
ACK
const static Int ACK := 6
BEL
const static Int BEL := 7
CNC_HEADER_LENGTH
const static Int CNC_HEADER_LENGTH := 8
CNC_MAX_CONTINUATION_MESSAGE_LENGTH
const static Int CNC_MAX_CONTINUATION_MESSAGE_LENGTH := 88
CNC_MAX_MESSAGE_LENGTH
const static Int CNC_MAX_MESSAGE_LENGTH := 90
CNC_TCP_RESPONSE_TIMEOUT_DEFAULT
const static Duration CNC_TCP_RESPONSE_TIMEOUT_DEFAULT := 2sec
CNC_TCP_RESPONSE_TIMEOUT_MAXIMUM
const static Duration CNC_TCP_RESPONSE_TIMEOUT_MAXIMUM := 30sec
CNC_TCP_RESPONSE_TIMEOUT_MINIMUM
const static Duration CNC_TCP_RESPONSE_TIMEOUT_MINIMUM := 500ms
CR
const static Int CR := 13
DEFAULT_PLOT_DATA_PRECISION
const static Int DEFAULT_PLOT_DATA_PRECISION := 2
ENQ
const static Int ENQ := 5
EOT
const static Int EOT := 4
ETX
const static Int ETX := 3
EXT_ADDR
const static Int EXT_ADDR := 126
FF
const static Int FF := 12
IP_CONFIGURATION_UDP_PORT
const static Int IP_CONFIGURATION_UDP_PORT := 65534
IQ4_OVERVIEW_RESPONSE_LENGTH
const static Int IQ4_OVERVIEW_RESPONSE_LENGTH := 9
MAX_CNC_MESSAGE_NUMBER
const static Int MAX_CNC_MESSAGE_NUMBER := 99
MIN_CNC_MESSAGE_NUMBER
const static Int MIN_CNC_MESSAGE_NUMBER := 0
NAK
const static Int NAK := 21
NOT_IN_USE_ADDRESS_255S
const static IpAddr NOT_IN_USE_ADDRESS_255S := IpAddr.<ctor>("255.255.255.255")
NUL
const static Int NUL := 0
PIN_BYTES_LENGTH
const static Int PIN_BYTES_LENGTH := 8
PLOT_RECORD_TYPE_ANALOGUE
const static Int PLOT_RECORD_TYPE_ANALOGUE := 2
PLOT_RECORD_TYPE_DIGITAL
const static Int PLOT_RECORD_TYPE_DIGITAL := 1
PLOT_RECORD_TYPE_LOG_STATUS
const static Int PLOT_RECORD_TYPE_LOG_STATUS := 0
PLOT_RECORD_TYPE_TIME_CHANGE
const static Int PLOT_RECORD_TYPE_TIME_CHANGE := 9
RS
const static Int RS := 30
SI
const static Int SI := 15
SO
const static Int SO := 14
STX
const static Int STX := 2
SYN
const static Int SYN := 22
TREND_TO_FANTOM_UNIT_MAP
const static Str:Unit TREND_TO_FANTOM_UNIT_MAP := ...
UDP_BROADCAST_ADDRESS
const static IpAddr UDP_BROADCAST_ADDRESS := IpAddr.<ctor>("255.255.255.255")
UDP_DISCOVERY_HEADER
const static Str UDP_DISCOVERY_HEADER := "TREND Controls"
UDP_DISCOVERY_MESSAGE_MIN_SIZE
const static Int UDP_DISCOVERY_MESSAGE_MIN_SIZE := @UDP_DISCOVERY_HEADER.size() + 32
WILDCARD_ADDRESS
const static IpAddr WILDCARD_ADDRESS := IpAddr.<ctor>("0.0.0.0")
DBModule
const class DBModule : Obj
Constructors
| make |
Fields
| discoverable | |
| iq2ToModNumDefault | |
| letter | |
| name | |
| numbered | |
| parameters | |
| properties |
Methods
| getDiscoveryParameters | |
| getParameterType | |
| getUnitsParameter | |
| getValueParameterLetter | |
| getValueParameterType |
Slot Details
discoverable
const Bool discoverable
getDiscoveryParameters
DBModuleParam[] getDiscoveryParameters(Str paramLetter)
getParameterType
DBModuleParam? getParameterType(Str paramLetter)
getUnitsParameter
DBModuleParam getUnitsParameter()
getValueParameterLetter
Str getValueParameterLetter()
getValueParameterType
DBModuleParam getValueParameterType()
iq2ToModNumDefault
const Int iq2ToModNumDefault
letter
const Str letter
make
new make(Str name, Str letter, Bool numbered, Bool discoverable, Int iq2ToModNumDefault, Str:DBModuleParam params)
name
const Str name
numbered
const Bool numbered
parameters
const Str:DBModuleParam parameters
properties
const Str:DBModuleParam properties
DBModuleParam
const class DBModuleParam : Obj
Constructors
| make |
Fields
| NULL | |
| letter | |
| lookUps | |
| maxLen | |
| name | |
| property | |
| range | |
| readWrite | |
| unit | |
| valueType |
Methods
| getTrendValueTypeEnum |
Slot Details
NULL
const static DBModuleParam NULL := ...
getTrendValueTypeEnum
TrendValueTypeEnum getTrendValueTypeEnum()
letter
const Str letter
lookUps
const [Int:Str]? lookUps
make
new make(Str:Obj params)
maxLen
const Int? maxLen
name
const Str name
property
const Str? property
range
const Range? range
readWrite
const Str readWrite
unit
const Str? unit
valueType
const Str valueType
DeviceDiscovery
class DeviceDiscovery : Obj
Attempts to discover all VCncs visible through a given address using UDP.
Methods
| vcncDiscovery | UDP broadcast discovers controllers. |
Slot Details
vcncDiscovery
static TrendDeviceRecord[] vcncDiscovery(IpAddr fromAddress, Proj? project := null, Duration timeout := Consts.CNC_TCP_RESPONSE_TIMEOUT_MAXIMUM)
UDP broadcast discovers controllers. Further data is then collected by direct TCP connection.
GenericDate
const class GenericDate : Obj
Constructors
| make |
Fields
| day | |
| month |
Methods
| equals | |
| hash |
Slot Details
day
const Int day
equals
virtual override Bool equals(Obj? that)
hash
virtual override Int hash()
make
new make(|This| f)
month
const Month month
GenericDateSpan
const class GenericDateSpan : Obj
Constructors
| make |
Fields
| end | |
| start |
Methods
| equals | |
| hash |
Slot Details
end
const GenericDate end
equals
virtual override Bool equals(Obj? that)
hash
virtual override Int hash()
make
new make(|This| f)
start
const GenericDate start
IncomingCncTcpMessage
const class IncomingCncTcpMessage : Obj
Constructors
| make |
Fields
| header | |
| is7Bit | |
| msgBody | |
| msgBytes | |
| pin |
Methods
| getSourceLan | |
| getSourceOutstation | |
| isAck | |
| isReply | |
| toStr |
Slot Details
getSourceLan
Int getSourceLan()
getSourceOutstation
Int getSourceOutstation()
header
const CncTcpMessageHeader? header
is7Bit
const Bool is7Bit
isAck
Bool isAck()
isReply
Bool isReply()
make
new make(InStream in)
msgBody
const Str msgBody
msgBytes
const Buf msgBytes
pin
const Str? pin
toStr
virtual override Str toStr()
IpConfigMsgCodeEnum
@Serializable { simple=true } enum class IpConfigMsgCodeEnum : Enum
Enum
| SEARCH_REQUEST | |
| WRITE_DATA | |
| SEARCH_REPLY | |
| NOT_SURE_0x06 | |
| NOT_SURE_0x07 | |
| ATTRIBUTE_REQUEST | |
| ATTRIBUTE_REPLY |
Constructors
| fromStr | Return the IpConfigMsgCodeEnum instance for the specified name. |
Fields
| number | |
| vals | List of IpConfigMsgCodeEnum values indexed by ordinal |
Methods
| fromNum |
Slot Details
ATTRIBUTE_REPLY
const static IpConfigMsgCodeEnum ATTRIBUTE_REPLY := ...
ATTRIBUTE_REQUEST
const static IpConfigMsgCodeEnum ATTRIBUTE_REQUEST := ...
NOT_SURE_0x06
const static IpConfigMsgCodeEnum NOT_SURE_0x06 := ...
NOT_SURE_0x07
const static IpConfigMsgCodeEnum NOT_SURE_0x07 := ...
SEARCH_REPLY
const static IpConfigMsgCodeEnum SEARCH_REPLY := ...
SEARCH_REQUEST
const static IpConfigMsgCodeEnum SEARCH_REQUEST := ...
WRITE_DATA
const static IpConfigMsgCodeEnum WRITE_DATA := ...
fromNum
static IpConfigMsgCodeEnum fromNum(Int num)
fromStr
static new fromStr(Str name, Bool checked := true)
Return the IpConfigMsgCodeEnum instance for the specified name. If not a valid name and checked is false return null, otherwise throw ParseErr.
number
const Int number
vals
const static IpConfigMsgCodeEnum[] vals := ...
List of IpConfigMsgCodeEnum values indexed by ordinal
ModuleParameter
class ModuleParameter : Obj
Constructors
| make | |
| makeWithValue |
Fields
| module | |
| parameter | |
| value |
Methods
| compare | |
| getBits8Value | |
| getBoolValue | |
| getIntegerValue | |
| getKey | |
| getRealValue | |
| setBits8Value | |
| setBoolValue | |
| setIntegerValue | |
| setRealValue | |
| setStringValue |
Slot Details
compare
virtual override Int compare(Obj obj)
getBits8Value
Int getBits8Value()
getBoolValue
Bool getBoolValue()
getIntegerValue
Int getIntegerValue()
getKey
Str getKey()
getRealValue
Float getRealValue()
make
new make(Str module, Str attribute)
makeWithValue
new makeWithValue(Str module, Str attribute, Str value)
module
Str module
parameter
Str parameter
setBits8Value
Void setBits8Value(Int iVal)
setBoolValue
Void setBoolValue(Bool bVal)
setIntegerValue
Void setIntegerValue(Int iVal)
setRealValue
Void setRealValue(Float dVal)
setStringValue
Void setStringValue(Str sVal)
value
Str value := ""
ModuleParameterValues
class ModuleParameterValues : Obj
Constructors
| make | |
| makeWithValue |
Fields
| MAX_TIME | |
| MIN_TIME | |
| key | |
| valArray |
Methods
Slot Details
MAX_TIME
const static Time MAX_TIME := Time.fromStr("23:59:59.999999999")
MIN_TIME
const static Time MIN_TIME := Time.defVal
add
ModuleParameterValues add(Str newKey)
addIntegerValue
Void addIntegerValue(Str key, Int value)
addLongValue
Void addLongValue(Str key, Int value)
addMpv
Void addMpv(ModuleParameterValues newMpv)
addRealValue
Void addRealValue(Str key, Float value)
addRealValueWithPrecision
Void addRealValueWithPrecision(Str key, Float value, Int precision)
addStringValue
Void addStringValue(Str key, Str value)
addTimeValue
Void addTimeValue(Str key, Time value)
getAttributeCommsReadString
Str getAttributeCommsReadString()
getAttributeCommsWriteString
Str getAttributeCommsWriteString()
getBits8Value
Int getBits8Value()
getBoolValue
Bool getBoolValue()
getChildCount
Int getChildCount()
getIntegerValue
Int getIntegerValue()
getParam
ModuleParameterValues? getParam(Str? paramKey, ModuleParameterValues? defaultParam := null)
getRealValue
Float getRealValue()
getStringValue
Str getStringValue()
getTimeValue
Time getTimeValue()
getValue
Obj getValue(TrendValueTypeEnum trendValueType)
getValueAsArrayList
ModuleParameterValues[] getValueAsArrayList()
getValueAsString
Str getValueAsString()
getValueOfContainer
ModuleParameterValues? getValueOfContainer(Str key)
getValueOfLeaf
Str? getValueOfLeaf(Str key)
isInvalid
Bool isInvalid()
key
Str key
make
new make(Str key)
makeWithValue
new makeWithValue(Str key, Str value)
setBits8Value
Void setBits8Value(Int iVal)
setBitsValue
Void setBitsValue(Int iVal, Int numBits)
setBoolValue
Void setBoolValue(Bool bVal)
setDateTimeValue
Void setDateTimeValue(DateTime timestamp)
setIntegerValue
Void setIntegerValue(Int iVal)
setInvalid
Void setInvalid()
setLongValue
Void setLongValue(Int iVal)
setRealValue
Void setRealValue(Float dVal, Int precision := 2)
setSquareBracketValue
Void setSquareBracketValue(Str sVal)
setStringValue
Void setStringValue(Str sVal)
setTimeValue
Void setTimeValue(Time tVal)
setValue
Void setValue(Obj? value, TrendValueTypeEnum trendValueType)
toStr
virtual override Str toStr()
valArray
ModuleParameterValues[]? valArray
ModuleParameters
class ModuleParameters : Obj
Constructors
| makeAttr | |
| makeStrStr |
Methods
| addParameter | |
| addParameterStrStr | |
| makeBody | |
| makeBodyWithValues |
Slot Details
addParameter
Void addParameter(ModuleParameter attr)
addParameterStrStr
Void addParameterStrStr(Str module, Str parameter)
makeAttr
new makeAttr(ModuleParameter attr)
makeBody
Str makeBody()
makeBodyWithValues
Str makeBodyWithValues(Bool withValues)
makeStrStr
new makeStrStr(Str module, Str parameter)
OutgoingCncTcpMessage
const class OutgoingCncTcpMessage : Obj
Constructors
Fields
| ODD_PARITY_TABLE | |
| header | |
| is7bit | |
| msgBody | |
| msgBytes | |
| pin |
Methods
| encodePin | |
| oddParityByte | |
| oddParityByteArray | |
| toOutStream | |
| toStr |
Slot Details
ODD_PARITY_TABLE
const static Int[] ODD_PARITY_TABLE := ...
encodePin
static Int[] encodePin(Str pin)
header
const CncTcpMessageHeader header
is7bit
const Bool is7bit
makeAckMessage
new makeAckMessage(CncTcpMessageHeader receivedHeader)
makeAttributeReadMessage
new makeAttributeReadMessage(Int destination, Int source, Str body, Int messageNumber)
makeAttributeReadMessageExt
new makeAttributeReadMessageExt(Int lan, Int destination, Int source, Str body, Int messageNumber)
makeAttributeWriteMessage
new makeAttributeWriteMessage(Int destination, Int source, Str body, Int messageNumber)
makeDeviceAttributeReadMessage
new makeDeviceAttributeReadMessage(Int deviceNumber, Int source, Int messageNumber, Str body := "R(C,D)")
makeDeviceOverviewReadMessage
new makeDeviceOverviewReadMessage(Int deviceNumber, Int source, Int overviewMessageNumber)
makeNetworkReadMessage
new makeNetworkReadMessage()
makePingMessage
new makePingMessage()
makePointDiscoveryTextReadMessage
new makePointDiscoveryTextReadMessage(Int destination, Int source, Buf msgBytes, Int messageNumber)
makePointReadMessage
new makePointReadMessage(Int vcncOutstation, TrendPointRecord point, Int? messageNumber)
makePointReadMessageExt
new makePointReadMessageExt(Int vcncOutstation, TrendPointRecord point, Int? messageNumber)
makePointWriteMessage
new makePointWriteMessage(Int vcncOutstation, Str? pin, TrendPointRecord point, Obj newValue, Int? messageNumber)
makePointWriteMessageExt
new makePointWriteMessageExt(Int vcncOutstation, Str? pin, TrendPointRecord point, Obj newValue, Int? messageNumber)
makeTextClearMessage
new makeTextClearMessage(Int destination, Int source, Str body, Int messageNumber)
makeTextCreateMessage
new makeTextCreateMessage(Int destination, Int source, Str body, Int messageNumber)
makeTextReadMessage
new makeTextReadMessage(Int destination, Int source, Str body, Int messageNumber)
makeTextReadMessageExt
new makeTextReadMessageExt(Int lan, Int destination, Int source, Str body, Int messageNumber)
makeTextWriteMessage
new makeTextWriteMessage(Int destination, Int source, Str body, Int messageNumber)
msgBody
const Str? msgBody
msgBytes
const Buf? msgBytes
oddParityByte
static Int oddParityByte(Int inByte)
oddParityByteArray
static Int[]? oddParityByteArray(Int[]? inBytes)
pin
const Str? pin
toOutStream
Void toOutStream(OutStream out)
toStr
virtual override Str toStr()
PointDiscoveryActor
const class PointDiscoveryActor : Actor
Attempts to discover points connected to a VCnc.
Created and managed by a VCncConnection instance.
Note that only points local to the VCnc are found.
Constructors
| make |
Methods
| receive | |
| toStr |
Slot Details
make
new make(ActorPool pool, VCncTcpSocketActor socketActor, VCncTcpMessageCountersActor countersActor, PointDiscoveryPrefs discoveryPrefs, Int vcncOutstation, Int lan, Int discoverBatchSize := 50)
receive
virtual override Obj? receive(Obj? command)
toStr
virtual override Str toStr()
PointDiscoveryLeaf
const class PointDiscoveryLeaf : Obj
Constructors
| make |
Fields
| isReadOnly | |
| label | |
| lan | |
| moduleLetter | |
| moduleNumber | |
| outstation | |
| parameterLetter | |
| parameterNumber | |
| unit | |
| valueType |
Methods
| toStr | |
| toTrendUriModule | |
| toTrendUriParameter |
Slot Details
isReadOnly
const Bool isReadOnly
label
const Str label
lan
const Str lan
make
new make(Str label, Str lan, Str outstation, Str moduleLetter := "", Str moduleNumber := "", Str parameterLetter := "", Str parameterNumber := "", TrendValueTypeEnum valueType := TrendValueTypeEnum.UNKNOWN, Str? unit := null, Bool isReadOnly := false)
moduleLetter
const Str moduleLetter
moduleNumber
const Str moduleNumber
outstation
const Str outstation
parameterLetter
const Str parameterLetter
parameterNumber
const Str parameterNumber
toStr
virtual override Str toStr()
toTrendUriModule
Uri toTrendUriModule()
toTrendUriParameter
Uri toTrendUriParameter()
unit
const Str? unit
valueType
const TrendValueTypeEnum valueType
PointDiscoveryPrefs
const class PointDiscoveryPrefs : Obj
Constructors
| make |
Fields
| fromModuleNum | |
| ignoreEmptyLabels | |
| moduleLetter | |
| outstation | |
| parameterLetter | |
| parameterNumber | |
| toModuleNum | |
| valueType |
Methods
| toStr |
Slot Details
fromModuleNum
const Int fromModuleNum
ignoreEmptyLabels
const Bool ignoreEmptyLabels
make
new make(Int outstation, Bool ignoreEmptyLabels := true, Str moduleLetter := ..., Int fromModuleNum := 0, Int toModuleNum := 0, Str parameterLetter := ..., Str parameterNumber := "", TrendValueTypeEnum valueType := ...)
moduleLetter
const Str moduleLetter
outstation
const Int outstation
parameterLetter
const Str parameterLetter
parameterNumber
const Str parameterNumber
toModuleNum
const Int toModuleNum
toStr
virtual override Str toStr()
valueType
const TrendValueTypeEnum valueType
ShadowTrendDeviceRecord
class ShadowTrendDeviceRecord : Obj
Constructors
| make |
Fields
| cncDeviceType | |
| firmwareVersion | |
| identifier | |
| ipAddress | |
| lan | |
| outstation | |
| overviewReply | |
| pin | |
| remoteDevices | |
| trendDeviceType | |
| vcncs |
Slot Details
cncDeviceType
CncDeviceTypeEnum? cncDeviceType
firmwareVersion
Str? firmwareVersion
identifier
Str? identifier
ipAddress
IpAddr? ipAddress
lan
Int? lan
make
new make(UdpDiscoveryLeaf leaf)
outstation
Int? outstation
overviewReply
Str? overviewReply
pin
Str? pin
remoteDevices
IpAddr[]? remoteDevices
trendDeviceType
TrendDeviceTypeEnum? trendDeviceType
vcncs
VCncDiscoveryLeaf[]? vcncs
TcpDiscoveryLeaf
const class TcpDiscoveryLeaf : Obj
Constructors
| make |
Fields
| firmwareVersion | |
| identifier | |
| lan | |
| outstation | |
| overviewReply | |
| trendDeviceType |
Methods
| toStr |
Slot Details
firmwareVersion
const Str firmwareVersion
identifier
const Str identifier
lan
const Str lan
make
new make(Str identifier, Str overviewReply, Str lan, Str outstation, Str firmwareVersion, TrendDeviceTypeEnum trendDeviceType)
outstation
const Str outstation
overviewReply
const Str overviewReply
toStr
virtual override Str toStr()
trendDeviceType
const TrendDeviceTypeEnum trendDeviceType
TrendConn
class TrendConn : Conn
Constructors
| make |
Fields
| connection |
Methods
| onClose | |
| onLearn | |
| onOpen | |
| onPing | |
| onPoll | |
| onSyncCur | |
| onSyncHis | |
| onUpdated | |
| onWrite | |
| pollFreq | |
| receive |
Slot Details
connection
VCncConnection? connection
make
new make(ConnActor actor, Dict rec)
onClose
virtual override Void onClose()
onLearn
virtual override Grid onLearn(Obj? arg)
onOpen
virtual override Void onOpen()
onPing
virtual override Dict onPing()
onPoll
virtual override Void onPoll()
onSyncCur
virtual override Void onSyncCur(ConnPoint[] points)
onSyncHis
virtual override Obj? onSyncHis(ConnPoint point, Span span)
onUpdated
virtual override Void onUpdated(Dict oldRec, Dict newRec)
onWrite
virtual override Void onWrite(ConnPoint point, Obj? val, Number level)
pollFreq
virtual override Duration? pollFreq()
receive
virtual override Obj? receive(ConnMsg msg)
TrendDB
const class TrendDB : Obj
Fields
| DEFAULT_POINT_DISCOVERY_MODULE_LETTER | |
| DEFAULT_POINT_DISCOVERY_PARAMETER_LETTER | |
| DEFAULT_POINT_DISCOVERY_VALUE_TYPE | |
| LABEL_LETTER |
Methods
Slot Details
DEFAULT_POINT_DISCOVERY_MODULE_LETTER
const static Str DEFAULT_POINT_DISCOVERY_MODULE_LETTER := "S"
DEFAULT_POINT_DISCOVERY_PARAMETER_LETTER
const static Str DEFAULT_POINT_DISCOVERY_PARAMETER_LETTER := "V"
DEFAULT_POINT_DISCOVERY_VALUE_TYPE
const static TrendValueTypeEnum DEFAULT_POINT_DISCOVERY_VALUE_TYPE := TrendValueTypeEnum.REAL
LABEL_LETTER
const static Str LABEL_LETTER := "\$"
canGeneratelarms
static Bool canGeneratelarms(Str moduleLetter)
getDefaultModuleTypeLetter
static Str getDefaultModuleTypeLetter()
getDiscoverableModuleTypeLetters
static Str[] getDiscoverableModuleTypeLetters()
getIQ2xxMaxModuleNumber
static Int getIQ2xxMaxModuleNumber(Str moduleLetter)
getModuleLetterForOrdinal
static Str getModuleLetterForOrdinal(Int ordinal)
getModuleType
static DBModule? getModuleType(Str moduleLetter)
getModuleTypeDescription
static Str getModuleTypeDescription(Str moduleLetter)
getTrendValueTypeEnum
static TrendValueTypeEnum getTrendValueTypeEnum(Str moduleLetter, Str paramLetter, Bool forWrite := false)
getValueParameterLetter
static Str getValueParameterLetter(Str moduleLetter)
isOverridableModule
static Bool isOverridableModule(Str moduleLetter)
TrendDeviceRecord
const class TrendDeviceRecord : Obj
Constructors
| make | |
| makeFromShadow |
Fields
| cncDeviceType | |
| firmwareVersion | |
| identifier | |
| ipAddress | |
| lan | |
| outstation | |
| overviewReply | |
| pin | |
| remoteDevices | |
| trendDeviceType | |
| vcncs |
Methods
| getAvailableVCncs | |
| toStr |
Slot Details
cncDeviceType
const CncDeviceTypeEnum? cncDeviceType
firmwareVersion
const Str firmwareVersion
getAvailableVCncs
VCncRecord[] getAvailableVCncs()
identifier
const Str identifier
ipAddress
const IpAddr ipAddress
lan
const Int lan
make
new make(TrendDeviceTypeEnum trendDeviceType, IpAddr ipAddress, Int lan, Int outstation, Str overviewReply, Str firmwareVersion, Str identifier, VCncRecord[] vcncs, CncDeviceTypeEnum? cncDeviceType := null, IpAddr[]? remoteDevices := null, Str? pin := null)
makeFromShadow
new makeFromShadow(ShadowTrendDeviceRecord shadow)
outstation
const Int outstation
overviewReply
const Str overviewReply
pin
const Str? pin
remoteDevices
const IpAddr[]? remoteDevices
toStr
virtual override Str toStr()
trendDeviceType
const TrendDeviceTypeEnum trendDeviceType
vcncs
const VCncRecord[] vcncs
TrendDeviceTypeEnum
@Serializable { simple=true } enum class TrendDeviceTypeEnum : Enum
Enum
| UNKNOWN | |
| IQ_2XX | |
| IQ_3XX | |
| IQ_4XX |
Constructors
| fromStr | Return the TrendDeviceTypeEnum instance for the specified name. |
Fields
| number | |
| vals | List of TrendDeviceTypeEnum values indexed by ordinal |
Methods
| fromNum |
Slot Details
IQ_2XX
const static TrendDeviceTypeEnum IQ_2XX := ...
IQ_3XX
const static TrendDeviceTypeEnum IQ_3XX := ...
IQ_4XX
const static TrendDeviceTypeEnum IQ_4XX := ...
UNKNOWN
const static TrendDeviceTypeEnum UNKNOWN := ...
fromNum
static TrendDeviceTypeEnum fromNum(Int num)
fromStr
static new fromStr(Str name, Bool checked := true)
Return the TrendDeviceTypeEnum instance for the specified name. If not a valid name and checked is false return null, otherwise throw ParseErr.
number
const Int number
vals
const static TrendDeviceTypeEnum[] vals := ...
List of TrendDeviceTypeEnum values indexed by ordinal
TrendExt
@ExtMeta { name="trend"; icon="chartLine"; depends=["conn"] } @FinExtMeta { licFeatureExclude="enterprise" } const class TrendExt : FinConnImplExt
TplTrend Extension
Methods
| cur |
Slot Details
cur
static TrendExt cur()
TrendLib
const class TrendLib : Obj
Axon functions for trend
Fields
| pod |
Methods
| finFormTrendConnDiscoverSettings | |
| trendDiscover | |
| trendLearn | Learn - discover points on a device |
| trendPing | Ping |
| trendSyncHis |
Slot Details
finFormTrendConnDiscoverSettings
@Axon { admin=true } static Grid? finFormTrendConnDiscoverSettings(Dict? settings := null)
const static Pod pod := Pod.find("trendExt")
trendDiscover
@Axon static Grid trendDiscover()
trendLearn
@Axon static Obj? trendLearn(Obj conn, Obj? arg := null)
Learn - discover points on a device
trendPing
@Axon static Obj? trendPing(Obj conn)
Ping
trendSyncHis
@Axon static Obj? trendSyncHis(Obj points, Obj? dates)
TrendModel
@Js const class TrendModel : ConnModel
TplTrendModel
Constructors
| make |
Fields
| connProto |
Methods
| isCurSupported | |
| isDiscoverSupported | |
| isHisSupported | |
| isLearnSupported | |
| isPollingSupported | |
| isWriteSupported | |
| pointAddrType |
Slot Details
connProto
virtual const override Dict connProto
isCurSupported
virtual override Bool isCurSupported()
isDiscoverSupported
virtual override Bool isDiscoverSupported()
isHisSupported
virtual override Bool isHisSupported()
isLearnSupported
virtual override Bool isLearnSupported()
isPollingSupported
virtual override Bool isPollingSupported()
isWriteSupported
virtual override Bool isWriteSupported()
make
new make()
pointAddrType
virtual override Type? pointAddrType()
TrendPointRecord
const class TrendPointRecord : Obj
Constructors
| make | |
| makeFromConnPoint |
Fields
| lan | |
| moduleLetter | |
| moduleNumber | |
| outstation | |
| parameterLetter | |
| parameterNumber |
Methods
| toStr |
Slot Details
lan
const Str lan
make
new make(Str lan, Str outstation, Str moduleLetter, Str moduleNumber := "", Str parameterLetter := "", Str parameterNumber := "")
makeFromConnPoint
new makeFromConnPoint(Uri trendUri)
moduleLetter
const Str moduleLetter
moduleNumber
const Str moduleNumber
outstation
const Str outstation
parameterLetter
const Str parameterLetter
parameterNumber
const Str parameterNumber
toStr
virtual override Str toStr()
TrendSchedule
const class TrendSchedule : Obj
Constructors
| make |
Fields
| exceptions | |
| normalWeek |
Methods
| fromHaystack |
Slot Details
exceptions
const TrendScheduleException[]? exceptions
fromHaystack
static TrendSchedule? fromHaystack(Obj sch)
make
new make(|This| f)
normalWeek
const Weekday:TrendScheduleEvent[]? normalWeek
TrendScheduleEvent
const class TrendScheduleEvent : Obj
Constructors
| make |
Fields
| time | |
| val |
Slot Details
make
new make(|This| f)
time
const Time time
val
const Obj val
TrendScheduleException
const class TrendScheduleException : Obj
Constructors
| make |
Fields
| dates | |
| events |
Slot Details
dates
const GenericDateSpan dates
events
const TrendScheduleEvent[] events
make
new make(|This| f)
TrendValueTypeEnum
@Serializable { simple=true } enum class TrendValueTypeEnum : Enum
Enum
| UNKNOWN | |
| STRING | |
| INTEGER | |
| REAL | |
| BOOL | |
| BITS_8 |
Constructors
| fromStr | Return the TrendValueTypeEnum instance for the specified name. |
Fields
| haystackStr | |
| number | |
| vals | List of TrendValueTypeEnum values indexed by ordinal |
Methods
| fromNum | |
| fromString |
Slot Details
BITS_8
const static TrendValueTypeEnum BITS_8 := ...
BOOL
const static TrendValueTypeEnum BOOL := ...
INTEGER
const static TrendValueTypeEnum INTEGER := ...
REAL
const static TrendValueTypeEnum REAL := ...
STRING
const static TrendValueTypeEnum STRING := ...
UNKNOWN
const static TrendValueTypeEnum UNKNOWN := ...
fromNum
static TrendValueTypeEnum fromNum(Int num)
fromStr
static new fromStr(Str name, Bool checked := true)
Return the TrendValueTypeEnum instance for the specified name. If not a valid name and checked is false return null, otherwise throw ParseErr.
fromString
static TrendValueTypeEnum fromString(Str tag)
haystackStr
const Str haystackStr
number
const Int number
vals
const static TrendValueTypeEnum[] vals := ...
List of TrendValueTypeEnum values indexed by ordinal
UdpDiscoveryLeaf
const class UdpDiscoveryLeaf : Obj
Constructors
| make | |
| makeFromUdpDiscovery |
Fields
| deviceType | |
| firmwareVersion | |
| identifier | |
| ipAddress | |
| lan | |
| outstation | |
| remoteDevices | |
| vcncs |
Methods
| toStr |
Slot Details
deviceType
const CncDeviceTypeEnum deviceType
firmwareVersion
const Str firmwareVersion
identifier
const Str identifier
ipAddress
const IpAddr ipAddress
lan
const Int lan
make
new make(CncDeviceTypeEnum deviceType, IpAddr ipAddress, Int lan, Int outstation, Str firmwareVersion, Str identifier, IpAddr[] remoteDevices, VCncDiscoveryLeaf[] vcncs)
makeFromUdpDiscovery
new makeFromUdpDiscovery(Buf data)
outstation
const Int outstation
remoteDevices
const IpAddr[] remoteDevices
toStr
virtual override Str toStr()
vcncs
const VCncDiscoveryLeaf[] vcncs
Utils
const class Utils : Obj
Fields
| BITS_IN_A_BYTE |
Methods
| dateTimeConverter | |
| encodePin | |
| escapeUnprintables | |
| getBitsAsNumbers | |
| getNumbersAsBits | |
| hexStringToBytes | |
| isValidOutstation | |
| lookupBindAddress | |
| toHexString |
Slot Details
BITS_IN_A_BYTE
const static Int BITS_IN_A_BYTE := 8
dateTimeConverter
static DateTime dateTimeConverter(Str trendDateTime)
encodePin
static Str encodePin(Str pin)
escapeUnprintables
static Str escapeUnprintables(Str? s)
getBitsAsNumbers
static Int[] getBitsAsNumbers(Str bits)
getNumbersAsBits
static Str getNumbersAsBits(Int[] numbers, Int size)
hexStringToBytes
static Int[] hexStringToBytes(Str bits)
isValidOutstation
static Bool isValidOutstation(Int os)
lookupBindAddress
static IpAddr lookupBindAddress(IpAddr addr)
toHexString
static Str toHexString(Int[] bytes, Str seperator := "")
VCncAlarm
const class VCncAlarm : Obj
Constructors
| make | |
| makeForBroadcast | |
| makeForTtansmission |
Fields
| alarmCondition | |
| connUri | |
| inAlarm | |
| lan | |
| projList | |
| tags | |
| trendAlarm |
Methods
| toStr |
Slot Details
alarmCondition
const Str alarmCondition
connUri
const Uri connUri
inAlarm
const Bool inAlarm
lan
const Int lan
make
new make(Uri connUri, Uri? trendAlarm, Bool inAlarm, Str alarmCondition, Dict tags)
makeForBroadcast
new makeForBroadcast(VCncAlarm raisedAlarm, Proj[]? projList)
makeForTtansmission
new makeForTtansmission(VCncAlarm broadcastAlarm)
projList
const Proj[]? projList
tags
const Dict tags
toStr
virtual override Str toStr()
trendAlarm
const Uri? trendAlarm
VCncAlarmHandlerPool
const class VCncAlarmHandlerPool : Actor
Used to keep a reference to all the projects that can receive alarms.
Fields
| cur |
Methods
| receive |
Slot Details
cur
const static VCncAlarmHandlerPool cur := ...
receive
virtual override Obj? receive(Obj? msg)
VCncConnection
const class VCncConnection : Obj
Manages the communication with a VCnc.
Only IQLAN is supported.
Constructors
| make | Make a full-fat connection, capable of handling alarms (IQLAN only). |
| makeForDiscovery | Make a limited connection for discovery purposes. |
Fields
| IQ2_TIME_ZONE_PERIOD_END_LETTERS | |
| IQ2_TIME_ZONE_PERIOD_START_LETTERS | |
| connectAddress | |
| connectPort | |
| deviceOutstation | |
| deviceType | |
| lan | |
| outstation | |
| pin | |
| project |
Methods
| autoDiscoverModulePoints | |
| autoDiscoverTimeZones | |
| broadcastAlarm | Broadcast this alarm to all projects connected to this LAN. |
| close | Remove this connection from the pool. |
| discoverPlots | |
| discoverPoints | |
| discoverTrendLan | TCP discovery of controllers on the same Trend LAN as this VCNC. |
| doPing | Ping the Trend network and return the response, or an empty string. |
| doPoll | |
| getConnection | Fetch the existing connection, if any, from the pool. |
| getUriForOutstation | Return the connection, if any, associated with the given device outstation. |
| readAttribute | Make a raw attribute comm's request; e.g. |
| readAttributeExt | Make a raw attribute comm's request; e.g. |
| readPlotData | Read the history in the device, which is stored in a circular buffer. |
| readPoint | Read the value of a point |
| readText | Make a raw text comm's request; e.g. |
| readTextExt | Make a raw text comm's request; e.g. |
| toStr | |
| toUri | Return the Uri for this connection. |
| vcncConnected | Return the VCNC outstation open for this LAN, or 0 for none. |
| writePoint | Write a value to a point. |
| writeTimeZone | Write a TrendTimezone |
Slot Details
IQ2_TIME_ZONE_PERIOD_END_LETTERS
const static Str[] IQ2_TIME_ZONE_PERIOD_END_LETTERS := Str["F","H","J"]
IQ2_TIME_ZONE_PERIOD_START_LETTERS
const static Str[] IQ2_TIME_ZONE_PERIOD_START_LETTERS := Str["E","G","I"]
autoDiscoverModulePoints
Str:Obj?[] autoDiscoverModulePoints(Int outstation, Str moduleLetter, Str:PointDiscoveryLeaf plotsMap, Int discoverRange := 5000)
autoDiscoverTimeZones
Str:Obj?[] autoDiscoverTimeZones(Int outstation)
broadcastAlarm
static Int broadcastAlarm(VCncAlarm alarm)
Broadcast this alarm to all projects connected to this LAN. Return the number of projects affected.
close
Void close()
Remove this connection from the pool. If no connections remain active, release the socket resources.
connectAddress
const IpAddr connectAddress
connectPort
const Int connectPort
deviceOutstation
const Int deviceOutstation
deviceType
const TrendDeviceTypeEnum? deviceType
discoverPlots
Str:PointDiscoveryLeaf discoverPlots(Int outstation)
discoverPoints
PointDiscoveryLeaf[] discoverPoints(PointDiscoveryPrefs discoveryPrefs)
discoverTrendLan
TcpDiscoveryLeaf[] discoverTrendLan()
TCP discovery of controllers on the same Trend LAN as this VCNC.
doPing
Str doPing()
Ping the Trend network and return the response, or an empty string.
doPoll
Void doPoll()
getConnection
static VCncConnection? getConnection(IpAddr deviceAddress, Int vcncPort)
Fetch the existing connection, if any, from the pool.
getUriForOutstation
static Uri? getUriForOutstation(IpAddr connectAddress, Int connectPort, Int outstation)
Return the connection, if any, associated with the given device outstation.
lan
const Int lan
make
new make(TrendDeviceTypeEnum trendDeviceType, IpAddr deviceAddress, Int vcncPort, Int deviceOutstation, Int vcncOutstation, Int lan, Str? pin, Proj? proj := null, ActorPool? actorPool := null)
Make a full-fat connection, capable of handling alarms (IQLAN only).
makeForDiscovery
new makeForDiscovery(IpAddr connectAddress, Int connectPort, Int lan, Int vcncOutstation, ActorPool? actorPool := null)
Make a limited connection for discovery purposes. It should be closed immediately after use.
outstation
const Int outstation
pin
const Str? pin
project
const Proj? project
readAttribute
IncomingCncTcpMessage? readAttribute(Str params, Int destination := this.deviceOutstation)
Make a raw attribute comm's request; e.g. "P1(Y,N,C,T)"
readAttributeExt
IncomingCncTcpMessage? readAttributeExt(Str params, Int lan, Int destination)
Make a raw attribute comm's request; e.g. "P1(Y,N,C,T)"
readPlotData
[DateTime:Obj]? readPlotData(TrendPointRecord pointRec, Span span)
Read the history in the device, which is stored in a circular buffer.
readPoint
Obj? readPoint(TrendPointRecord point)
Read the value of a point
readText
IncomingCncTcpMessage? readText(Str params, Int destination := this.deviceOutstation)
Make a raw text comm's request; e.g. "P1#2(B{E>14430&E<14433}(T,V,S4,Y))"
readTextExt
IncomingCncTcpMessage? readTextExt(Str params, Int lan, Int destination)
Make a raw text comm's request; e.g. "P1#2(B{E>14430&E<14433}(T,V,S4,Y))"
toStr
virtual override Str toStr()
toUri
Uri toUri()
Return the Uri for this connection.
vcncConnected
static Int vcncConnected(Int lan, Proj? project)
Return the VCNC outstation open for this LAN, or 0 for none.
writePoint
Void writePoint(TrendPointRecord point, Obj newValue)
Write a value to a point.
writeTimeZone
Void writeTimeZone(Obj sch)
Write a TrendTimezone
VCncConnectionAction
const class VCncConnectionAction : Obj
Constructors
| make |
Fields
| action | |
| address | |
| port |
Slot Details
action
const Str action
address
const IpAddr address
make
new make(Str action, IpAddr address, Int port)
port
const Int port
VCncConnectionFindParams
const class VCncConnectionFindParams : Obj
Constructors
| make |
Fields
| lan | |
| outstation | |
| project |
Slot Details
lan
const Int lan
make
new make(Int lan, Int outstation := 0, Proj? project := null)
outstation
const Int outstation
project
const Proj? project
VCncConnectionPool
const class VCncConnectionPool : Actor
Used to keep a singleton reference to all the VCncConnection addresses.
Connections are reference counted.
Fields
| CHECK_IF_PRESENT | |
| GET_AND_REFERENCE | |
| POLL | |
| REMOVE | |
| cur |
Methods
| doPoll | |
| receive |
Slot Details
CHECK_IF_PRESENT
const static Str CHECK_IF_PRESENT := "CHECK_IF_PRESENT"
GET_AND_REFERENCE
const static Str GET_AND_REFERENCE := "GET_AND_REFERENCE"
POLL
const static Str POLL := "POLL"
REMOVE
const static Str REMOVE := "REMOVE"
cur
const static VCncConnectionPool cur := ...
doPoll
Void doPoll()
receive
virtual override Obj? receive(Obj? msg)
VCncDiscoveryLeaf
const class VCncDiscoveryLeaf : Obj
Constructors
| make |
Fields
| inUseByAddress | |
| lan | |
| outstation | |
| port | |
| type |
Methods
| toStr |
Slot Details
inUseByAddress
const IpAddr inUseByAddress
lan
const Int lan
make
new make(Int type, Int lan, Int outstation, Int port, IpAddr inUseByAddress)
outstation
const Int outstation
port
const Int port
toStr
virtual override Str toStr()
type
const Int type
VCncInUseParams
const class VCncInUseParams : Obj
Constructors
| make |
Fields
| lan | |
| outstation |
Slot Details
lan
const Int lan
make
new make(Int lan, Int outstation)
outstation
const Int outstation
VCncPollActor
const class VCncPollActor : Actor
Polls all VCncConnection instances at a given frequency for unsolicited data.
Created and managed by the VCncConnectionPool.
Constructors
| make |
Methods
| receive |
Slot Details
make
new make(ActorPool pool, Duration pollFreq := 5sec)
receive
virtual override Obj? receive(Obj? command)
VCncRecord
const class VCncRecord : Obj
Constructors
| make |
Fields
| inUseByAddress | |
| outstation | |
| owner | |
| port | |
| type |
Methods
| isInUse | |
| toStr |
Slot Details
inUseByAddress
const IpAddr? inUseByAddress
isInUse
Bool isInUse()
make
new make(TrendDeviceRecord owner, Int outstation, Int port, Int? type := null, IpAddr? inUseByAddress := null)
outstation
const Int outstation
owner
const TrendDeviceRecord owner
port
const Int port
toStr
virtual override Str toStr()
type
const Int? type
VCncTcpMessageCountersActor
const class VCncTcpMessageCountersActor : Actor
Transaction number provider.
OVERVIEW and ATTRIBUTE messages have separate counters.
Constructors
| make |
Methods
| nextAttributeMessageNumber | |
| nextOverviewMessageNumber | |
| receive |
Slot Details
make
new make(ActorPool pool)
nextAttributeMessageNumber
Int nextAttributeMessageNumber()
nextOverviewMessageNumber
Int nextOverviewMessageNumber()
receive
virtual override Obj? receive(Obj? command)
VCncTcpSocketActor
const class VCncTcpSocketActor : Actor
Connection to a VCNC.
Created and managed by a VCncConnection instance.
Constructors
| make |
Fields
| CLEAR_ALARM_CODES | |
| CMD_DISCONNECT | |
| CMD_POLL | |
| SET_ALARM_CODES | |
| bindAddress | |
| cnnctTimeout | |
| connectAddress | |
| connectPort | |
| rcvTimeout |
Methods
| receive |
Slot Details
CLEAR_ALARM_CODES
const static Str[] CLEAR_ALARM_CODES := ...
CMD_DISCONNECT
const static Str CMD_DISCONNECT := "DISCONNECT"
CMD_POLL
const static Str CMD_POLL := "POLL"
SET_ALARM_CODES
const static Str[] SET_ALARM_CODES := 0","DI=1","NKBK","DVDD"]
bindAddress
const IpAddr? bindAddress
cnnctTimeout
const Duration cnnctTimeout
connectAddress
const IpAddr connectAddress
connectPort
const Int connectPort
make
new make(ActorPool pool, IpAddr connectAddress, Int connectPort, Duration cnnctTimeout := Consts.CNC_TCP_RESPONSE_TIMEOUT_DEFAULT, Duration rcvTimeout := Consts.CNC_TCP_RESPONSE_TIMEOUT_DEFAULT)
rcvTimeout
const Duration rcvTimeout
receive
virtual override Obj? receive(Obj? msg)
VCncUdpDiscoveryLinux
const class VCncUdpDiscoveryLinux : Actor
Constructors
| make |
Fields
| rcvTimeout |
Methods
| receive |
Slot Details
make
new make(ActorPool pool, Duration rcvTimeout := Consts.CNC_TCP_RESPONSE_TIMEOUT_MAXIMUM)
rcvTimeout
const Duration rcvTimeout
receive
virtual override UdpDiscoveryLeaf[]? receive(Obj? fromAddress)
VCncUdpDiscoveryWindows
const class VCncUdpDiscoveryWindows : Actor
Windows receives responses through the sending address rather than the expected wildcard one.
Constructors
| make |
Fields
| rcvTimeout |
Methods
| receive |
Slot Details
make
new make(ActorPool pool, Duration rcvTimeout := Consts.CNC_TCP_RESPONSE_TIMEOUT_MAXIMUM)
rcvTimeout
const Duration rcvTimeout
receive
virtual override UdpDiscoveryLeaf[]? receive(Obj? fromAddress)