1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
use dtn7_codegen::*;
pub trait ConvergenceLayerAgent {
fn name(&self) -> &'static str;
}
pub trait HelpStr {
fn local_help_str() -> &'static str {
"<>"
}
fn global_help_str() -> &'static str {
"<>"
}
}
#[cla(mtcp)]
#[derive(Debug)]
struct A {}
impl HelpStr for A {
fn local_help_str() -> &'static str {
"a"
}
fn global_help_str() -> &'static str {
"global: a"
}
}
#[cla(http)]
#[derive(Debug)]
struct B {}
impl HelpStr for B {}
//init_cla_subsystem!();
//#[test]
fn test_cla() {
let a = A {};
let b = B {};
println!("{:?}", a.name());
println!("{:?}", b);
println!("{:?}", local_help());
println!("{:?}", global_help());
println!("{:?}", convergence_layer_agents());
//println!("all clas: {}", all_clas());
//assert_eq!(a.get_name(), "A");
//assert_eq!(b.get_name(), "B");
}
*/