#![cfg_attr(not(feature = "std"), no_std)]
#![forbid(unsafe_code)]
#[cfg(not(feature = "std"))]
extern crate alloc;
pub mod error;
pub mod traits;
pub mod types;
pub mod utils;
pub use error::{CoreError, CoreResult, InferenceError, SignalError, StorageError};
pub use traits::{CanonicalFrame, DataStore, NeuralInference, SignalProcessor};
pub use types::{
AntennaConfig,
BoundingBox,
ComplexSample,
Confidence,
CsiFrame,
CsiMetadata,
DeviceId,
FrameId,
FrequencyBand,
Keypoint,
KeypointType,
PersonPose,
PoseEstimate,
ProcessedSignal,
SignalFeatures,
Timestamp,
};
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub const MAX_KEYPOINTS: usize = 17;
pub const MAX_SUBCARRIERS: usize = 256;
pub const DEFAULT_CONFIDENCE_THRESHOLD: f32 = 0.5;
pub mod prelude {
pub use crate::error::{CoreError, CoreResult};
pub use crate::traits::{CanonicalFrame, DataStore, NeuralInference, SignalProcessor};
pub use crate::types::{
AntennaConfig, BoundingBox, ComplexSample, Confidence, CsiFrame, CsiMetadata, DeviceId,
FrameId, FrequencyBand, Keypoint, KeypointType, PersonPose, PoseEstimate, ProcessedSignal,
SignalFeatures, Timestamp,
};
}
const _: () = assert!(MAX_SUBCARRIERS > 0);
const _: () = assert!(DEFAULT_CONFIDENCE_THRESHOLD > 0.0);
const _: () = assert!(DEFAULT_CONFIDENCE_THRESHOLD < 1.0);
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_version_is_valid() {
assert!(VERSION.contains('.'), "version should be semver: {VERSION}");
}
#[test]
fn test_constants() {
assert_eq!(MAX_KEYPOINTS, 17);
}
}