Skip to main content

apis_saltans_zdp/
lib.rs

1//! Zigbee Device Profile (ZDP) frame and service command models.
2//!
3//! The crate provides typed ZDP request/response payloads, grouped service enums, a unified
4//! [`Command`] enum, command dispatch by cluster ID, and sequence-numbered [`Frame`] wrappers.
5//! Implemented service groups currently include Device and Service Discovery, Bind Management,
6//! Network Management, and Security.
7
8extern crate core;
9
10pub use status::{Displayable, Status};
11
12pub use self::frame::{Frame, ParseFrameError};
13pub use self::services::{
14    ActiveEpReq, ActiveEpRsp, BindManagement, BindReq, BindRsp, ClearAllBindingsReq,
15    ClearAllBindingsRsp, Command, Destination, DeviceAndServiceDiscovery, DeviceAnnce,
16    EnhancedNwkUpdateParameters, IeeeAddrReq, IeeeAddrRsp, IeeeAddrRspResponse, JoiningPolicy,
17    LeaveReqFlags, MatchDescReq, MatchDescRsp, MgmtBindReq, MgmtBindRsp, MgmtBindRspPayload,
18    MgmtLeaveReq, MgmtLeaveRsp, MgmtLqiReq, MgmtLqiRsp, MgmtLqiRspPayload, MgmtNwkBeaconSurveyReq,
19    MgmtNwkBeaconSurveyRsp, MgmtNwkEnhancedUpdateNotify, MgmtNwkEnhancedUpdateReq,
20    MgmtNwkIeeeJoiningListReq, MgmtNwkIeeeJoiningListRsp, MgmtNwkIeeeJoiningListRspEntries,
21    MgmtNwkIeeeJoiningListRspPayload, MgmtNwkUnsolicitedEnhancedUpdateNotify, MgmtNwkUpdateNotify,
22    MgmtNwkUpdateReq, MgmtPermitJoiningReq, MgmtPermitJoiningRsp, MgmtRtgReq, MgmtRtgRsp,
23    MgmtRtgRspPayload, NetworkManagement, NodeDescReq, NodeDescRsp, NwkAddrReq, NwkAddrRsp,
24    NwkAddrRspResponse, ParentAnnce, ParentAnnceRsp, PowerDescReq, PowerDescRsp, RequestType,
25    ScanDuration, Security, SecurityChallengeReq, SecurityChallengeRsp, SecurityDecommissionReq,
26    SecurityDecommissionRsp, SecurityGetAuthenticationLevelReq, SecurityGetAuthenticationLevelRsp,
27    SecurityGetConfigurationReq, SecurityGetConfigurationRsp,
28    SecurityRetrieveAuthenticationTokenReq, SecurityRetrieveAuthenticationTokenRsp,
29    SecuritySetConfigurationReq, SecuritySetConfigurationRsp, SecurityStartKeyNegotiationReq,
30    SecurityStartKeyNegotiationRsp, SecurityStartKeyUpdateReq, SecurityStartKeyUpdateRsp, Service,
31    SimpleDescReq, SimpleDescRsp, SystemServerDiscoveryReq, SystemServerDiscoveryRsp, UnbindReq,
32    UnbindRsp,
33};
34pub use self::simple_descriptor::{AppFlags, Clusters, SimpleDescriptor};
35
36mod frame;
37mod macros;
38mod services;
39mod simple_descriptor;
40mod status;
41
42pub(crate) use self::macros::{zdp_command, zdp_command_enum, zdp_command_group};
43
44/// Bit mask that marks a ZDP cluster ID as a response cluster.
45///
46/// ZDP response cluster IDs are formed by setting bit 15 on the corresponding
47/// request cluster ID.
48pub const CLUSTER_ID_RESPONSE_MASK: u16 = 0x8000;