Skip to content

Commit d8a5990

Browse files
committed
Update Excel config server and worksheet to add new tag parameters.
1 parent 3d986e0 commit d8a5990

File tree

5 files changed

+64
-92
lines changed

5 files changed

+64
-92
lines changed
65.5 KB
Binary file not shown.

src/config_server_for_excel/app-defs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ module.exports = {
2323
HTTP_PORT: 10001,
2424
IP_BIND: '127.0.0.1',
2525
MSG: '{json:scada} - Config Server for Excel',
26-
VERSION: '0.1.1',
26+
VERSION: '0.2.0',
2727
}

src/config_server_for_excel/index.js

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* {json:scada} - Copyright (c) 2020-2024 - Ricardo L. Olsen
2+
* {json:scada} - Copyright (c) 2020-2025 - Ricardo L. Olsen
33
* This file is part of the JSON-SCADA distribution (https://github.com/riclolsen/json-scada).
44
*
55
* This program is free software: you can redistribute it and/or modify
@@ -241,6 +241,10 @@ MongoClient.connect(
241241
'alarmDisabled',
242242
'commandBlocked',
243243
'commissioningRemarks',
244+
'protocolSourceDiscardOldest',
245+
'protocolSourcePublishingInterval',
246+
'protocolSourceQueueSize',
247+
'protocolSourceSamplingInterval',
244248
]
245249
let projection = {}
246250
fields.forEach((value) => {
@@ -309,6 +313,7 @@ MongoClient.connect(
309313
elem.commandOfSupervised = toMongoDouble(elem.commandOfSupervised)
310314
elem.supervisedOfCommand = toMongoDouble(elem.supervisedOfCommand)
311315
elem.alarmState = toMongoDouble(elem.alarmState)
316+
elem.alertedState = toMongoDouble(elem.alertedState)
312317
elem.formula = toMongoDouble(elem.formula)
313318
elem.kconv1 = toMongoDouble(elem.kconv1, 1)
314319
elem.kconv2 = toMongoDouble(elem.kconv2, 0)
@@ -333,6 +338,19 @@ MongoClient.connect(
333338
elem.protocolSourceCommandUseSBO,
334339
false
335340
)
341+
elem.protocolSourceDiscardOldest = toMongoBoolean(
342+
elem.protocolSourceDiscardOldest,
343+
false
344+
)
345+
elem.protocolSourcePublishingInterval = toMongoDouble(
346+
elem.protocolSourcePublishingInterval
347+
)
348+
elem.protocolSourceQueueSize = toMongoDouble(
349+
elem.protocolSourceQueueSize
350+
)
351+
elem.protocolSourceSamplingInterval = toMongoDouble(
352+
elem.protocolSourceSamplingInterval
353+
)
336354
elem.protocolDestinations = toMongoObj(elem.protocolDestinations, [])
337355
elem.protocolDestinations.forEach((pd) => {
338356
pd.protocolDestinationConnectionNumber = toMongoDouble(
@@ -384,23 +402,28 @@ MongoClient.connect(
384402
delete elem._id
385403

386404
let onInsert = {
387-
value: new Double(0),
388-
valueString: '',
389-
valueJson: {},
390-
sourceDataUpdate: null,
391-
invalid: true,
392-
substituted: false,
393405
alarmed: false,
394-
overflow: false,
395-
transient: false,
396-
frozen: false,
406+
alarmRange: new Double(0),
407+
alerted: false,
408+
alertState: '',
397409
annotation: '',
410+
frozen: false,
411+
historianLastValue: null,
412+
invalid: true,
398413
notes: '',
414+
overflow: false,
415+
sourceDataUpdate: null,
416+
substituted: false,
399417
timeTag: null,
400418
timeTagAlarm: null,
419+
timeTagAlertState: null,
401420
timeTagAtSource: null,
402421
timeTagAtSourceOk: false,
422+
transient: false,
403423
updatesCnt: new Double(0),
424+
value: new Double(0),
425+
valueJson: '',
426+
valueString: '',
404427
}
405428

406429
if (elem.tag.trim() === '') {
59.6 KB
Binary file not shown.

src/config_server_for_excel/package-lock.json

Lines changed: 30 additions & 81 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)