pub enum SetRequest {
Normal {
invoke_id_and_priority: u8,
attribute: AttributeDescriptor,
access_selection: Option<AccessSelection>,
value: CosemDataType,
},
WithFirstDatablock {
invoke_id_and_priority: u8,
attribute: AttributeDescriptor,
access_selection: Option<AccessSelection>,
datablock: DataBlockSa,
},
WithDatablock {
invoke_id_and_priority: u8,
datablock: DataBlockSa,
},
WithList {
invoke_id_and_priority: u8,
attributes: Vec<(AttributeDescriptor, Option<AccessSelection>)>,
values: Vec<CosemDataType>,
},
}Expand description
A SET-Request APDU.
Variants§
Normal
SET-REQUEST-NORMAL: write a single attribute.
Fields
§
attribute: AttributeDescriptorThe attribute to write.
§
access_selection: Option<AccessSelection>Optional selective access applied to the attribute.
§
value: CosemDataTypeThe value to write.
WithFirstDatablock
SET-REQUEST-WITH-FIRST-DATABLOCK: the attribute reference and the first block of the value.
Fields
§
attribute: AttributeDescriptorThe attribute to write.
§
access_selection: Option<AccessSelection>Optional selective access applied to the attribute.
§
datablock: DataBlockSaThe first block of the value being written.
WithDatablock
SET-REQUEST-WITH-DATABLOCK: a subsequent block of the value.
Fields
§
datablock: DataBlockSaThe next block of the value being written.
WithList
SET-REQUEST-WITH-LIST: write several attributes in one request.
Fields
§
attributes: Vec<(AttributeDescriptor, Option<AccessSelection>)>The attributes to write, each with optional selective access.
§
values: Vec<CosemDataType>The values to write, one per attribute in order.
Implementations§
Source§impl SetRequest
impl SetRequest
Sourcepub fn decode(bytes: &[u8]) -> Result<SetRequest, ServiceError>
pub fn decode(bytes: &[u8]) -> Result<SetRequest, ServiceError>
Decodes a request APDU.
Trait Implementations§
Source§impl Clone for SetRequest
impl Clone for SetRequest
Source§fn clone(&self) -> SetRequest
fn clone(&self) -> SetRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SetRequest
impl Debug for SetRequest
Source§impl PartialEq for SetRequest
impl PartialEq for SetRequest
impl StructuralPartialEq for SetRequest
Auto Trait Implementations§
impl Freeze for SetRequest
impl RefUnwindSafe for SetRequest
impl Send for SetRequest
impl Sync for SetRequest
impl Unpin for SetRequest
impl UnsafeUnpin for SetRequest
impl UnwindSafe for SetRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more