Libextext
Overview
libextext has multiple built-in macro functions for formatting and outputting system time or tag values. Users can use these macro functions to format the required text templates.
This module can be used to output email and short message content in event management, or for other applications that need to forward text data, such as MQTT or HTTP forwarding.
Macro function overview
| Function item | Function description | Parameter description | fmt options |
|---|---|---|---|
$localtime(fmt) | Output local time | fmt: Output format configuration | %F,%T,%H, …… |
$gmttime(fmt) | Output Greenwich Mean Time | fmt: Output format configuration | %F,%T,%H, …… |
$ctime(fmt) | Output timestamp | fmt: Output format configuration | s,ms,sms |
$tagLocalTime(tag_name,fmt) | Output tag timestamp local time | tag_name:tag name fmt: Output format configuration | %F,%T,%H, …… |
$tagGmtTime(tag_name,fmt) | Output tag timestamp Greenwich Mean Time | tag_name:tag name fmt: output format configuration | %F,%T,%H, …… |
$tagCTime(tag_name,fmt) | Output tag timestamp value | tag_name:tag name fmt: output format configuration | s,ms,sms |
$tagName(tag_name) | Output tag name | tag_name:tag name | --- |
$tagValue(tag_name,fmt) | Output tag value | tag_name:tag name fmt: output format configuration | %.1lf,%.2lf,%.3lf,%g |
$tagQuality(tag_name) | Output tag quality | tag_name:tag name | --- |
$tagValueDescriptor(tag_name) | Output tag value description | tag_name: tag name | --- |
$tagDesc(tag_name) | Output tag description | tag_name: tag name | --- |
$MulTagBegin(tag_list) | Multi-point processing template starting position, no output. | tag_list: a list of tag names separated by commas, leaving it blank means using the entire point table in the project configuration | --- |
$MulTagEnd(separator) | Multi-point processing template end position, output the string specified by separator | separator: separator, used to add to the middle of each tag output text block. | --- |
$MulDevBegin(tag_list) | Multi-device processing module starting position, no output. | tag_list: a list of tag names separated by commas. Leaving it blank means using the entire point list in the project configuration. | --- |
$MulDevEnd(separator) | The end position of the multi-device processing module, outputs the string specified by separator. | separator: a separator, used to be added to the middle of each device output text block. | --- |
$MulVarBegin() | The start position of the multi-variable processing module, no output. | No parameters | --- |
$MulVarEnd(separator) | The end position of the multi-variable processing module, outputs the string specified by separator. | separator: a separator, used to be added to the middle of each device output text block. | --- |
$devName() | Output device name | No parameters | --- |
$varName() | Output variable name | No parameters | --- |
$varValue(@,fmt) | Output variable corresponding to the tag value | fmt: Output format configuration | %.1lf,%.2lf,%.3lf,%g |
$varQuality() | Output variable corresponding to the tag quality | No parameters | --- |
$varDesc() | Output variable corresponding to the tag description | No parameters | --- |
$varValueDescriptor() | Output variable corresponding to the tag value description | No parameters | --- |
$varLocalTime(@,fmt) | Output variable corresponding to the tag timestamp local time | fmt: Output format configuration | %F,%T,%H, …… |
$varGmtTime(@,fmt) | Output variable corresponds to the Greenwich Mean Time of tag timestamp | fmt: Output format configuration | %F,%T,%H, …… |
$varCTime(@,fmt) | Output variable corresponds to the value of tag timestamp | fmt: Output format configuration | s,ms,sms |