From 8e20626f319d5c7ce8b9f90b234b21af692fee78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Stu=CC=88rmer?= Date: Sun, 20 Oct 2024 06:44:35 +0200 Subject: [PATCH] split up apsme --- src/aps/{apsme.rs => apsme/basemgt.rs} | 21 ++++++++++++++++++++- src/aps/apsme/groupmgt.rs | 13 +++++++++++++ src/aps/apsme/mod.rs | 4 ++++ 3 files changed, 37 insertions(+), 1 deletion(-) rename src/aps/{apsme.rs => apsme/basemgt.rs} (79%) create mode 100644 src/aps/apsme/groupmgt.rs create mode 100644 src/aps/apsme/mod.rs diff --git a/src/aps/apsme.rs b/src/aps/apsme/basemgt.rs similarity index 79% rename from src/aps/apsme.rs rename to src/aps/apsme/basemgt.rs index 54b540a..cf72d67 100644 --- a/src/aps/apsme.rs +++ b/src/aps/apsme/basemgt.rs @@ -1,4 +1,7 @@ -#![allow(dead_code)] +//! +//! 2.2.4.4 Information Base Maintenance +//! This set of primitives defines how the next higher layer of a device can read and write attributes in the AIB +//! use crate::aps::types; type DstAddrMode = u8; @@ -88,3 +91,19 @@ struct ApsmeGetConfirm { attribute_value: AIBAttributeValue, } +// 2.2.4.4.3 APSME-SET.request +struct ApsmeSetRequest { + attribute: AIBAttribute, + attribute_length: u8, + attribute_value: AIBAttributeValue, +} + +// 2.2.4.4.4 APSME-SET.confirm +struct ApsmeSetConfirm { + status: u8, + attribute: AIBAttribute, + attribute_length: u8, + attribute_value: AIBAttributeValue, +} + + diff --git a/src/aps/apsme/groupmgt.rs b/src/aps/apsme/groupmgt.rs new file mode 100644 index 0000000..bc1b271 --- /dev/null +++ b/src/aps/apsme/groupmgt.rs @@ -0,0 +1,13 @@ +//! +//! 2.2.4.5 Group Management +//! This set of primitives allows the next higher layer to manage group membership for endpoints on the current device by adding and removing entries in the group table +//! +type DstAddrMode = u8; +// 2.2.4.3.1 APSME-BIND.request +struct ApsmeAddrGroupRequest { + group_address: u16, + endpoint: u8, +} + + + diff --git a/src/aps/apsme/mod.rs b/src/aps/apsme/mod.rs new file mode 100644 index 0000000..bba7b3d --- /dev/null +++ b/src/aps/apsme/mod.rs @@ -0,0 +1,4 @@ +pub(crate) mod basemgt; +pub(crate) mod groupmgt; + +