Tekvel Magic
|
SVPublisher class for simulating SV message publishing. More...
Public Member Functions | |
def | __init__ (self, ServerSimulator ss=None, Subnetwork sn=None, msvCbRef=None, sim=True, **kwargs) |
Initialize a SVPublisher instance. More... | |
None | disable_all (cls) |
None | enable_all (cls) |
ServerSimulator | ss (self) |
Get the ServerSimulator instance associated with the SVPublisher. More... | |
Subnetwork | sn (self) |
Get the Subnetwork instance associated with the SVPublisher. More... | |
def | msvCbRef (self) |
Get the SV control block reference. More... | |
def | enabled (self) |
def | enabled (self, bool enable) |
None | enable (self) |
Enable the SVPublisher. More... | |
None | disable (self) |
Disable the GOOSEPublisher. More... | |
def | set_smpSynch (self, smpSynch) |
Set SVPublisher synchronization. More... | |
def | smpSynch (self) |
def | smpSynch (self, smpSynch) |
Set SVPublisher synchronization. More... | |
def | get_fcda_ref_list (self, ref_type=ReferenceType.ObjectReference) |
Returns a list of data attribute references of dataset associated with SV control block . More... | |
Public Attributes | |
smpSynch | |
all_enabled | |
enabled | |
Static Public Attributes | |
list | instances = [] |
bool | all_enabled = False |
SVPublisher class for simulating SV message publishing.
The SVPublisher class is used to simulate the publishing of Sampled Values (SV) messages within a specified subnetwork. Each instance is associated with a ServerSimulator and a Subnetwork object. The class ensures that only one SVPublisher instance is created for a specific SV control block reference. If no Subnetwork or ServerSimulator is provided, new instances are created. This class enables simulation of different signal states (e.g., pre-fault, fault, and post-fault) using the SGSineWave class for the signal generation and switching between different states.
Example usage of SVPublisher class:
def __init__ | ( | self, | |
ServerSimulator | ss = None , |
||
Subnetwork | sn = None , |
||
msvCbRef = None , |
|||
sim = True , |
|||
** | kwargs | ||
) |
Initialize a SVPublisher instance.
Initializes a SVPublisher object, which simulates SV message publishing. If no ServerSimulator or Subnetwork is provided, a new one is created. The method also validates the presence of control block references for the selected IED and AccessPoint.
ss | ServerSimulator object to be used for the SVPublisher. |
sn | Subnetwork object that connects the SVPublisher. |
msvCbRef | The reference of the SV control block to be used. |
sim | Boolean flag to indicate if the simulation flag is set in the SV message (default is True). |
smpSynch | integer sychronization flag. Use SmpSynch enum for handy shortcuts. |
kwargs | Additional keyword arguments (such as scl, mms_port) used to customize the simulator. |
AttributeError | Raised when ServerSimulator is None and msvCbRef is provided. |
Exception | Raised if no SV control blocks are found for the specified IED and AccessPoint. |
Exception | Raised if the control block reference is not found in the IED's data model. |
None disable | ( | self | ) |
Disable the GOOSEPublisher.
This method is intended to disable the GOOSEPublisher, but it is not yet implemented. When implemented, it will deactivate the GOOSEPublisher and set the _enabled
flag to False.
NotImplementedError | This function is not yet implemented. |
None disable_all | ( | cls | ) |
None enable | ( | self | ) |
Enable the SVPublisher.
This method enables the SVPublisher by starting the associated ServerSimulator and setting the SV control block to be enabled. If the ServerSimulator is not yet created or running, it is created and started before enabling the SVPublisher.
None enable_all | ( | cls | ) |
def enabled | ( | self | ) |
def enabled | ( | self, | |
bool | enable | ||
) |
def get_fcda_ref_list | ( | self, | |
ref_type = ReferenceType.ObjectReference |
|||
) |
Returns a list of data attribute references of dataset associated with SV control block .
If no svcb_ref specified the function returns references to all control blocks associated with this SVSimulator instance.
ref_type | Type of reference for returned data. See ReferenceType for available types. |
def msvCbRef | ( | self | ) |
Get the SV control block reference.
This property retrieves the SV control block reference (msvCbRef) associated with the SVPublisher.
def set_smpSynch | ( | self, | |
smpSynch | |||
) |
Set SVPublisher synchronization.
smpSynch | integer sychronization flag. Use SmpSynch enum for handy shortcuts. |
def smpSynch | ( | self | ) |
def smpSynch | ( | self, | |
smpSynch | |||
) |
Set SVPublisher synchronization.
smpSynch | integer sychronization flag. Use SmpSynch enum for handy shortcuts. |
Subnetwork sn | ( | self | ) |
Get the Subnetwork instance associated with the SVPublisher.
This property retrieves the Subnetwork instance associated with the SVPublisher.
ServerSimulator ss | ( | self | ) |
Get the ServerSimulator instance associated with the SVPublisher.
This property retrieves the ServerSimulator instance associated with the SVPublisher. If the ServerSimulator has not been assigned, an AttributeError is raised.
AttributeError | Raised if the ServerSimulator has not been assigned to the SVPublisher instance. |
|
static |
all_enabled |
enabled |
|
static |
smpSynch |