@amigo9090/ih-libiec61850-node 1.0.38 → 1.0.40
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/builds/linux_arm/addon_iec61850.node +0 -0
- package/builds/linux_arm64/addon_iec61850.node +0 -0
- package/builds/linux_x64/addon_iec61850.node +0 -0
- package/builds/macos_arm64/addon_iec61850.node +0 -0
- package/builds/macos_x64/addon_iec61850.node +0 -0
- package/builds/windows_x64/addon_iec61850.node +0 -0
- package/examples/index_iec61850_client2.js +15 -18
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -38,6 +38,7 @@ const client = new MmsClient((event, data) => {
|
|
|
38
38
|
console.log(` ${ref}: ${util.inspect(value, { depth: null })}, Reason: ${reason}`);
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
|
+
|
|
41
42
|
} else if (data.event === 'batchData') {
|
|
42
43
|
console.log(`Batch Data received for ${util.inspect(data.dataRefs, { depth: null })}:`);
|
|
43
44
|
data.values.forEach((result, index) => {
|
|
@@ -146,7 +147,7 @@ async function handleConnectionOpened() {
|
|
|
146
147
|
});
|
|
147
148
|
});
|
|
148
149
|
|
|
149
|
-
console.log('Reading data...');
|
|
150
|
+
/*console.log('Reading data...');
|
|
150
151
|
const dataRefs = [
|
|
151
152
|
'WAGO61850ServerDevice/XCBR1.Pos[ST]',
|
|
152
153
|
'WAGO61850ServerDevice/GGIO1.Ind1.stVal',
|
|
@@ -155,17 +156,12 @@ async function handleConnectionOpened() {
|
|
|
155
156
|
const readRefResult = await client.readData(dataRefs);
|
|
156
157
|
console.log("readRefResult " + util.inspect(readRefResult, { depth: null }));
|
|
157
158
|
|
|
158
|
-
/*const rcbRef = 'WAGO61850ServerDevice/LLN0.RP.ReportBlock0101';
|
|
159
|
-
const dataSetRef = 'WAGO61850ServerDevice/LLN0.DataSet01';
|
|
160
|
-
console.log(`Enabling reporting for ${rcbRef} with dataset ${dataSetRef}`);
|
|
161
|
-
await client.enableReporting(rcbRef, dataSetRef);*/
|
|
162
|
-
|
|
163
159
|
const rcbRef2 = 'WAGO61850ServerDevice/LLN0.RP.ReportBlock0201';
|
|
164
160
|
const dataSetRef2 = 'WAGO61850ServerDevice/LLN0.DataSet02';
|
|
165
161
|
console.log(`Enabling reporting for ${rcbRef2} with dataset ${dataSetRef2}`);
|
|
166
|
-
await client.enableReporting(rcbRef2, dataSetRef2)
|
|
162
|
+
await client.enableReporting(rcbRef2, dataSetRef2);*/
|
|
167
163
|
|
|
168
|
-
|
|
164
|
+
console.log('Reading data...');
|
|
169
165
|
const dataRefs = [
|
|
170
166
|
'A01LD0/Q1_XCBR1.Pos[ST]',
|
|
171
167
|
'A01LD0/In_GGIO1.Ind1',
|
|
@@ -174,15 +170,15 @@ async function handleConnectionOpened() {
|
|
|
174
170
|
const readRefResult = await client.readData(dataRefs);
|
|
175
171
|
console.log("readRefResult " + util.inspect(readRefResult, { depth: null }));
|
|
176
172
|
|
|
177
|
-
|
|
173
|
+
/* const rcbRef = 'A01LD0/LLN0.RP.repTI1';
|
|
178
174
|
const dataSetRef = 'A01LD0/LLN0.TI_ASU';
|
|
179
175
|
console.log(`Enabling reporting for ${rcbRef} with dataset ${dataSetRef}`);
|
|
180
|
-
await client.enableReporting(rcbRef, dataSetRef)
|
|
176
|
+
await client.enableReporting(rcbRef, dataSetRef);*/
|
|
181
177
|
|
|
182
178
|
const rcbRef2 = 'A01LD0/LLN0.BR.repTS1';
|
|
183
179
|
const dataSetRef2 = 'A01LD0/LLN0.TS_ASU';
|
|
184
180
|
console.log(`Enabling reporting for ${rcbRef2} with dataset ${dataSetRef2}`);
|
|
185
|
-
await client.enableReporting(rcbRef2, dataSetRef2)
|
|
181
|
+
await client.enableReporting(rcbRef2, dataSetRef2);
|
|
186
182
|
|
|
187
183
|
} catch (err) {
|
|
188
184
|
console.error('Error in handleConnectionOpened:', err.message);
|
|
@@ -193,24 +189,25 @@ async function main() {
|
|
|
193
189
|
try {
|
|
194
190
|
console.log('Starting client...');
|
|
195
191
|
await client.connect({
|
|
196
|
-
ip: '192.168.0.
|
|
192
|
+
ip: '192.168.0.106',
|
|
197
193
|
port: 102,
|
|
198
194
|
clientID: 'mms_client1',
|
|
199
|
-
reconnectDelay: 2
|
|
195
|
+
reconnectDelay: 2,
|
|
196
|
+
//heartbeatInterval: 3000 //новый параметр - интервал эхо-запросов для поддержки соединения
|
|
200
197
|
});
|
|
201
198
|
|
|
202
199
|
await sleep(5000);
|
|
203
200
|
|
|
204
201
|
console.log('Waiting for data and reports...');
|
|
205
|
-
await sleep(
|
|
202
|
+
await sleep(30000);
|
|
206
203
|
|
|
207
|
-
|
|
204
|
+
const rcbRef = 'A01LD0/LLN0.BR.repTS1';
|
|
208
205
|
console.log(`Disabling reporting for ${rcbRef}`);
|
|
209
|
-
await client.disableReporting(rcbRef)
|
|
206
|
+
await client.disableReporting(rcbRef);
|
|
210
207
|
|
|
211
|
-
const rcbRef2 = 'WAGO61850ServerDevice/LLN0.RP.ReportBlock0201';
|
|
208
|
+
/*const rcbRef2 = 'WAGO61850ServerDevice/LLN0.RP.ReportBlock0201';
|
|
212
209
|
console.log(`Disabling reporting for ${rcbRef2}`);
|
|
213
|
-
await client.disableReporting(rcbRef2)
|
|
210
|
+
await client.disableReporting(rcbRef2);*/
|
|
214
211
|
|
|
215
212
|
console.log('Client status:', client.getStatus());
|
|
216
213
|
console.log('Closing client...');
|