#![allow(dead_code)]
use heapless::Vec;
use crate::apl::descriptors::node_descriptor::MacCapabilities;
use crate::apl::descriptors::node_descriptor::NodeDescriptor;
use crate::apl::descriptors::node_descriptor::ServerMask;
use crate::internal::types::IeeeAddress;
use crate::internal::types::NwkAddress;
const CLUSTER_LIST_SIZE: usize = 2 * 0xffff;
pub struct NWKAddrReq {
ieee_address: IeeeAddress,
request_type: u8,
start_index: u8,
}
pub struct IeeeAddrReq {
nwk_addr_of_interest: NwkAddress,
request_type: u8,
start_index: u8,
}
pub struct NodeDescReq {
nwk_addr_of_interest: NwkAddress,
}
pub struct PowerDescReq {
nwk_addr_of_interest: NwkAddress,
}
pub struct SimpleDescReq {
nwk_addr_of_interest: NwkAddress,
endpoint: u8,
}
pub struct ActivePeReq {
nwk_addr_of_interest: NwkAddress,
}
pub struct MatchDescReq {
nwk_addr_of_interest: NwkAddress,
profile_id: u16,
num_in_clusters: u8,
in_cluster_list: Vec<u16, CLUSTER_LIST_SIZE>,
num_out_clusters: u8,
out_cluster_list: Vec<u16, CLUSTER_LIST_SIZE>,
}
pub struct ComplexDescReq {
nwk_addr_of_interest: NwkAddress,
}
pub struct UserDescReq {
nwk_addr_of_interest: NwkAddress,
}
pub struct DeviceAnnce {
nwk_addr: NwkAddress,
ieee_addr: IeeeAddress,
capability: MacCapabilities,
}
pub struct ChildInfo(IeeeAddress);
pub struct ParentAnnce {
number_of_children: u8,
children: Vec<ChildInfo, { 255 * size_of::<ChildInfo>() }>,
}
pub struct UserDescSet {
nwk_addr_of_interest: NwkAddress,
length: u8,
user_description: Vec<u8, 255>,
}
pub struct SystemServerDiscoveryReq {
server_mask: ServerMask,
}
pub struct DiscoveryStoreReq {
nwk_addr: NwkAddress,
ieee_addr: IeeeAddress,
node_desc_size: u8,
power_desc_size: u8,
active_ep_size: u8,
simple_desc_count: u8,
simple_desc_size_list: Vec<u8, 255>,
}
pub struct NodeDescStoreReq {
nwk_addr: NwkAddress,
ieee_addr: IeeeAddress,
node_descriptor: NodeDescriptor,
}