Skip to content

Commit

Permalink
Merge pull request #175 from com-pas/export-ied-parameters
Browse files Browse the repository at this point in the history
New menu option to export IED Parameters to CSV File
  • Loading branch information
Dennis Labordus committed Aug 4, 2022
2 parents fb4ea0a + 61357e1 commit be0886c
Show file tree
Hide file tree
Showing 12 changed files with 9,901 additions and 5,521 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ COPY build/. /usr/share/nginx/html/

VOLUME /etc/nginx/conf.d
VOLUME /usr/share/nginx/html/public/cim
VOLUME /usr/share/nginx/html/public/conf
13,383 changes: 7,897 additions & 5,486 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@material/mwc-textfield": "0.22.1",
"@material/mwc-top-app-bar-fixed": "0.22.1",
"ace-custom-element": "^1.6.5",
"csv-stringify": "^6.2.0",
"lit-element": "2.5.1",
"lit-html": "1.4.1",
"lit-translate": "^1.2.1",
Expand Down
106 changes: 106 additions & 0 deletions public/conf/export-ied-params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"comments": [
"This file contains the configuration for exporting IED Information to a CSV File.",
"Each column can be defined below in the section \"columns\".",
"A Column must at least have a \"header\" defined.",
"",
"A selector can be defined to search for a Element, if no selector is defined, the IED Element is used.",
"If the useOwnerDocument is set to true, the selector will be used on the whole document, otherwise on the IED Element",
"There is a variable 'iedName' being replaced before executing the selector, put this between '{{' an '}}'.",
"If a dataAttributePath is defined, the selector should return a LN(0) Element and the path is then used to search for a DAI/DA Element.",
"The dataAttributePath should at least contain 2 names, because the minimum is always a DO(I) followed by a DA(I) element.",
"",
"If a attributeName is defined that attribute will be retrieved from the elements found by the selector.",
"Otherwise the text content of the elements is retrieved."
],
"columns": [
{
"header": "IED Name",
"attributeName": "name"
},
{
"header": "IP address",
"selector": "Communication > SubNetwork > ConnectedAP[iedName=\"{{ iedName }}\"] > Address:first-child > P[type=\"IP\"]",
"useOwnerDocument": true
},
{
"header": "Subnetmask",
"selector": "Communication > SubNetwork > ConnectedAP[iedName=\"{{ iedName }}\"] > Address:first-child > P[type=\"IP-SUBNET\"]",
"useOwnerDocument": true
},
{
"header": "IED Description",
"attributeName": "desc"
},
{
"header": "IL1 Primary rated current",
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"IL1\"][lnClass=\"TCTR\"]",
"dataAttributePath": ["ARtg", "setMag", "f"]
},
{
"header": "IL1 Network Nominal Current",
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"IL1\"][lnClass=\"TCTR\"]",
"dataAttributePath": ["ARtgNom", "setMag", "f"]
},
{
"header": "IL1 Secondary rated current",
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"IL1\"][lnClass=\"TCTR\"]",
"dataAttributePath": ["ARtgSec", "setVal"]
},
{
"header": "RES Primary rated current",
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"RES\"][lnClass=\"TCTR\"]",
"dataAttributePath": ["ARtg", "setMag", "f"]
},
{
"header": "RES Network Nominal Current",
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"RES\"][lnClass=\"TCTR\"]",
"dataAttributePath": ["ARtgNom", "setMag", "f"]
},
{
"header": "RES Secondary rated current",
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"RES\"][lnClass=\"TCTR\"]",
"dataAttributePath": ["ARtgSec", "setVal"]
},
{
"header": "UL1 Primary rated voltage",
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"UL1\"][lnClass=\"TVTR\"]",
"dataAttributePath": ["VRtg", "setMag", "f"]
},
{
"header": "UL1 Secondary rated voltage",
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"UL1\"][lnClass=\"TVTR\"]",
"dataAttributePath": ["VRtgSec", "setVal"]
},
{
"header": "UL1 Devision ratio",
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"UL1\"][lnClass=\"TVTR\"]",
"dataAttributePath": ["Rat", "setMag", "f"]
},
{
"header": "RES Primary rated voltage",
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"RES\"][lnClass=\"TVTR\"]",
"dataAttributePath": ["VRtg", "setMag", "f"]
},
{
"header": "RES Secondary rated voltage",
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"RES\"][lnClass=\"TVTR\"]",
"dataAttributePath": ["VRtgSec", "setVal"]
},
{
"header": "RES Devision ratio",
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"RES\"][lnClass=\"TVTR\"]",
"dataAttributePath": ["Rat", "setMag", "f"]
},
{
"header": "Vendor",
"selector": "AccessPoint > Server > LDevice > LN[lnClass=\"LPHD\"]",
"dataAttributePath": ["PhyNam", "vendor"]
},
{
"header": "Model",
"selector": "AccessPoint > Server > LDevice > LN[lnClass=\"LPHD\"]",
"dataAttributePath": ["PhyNam", "model"]
}
]
}
21 changes: 15 additions & 6 deletions public/js/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const officialPlugins = [
default: true,
kind: 'menu',
requireDoc: false,
position: 'top'
position: 'top',
},
{
name: 'Import from API',
Expand All @@ -110,7 +110,7 @@ export const officialPlugins = [
default: false,
kind: 'menu',
requireDoc: false,
position: 'top'
position: 'top',
},
{
name: 'Save project',
Expand All @@ -119,7 +119,7 @@ export const officialPlugins = [
default: true,
kind: 'menu',
requireDoc: true,
position: 'top'
position: 'top',
},
{
name: 'Save project as',
Expand Down Expand Up @@ -227,7 +227,16 @@ export const officialPlugins = [
default: true,
kind: 'menu',
requireDoc: true,
position: 'middle'
position: 'middle',
},
{
name: 'Export IED Params',
src: '/src/menu/ExportIEDParams.js',
icon: 'download',
default: false,
kind: 'menu',
requireDoc: true,
position: 'middle',
},
{
name: 'Locamation VMU',
Expand All @@ -236,7 +245,7 @@ export const officialPlugins = [
default: false,
kind: 'menu',
requireDoc: true,
position: 'middle'
position: 'middle',
},
{
name: 'CoMPAS Settings',
Expand All @@ -245,7 +254,7 @@ export const officialPlugins = [
default: true,
kind: 'menu',
requireDoc: false,
position: 'bottom'
position: 'bottom',
},
{
name: 'Help',
Expand Down
Loading

0 comments on commit be0886c

Please sign in to comment.