SampledValues Client¶
- icspacket.proto.iec61850.sv.SampledValues¶
Type alias for the IEC 61850-9-2 Sampled Values ASN.1 protocol representation. This alias provides semantic clarity when working with decoded SV application PDUs.
- class icspacket.proto.iec61850.sv.IEC61850_9_2_Specific_Protocol¶
ASN.1 IEC61850_9_2_Specific_Protocol type
- PRESENT¶
alias of
PRESENT
- class icspacket.proto.iec61850.sv.ASDU¶
ASN.1 ASDU type
- smpMod_VALUES¶
alias of
smpMod_VALUES
- smpSynch_VALUES¶
alias of
smpSynch_VALUES
- icspacket.proto.iec61850.sv.SV_ETHER_TYPE = 35002¶
EtherType used for IEC 61850-9-2 Sampled Values (SV) traffic. According to the IEC 61850 standard, SV frames are identified at the Ethernet layer with EtherType
0x88BA.
- class icspacket.proto.iec61850.sv.SV_Client(interfaces: list[str] | str | None = None, callback: Callable[[Ether, PDU], None] | None = None, inputs: list[str] | None = None)[source]¶
Observer and Publisher for IEC 61850-9-2 Sampled Values (SV) traffic.
This class is a protocol-specific specialization of
GOOSE_Clientthat automatically binds to the EtherType0x88BAused by Sampled Values (SV) frames. It reuses the same underlying packet capture, filtering, and publishing mechanisms provided byGOOSE_Client, but targets SV instead of GOOSE.Core functionality:
Observation: Capture and decode SV PDUs from one or more interfaces, optionally with an application-provided callback.
Publishing: Transmit SV PDUs on a given interface or across multiple interfaces, with optional VLAN tagging support.
Compatibility: Since SV reuses the same PDU decoding layer, both online capture and offline PCAP file analysis are supported.
Example¶# Capture Sampled Values on eth1 with SV_Client(interfaces=["eth1"]) as sv_client: sv_pdu = sv_client.recv_next() print("Received SV:", sv_pdu) # Publish a new Sampled Value PDU sv_client = SV_Client(["eth1"]) sv_client.publish("01:0c:cd:01:00:01", my_sv_apdu)
Added in version 0.2.3.
- Parameters:
interfaces (list[str] | None) – List of interface names (e.g.,
["eth0", "eth1"]) to capture and/or publish Sampled Values on. IfNone, the default system capture interface is used.callback (Callable[[Ether, PDU], None] | None) – Optional callback invoked for each received SV frame. The callback receives the raw
Etherframe and the decodedPDU.inputs (list[str] | None) – Optional list of offline PCAP files to process instead of live capture.