use config::Config;
pub mod config;
use crate::aps::apsme::Apsme;
pub struct ZigbeeDevice {
config: Config,
apsme: Apsme,
}
pub struct ZigBeeNetwork {}
impl ZigbeeDevice {
pub fn new() -> Self {
Self {
config: Config::default(),
apsme: Apsme::new(),
}
}
pub fn configure(&self, _config: Config) {}
pub fn is_connected(&self) -> bool {
false }
pub fn scan_for_available_networks(&self) {
self.apsme.start_network_discovery();
}
pub fn try_to_connect(&self) {
self.apsme.join_network();
}
pub fn setup_security(&self) {
}
pub fn send_keep_alive(&self) {}
pub fn send_data(&self, _input: &[u8]) {}
pub fn start_device_discovery(&self) {
match self.config.device_discovery_type {
config::DiscoveryType::IEEE => {
todo!()
}
config::DiscoveryType::NWK => {
todo!()
}
}
}
pub fn start_service_discovery(&self) {}
}
impl Default for ZigbeeDevice {
fn default() -> Self {
Self::new()
}
}