This plugin provides declarative information about GOOSE and Sampled Value subscriptions within the Communication section of an SCL file (which normally only provides publishing information). The purpose is to assist in development of network configuration information for IEC 61850 without requiring significant processing.
-
It does this by exporting of communications data using a
Private
element and custom namespace. -
Two
Private
elements are used,Transpower-GSE-Subscribe
andTranspower-SMV-Subscribe
which have identical attribues to the IEC 61850 standard defined SCLGSE
andSMV
elements.
Technically:
-
This is a plugin for open-scd-core, the core editor engine for OpenSCD.
-
This plugin is a web component and follows the open-wc recommendations.
-
This plugin uses the Apache License and is intended for you to use, study, share and improve.
Feel free to log issues to request fixes, improvements or new features.
-
Two
Private
elements are provided,Transpower-GSE-Subscribe
andTranspower-SMV-Subscribe
which "mimic" the performance of the IEC 61850 SCL standard (IEC 61850-6) definedGSE
andSMV
elements. -
For each subscribing control block for an IED, one of these elements is created, using the
etpc
namespace:https://transpower.co.nz/SCL/SCD/Communication/v1
. They are created within the appropriateConnectedAP
, if it exists, otherwise a newConnectedAP
is created. -
Below, an example is given for a GOOSE message:
<Private type="Transpower-GSE-Subscribe" etpc:iedName="XAT_T1_P1" etpc:cbName="GoCB16" etpc:ldInst="Master"> <etpc:Address> <etpc:P type="VLAN-ID" xsi:type="tP_VLAN-ID">000</etpc:P> <etpc:P type="VLAN-PRIORITY" xsi:type="tP_VLAN-PRIORITY">4</etpc:P> <etpc:P type="MAC-Address" xsi:type="tP_MAC-Address">01-0C-CD-01-00-06</etpc:P> </etpc:Address> </Private>
-
In general, the element and attributes match those for the
GSE
andSMV
as defined in the standard, however:-
An additional field is used to include the name of the publishing IED,
etpc:iedName
. -
The
SubNetwork
must match between publishers and subscribers for these elements to be written. This plugin does not create newSubNetwork
elements as there should not be a need for this. -
Only
VLAN-ID
,VLAN-PRIORITY
andMAC-Address
elements are added (Question: what else should be added?APPID
?).
-
Follow the steps in Loading the Plugin. Once the plugin is loaded:
-
The plugin provides a menu option. Go to the menu in the top left and click on the plugin name.
-
This will add the information required and remove any prior information this plugin has written (within the
Private
elements).
Open SCD core allows plugins to be loaded from a URL.
You can click on this link to trial this plugin.
In this view it is without theming and only presents this plugin along with the open and save plugins.
-
The latest core is available at https://openscd.github.io/open-scd/.
-
Go to Menu › Add plugins…
-
Select Cancel - this is an editor plugin.
-
Select OK to required a loaded document.
-
Choose a plugin name of 'Add Networking Data'.
-
Choose a plugin icon of 'link'
-
Provide a plugin source URI of: https://danyill.github.io/oscd-network-data/oscd-network-data.js
-
Click OK on the summary, it should indicate the parameters previously entered.
-
Open a file and enjoy!
-
Clone this project:
$ git clone https://github.com/danyill/oscd-network-data
-
Install dependencies
$ npm i
-
Start up a demo server
$ npm run start
-
Open in your browser locally at http://localhost:8000/demo/
Tip
|
OpenSCD is transitioning to use of open-scd-core , these instructions will require updating at the end of this transition.
|
-
Open your OpenSCD distribution or use https://openscd.github.io.
-
Create a custom extension by going to menu › Extensions › Add Custom Extension.
-
Enter the name 'Add Networking Data', select 'Menu entry' and enter https://danyill.github.io/oscd-network-data/oscd-network-data.js as the URL.
This is the URL of the bundle built by CI and is always the latest pre-release version of this plugin.
-
Click on Add.
-
This plugin is now available in the menu entry.
-
Within the current OpenSCD distribution, plugins are stored in the
public/js/plugins.js
folder. Each plugin appears in the following form:{ name: 'Add Networking Data', // (1) src: 'https://danyill.github.io/oscd-network-data/oscd-network-data.js', // (2) icon: 'hub', // (3) default: true, // (4) kind: 'menu', // (5) requireDoc: true, // (6) position: 'middle' // (7) }
-
Name of the plugin which appears in the editor menu at top of screen
-
URL which can be a local or remote resource. For a local resource, begins without a forward slash, e.g.
plugins/oscd-network-data/dist/oscd-network-data.js
. In this case what is shown is loading a plugin from the build process. -
A material icon, see others at Material Symbols and Icons
-
Whether the plugin is enabled by default or has to be enabled in the plugins menu
-
The type of plugin, either
menu
oreditor
. This is aneditor
plugin. -
Whether a document must be loaded for this plugin to be available
-
A string, either
top
,middle
orbottom
to give a location in the menu. Otherwise inferred from the order in the file relative to other plugins.
-
-
You need to copy an entry like the above, ensure the
src
URL resolves and the plugin should be loaded when the distribution is built. -
If you are building locally you likely need to run an
npm run bundle
command in each plugin to make thedist
folder, containing a single JavaScript file with the plugin available to OpenSCD.
Within an OpenSCD core distribution, plugins are also loaded from a json file with a slightly different schema.
-
Typically the distribution will be served from a static web page and within the web page there will be a plugins property declared on an
open-scd
object, for instance:link:demo/index.html[role=include]
-
This plugin is an editor plugin, editor plugins are an array of JSON of the following form:
{ "name": "Add Networking Data", // (1) "translations": { // (2) "de": "Add Networking Data in German!", "pt":"Add Networking Data in Portuguese!}" }, "icon": "hub", // (3) "active": true, // (4) "requireDoc": true, // (5) "src": "/dist/oscd-network-data.js" // (6) }
-
Name of the plugin which appears in the editor menu at top of screen
-
Translations of the plugin name as required using standard locale names.
-
A material icon, see others at Material Symbols and Icons
-
Whether the plugin is enabled by default or has to be enabled in the plugins menu
-
Whether a document must be loaded for this plugin to be available
-
URL which can be a local or remote resource. For a local resource, begins with a forward slash, e.g.
plugins/oscd-network-data/dist/oscd-network-data.js
. In this case what is shown is loading a plugin from the internet using the continuous integration build process.
-
-
You need to copy an entry like the above, ensure the
src
URL resolves and the plugin should be loaded when the distribution is built. -
If you are building locally you likely need to run an
npm run bundle
command in each plugin to make thedist
folder, containing a single JavaScript file with the plugin available to OpenSCD.
To scan the project for linting and formatting errors, run
npm run lint
To automatically fix linting and formatting errors, run
npm run format
To execute a single test run:
npm run test
To run the tests in interactive watch mode run:
npm run test:watch
For most of the tools, the configuration is in the package.json
to reduce the number of files in your project.
If you customize the configuration a lot, you can consider moving them to individual files.
To run a local development server that serves the basic demo located in demo/index.html
npm start
© 2023 Daniel Mulholland