Tekvel Magic
|
SCD file manipulation. More...
Public Member Functions | |
def | get_switch_ied_list (self) |
Get list of IED elements that are switches. More... | |
![]() | |
def | from_artifact (cls, str artifact_id) |
Load SCL contents from an Artifact. More... | |
def | __init__ (self, file_path=None, edition=None, init_empty=False) |
def | detect_edition (self, raise_on_unknown=False) |
Detect SCL-file edition. More... | |
def | to_string (self, pretty_print=True) |
Return SCL object contents as string. More... | |
def | toString (self, pretty_print=True) |
Alias for to_string function. More... | |
def | load_from_string (self, scl_str) |
Load SCL contents from string. More... | |
def | load_from_artifact (self, artifact_str) |
Load SCL contents from string obtained from Artifact. More... | |
def | write_to_file (self, save_path) |
Write SCL contents to file. More... | |
def | get_string_snippet_by_line_num (self, line_num, neighbours=0, mark_line=False) |
Get SCL source code snippet by line number. More... | |
def | validate (self, override_edition=None) |
Validate SCL-file. More... | |
def | get_ld_by_ldname (self, ldName) |
Get LDevice element by ldName. More... | |
def | get_ldevice_by_ldname (self, ldName) |
Alias for SCL.get_ld_by_ldname() More... | |
def | get_iedName_by_ldName (self, ldName) |
Get IED.name attribute by ldName. More... | |
def | get_ldInst_by_ldName (self, ldName) |
Get LDevice.inst attribute by specified ldName. More... | |
def | get_ied_by_name (self, iedName, dom=None) |
Get IED element by name attribute. More... | |
def | get_ln_element_by_ref (self, str ln_ref) |
Get LN/LN0 element by LN Reference. More... | |
def | add_new_type_to_templates (self, str str_element) |
Adds a new type to the DataTypeTemplates list. More... | |
int | add_new_object_to_LnType (self, ln_path, str_element) |
Adds a new object type to an existing Logical Node Type. More... | |
int | add_new_node_to_any_ln (self, str ln_path, str str_element) |
Adds a data object to an existing Logical Node. More... | |
def | get_dai_by_ref (self, object_reference) |
Retrieves a DAI element by its reference. More... | |
def | get_doi_by_ref (self, str object_reference) |
Retrieves a DOI element by its reference. More... | |
def | get_doType_by_doiRef (self, str object_reference) |
Retrieves a DOType element by the DOI reference path. More... | |
def | get_cdc_by_doiRef (self, str object_reference) |
Retrieve the CDC type associated with a specific DOI reference. More... | |
def | get_daType_by_daiRef (self, str object_reference) |
Retrieves a DAType element by the DAI reference path. More... | |
str | get_btype_by_dai_ref (self, str object_reference) |
def | get_attributes_with_values (self) |
Get list of data attributes with values set. More... | |
def | get_da_val_regex_by_daiRef (self, object_reference) |
Returns a regular expression for validating the value of a data attribute by its reference. More... | |
def | get_Substation_list (self) |
Get list of Substation elements. More... | |
def | get_ied_list (self, bool server_only=False, bool with_gse_only=False, bool with_smv_only=False) |
Get list of IED elements. More... | |
def | get_ied_name_list (self, bool server_only=False, bool with_gse_only=False, bool with_smv_only=False) |
Get list of IED names. More... | |
str | get_ied_name (self, int ied_num=0) |
Get the name of an IED by its number in the file. More... | |
def | get_ied_access_point_list (self, str ied_name, bool with_server_only=False, allow_serverat=False) |
Get list of AccessPoint elements for a specified IED. More... | |
def | get_ied_access_point_name_list (self, str ied_name, bool with_server_only=False, allow_serverat=False) |
Get list of AccessPoint names for a specified IED. More... | |
def | get_ied_access_point_server (self, str ied_name, str ap_name) |
Get Server element for specified IED and AccessPoint. More... | |
def | get_ied_access_point_server_tuple (self, str ied_name, str ap_name) |
Get IED and AccessPoint names as a tuple for a specified Server element. More... | |
def | get_connected_ap_by_name (self, str ied_name, str ap_name) |
Retrieve a ConnectedAP element by its IED and AccessPoint names. More... | |
def | get_connected_ap_by_access_point (self, access_point) |
Get the ConnectedAP element corresponding to the given AccessPoint. More... | |
def | get_connected_ap_subnetwork (self, connected_ap) |
Get the SubNetwork element to which the ConnectedAP is connected. More... | |
def | get_connected_ap_subnet (self, connected_ap) |
Alias for get_connected_ap_subnetwork(). More... | |
def | get_ap_with_ip_list (self) |
Get list of ConnectedAP elements with IP addresses. More... | |
def | get_connected_ap_ip (self, et.Element connect_ap) |
Retrieve the IP address of a ConnectedAP element. More... | |
def | get_ap_ip (self, str ied_name, str ap_name) |
Retrieve the IP address of a specific AccessPoint. More... | |
def | get_context_object (self, str ied_name=None, str ap_name=None, str ld_inst=None, str ln_name=None) |
Get the etree.Element based on the selected search context: IED, LDevice, or LN (LN0). More... | |
def | get_dataset_list (self, str ied_name=None, str ap_name=None, str ld_inst=None, str ln_name=None) |
Get a list of DataSet elements. More... | |
def | get_dataset_names_list (self, ied_name=None, ap_name=None, ld_inst=None, ln_name=None, ref_type=ReferenceType.ObjectReference) |
Get a list of ObjectReferences for DataSet elements within the specified search context. More... | |
def | get_urcb_list (self, ied_name=None, ap_name=None, ld_inst=None, ln_name=None) |
Get a list of Unbuffered ReportControl blocks. More... | |
def | get_brcb_list (self, ied_name=None, ap_name=None, ld_inst=None, ln_name=None) |
Get a list of Buffered ReportControl blocks. More... | |
def | get_rcb_list (self, ied_name=None, ap_name=None, ld_inst=None, ln_name=None) |
Get a list of ReportControl elements. More... | |
def | get_rcb_dataset (self, rcb) |
Get the DataSet element for the given ReportControl. More... | |
def | get_rcb_fcda_list (self, rcb) |
Retrieve the list of FCDA elements associated with a specified RCB. More... | |
def | get_urcb_dataset (self, urcb) |
Alias for get_rcb_dataset(). More... | |
def | get_brcb_dataset (self, brcb) |
Alias for get_rcb_dataset(). More... | |
def | get_lcb_list (self, ied_name=None, ap_name=None, ld_inst=None, ln_name=None) |
Get a list of LogControl elements. More... | |
def | get_gocb_list (self, ied_name=None, ap_name=None, ld_inst=None) |
Get a list of GSEControl elements. More... | |
def | get_gocb_dataset (self, gocb) |
Get the DataSet element for the given GSEControl. More... | |
def | get_msvcb_list (self, ied_name=None, ap_name=None, ld_inst=None) |
Get a list of Multicast SampledValueControl (MSVCB) elements. More... | |
def | get_msvcb_dataset (self, msvcb) |
Get the DataSet element for the given MSVCB. More... | |
def | get_cb_refs_list (self, cb_type, ied_name=None, ap_name=None, ld_inst=None, ln_name=None, ref_type=ReferenceType.ObjectReference) |
Get a list of references for specified Control Block (CB) type. More... | |
def | get_urcb_refs_list (self, ied_name=None, ap_name=None, ld_inst=None, ln_name=None, ref_type=ReferenceType.ObjectReference) |
Get a list of references for Unbuffered ReportControl blocks (URCB). More... | |
def | get_brcb_refs_list (self, ied_name=None, ap_name=None, ld_inst=None, ln_name=None, ref_type=ReferenceType.ObjectReference) |
Get a list of references for Buffered ReportControl blocks (BRCB). More... | |
def | get_lcb_refs_list (self, ied_name=None, ap_name=None, ld_inst=None, ln_name=None, ref_type=ReferenceType.ObjectReference) |
Get a list of references for LogControl blocks (LCB). More... | |
def | get_gocb_refs_list (self, ied_name=None, ap_name=None, ld_inst=None, ref_type=ReferenceType.ObjectReference) |
Get a list of references for GSEControl blocks (GoCB). More... | |
def | get_msvcb_refs_list (self, ied_name=None, ap_name=None, ld_inst=None, ref_type=ReferenceType.ObjectReference) |
Get a list of references for Multicast SampledValueControl blocks (MSVCB). More... | |
def | get_dataset_by_ref (self, dataset_reference) |
Get the DataSet element by its reference. More... | |
def | get_cb_by_ref (self, cb_type, cb_reference) |
Get the Control Block (CB) element by its type and reference. More... | |
def | get_gocb_by_ref (self, cb_reference) |
Get the GSEControl block by its reference. More... | |
def | get_msvcb_by_ref (self, cb_reference) |
Get the Multicast SampledValueControl block by its reference. More... | |
def | get_ld_name_list (self, ied_name=None) |
Get a list of LDName strings. More... | |
def | get_ln_element_list (self, str ied_name=None, str ld_inst=None, str ld_name=None, bool exclude_ln0=False) |
Get list of LN elements. More... | |
def | get_ln_ref_list (self, ld_name) |
Get LN reference list. More... | |
def | get_type_definition_recursive (self, element, parent_path="") |
Get the data type structure for an element as MMS ObjectReference paths. More... | |
def | get_da_mms_ref_list (self, ln_ref) |
Get a list of data attributes in MMS reference format for the given logical node. More... | |
def | get_full_datamodel_mms_refs (self, ied_name=None) |
Get the complete data model of the device in MMS variable format. More... | |
def | get_inputs_extref_list (self) |
Get all Inputs/ExtRef elements. More... | |
def | get_fcda_from_mmsref (self, mms_ref) |
Get the FCDA element from an MMS reference. More... | |
def | get_gse_for_gocb (self, gocb) |
Get the GSE element from the Communications section for the specified GSEControl. More... | |
def | get_smv_for_mscvb (self, msvcb) |
Get the SMV element from the Communications section for the specified SampledValueControl. More... | |
def | get_subnetwork_list (self) |
Get list of SubNetwork elements. More... | |
def | get_subnetwork_by_name (self, str name) |
Get Subnetwork element by name. More... | |
def | get_subnetwork_name_list (self) |
Get list of SubNetwork names. More... | |
def | get_subnetwork_connected_ap_list (self, subnetwork_name=None, subnetwork=None) |
Get list of ConnectedAP elements for a Subnetwork. More... | |
def | get_subnetwork_connected_server_list (self, subnetwork_name=None, subnetwork=None) |
Get the list of connected servers in a Subnetwork. More... | |
def | get_subnetwork_connected_server_ap_tuple_list (self, subnetwork_name=None, subnetwork=None) |
Get a list of tuples containing IED names and Access Point names of connected servers in a Subnetwork. More... | |
def | select_ied (self, **kwargs) |
Select an IED based on specified criteria. More... | |
def | append_scl (self, scl) |
Append a CID file to the current SCD. More... | |
def | remove_gocb (self, go_cb_ref, preserve_communications=False) |
Remove the GSEControl element by reference. More... | |
def | remove_msvcb (self, msv_cb_ref, preserve_communications=False) |
Remove the SampledValueControl element by reference. More... | |
def | move_gse_smv_elements (self, str iedName, str srcApName, str trgtApName) |
Moves GSE and SMV elements between ConnectedAPs. More... | |
def | check_ldNs_defined (self) |
Проверка наличия объекта данных NamPlt.ldNs во всех LLN0. More... | |
def | check_lnNs_defined (self) |
Check for the presence of NamPlt.ldNs data objects in all LLN0 elements. More... | |
def | check_dataNs_defined (self) |
Check the correctness of dataNs assignment. More... | |
def | check_cdcNs_defined (self) |
Check the correctness of cdcNs assignment. More... | |
def | check_originalSclVersion_is (self, originalSclVersion) |
Check if the originalSclVersion attribute is correctly set. More... | |
def | check_originalSclRevision_is (self, originalSclRevision) |
Check if the originalSclRevision attribute is correctly set. More... | |
def | check_xmlns_is (self, xmlns) |
Check the value of the xmlns attribute of the root SCL element. More... | |
def | check_xsi_is (self, xsi) |
Check the value of the xmlns:xsi attribute of the root SCL element. More... | |
def | check_lln0_configRev_defined (self) |
Check the presence of the configRev attribute (DAI) in all LLN0.NamPlt elements. More... | |
def | check_value_list_match_type (self, dai_value_reference_list) |
Check if attribute values match their specified types. More... | |
def | validate_xml_declaration (self) |
Verify that the file contains a valid XML declaration according to the standard requirements. More... | |
def | validate_utf8_encoding (self) |
Perform encoding validation to check if the file is UTF-8 encoded. More... | |
def | check_datasets_consistency (self) |
Check the consistency of all datasets. More... | |
def | fix_triggers (self, bool dchg=True, bool qchg=True, bool dupd=True) |
def | get_fcda_by_extref (self, et_extref) |
Find the corresponding FCDA for a given ExtRef. More... | |
def | check_ied_has_preconfigured_urcb (self) |
Check for the presence of preconfigured unbuffered report control blocks (URCB) in the ICD. More... | |
def | check_ied_has_preconfigured_brcb (self) |
Check for the presence of preconfigured buffered report control blocks (BRCB) in the ICD. More... | |
def | check_ied_has_preconfigured_lcb (self) |
Check for the presence of preconfigured log control blocks (LCB) in the ICD. More... | |
def | check_ied_has_preconfigured_gocb (self) |
Check for the presence of preconfigured GOOSE control blocks (GoCB) in the ICD. More... | |
def | check_ied_has_preconfigured_msvcb (self) |
Check for the presence of preconfigured multicast SV control blocks (MSVCB) in the ICD. More... | |
Additional Inherited Members | |
![]() | |
file_path | |
dom | |
namespaces | |
default_namespace | |
original_string | |
edition | |
![]() | |
dictionary | BTYPE_REGEX_DICT |
int | iterations = 0 |
SCD file manipulation.
This class is a specialization of the SCL class for manipulations related to SCD files. It inherits all functions from the parent SCL class.
def get_switch_ied_list | ( | self | ) |
Get list of IED elements that are switches.
This function returns a list of IED elements that are identified as switches by checking for the presence of the LPLD logical node within each IED.
Exception | if an error occurs during the retrieval of the IED elements. |