|
| 1 | +<!-- SPDX-FileCopyrightText: 2021 RTE FRANCE --> |
| 2 | +<!-- --> |
| 3 | +<!-- SPDX-License-Identifier: Apache-2.0 --> |
| 4 | +# COMPAS SCT (Substation Configuration Tool) |
| 5 | +## Introduction |
| 6 | + |
| 7 | +The CoMPAS SCT (System Configuration Tool) is part of the CoMPAS (Configuration Module for Power System Automation) |
| 8 | +ecosystem which is an open source project aimed at providing a tool for configuring control system and |
| 9 | +profile management related to the 61850 standard. Its architecture allows an easy integration with the other |
| 10 | +components of CoMPAS, in addition to being modular and flexible with a high level of abstraction, it gives |
| 11 | +the freedom to implement the tool with the database of its choice. |
| 12 | + |
| 13 | +The below package diagram shows different part of the tool architecture. |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +Hence, we can distinguish four major parts: |
| 18 | + |
| 19 | +* **[sct-commons](#SCT-COMMONS)** : a library that contents shared functionalities for the bound SCL object. |
| 20 | +* **[sct-service](#SCT-SERVICE)** : It computes all needed operations and uses sct-data for database access. |
| 21 | +* **[sct-data](#SCT-DATA)** : It holds data models and database connectivity services. |
| 22 | +* **[sct-app](#SCT-APPLICATION)** : *TODO*. |
| 23 | + |
| 24 | +## SCT COMMONS |
| 25 | +This package holds a light weight and configurable XML binding tool based on the JAXB utilities, and set of bound SCL |
| 26 | +objects adapter. Actually the JAXB generated SCL objects can only be read through from the parent tag to child tag. That can be very limiting. |
| 27 | +The adapter concept allows: |
| 28 | +* navigating in all direction (upward, downward) |
| 29 | +* more flexible manipulation of the JAXB SCL object |
| 30 | +* considering specific algorithm based on SCL version |
| 31 | + |
| 32 | +The SCT services specification of the norm IEC 61850 will be implemented in this package. |
| 33 | + |
| 34 | +The Approach behind the SCL adapter is to complete the navigation provided by the JAXB tool, by adding |
| 35 | +functionalities that allow the browsing upward (from child to any ancestor). The conception is based on the |
| 36 | +abstraction defined below : |
| 37 | + |
| 38 | + public abstract class SclElementAdapter<P extends SclElementAdapter, T> { |
| 39 | + protected P parentAdapter; |
| 40 | + protected T currentElem; |
| 41 | + |
| 42 | + public SclElementAdapter(P parentAdapter) { |
| 43 | + this.parentAdapter = parentAdapter; |
| 44 | + } |
| 45 | + |
| 46 | + public SclElementAdapter(P parentAdapter, T currentElem) { |
| 47 | + this.parentAdapter = parentAdapter; |
| 48 | + setCurrentElem(currentElem); |
| 49 | + } |
| 50 | + |
| 51 | + public final void setCurrentElem(T currentElem){ |
| 52 | + Assert.isTrue(amChildElementRef(currentElem),"No relation between SCL parent and child elements"); |
| 53 | + this.currentElem = currentElem; |
| 54 | + } |
| 55 | + |
| 56 | + protected abstract boolean amChildElementRef(T sclElement); |
| 57 | + } |
| 58 | + |
| 59 | +The root element adapter (entry point) is special as it does not have any parent adapter, hence, its method `amChildElementRef(T)` |
| 60 | +should always return `true`: |
| 61 | + |
| 62 | + public class SclRootAdapter extends SclElementAdapter<SclRootAdapter, SCL>{ |
| 63 | + private version; |
| 64 | + private revision; |
| 65 | + private release; |
| 66 | + |
| 67 | + public SclRootAdapter(SCL currentElem) { |
| 68 | + super(null, currentElem); |
| 69 | + //set version, release & revision |
| 70 | + } |
| 71 | + |
| 72 | + public SclRootAdapter(String hId, String hVersion, String hRevision){ |
| 73 | + super(null); |
| 74 | + this.currentElem = initialize(hId,hVersion,hRevision); |
| 75 | + } |
| 76 | + |
| 77 | + @Override |
| 78 | + protected boolean amChildElementRef(SCL sclElement) { |
| 79 | + return true; |
| 80 | + } |
| 81 | + |
| 82 | + [...] |
| 83 | + } |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | +## SCT DATA |
| 88 | +Data models and connectivity to database are defined here. Data access layer is an abstract layer that defined connectivity |
| 89 | +interfaces. This layer manages a database with single table (SQL-Like database) or single collection (NoSQL-Like database). |
| 90 | +The concrete data access layers are implemented in specific packages |
| 91 | + |
| 92 | +* ### SQL-Like Database |
| 93 | +An implementation of the sct-data connectivity interface with custom data models. This allows the application to work with sql-like database. |
| 94 | +The libraries ares use for SQL-Like databases, those that support XML type (PostgreSql, Oracle, etc) |
| 95 | + |
| 96 | +* ### NoSQL-Like Database |
| 97 | +Like SQL-like part, this package contains the sct-data connector interfaces implementation for NoSQL-Like databases (BaseX, existDB, etc ) |
| 98 | +that support XML processing |
| 99 | + |
| 100 | +## SCT SERVICE |
| 101 | +This module implements all needed specification as functions (methods in Java). As shown in package diagram, |
| 102 | +it interacts with sct-data (database access) and sct-commons (delegate SCL manipulation). |
| 103 | +## SCT APPLICATION |
| 104 | +**TODO** |
0 commit comments