mod oscquery_types;
mod oscunit;
mod service;
mod tokiort;
pub use oscquery_types::*;
pub use oscunit::*;
pub use service::*;
pub mod osc {
pub use rosc::*;
}
#[test]
fn readme_example() {
use crate::{OSCAccess, OSCUnit, OscHostInfo};
use rosc::OscType;
let mut root = OSCNode::root(Some(Box::new(OscHostInfo::new(
"My OSC Server".to_string(),
"127.0.0.1".to_string(),
9000,
))));
let param1 = OscQueryParameter::new("/endpoint1".to_string(), OscType::Float(0.0))
.with_access(OSCAccess::ReadWrite)
.with_unit(OSCUnit::Distance(OSCDistance::Centimeter))
.with_description("This is endpoint1".to_string())
.with_min_max(0.0, 100.0);
let param2 = OscQueryParameter::new("/endpoint2".to_string(), OscType::Float(1.0f32))
.with_access(OSCAccess::Read)
.with_description("This is endpoint2".to_string());
root.add(param1).unwrap();
root.add(param2).unwrap();
let json_str = serde_json::to_string(&root).unwrap();
println!("{}", json_str);
}