-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathieee1906-dot1-nanosensor.yang
97 lines (82 loc) · 3.2 KB
/
ieee1906-dot1-nanosensor.yang
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
module ieee1906-dot1-nanosensor
{
yang-version 1.1;
namespace "urn:ieee:std:1906.1:yang:ieee1906-dot1-nanosensor";
prefix "ieee1906-nanosensor";
import ietf-interfaces { prefix if; }
import ieee1906-dot1-components { prefix components; }
import ieee1906-dot1-components { prefix definitions; }
import ieee1906-dot1-types { prefix types; }
organization "IEEE 1906.1.1 Working Group";
contact "IEEE 1906.1.1 Working Group
Chair: Stephen F. Bush <[email protected]>
Secretary: Guillaume Mantelet <[email protected]>";
description "This is an example illustrating how to refine the 1906.1 framework
to include specific details regarding Nanosensors. The framework
augments ietf-interface.yang module, this means that our nanosensor
can be now described as an IETF interface system.";
revision 2020-12-07
{
description "Initial version.";
}
//
// Let us control how ieth-interface can be augmented. Only for systems
// that implement naniosensor. Other systems may find no value in it.
//
feature nanosensor
{
description "This nanoscale interface is a nanosensor.";
}
//
// Here, we simply want to report a non standard property for this model.
// Note that our impact of scale on resonance is also considered a kind
// of motion, and then, this keyword can also be reused to define a
// component!
//
identity impact-of-scale-on-resonance
{
base types:non-standard-physics;
description "Apparently, scale of the system has an impact on its resonance
its motion.";
}
//
// Next identity defines a new type of perturbation.
//
identity radio-frequency-modulation
{
base types:perturbation;
description "The instantaneous frequency deviation in carrier waves
transport message acting in our model as a perturbation. In
this model, modulation is performed over oscillations in the
range of 20Khz – 300GHz, and beyond.";
}
//
// So because we define a new type of motion, we thought it was the perfect
// moment to introduce a new type of metrics that is closely related to this
// new component. Well... it is an empty shell, but still, it is a good
// example.
//
grouping resonance-metrics
{
container resonance-metrics
{
when "derived-from-or-self(../definitions:type-of-definition, 'impact-of-scale-on-resonance')";
description "The parent component must have a leaf of type 'impact-of-
scale-on-resonance' in order to be eligible to use this
container.";
}
description "This is a placeholder for Resonance metrics being used as
non-standard physics in this model.";
}
//
// We are now ready to augment existing framework!
// Note that in this example, we have no interest augmenting ietf interface.
//
augment "/if:interfaces/if:interface/components:nanoscale-interface/definitions:definitions/definitions:definition"
{
if-feature nanosensor;
uses resonance-metrics;
description "Augment nanoscale interface with the resonance defined
in nanosensor example.";
}
}