Skip to content

Commit

Permalink
Fixed type of protocolSourceCommonAddress, protocolDestinationCommonA…
Browse files Browse the repository at this point in the history
…ddress and protocolDestinationGroup on config_server_for_excel.
  • Loading branch information
riclolsen committed Aug 12, 2023
1 parent f2a0927 commit b434711
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions docs/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,16 @@ Example document.
* _**_protocolSourceCommandDuration_**_ [Double] - Additional command specification. Only meaningful when _origin=command_. See protocol documentation. **Mandatory parameter**.
* _**_protocolSourceCommandUseSBO_**_ [Boolean] - Use or not Select Before Operate for commands. Only meaningful when _origin=command_. See protocol documentation. **Mandatory parameter**.
* _**_protocolDestinations_**_ [Array of Objects] - List of protocol destinations for server protocol connections. Can be null or empty array when not point is not to be distributed. See protocol documentation. **Mandatory parameter**.
* _**_protocolDestinationConnectionNumber_**_ [Double] - Indicates the protocol connection that will monitor updates to the point. Should contain only integer values. **Mandatory parameter**.
* _**_protocolDestinationCommonAddress_**_ [Double or String] - Protocol common address (device address). See protocol documentation. **Mandatory parameter**.
* _**_protocolDestinationObjectAddress_**_ [Double or String] - Protocol object address. See protocol documentation. **Mandatory parameter**.
* _**_protocolDestinationASDU_**_ [Double or String] - Protocol information ASDU TI type. See protocol documentation. **Mandatory parameter**.
* _**_protocolDestinationCommandDuration_**_ [Double] - Additional command specification. See protocol documentation. **Mandatory parameter**.
* _**_protocolDestinationCommandUseSBO_**_ [Boolean] - Use or not Select Before Operate for commands. See protocol documentation. **Mandatory parameter**.
* _**_protocolDestinationKConv1_**_ [Double] - Conversion factor 1 (multiplier). **Mandatory parameter**.
* _**_protocolDestinationKConv2_**_ [Double] - Conversion factor 2 (adder). **Mandatory parameter**.
* _**_protocolDestinationGroup_**_ [Double or String] - Group number or dataset id of points. See protocol documentation. **Mandatory parameter**.
* _**_protocolDestinationHoursShift_**_ [Double] - Number of hours to add to timestamps. **Mandatory parameter**.

### Fields that can be configured and altered by the operators.

Expand Down
2 changes: 1 addition & 1 deletion src/config_server_for_excel/app-defs.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ module.exports = {
HTTP_PORT: 10001,
IP_BIND: '127.0.0.1',
MSG: '{json:scada} - Config Server for Excel',
VERSION: '0.1.0',
VERSION: '0.1.1',
}
6 changes: 3 additions & 3 deletions src/config_server_for_excel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ MongoClient.connect(
elem.protocolSourceConnectionNumber = toMongoDouble(
elem.protocolSourceConnectionNumber
)
elem.protocolSourceCommonAddress = toMongoDouble(
elem.protocolSourceCommonAddress = toMongoDoubleOrString(
elem.protocolSourceCommonAddress
)
elem.protocolSourceObjectAddress = toMongoDoubleOrString(
Expand All @@ -333,7 +333,7 @@ MongoClient.connect(
pd.protocolDestinationConnectionNumber = toMongoDouble(
pd.protocolDestinationConnectionNumber
)
pd.protocolDestinationCommonAddress = toMongoDouble(
pd.protocolDestinationCommonAddress = toMongoDoubleOrString(
pd.protocolDestinationCommonAddress
)
pd.protocolDestinationObjectAddress = toMongoDoubleOrString(
Expand All @@ -357,7 +357,7 @@ MongoClient.connect(
pd.protocolDestinationKConv2,
0
)
pd.protocolDestinationGroup = toMongoDouble(
pd.protocolDestinationGroup = toMongoDoubleOrString(
pd.protocolDestinationGroup,
0
)
Expand Down

0 comments on commit b434711

Please sign in to comment.