pub struct PushSetup {Show 14 fields
version: u8,
logical_name: ObisCode,
push_object_list: Vec<CaptureObjectDefinition>,
send_destination_and_method: SendDestinationAndMethod,
communication_window: Vec<CommunicationWindow>,
randomisation_start_interval: u16,
number_of_retries: u8,
repetition_delay: CosemDataType,
port_reference: Vec<u8>,
push_client_sap: i8,
push_protection_parameters: Vec<PushProtectionParameter>,
push_operation_method: u8,
confirmation_parameters: ConfirmationParameters,
last_confirmation_date_time: DateTime,
}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.
Fields§
§version: u8§logical_name: ObisCode§push_object_list: Vec<CaptureObjectDefinition>§send_destination_and_method: SendDestinationAndMethod§communication_window: Vec<CommunicationWindow>§randomisation_start_interval: u16§number_of_retries: u8§repetition_delay: CosemDataType§port_reference: Vec<u8>§push_client_sap: i8§push_protection_parameters: Vec<PushProtectionParameter>§push_operation_method: u8§confirmation_parameters: ConfirmationParameters§last_confirmation_date_time: DateTimeImplementations§
Source§impl PushSetup
impl PushSetup
Sourcepub fn new(config: PushSetupConfig) -> Self
pub fn new(config: PushSetupConfig) -> Self
Builds a new PushSetup from its configuration.
Sourcefn push() -> CosemDataType
fn push() -> CosemDataType
Method 1: push — triggers sending the push object list to the
destination (IEC 62056-6-2 §4.4.8.3.1). Building the notification body
requires reading the live values of the referenced objects, which this
class does not hold; use
RequestDispatcher::build_push_delivery_request
against the object registry to actually assemble and send the push. The
ACTION itself only validates that the object is triggerable.
Sourcefn reset(&mut self) -> CosemDataType
fn reset(&mut self) -> CosemDataType
Method 2: reset — resets the push confirmation state by clearing
last_confirmation_date_time.
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.