pub struct PushSetup { /* private fields */ }Expand description
Push setup interface class (class_id = 40) per IEC 62056-6-2 §4.4.8. Holds
the configuration of the server’s unsolicited (push) output.
All three versions are supported:
- version 0 — attributes 1..7, method
push; - version 1 — attributes 1..10, method
push; - version 2 — attributes 1..13, methods
pushandreset.
In versions 0 and 1 attribute 7 (repetition_delay) is a long-unsigned;
in version 2 it is a structure. The push ACTION only validates that the
object is triggerable; assembling and sending the actual DataNotification
is done by RequestDispatcher::build_push_delivery_request,
which has access to the live object registry that this class does not
hold.
Implementations§
Source§impl PushSetup
impl PushSetup
Sourcepub fn new(config: PushSetupConfig) -> Self
pub fn new(config: PushSetupConfig) -> Self
Builds a new PushSetup from its configuration.
Sourcepub fn push_object_list(&self) -> &[CaptureObjectDefinition]
pub fn push_object_list(&self) -> &[CaptureObjectDefinition]
Returns the push object list (attribute 2): the objects and attribute indices to read when assembling a push.
Sourcepub fn send_destination_and_method(&self) -> &SendDestinationAndMethod
pub fn send_destination_and_method(&self) -> &SendDestinationAndMethod
Returns the send-destination-and-method (attribute 3).
Sourcepub fn push_client_sap(&self) -> i8
pub fn push_client_sap(&self) -> i8
Returns the push client SAP (attribute 9, 0 in versions without it).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PushSetup
impl<'de> Deserialize<'de> for PushSetup
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl InterfaceClass for PushSetup
impl InterfaceClass for PushSetup
Source§fn logical_name(&self) -> &ObisCode
fn logical_name(&self) -> &ObisCode
Source§fn attributes(&self) -> Vec<(u8, CosemDataType)>
fn attributes(&self) -> Vec<(u8, CosemDataType)>
(attribute_id, value) pairs.