- DateTime
- DateTimeStruct
- Variant
- DataValue
- NodeId
- ExpandedNodeId
- QualifiedName
- LocalizedText
- ObjectAttributes
- VariantAttributes
- ViewAttributes
- MethodAttributes
DateTime没有默认的构造函数(即没有new函数 )
提供一下构造函数:
-
now()
当前UTC时间 -
nowMonotonic()
当前自操作系统启动后的时间长度,仅用来标记时间间隔长度等,不能用作时间戳
N/A
- __tostring
字符串化当前时间,例如 2019/08/23 12:08:36.219.213.222 - toUnixTime()
转换为Unix时间戳 (uint64数据) - FromUnitTime(time | int64)
从Unix时间戳转换到当前结构 - toStruct()
转换成为DateTimeStruct结构,方便访问具体的时间属性(年月日等等) - fromStruct()
从DateTimeStruct转换成为当前结构 - localTimeUtcOffset()
本地时间和UTC时间的间隔秒数
- new()
默认构造,提供初始化一个默认的时间结构体对象 - new(DateTime now)
从时间对象构造一个时间结构体对象
- nanoSec
- microSec
- milliSec
- sec
- min
- hour
- day
- month
- year
提供默认的构造函数,支持boolean, 整数(int64),浮点(double), 字符串。也支持指定的数据类型,如Variant.uint8(10),Variant.datatime(datetime_obj)等等
- new(boolean)
- new(integer)
- new(numeric)
- new(string)
- int8(integer)
- uint8(integer)
- int16(integer)
- uint16(integer)
- int32(integer)
- uint32(integer)
- int64(integer)
- uint64(integer)
- datetime(DateTime)
- isEmpty()
是否是一个空对象 - isScalar()
是否是元数据(非数组类型) - isNumberic()
是否是数值数据 - hasScalarType(type: number)
是否含有指定的数据类型 - hasArrayType(type: number)
是否含有制定的数组类型 - setScalar(val: any, type: number)
设定元数据 - setScalarCopy(val: any, type: number)
设定并复制数据 - setArray(array: array, arraySize: number, type: number)
设定数组数据 - setArrayCopy(array: array, arraySize: number, type: number)
设定数组数据 - copyRange()
- setRange()
- setRangeCopy()
- asLong()
获取整数数据(尝试进行数据转换) - asDouble()
获取浮点数据 (尝试进行数据转换) - asString()
获取字符串数据 - asDateTime()
获取时间戳 - asValue
返回对应的Lua数据(可以是整数、浮点、字符串), 失败返回nil, error
只提供一种默认的构造函数,即使用Variant作为输入
- new(val | Variant)
- hasValue (Readonly)
是否有合法的数值,只读 - hasStatus (Readonly)
是否有状态值,只读 - hasSourceTimestamp (Readonly)
是否有数据源时间戳, 只读 - hasServerTimestamp (Readonly)
是否有服务器时间戳,只读 - hasSorucePicoseconds (Readonly)
- hasServerPicoseconds (Readonly)
- value -- Variant
数据 - status -- StatusCode
状态 - sourceTimestamp -- DateTime
数据源时间戳 - sourcePicoseconds -- int16
- serverTimestamp -- DateTime
服务器时间戳 - serverPicoseconds -- int16
- new(ns | integer, val | integer)
使用整数作为ID - new(ns | integer, val | string)
使用字符串作为ID - new(ns | integer, val | Guid)
使用UUID作为字符串
- ns
名字空间的ID - type
ID类型 - index
ID数值(可以是整数、字符串以及UUID)
- isNull()
是否为空 - hash()
哈希
- new(ns | integer, val | integer)
- new(ns | integer, val | string)
- nodeId
- namespaceUri
- serverIndex
- new(ns | integers, val | string)
- name
- namespaceIndex
- new(locale | string, text | string)
- text
- locale
- new()
- specifiledAttributes
- displayName
- description
- writeMask
- userWriteMask
- eventNotifier
- new()
- specifiledAttributes
- displayName
- description
- writeMask
- userWriteMask
- value -- Variant
- dataType -- NodeId
- valueRank
- arrayDimensionsSize
- accessLevel
- userAccesssLevel
- minimumSamplingInterval
- historizing
- new()
- specifiledAttributes
- displayName
- description
- writeMask
- userWriteMask
- containsNoLoops
- eventNotifier
- new()
- specifiledAttributes
- displayName
- description
- writeMask
- userWriteMask
- executable
- userExecutable