@machinemetrics/io-adapter-lib 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +141 -0
- package/.eslintrc.json +36 -0
- package/.gitattributes +12 -0
- package/CHANGELOG.md +544 -0
- package/README.md +2 -0
- package/index.js +17 -0
- package/lib/config/adapterConfig.js +535 -0
- package/lib/config/common/allowDenyList.js +58 -0
- package/lib/config/common/jsonPath.js +44 -0
- package/lib/config/common/labjackU3T4Common.js +227 -0
- package/lib/config/common/validations.js +142 -0
- package/lib/config/configError.js +32 -0
- package/lib/config/device/adam-6052Config.js +103 -0
- package/lib/config/device/brotherHTTPConfig.js +215 -0
- package/lib/config/device/ethernetIPConfig.js +191 -0
- package/lib/config/device/ifmIotConfig.js +245 -0
- package/lib/config/device/jsonHttpConfig.js +76 -0
- package/lib/config/device/labjackT4Config.js +39 -0
- package/lib/config/device/labjackT7Config.js +192 -0
- package/lib/config/device/labjackU3Config.js +32 -0
- package/lib/config/device/modbusTcpConfig.js +336 -0
- package/lib/config/device/mqttBaseConfig.js +70 -0
- package/lib/config/device/mqttConfig.js +113 -0
- package/lib/config/device/mqttLincolnConfig.js +62 -0
- package/lib/config/device/mtconnectAdapterConfig.js +42 -0
- package/lib/config/device/mtconnectBaseConfig.js +136 -0
- package/lib/config/device/mtconnectConfig.js +52 -0
- package/lib/config/device/mtconnectHaasConfig.js +15 -0
- package/lib/config/device/nullConfig.js +81 -0
- package/lib/config/device/opcuaConfig.js +205 -0
- package/lib/config/device/pcccConfig.js +88 -0
- package/lib/config/engineConfigV1.js +382 -0
- package/lib/config/engineConfigV2.js +106 -0
- package/lib/config/generator/counterGenConfig.js +15 -0
- package/lib/config/generator/cronGenConfig.js +33 -0
- package/lib/config/generator/dateTimeGenConfig.js +33 -0
- package/lib/config/index.js +339 -0
- package/lib/config/transformConfigUtil.js +296 -0
- package/lib/engine/dataOutput.js +357 -0
- package/lib/engine/deviceOutput.js +186 -0
- package/lib/engine/engineV1.js +480 -0
- package/lib/engine/engineV2.js +719 -0
- package/lib/engine/index.js +34 -0
- package/lib/engine/transformBuilderV1.js +111 -0
- package/lib/engine/transformBuilderV2.js +74 -0
- package/lib/expressionService.js +330 -0
- package/lib/math.js +142 -0
- package/lib/transform/accumulate.js +98 -0
- package/lib/transform/average.js +56 -0
- package/lib/transform/debounce.js +152 -0
- package/lib/transform/downsample.js +69 -0
- package/lib/transform/edge.js +34 -0
- package/lib/transform/expression.js +91 -0
- package/lib/transform/fallingEdge.js +70 -0
- package/lib/transform/fromBuffer.js +89 -0
- package/lib/transform/hash.js +41 -0
- package/lib/transform/ignoreValue.js +118 -0
- package/lib/transform/index.js +93 -0
- package/lib/transform/invert.js +25 -0
- package/lib/transform/latch.js +99 -0
- package/lib/transform/latchValue.js +115 -0
- package/lib/transform/logicAnd.js +67 -0
- package/lib/transform/logicOr.js +67 -0
- package/lib/transform/map.js +115 -0
- package/lib/transform/max.js +57 -0
- package/lib/transform/maxLength.js +39 -0
- package/lib/transform/min.js +57 -0
- package/lib/transform/minDelta.js +40 -0
- package/lib/transform/offDelay.js +89 -0
- package/lib/transform/onDelay.js +89 -0
- package/lib/transform/patternEscape.js +24 -0
- package/lib/transform/patternMatch.js +194 -0
- package/lib/transform/patternReplace.js +170 -0
- package/lib/transform/patternTest.js +85 -0
- package/lib/transform/rateOfChange.js +56 -0
- package/lib/transform/reject.js +115 -0
- package/lib/transform/resample.js +96 -0
- package/lib/transform/risingEdge.js +90 -0
- package/lib/transform/risingEdgeCounter.js +179 -0
- package/lib/transform/sampleInterval.js +12 -0
- package/lib/transform/source.js +116 -0
- package/lib/transform/state.js +201 -0
- package/lib/transform/threshold.js +52 -0
- package/lib/transform/toBuffer.js +159 -0
- package/lib/transform/toggle.js +118 -0
- package/lib/transform/transformState.js +193 -0
- package/lib/transform/trim.js +27 -0
- package/lib/transform/util/chainSource.js +96 -0
- package/lib/transform/util/ringBuffer.js +34 -0
- package/lib/transform/valueChange.js +34 -0
- package/lib/transform/valueDecrease.js +38 -0
- package/lib/transform/valueIncrease.js +38 -0
- package/lib/transform/valueIncreaseDiff.js +66 -0
- package/lib/transform/whenUnavailable.js +73 -0
- package/lib/transform/windowCount.js +86 -0
- package/lib/util/fileUtil.js +44 -0
- package/package.json +38 -0
- package/test/.eslintrc.json +15 -0
- package/test/chainedTransform.test.js +88 -0
- package/test/conditions.test.js +118 -0
- package/test/config/ab-pccc.test.js +41 -0
- package/test/config/adam-6052.test.js +16 -0
- package/test/config/adapter.test.js +109 -0
- package/test/config/brother-http.test.js +19 -0
- package/test/config/ethernet-ip.test.js +19 -0
- package/test/config/ifm-iot.test.js +20 -0
- package/test/config/json-http.test.js +47 -0
- package/test/config/labjack-t4.test.js +78 -0
- package/test/config/labjack-t7.test.js +18 -0
- package/test/config/labjack-u3.test.js +17 -0
- package/test/config/modbusTcp.test.js +87 -0
- package/test/config/mqtt.test.js +19 -0
- package/test/config/mqttLincoln.test.js +29 -0
- package/test/config/mtconnect.test.js +63 -0
- package/test/config/mtconnectAdapter.test.js +124 -0
- package/test/config/mtconnectHaas.test.js +15 -0
- package/test/config/null.test.js +16 -0
- package/test/config/opcua.test.js +97 -0
- package/test/config-tests.js +102 -0
- package/test/configFiles/conditions.yml +37 -0
- package/test/configFiles/data-items-legacy.yml +24 -0
- package/test/configFiles/data-items-shorthand.yml +14 -0
- package/test/configFiles/data-items.yml +12 -0
- package/test/configFiles/device/ab-pccc-default.yml +3 -0
- package/test/configFiles/device/ab-pccc-full.yml +13 -0
- package/test/configFiles/device/adam-6052-default.yml +2 -0
- package/test/configFiles/device/brother-http-default.yml +3 -0
- package/test/configFiles/device/ethernet-ip-default.yml +2 -0
- package/test/configFiles/device/ifm-iot-default.yml +2 -0
- package/test/configFiles/device/json-http-bad-prop.yml +13 -0
- package/test/configFiles/device/json-http-bad-prop2.yml +13 -0
- package/test/configFiles/device/json-http-default.yml +3 -0
- package/test/configFiles/device/json-http-std.yml +13 -0
- package/test/configFiles/device/labjack-t4-condition-exprs.yaml +46 -0
- package/test/configFiles/device/labjack-t4-default.yml +3 -0
- package/test/configFiles/device/labjack-t4-pins-alt.yaml +41 -0
- package/test/configFiles/device/labjack-t4-pins.yaml +40 -0
- package/test/configFiles/device/labjack-t4-v1.yaml +29 -0
- package/test/configFiles/device/labjack-t7-default.yml +2 -0
- package/test/configFiles/device/labjack-u3-default.yml +2 -0
- package/test/configFiles/device/modbus-partial.yml +4 -0
- package/test/configFiles/device/modbus-std-extended.yaml +23 -0
- package/test/configFiles/device/modbus-std.yaml +34 -0
- package/test/configFiles/device/modbus-tcp-default.yml +3 -0
- package/test/configFiles/device/mqtt-default.yml +2 -0
- package/test/configFiles/device/mqtt-lincoln-default.yml +3 -0
- package/test/configFiles/device/mqtt-lincoln-full.yml +7 -0
- package/test/configFiles/device/mtconnect-adapter-default.yml +3 -0
- package/test/configFiles/device/mtconnect-adapter-keys.yaml +18 -0
- package/test/configFiles/device/mtconnect-complex-keys.yaml +17 -0
- package/test/configFiles/device/mtconnect-default.yml +3 -0
- package/test/configFiles/device/mtconnect-duplicate-allow-keys.yaml +10 -0
- package/test/configFiles/device/mtconnect-duplicate-declare-keys.yaml +8 -0
- package/test/configFiles/device/mtconnect-duplicate-deny-keys.yaml +10 -0
- package/test/configFiles/device/mtconnect-haas-default.yml +3 -0
- package/test/configFiles/device/mtconnect-std.yaml +18 -0
- package/test/configFiles/device/null-default.yml +1 -0
- package/test/configFiles/device/opcua-bad-tag.yml +18 -0
- package/test/configFiles/device/opcua-bad-tag2.yml +18 -0
- package/test/configFiles/device/opcua-default.yml +3 -0
- package/test/configFiles/device/opcua-std.yml +18 -0
- package/test/configFiles/dump-test.yml +11 -0
- package/test/configFiles/expressionCond.yml +46 -0
- package/test/configFiles/min-config-t4.yaml +4 -0
- package/test/configFiles/min-config-u3.yaml +3 -0
- package/test/configFiles/missing-device.yaml +2 -0
- package/test/configFiles/parse-error1.yml +9 -0
- package/test/configFiles/parse-error2.yml +9 -0
- package/test/configFiles/repro/buffer-convert-repro.yml +15 -0
- package/test/configFiles/repro/chained-delay-timing-repro.yml +13 -0
- package/test/configFiles/repro/count-init-repro.yml +45 -0
- package/test/configFiles/repro/cycle-break-repro.yml +44 -0
- package/test/configFiles/repro/debounce-repro.yml +46 -0
- package/test/configFiles/repro/diff-count-repro.yml +34 -0
- package/test/configFiles/repro/engine-hang-repro.yml +9 -0
- package/test/configFiles/repro/latch-apm-repro.yml +26 -0
- package/test/configFiles/repro/lockout-count-repro.yml +33 -0
- package/test/configFiles/repro/program-extract-repro.yml +38 -0
- package/test/configFiles/repro/state-latch-repro.yml +47 -0
- package/test/configFiles/repro/ternary-repro.yml +26 -0
- package/test/configFiles/transform/debounce.yml +12 -0
- package/test/configFiles/transform/expression.yml +34 -0
- package/test/configFiles/transform/ignoreValue.yml +31 -0
- package/test/configFiles/transform/latch.yml +11 -0
- package/test/configFiles/transform/latchValue.yml +31 -0
- package/test/configFiles/transform/logicAnd.yml +14 -0
- package/test/configFiles/transform/logicOr.yml +14 -0
- package/test/configFiles/transform/map.yml +19 -0
- package/test/configFiles/transform/maxLength.yml +13 -0
- package/test/configFiles/transform/offDelay.yml +12 -0
- package/test/configFiles/transform/pattern-escape.yml +10 -0
- package/test/configFiles/transform/pattern-match.yml +57 -0
- package/test/configFiles/transform/pattern-replace.yml +34 -0
- package/test/configFiles/transform/pattern-test.yml +25 -0
- package/test/configFiles/transform/reject.yml +24 -0
- package/test/configFiles/transform/risingEdgeCounter.yml +36 -0
- package/test/configFiles/transform/source.yml +20 -0
- package/test/configFiles/transform/state.yml +56 -0
- package/test/configFiles/transform/toggle.yml +19 -0
- package/test/configFiles/transform/whenUnavailable.yml +19 -0
- package/test/dataFiles/noisy-pulse.txt +11330 -0
- package/test/dataItems.test.js +140 -0
- package/test/engine-v1-tests.js +418 -0
- package/test/engine-v2-tests.js +284 -0
- package/test/expression-tests.js +171 -0
- package/test/expressionService.test.js +154 -0
- package/test/expressionServiceCondition.test.js +130 -0
- package/test/repro/buffer-convert-repro.test.js +38 -0
- package/test/repro/chained-delay-timing-repro.test.js +34 -0
- package/test/repro/count-init-repro.test.js +46 -0
- package/test/repro/cylce-break-repro.test.js +57 -0
- package/test/repro/debounce-repro.test.js +65 -0
- package/test/repro/diff-count-repro.test.js +79 -0
- package/test/repro/engine-hang-repro.test.js +38 -0
- package/test/repro/latch-apm-repro.test.js +119 -0
- package/test/repro/lockout-count-repro.test.js +84 -0
- package/test/repro/program-extract-repro.test.js +40 -0
- package/test/repro/state-latch-repro.test.js +63 -0
- package/test/repro/ternary-repro.test.js +43 -0
- package/test/transform/accumulte.test.js +18 -0
- package/test/transform/average.test.js +22 -0
- package/test/transform/debounce.test.js +70 -0
- package/test/transform/downsample.test.js +30 -0
- package/test/transform/edge.test.js +27 -0
- package/test/transform/expression.test.js +189 -0
- package/test/transform/fallingEdge.test.js +59 -0
- package/test/transform/fromBuffer.test.js +60 -0
- package/test/transform/hash.test.js +34 -0
- package/test/transform/ignoreValue.test.js +123 -0
- package/test/transform/invert.test.js +26 -0
- package/test/transform/latch.test.js +33 -0
- package/test/transform/latchValue.test.js +126 -0
- package/test/transform/logicAnd.test.js +80 -0
- package/test/transform/logicOr.test.js +80 -0
- package/test/transform/map.test.js +42 -0
- package/test/transform/max.test.js +30 -0
- package/test/transform/maxLength.test.js +32 -0
- package/test/transform/min.test.js +30 -0
- package/test/transform/minDelta.test.js +14 -0
- package/test/transform/offDelay.test.js +123 -0
- package/test/transform/onDelay.test.js +105 -0
- package/test/transform/patternEscape.test.js +18 -0
- package/test/transform/patternMatch.test.js +177 -0
- package/test/transform/patternReplace.test.js +95 -0
- package/test/transform/patternTest.test.js +105 -0
- package/test/transform/rateOfChange.test.js +34 -0
- package/test/transform/reject.test.js +56 -0
- package/test/transform/resample.test.js +193 -0
- package/test/transform/risingEdge.test.js +60 -0
- package/test/transform/risingEdgeCounter.test.js +227 -0
- package/test/transform/sampleInterval.test.js +22 -0
- package/test/transform/source.test.js +137 -0
- package/test/transform/state.test.js +248 -0
- package/test/transform/threshold.test.js +78 -0
- package/test/transform/toBuffer.test.js +60 -0
- package/test/transform/toggle.test.js +92 -0
- package/test/transform/trim.test.js +30 -0
- package/test/transform/valueChange.test.js +14 -0
- package/test/transform/valueDecrease.test.js +32 -0
- package/test/transform/valueIncrease.test.js +32 -0
- package/test/transform/valueIncreaseDiff.test.js +32 -0
- package/test/transform/whenUnavailable.test.js +93 -0
- package/test/transform/windowCount.test.js +26 -0
- package/test/util/testUtils.js +405 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [2.32.0]
|
|
4
|
+
- Repackaged for public NPM publishing on @machinemetrics/io-adapter-lib
|
|
5
|
+
|
|
6
|
+
## [2.31.5]
|
|
7
|
+
- Added reset config block to EtherNet/IP and MQTT devices
|
|
8
|
+
|
|
9
|
+
## [2.31.4]
|
|
10
|
+
- Added 'enforce-avail-check' option for mtconnect sources
|
|
11
|
+
|
|
12
|
+
## [2.31.3]
|
|
13
|
+
- Add duplicate key check for declare-keys, allow-keys, deny-keys
|
|
14
|
+
|
|
15
|
+
## [2.31.2]
|
|
16
|
+
- Added default config tests where they were missing
|
|
17
|
+
|
|
18
|
+
## [2.31.1]
|
|
19
|
+
- Fixed default value in ab-pccc device config
|
|
20
|
+
|
|
21
|
+
## [2.31.0]
|
|
22
|
+
- Added ab-pccc device config
|
|
23
|
+
|
|
24
|
+
## [2.30.2]
|
|
25
|
+
- Added to-buffer op
|
|
26
|
+
- concat() will implicitly convert arguments to strings
|
|
27
|
+
- Fixed identifiers not being found if inside array brackets
|
|
28
|
+
- From-buffer will output entire buffer as string if not provided length
|
|
29
|
+
|
|
30
|
+
## [2.30.1]
|
|
31
|
+
- Added 'asc' and 'ord' functions to expressions
|
|
32
|
+
|
|
33
|
+
## [2.30.0]
|
|
34
|
+
- Build against Node 20
|
|
35
|
+
- Updated packages
|
|
36
|
+
|
|
37
|
+
## [2.29.3]
|
|
38
|
+
- Added timezone option to datetime generator
|
|
39
|
+
|
|
40
|
+
## [2.29.2]
|
|
41
|
+
- Fix TZ check on cron generator config
|
|
42
|
+
|
|
43
|
+
## [2.29.1]
|
|
44
|
+
- Added cron generator
|
|
45
|
+
- Added counter generator
|
|
46
|
+
|
|
47
|
+
## [2.29.0]
|
|
48
|
+
- Added Generators support
|
|
49
|
+
- Added datetime generator
|
|
50
|
+
|
|
51
|
+
## [2.28.0]
|
|
52
|
+
- Added MQTT device type
|
|
53
|
+
|
|
54
|
+
## [2.27.2]
|
|
55
|
+
- Fixed pattern-match else ignoring 0 as a valid value
|
|
56
|
+
|
|
57
|
+
## [2.27.1]
|
|
58
|
+
- Roll back MathJS to 11.0.0 to avoid Node 18+ sub-dependency from typed-function
|
|
59
|
+
|
|
60
|
+
## [2.27.0]
|
|
61
|
+
- Added support for condition overrides
|
|
62
|
+
- More fixes around MTConnect key aliasing
|
|
63
|
+
|
|
64
|
+
## [2.26.2]
|
|
65
|
+
- Fix MTConnect key aliasing not recognizing 'key' in extended format
|
|
66
|
+
|
|
67
|
+
## [2.26.1]
|
|
68
|
+
- ALGOS is indeed not a function
|
|
69
|
+
|
|
70
|
+
## [2.26.0]
|
|
71
|
+
- Add tracing to variable updates
|
|
72
|
+
- Track additional error history on variables
|
|
73
|
+
- Additional safety around handling of pattern-* transforms
|
|
74
|
+
- Add 'device-connected' identifier on system channel
|
|
75
|
+
|
|
76
|
+
## [2.25.1]
|
|
77
|
+
- Allow device output adapter to override file writing
|
|
78
|
+
|
|
79
|
+
## [2.25.0]
|
|
80
|
+
- Added shorthand single expression variable definition support
|
|
81
|
+
- Added shorthand single expression data item support
|
|
82
|
+
|
|
83
|
+
## [2.24.3]
|
|
84
|
+
- Fixed condition changes not emitting a change from the engine
|
|
85
|
+
|
|
86
|
+
## [2.24.2]
|
|
87
|
+
- Fixed all mtconnect declared keys being added as conditions
|
|
88
|
+
|
|
89
|
+
## [2.24.1]
|
|
90
|
+
- Fixed expression compiler throwing when parsing unknown compounds
|
|
91
|
+
- Fixed expression compiler not recognizing identifiers with underscores
|
|
92
|
+
|
|
93
|
+
## [2.24.0]
|
|
94
|
+
- Added support for indexing into an MTConnection condition by code for level or message
|
|
95
|
+
- Expanded sub-indexing support in expressions to all identifiers, not just 'this' keyword
|
|
96
|
+
- Expanded sub-indexing support in expressions for square bracket syntax
|
|
97
|
+
- Removed legacy condition type defines
|
|
98
|
+
- Updated mathjs to 11.12.0
|
|
99
|
+
|
|
100
|
+
## [2.23.2]
|
|
101
|
+
- Added from-buffer op
|
|
102
|
+
|
|
103
|
+
## [2.23.1]
|
|
104
|
+
- Remove moment and unused libraries
|
|
105
|
+
|
|
106
|
+
## [2.23.0]
|
|
107
|
+
- Remove or replace multiple node dependencies
|
|
108
|
+
|
|
109
|
+
## [2.22.2]
|
|
110
|
+
- Added active attribute to state
|
|
111
|
+
- Added methods to get variables, dependencies, and set focus
|
|
112
|
+
- Updated replay logging to not record null envelopes
|
|
113
|
+
- Updated replay logging to record mtconnect source values
|
|
114
|
+
|
|
115
|
+
## [2.22.1]
|
|
116
|
+
- Add support for hass-mode config value on MTConnect Agent machines.
|
|
117
|
+
|
|
118
|
+
## [2.22.0]
|
|
119
|
+
- Added adapter reply logging support
|
|
120
|
+
|
|
121
|
+
## [2.21.4]
|
|
122
|
+
- Update image used to run on circleci
|
|
123
|
+
- Publish to CodeArtifact on master instead.
|
|
124
|
+
|
|
125
|
+
## [2.21.3]
|
|
126
|
+
- Default haasMode to true mtconnect-haas device type
|
|
127
|
+
|
|
128
|
+
## [2.21.2]
|
|
129
|
+
- Add error context during config creation
|
|
130
|
+
- Several checks and fixes based on bugsnag reports
|
|
131
|
+
|
|
132
|
+
## [2.21.1]
|
|
133
|
+
- Fix count op when direct value is an expression with vars
|
|
134
|
+
- Fix getExpressions handling of default attribute
|
|
135
|
+
- Add protection around count expression calls
|
|
136
|
+
|
|
137
|
+
## [2.21.0]
|
|
138
|
+
- Refactoring around transform config
|
|
139
|
+
- Deleted log-file transform
|
|
140
|
+
- Deleted falling-edge-counter transform
|
|
141
|
+
- Added direction option to threshold op
|
|
142
|
+
|
|
143
|
+
## [2.20.4]
|
|
144
|
+
- Added latch-value op
|
|
145
|
+
- Added default option to ignore-value op
|
|
146
|
+
- Added declare-keys support to ifm-iot
|
|
147
|
+
|
|
148
|
+
## [2.20.3]
|
|
149
|
+
- Added ignore-value op
|
|
150
|
+
|
|
151
|
+
## [2.20.2]
|
|
152
|
+
- Extend contains() mathod to work with arrays
|
|
153
|
+
|
|
154
|
+
## [2.20.1]
|
|
155
|
+
- Add opcua-condition-key to opcua config
|
|
156
|
+
|
|
157
|
+
## [2.20.0]
|
|
158
|
+
- Break cycles detected in engine execution
|
|
159
|
+
|
|
160
|
+
## [2.19.0]
|
|
161
|
+
- Added some statistics gathering
|
|
162
|
+
- Various small optimizations
|
|
163
|
+
- Conditions idenitfy their triggers per-code
|
|
164
|
+
- Reduce scopes provided to mathjs expression evaluator to only known identifiers
|
|
165
|
+
|
|
166
|
+
## [2.18.0]
|
|
167
|
+
- Adds mtconnect-haas device type
|
|
168
|
+
|
|
169
|
+
## [2.17.7]
|
|
170
|
+
- Added reclassify-warning and reclassify-fault options to conditions
|
|
171
|
+
|
|
172
|
+
## [2.17.6]
|
|
173
|
+
- Added force-read-on-connect option to OPC-UA type
|
|
174
|
+
- Added read-mode option to OPC-UA type
|
|
175
|
+
- Added user-certificate-path and user-private-key-path options to OPC-UA
|
|
176
|
+
|
|
177
|
+
## [2.17.5]
|
|
178
|
+
- Add scan-interval and device-scan-interval to ifm-iot config
|
|
179
|
+
|
|
180
|
+
## [2.17.4]
|
|
181
|
+
- Fixes parsing MTConnect Agent endpoints with a path after the port number
|
|
182
|
+
|
|
183
|
+
## [2.17.3]
|
|
184
|
+
- Added optional insecure parameter to json-http type
|
|
185
|
+
|
|
186
|
+
## [2.17.2]
|
|
187
|
+
- Added optional 'index' paramter to OPCUA tags
|
|
188
|
+
|
|
189
|
+
## [2.17.1]
|
|
190
|
+
- Extended flag() function to handle arrays
|
|
191
|
+
|
|
192
|
+
## [2.17.0]
|
|
193
|
+
- Added json-http device type
|
|
194
|
+
|
|
195
|
+
## [2.16.0]
|
|
196
|
+
- Added when-unavailable transform
|
|
197
|
+
- Internal engine change to allow unavailable to be handled by chains
|
|
198
|
+
- Added try/catch around logic-and and logic-or expression execution
|
|
199
|
+
|
|
200
|
+
## [2.15.9]
|
|
201
|
+
- Support nested objects on 'this' in expressions
|
|
202
|
+
|
|
203
|
+
## [2.15.8]
|
|
204
|
+
- Added implicit handling of /g flag on pattern-match
|
|
205
|
+
- Quietly discard invalid flags passed to patterns
|
|
206
|
+
- Check and throw error at config time if regex pattern is invalid
|
|
207
|
+
|
|
208
|
+
## [2.15.7]
|
|
209
|
+
- Added latch transform
|
|
210
|
+
|
|
211
|
+
## [2.15.6]
|
|
212
|
+
- Fix rising-edge to not emit signal if first available state is already high
|
|
213
|
+
- Fix count to not count until a low has been observed after becoming available
|
|
214
|
+
|
|
215
|
+
## [2.15.5]
|
|
216
|
+
- Additional diagnostic support
|
|
217
|
+
|
|
218
|
+
## [2.15.4]
|
|
219
|
+
- Brother: Exclude 2nd path metrics post-validation (will be reintroduced if needed by io-adapter)
|
|
220
|
+
|
|
221
|
+
## [2.15.3]
|
|
222
|
+
- Emit data items corresponding uniquely to each brother "mode" (ftp/mixed/http)
|
|
223
|
+
|
|
224
|
+
## [2.15.2]
|
|
225
|
+
- Fix string handling for != operator
|
|
226
|
+
- Added accumulate transform
|
|
227
|
+
- Added value-increase-diff transform
|
|
228
|
+
|
|
229
|
+
## [2.15.1]
|
|
230
|
+
- Validate that lists are not passed in where objects are expected
|
|
231
|
+
|
|
232
|
+
## [2.15.0]
|
|
233
|
+
- Support three modes of data collection: collection-mode: http/ftp/mixed; integration type brother-http
|
|
234
|
+
|
|
235
|
+
## [2.14.5]
|
|
236
|
+
- Added pattern-escape transform
|
|
237
|
+
|
|
238
|
+
## [2.14.4]
|
|
239
|
+
- Variables track last error
|
|
240
|
+
|
|
241
|
+
## [2.14.3]
|
|
242
|
+
- Brother HTTP multipath support
|
|
243
|
+
|
|
244
|
+
## [2.14.2]
|
|
245
|
+
- Changed pattern-match properties pattern,else to accept interpolated expressions
|
|
246
|
+
- Changed pattern-test properties pattern to accept interpolated expressions
|
|
247
|
+
|
|
248
|
+
## [2.14.1]
|
|
249
|
+
- Fix size() function for strings
|
|
250
|
+
- Fix unexpected throw validating certain expressions
|
|
251
|
+
|
|
252
|
+
## [2.14.0]
|
|
253
|
+
- Changed pattern-replace properties pattern,with,else to accept interpolated expressions
|
|
254
|
+
- Added lpad and rpad expression functions
|
|
255
|
+
|
|
256
|
+
## [2.13.0]
|
|
257
|
+
- Added merge-window property to count transform, also making count a pending change transform
|
|
258
|
+
- Added index property to pattern-match transform
|
|
259
|
+
|
|
260
|
+
## [2.12.8]
|
|
261
|
+
- Add http interval config to brother adapter
|
|
262
|
+
|
|
263
|
+
## [2.12.7]
|
|
264
|
+
- Fix variables not recognized in expression when adjacent to : or ?
|
|
265
|
+
|
|
266
|
+
## [2.12.5]
|
|
267
|
+
- Adds 'brother-http' as an alias for the 'brother' device
|
|
268
|
+
|
|
269
|
+
## [2.12.4]
|
|
270
|
+
- Added 'find-iodd' option to iolink-ifm-iot type
|
|
271
|
+
|
|
272
|
+
## [2.12.3]
|
|
273
|
+
- Added support for 'extended' modbus addressing
|
|
274
|
+
|
|
275
|
+
## [2.12.2]
|
|
276
|
+
- Add sourceRef, machineRef, machineId to parsed config
|
|
277
|
+
|
|
278
|
+
## [2.12.1]
|
|
279
|
+
- Add gradient and offset fields to iolink-ofm-iot config
|
|
280
|
+
|
|
281
|
+
## [2.12.0]
|
|
282
|
+
- Added iolink-ifm-iot device type
|
|
283
|
+
|
|
284
|
+
## [2.11.1]
|
|
285
|
+
- Most transform expressions support property access
|
|
286
|
+
- Add optional level-list for array-sourced conditions
|
|
287
|
+
|
|
288
|
+
## [2.11.0]
|
|
289
|
+
- Added dataOutput engine component
|
|
290
|
+
|
|
291
|
+
## [2.10.0]
|
|
292
|
+
- Added null device type
|
|
293
|
+
|
|
294
|
+
## [2.9.6]
|
|
295
|
+
- Added toggle transform
|
|
296
|
+
|
|
297
|
+
## [2.9.5]
|
|
298
|
+
- Added rate-of-change transform
|
|
299
|
+
- Added value field support to U3 pins for updating output state
|
|
300
|
+
|
|
301
|
+
## [2.9.4]
|
|
302
|
+
- Support expressions referncing this.subkey
|
|
303
|
+
- Support this keyword in expressions at start of map chain
|
|
304
|
+
|
|
305
|
+
## [2.9.3]
|
|
306
|
+
- Add optional username nad password fields to Lincoln Electric device type
|
|
307
|
+
|
|
308
|
+
## [2.9.2]
|
|
309
|
+
- Add more keys to Lincoln Electric device type
|
|
310
|
+
- Support mtconnect-condition passthrough for value device types
|
|
311
|
+
|
|
312
|
+
## [2.9.1]
|
|
313
|
+
- Fix MQTT Lincoln serial check in config validation
|
|
314
|
+
|
|
315
|
+
## [2.9.0]
|
|
316
|
+
- Added MQTT for Lincoln Electric support
|
|
317
|
+
- Added support for device definitions to inject data items into engine
|
|
318
|
+
|
|
319
|
+
## [2.8.0]
|
|
320
|
+
- Added support for devices to subscribe to engine variable updates
|
|
321
|
+
- Added value field to T4 pins for updating output state
|
|
322
|
+
|
|
323
|
+
## [2.7.6]
|
|
324
|
+
- Support amount attribute and default shorthand on count for counting by expression
|
|
325
|
+
|
|
326
|
+
## [2.7.5]
|
|
327
|
+
- Keep track of original expression on non-state-based data items
|
|
328
|
+
|
|
329
|
+
## [2.7.4]
|
|
330
|
+
- Fix crash processing reject command
|
|
331
|
+
|
|
332
|
+
## [2.7.3]
|
|
333
|
+
- Revert mathjs dependency to 6.x for node 8 support
|
|
334
|
+
|
|
335
|
+
## [2.7.2]
|
|
336
|
+
- Added reject transform
|
|
337
|
+
- Updated max-length transform to process arrays
|
|
338
|
+
|
|
339
|
+
## [2.7.1]
|
|
340
|
+
- Validate node ID paths for tags in OPC-UA config
|
|
341
|
+
|
|
342
|
+
## [2.7.0]
|
|
343
|
+
- Support array passthrough in engine
|
|
344
|
+
- Added map transform to process array elements on a subprogram of transforms
|
|
345
|
+
- Added hash transform
|
|
346
|
+
- Added max-length transform
|
|
347
|
+
- Conditions support new source syntax for mtconnect passthrough or array-based sources
|
|
348
|
+
- Conditions support allow-codes and deny-codes options when used with new source model
|
|
349
|
+
- Updated mathjs to 9.x
|
|
350
|
+
- Added md5 function to expressions
|
|
351
|
+
|
|
352
|
+
## [2.6.2]
|
|
353
|
+
- Adds generic condition to Brother adapter to consolidate alarms
|
|
354
|
+
|
|
355
|
+
## [2.6.1]
|
|
356
|
+
- Adds security mode and security policy options to opc-ua configurations
|
|
357
|
+
|
|
358
|
+
## [2.6.0]
|
|
359
|
+
- Adds Brother device configuration
|
|
360
|
+
|
|
361
|
+
## [2.5.6]
|
|
362
|
+
- Fix value-increase and value-decrease wrong result from lexical string compare
|
|
363
|
+
|
|
364
|
+
## [2.5.5]
|
|
365
|
+
- Fix later pending time changes shadowing earlier ones further in a chain
|
|
366
|
+
|
|
367
|
+
## [2.5.4]
|
|
368
|
+
- Fix dependent updates not cascading through chain if timestamp doesn't change
|
|
369
|
+
|
|
370
|
+
## [2.5.3]
|
|
371
|
+
- Fix debounce transform not scheduling future state changes
|
|
372
|
+
- Fix scheduled state changes not executing on device unavailable event
|
|
373
|
+
|
|
374
|
+
## [2.5.2]
|
|
375
|
+
- Add shorthand list format for data-items definition
|
|
376
|
+
|
|
377
|
+
## [2.5.1]
|
|
378
|
+
- Add trim transform to strip nonprint characters from string ends
|
|
379
|
+
|
|
380
|
+
## [2.5.0]
|
|
381
|
+
- Refactored start-of-chain to allow more transforms to start a variable chain
|
|
382
|
+
- Allow expression to be used at start of variable chain
|
|
383
|
+
- Allow state to be used at the start of variable chain
|
|
384
|
+
|
|
385
|
+
## [2.4.2]
|
|
386
|
+
- Added state transform
|
|
387
|
+
|
|
388
|
+
## [2.4.1]
|
|
389
|
+
- Add inject option to Config.load to inject config properties after low-level parsing config document
|
|
390
|
+
- Separate load and loadFile
|
|
391
|
+
- Add dumpYaml to Config to return original / merged config
|
|
392
|
+
|
|
393
|
+
## [2.4.0]
|
|
394
|
+
- Add Ethernet/IP device type
|
|
395
|
+
|
|
396
|
+
## [2.3.1]
|
|
397
|
+
- Improved config checking for OPC-UA device
|
|
398
|
+
|
|
399
|
+
## [2.3.0]
|
|
400
|
+
- U3 support for named pins (AIN0, FIO7, etc)
|
|
401
|
+
- ADAM support for named pins (DI0, etc)
|
|
402
|
+
- U3 and ADAM preserve backwards compat with pin-X naming and V1-style pin definitions
|
|
403
|
+
- Remove support for legacy 'pin' device types
|
|
404
|
+
|
|
405
|
+
## [2.2.2]
|
|
406
|
+
- Fix max listener count for engine being too small for some configurations
|
|
407
|
+
- Add config check for variables following proper operation list form
|
|
408
|
+
|
|
409
|
+
## [2.2.1]
|
|
410
|
+
- Fix crash handling digital or counter input in V1 config
|
|
411
|
+
|
|
412
|
+
## [2.2.0]
|
|
413
|
+
- T7 support matching T4
|
|
414
|
+
- T7 supports range setting on analog pins
|
|
415
|
+
- T7 and T4 support named pins (AIN0, FIO7, etc)
|
|
416
|
+
- T7 and T4 support configuring DAC pin output
|
|
417
|
+
- T4 preserves backwards compat with pin-X naming and V1-style pin definitions
|
|
418
|
+
|
|
419
|
+
## [2.1.2]
|
|
420
|
+
- Add support for probe event handlers to advance engine without value updates
|
|
421
|
+
- Fix threshold to handle string numbers and pass through booleans
|
|
422
|
+
|
|
423
|
+
## [2.1.1]
|
|
424
|
+
- Add reset trigger to rising-edge-counter
|
|
425
|
+
|
|
426
|
+
## [2.1.0]
|
|
427
|
+
- Variable changes in expressions down-chain will re-trigger the whole chain for evaluation
|
|
428
|
+
- Uniform handling and propagation of 'UNAVAILABLE' when an expression term is unavailable
|
|
429
|
+
- Certain expressions like 'false' are now valid
|
|
430
|
+
- Expression evaluation errors will set state to unavailable instead of ignoring
|
|
431
|
+
|
|
432
|
+
## [2.0.0]
|
|
433
|
+
- Introduced central expression service
|
|
434
|
+
- Improved consistency in what data sources can be used in expressions in different sections
|
|
435
|
+
- Multiple breaking changes to interface
|
|
436
|
+
- Removed inputNames and defaultState methods from all locations
|
|
437
|
+
- Fixed infinite loop in resample transform
|
|
438
|
+
|
|
439
|
+
## [1.9.2]
|
|
440
|
+
- Fix implicit pin detection for V2 labjack configs
|
|
441
|
+
- Add flag support to mtconnect allow/deny-keys regex form
|
|
442
|
+
|
|
443
|
+
## [1.9.1]
|
|
444
|
+
- Pattern transforms support /regex/flags syntax for pattern
|
|
445
|
+
- Pattern-match supports shorthand config syntax
|
|
446
|
+
|
|
447
|
+
## [1.9.0]
|
|
448
|
+
- Engine recognizes scheduled pending changes in transforms to update delayed state changes on time
|
|
449
|
+
- Resample, on-delay, off-delay transforms support pending change
|
|
450
|
+
- Removed interpolation and limit support from resample transform
|
|
451
|
+
- Removed variable-clock-interval option from engine, as it is now obsolete
|
|
452
|
+
|
|
453
|
+
## [1.8.1]
|
|
454
|
+
- Fix subtraction of modbus mixed-mode address
|
|
455
|
+
|
|
456
|
+
## [1.8.0]
|
|
457
|
+
- Add labjack-t7 device type
|
|
458
|
+
|
|
459
|
+
## [1.7.1]
|
|
460
|
+
- Override == operator to support string comparisons
|
|
461
|
+
- Add startsWith, endsWith, contains, test, match, replace string functions to expressions
|
|
462
|
+
- Add pattern-match, pattern-replace, pattern-test string transforms
|
|
463
|
+
|
|
464
|
+
## [1.7.0]
|
|
465
|
+
- Add variable-clock-interval (supported by mtconnect-based devices)
|
|
466
|
+
- Engine 2 supports generating additional samples in-stream
|
|
467
|
+
|
|
468
|
+
## [1.6.4]
|
|
469
|
+
- Fix Engine 1 counter pin type counting
|
|
470
|
+
- Engine 2 support for ADAM device
|
|
471
|
+
|
|
472
|
+
## [1.6.3]
|
|
473
|
+
- Add resample transform
|
|
474
|
+
- Add value-decrease transform
|
|
475
|
+
|
|
476
|
+
## [1.6.2]
|
|
477
|
+
- Fix source transform not receiving samples at full sample rate
|
|
478
|
+
- Add min and max to transform builder list
|
|
479
|
+
|
|
480
|
+
## [1.6.1]
|
|
481
|
+
- Root config object accepts sampleLogPath option
|
|
482
|
+
- Add log-file transform
|
|
483
|
+
|
|
484
|
+
## [1.6.0]
|
|
485
|
+
- Add mtconnect-adapter device type
|
|
486
|
+
- More intelligent parsing of mtconnect and mtconnect-adapter endpoints
|
|
487
|
+
- Add allow-keys, deny-keys, mtconnect-passthrough rules to mtconnect* devices
|
|
488
|
+
- Add declare-keys as alias of keys
|
|
489
|
+
- Add local endpoing mapping for mtconnect-adapter device
|
|
490
|
+
|
|
491
|
+
## [1.5.5]
|
|
492
|
+
- Add window-count transform filter
|
|
493
|
+
- Add 'and' and 'or' aliases
|
|
494
|
+
|
|
495
|
+
## [1.5.4]
|
|
496
|
+
- Expand keys syntax for mtconnect device
|
|
497
|
+
|
|
498
|
+
## [1.5.3]
|
|
499
|
+
- Stop edge counters from counting when coming out of unavail state
|
|
500
|
+
|
|
501
|
+
## [1.5.2]
|
|
502
|
+
- Updated mathjs
|
|
503
|
+
- Support additional variables and data-items in mtconnect source
|
|
504
|
+
|
|
505
|
+
## [1.5.1]
|
|
506
|
+
- Add 'flag' function to expression parser
|
|
507
|
+
|
|
508
|
+
## [1.5.0]
|
|
509
|
+
- Unavailable propagation and reset
|
|
510
|
+
|
|
511
|
+
## [1.4.0]
|
|
512
|
+
- Transform source overhaul
|
|
513
|
+
|
|
514
|
+
## [1.3.0]
|
|
515
|
+
- Config version 2 for Engine 2
|
|
516
|
+
|
|
517
|
+
## [1.2.0]
|
|
518
|
+
- Structural changes for tag sources
|
|
519
|
+
- Support 'counter' pin sources for EngineV1 digital inputs
|
|
520
|
+
|
|
521
|
+
## [1.1.3]
|
|
522
|
+
- Add verbose-scanning to MTConnect config
|
|
523
|
+
- Add MTConnect passthrough source handlers to engines
|
|
524
|
+
- Unify source adding by checking a device/source's 'sourceType' property
|
|
525
|
+
|
|
526
|
+
## [1.1.2]
|
|
527
|
+
- Recognize MTConnect
|
|
528
|
+
|
|
529
|
+
## [1.1.1]
|
|
530
|
+
- Recognize ADAM-6052
|
|
531
|
+
|
|
532
|
+
## [1.1.0]
|
|
533
|
+
- Handle adapter config
|
|
534
|
+
|
|
535
|
+
## [1.0.2]
|
|
536
|
+
- Move V1 logfile creation from config to engine
|
|
537
|
+
|
|
538
|
+
## [1.0.1]
|
|
539
|
+
- Apply security constraints to mathjs (exclude some functionality)
|
|
540
|
+
- Expose mathjs as a service of the library
|
|
541
|
+
|
|
542
|
+
## [1.0.0]
|
|
543
|
+
- Initial build
|
|
544
|
+
- Based on majority of io-adapter 2.0 rebuild effort
|
package/README.md
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const Config = require('./lib/config');
|
|
4
|
+
const Engine = require('./lib/engine');
|
|
5
|
+
const Transform = require('./lib/transform');
|
|
6
|
+
const Math = require('./lib/math');
|
|
7
|
+
const packageInfo = require('./package.json');
|
|
8
|
+
|
|
9
|
+
if (module) {
|
|
10
|
+
module.exports = {
|
|
11
|
+
Config,
|
|
12
|
+
Engine,
|
|
13
|
+
Math,
|
|
14
|
+
Transform,
|
|
15
|
+
version: packageInfo.version,
|
|
16
|
+
};
|
|
17
|
+
}
|