-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/APSDE-SAP
- Loading branch information
Showing
9 changed files
with
77 additions
and
27 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
[package] | ||
name = "zigbee-rs" | ||
version = "0.1.0" | ||
name = "zigbee" | ||
version = "0.1.0-alpha.1" | ||
authors = ["Stürmer, Benjamin <[email protected]>"] | ||
edition = "2018" | ||
rust-version = "1.31" | ||
|
||
description = "ZigBee protocol stack based on the [ZigBee specification 22 1.0](https://csa-iot.org/wp-content/uploads/2022/01/docs-05-3474-22-0csg-zigbee-specification-1.pdf)" | ||
documentation = "https://docs.rs/zigbee-rs" | ||
homepage = "https://github.com/thebino/zigbee-rs" | ||
description = "ZigBee protocol stack in `no-std` based on the [ZigBee specification 22 1.0](https://csa-iot.org/wp-content/uploads/2022/01/docs-05-3474-22-0csg-zigbee-specification-1.pdf)" | ||
documentation = "https://docs.rs/zigbee" | ||
repository = "https://github.com/thebino/zigbee-rs" | ||
readme = "README.md" | ||
keywords = ["zigbee", "208.15.4"] | ||
categories = ["network-programming", "no-std", "embedded"] | ||
license = "MIT OR Apache-2.0" | ||
|
||
[features] | ||
|
||
[dependencies] | ||
bitmaps = { version = "3.2.1", default-features = false } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,31 @@ | ||
use basemgt::{AIBAttribute, AIBAttributeValue, ApsmeBindConfirm, ApsmeBindRequest}; | ||
|
||
pub(crate) mod basemgt; | ||
pub(crate) mod groupmgt; | ||
|
||
// 2.2.4.2 | ||
// Application support sub-layer management service = service access point | ||
// | ||
// supports the transport of management commands between the NHLE and the APSME | ||
pub(crate) trait ApsmeSap { | ||
// 2.2.4.3.1 | ||
// request to bind two devices together, or to bind a device to a group | ||
fn bind_request(request: ApsmeBindRequest) -> ApsmeBindConfirm; | ||
// 2.2.4.3.3 | ||
// request to unbind two devices, or to unbind a device from a group | ||
fn unbind_request(); | ||
// 2.2.4.4.1 | ||
fn get(attribute: AIBAttribute) -> AIBAttributeValue; | ||
// 2.2.4.4.3 | ||
fn set(); | ||
// 2.2.4.5.1 | ||
fn add_group(); | ||
// 2.2.4.5.1 | ||
fn remove_group(); | ||
// 2.2.4.5.5 | ||
fn remove_all_groups(); | ||
} | ||
|
||
// TODO: add AIB (APS information base) a database of managed objects | ||
// | ||
// 2.2.4.4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
//! Bounded address | ||
//! 2.2.4.1.1 | ||
|
||
use super::error::ApsError; | ||
pub struct SrcEndpoint { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
#![no_std] | ||
|
||
//! # zigbee | ||
//! Implements the ZigBee protocol stack in `no-std` based on the [ZigBee specification] | ||
//! | ||
//! ZigBee is a protocol stack based on the ZigBee specification 22 1.0 | ||
//! [ZigBee specification]: https://csa-iot.org/wp-content/uploads/2022/01/docs-05-3474-22-0csg-zigbee-specification-1.pdf | ||
//! | ||
mod aps; | ||
|
||
mod lib { | ||
#![no_std] | ||
|
||
} | ||
mod aps; | ||
pub mod zdo; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#![allow(dead_code)] | ||
|
||
#[derive(Debug)] | ||
pub struct ZigbeeDevice { | ||
field: bool | ||
} | ||
|
||
impl ZigbeeDevice { | ||
pub fn new(gpio: u8) -> Self { | ||
Self { field: true } | ||
} | ||
|
||
pub fn discover() { | ||
|
||
} | ||
} | ||
|