Bug fix.
[sim/o1-interface.git] / ntsimulator / yang / o-ran / ru-fh / o-ran-antenna-calibration.yang
1 module o-ran-antenna-calibration {
2   yang-version 1.1;
3   namespace "urn:o-ran:antcal:1.0";
4   prefix "o-ran-antcal";
5
6   organization "O-RAN Alliance";
7
8   contact
9     "www.o-ran.org";
10
11   description
12     "This module defines the configuration required for supporting the optional
13     antenna calibration functionality.
14
15      Copyright 2019 the O-RAN Alliance.
16
17      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
18      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19      IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20      ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21      LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22      CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23      SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24      INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25      CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27      POSSIBILITY OF SUCH DAMAGE.
28
29      Redistribution and use in source and binary forms, with or without
30      modification, are permitted provided that the following conditions are met:
31
32      * Redistributions of source code must retain the above copyright notice,
33      this list of conditions and the above disclaimer.
34      * Redistributions in binary form must reproduce the above copyright notice,
35      this list of conditions and the above disclaimer in the documentation
36      and/or other materials provided with the distribution.
37      * Neither the Members of the O-RAN Alliance nor the names of its
38      contributors may be used to endorse or promote products derived from
39      this software without specific prior written permission.";
40
41   revision 2019-07-03 {
42     description
43       "version 1.0.0
44
45        1) Newly introduced model for supporting optional
46        antenna calibration functionality";
47
48     reference "ORAN-WG4.MP-v02.00";
49   }
50
51   grouping antenna-calibration-capabilities {
52     description "container for collection of leafs for antenna calibration";
53
54     leaf self-calibration-support {
55       type boolean;
56       default false;
57       description
58         "Indicates whether O-RU supports self-calibration or not.
59
60         When true, indicates O-RU can initiate calibration without receiving an
61         rpc";
62     }
63     leaf number-of-calibration-symbols-per-block-dl {
64       type uint8 {
65         range "1..max";
66       }
67       units symbols;
68       mandatory true;
69       description
70         "Indicates how many consecutive symbols are required for DL antenna
71         calibration operation";
72     }
73     leaf number-of-calibration-symbols-per-block-ul {
74       type uint8 {
75         range "1..max";
76       }
77       units symbols;
78       mandatory true;
79       description
80         "Indicates how many consecutive symbols are required for UL antenna
81         calibration operation";
82     }
83     leaf interval-between-calibration-blocks {
84       type uint8;
85       units symbols;
86       description
87         "if time interval is required between consecutive antenna calibration
88         operation, defines this time value as unit of symbols.
89
90         A common value is used here for the intervals
91         between DL-DL blocks, UL-UL blocks, DL-UL blocks and UL-DL blocks,
92         which is the largest minimum interval required between any two adjacent
93         calibration blocks.";
94     }
95     leaf number-of-calibration-blocks-per-step-dl {
96       type uint8 {
97         range "1..max";
98       }
99       mandatory true;
100       description
101         "Indicates how many blocks are required for one step of DL antenna
102         calibration operation";
103     }
104     leaf number-of-calibration-blocks-per-step-ul {
105       type uint8 {
106         range "1..max";
107       }
108       mandatory true;
109       description
110         "Indicates how many blocks are required for one step of UL antenna
111         calibration operation";
112     }
113     leaf interval-between-calibration-steps {
114       type uint8;
115       units radio-frames;
116       description
117         "If time interval is required between consecutive step of antenna
118         calibration operation, defines this time value as unit of radio frames";
119     }
120     leaf number-of-calibration-steps {
121       type uint8 {
122         range "1..max";
123       }
124       mandatory true;
125       description
126         "Indicates how many steps are required for whole DL/UL antenna
127         calibration operation";
128     }
129   }
130
131   grouping antenna-calibration {
132     container antenna-calibration-capabilities {
133       config false;
134       description
135         "Describes the antenna calibration capabilities";
136       uses antenna-calibration-capabilities;
137     }
138     container self-calibration-policy {
139       leaf self-calibration-allowed {
140         type boolean;
141         default false;
142         description
143           "whether the self-calibration is allowed configured by operator.";
144       }
145       description
146         "Describes the self calibration policy of the operator";
147     }
148     description
149       "Describe the grouping set of antenna calibration";
150   }
151
152   container antenna-calibration {
153     uses antenna-calibration;
154     description
155       "Describes the antenna calibration top node";
156   }
157
158   rpc start-antenna-calibration {
159     description
160       "The antenna calibration operation can start when NETCONF client sends a
161       calibration start command with resource allocation parameters.
162       These parameters indicate how the O-RU can perform the antenna
163       calibration operation; at which Symbol, Slot, and Frame.
164       This scheduling information can be generated by O-RU itself.
165       However, in a dynamic TDD environment, the DL and UL configuration
166       is only determined and known by O-DU. Consequently, only O-DU (NETCONF
167       client ) can determine and configure the scheduling and resource
168       allocation permitted for use by the antenna calibration operation";
169     input  {
170       leaf symbol-bitmask-dl {
171         type string {
172           length "14";
173           pattern "[01]*";
174         }
175         mandatory true;
176         description
177           "Bitmask indicating DL calibration symbol within a calibration slot.
178            First character in the string indicate first symbol,
179            next character in the string indicate second symbol and so on.
180            Value 1 indicates that the symbol may be used for calibration
181            and 0 means the symbol shall not be used for calibration.";
182       }
183       leaf symbol-bitmask-ul {
184         type string {
185           length "14";
186           pattern "[01]*";
187         }
188         mandatory true;
189         description
190           "Bitmask indicating UL calibration symbol within a calibration slot.
191            First character in the string indicate first symbol,
192            next character in the string indicate second symbol and so on.
193            Value 1 indicates that the symbol may be used for calibration
194            and 0 means the symbol shall not be used for calibration.";
195       }
196       leaf slot-bitmask-dl {
197         type string {
198           length "10..255";
199           pattern "[01]*";
200         }
201         mandatory true;
202         description
203           "Bitmask indicating DL calibration slot within a calibration frame.
204            First character in the string indicate first slot,
205            next character in the string indicate second slot and so on.
206            Value 1 indicates that the slot may be used for calibration
207            and 0 means the slot shall not be used for calibration.";
208         }
209         leaf slot-bitmask-ul {
210           type string {
211             length "10..255";
212             pattern "[01]*";
213           }
214           mandatory true;
215           description
216             "Bitmask indicating UL calibration slot within a calibration frame.
217              First character in the string indicate first slot,
218              next character in the string indicate second slot and so on.
219              Value 1 indicates that the slot may be used for calibration
220              and 0 means the slot shall not be used for calibration.";
221         }
222         leaf frame-bitmask-dl {
223           type string {
224             length "1..255";
225             pattern "[01]*";
226           }
227           mandatory true;
228           description
229             "Bitmask indicating DL calibration frame within a calibration step.
230              First character in the string indicate first radio frame equal to
231              the start-SFN, next character in the string indicate the next frame
232              and so on.
233
234              Value 1 indicates that the frame may be used for calibration
235              and 0 means the frame shall not be used for calibration.";
236         }
237         leaf frame-bitmask-ul {
238           type string {
239             length "1..255";
240             pattern "[01]*";
241           }
242           mandatory true;
243           description
244             "Bitmask indicating UL calibration frame within a calibration step.
245              First character in the string indicate first radio frame equal to
246              the start-SFN, next character in the string indicate the next frame
247              and so on.
248
249              Value 1 indicates that the frame is may be used for calibration
250              and 0 means the frame shall not be used for calibration.";
251         }
252         leaf calibration-step-size {
253           type uint8;
254           mandatory true;
255           description " Number of frames within a calibration step";
256         }
257         leaf calibration-step-number {
258           type uint8;
259           mandatory true;
260           description "Number of calibration steps";
261         }
262         leaf start-sfn {
263           type uint16 {
264             range "0..1023";
265           }
266           mandatory true;
267           description "start SFN number of the first calibration step";
268         }
269     }
270     output  {
271       leaf status {
272         type enumeration {
273           enum ACCEPTED {
274             description
275               "Status information to indicate that O-RU accepted RPC
276               antenna calibration start request";
277           }
278           enum REJECTED {
279             description
280               "Status information to indicate that O-RU rejected RPC antenna
281               calibration start request";
282           }
283         }
284         mandatory true;
285         description
286           "Status of whether antenna calibration trigger by RPC is accepted
287           by the O-RU";
288       }
289       leaf error-message {
290         when "../status='REJECTED'";
291           type string;
292           description
293             "Detailed error Message when the status is rejected, e.g.,
294              because O-RU can not start antenna calibration
295              such as already running antenna calibration,
296              resource mask mismatch with O-RU antenna calibration capability,
297                                overlapped DL and UL masks, insufficient memory, O-RU internal reason";
298         }
299       }
300   }
301
302
303   notification antenna-calibration-required {
304     list dl-calibration-frequency-chunk {
305       leaf start-calibration-frequency-dl {
306         type uint64;
307         description
308           "lowest frequency value in Hz of the frequency range is required for
309            DL antenna calibration operation.";
310       }
311       leaf end-calibration-frequency-dl {
312         type uint64;
313         description
314           "highest frequency value in Hz of the frequency range is required for
315            DL antenna calibration operation.";
316       }
317       description
318          "min/max frequency of dl spectrum chunk affected by calibration process";
319     }
320     list ul-calibration-frequency-chunk {
321       leaf start-calibration-frequency-ul {
322         type uint64;
323         description
324           "lowest frequency value in Hz of the frequency range is required for
325            UL antenna calibration operation.";
326       }
327       leaf end-calibration-frequency-ul {
328         type uint64;
329         description
330           "highest frequency value in Hz of the frequency range is required for
331            UL antenna calibration operation.";
332       }
333       description
334         "min/max frequency of ul spectrum chunk affected by calibration process";
335     }
336     description
337       "this notification indicates that the antenna calibration is required in O-RU";
338   }
339
340   notification antenna-calibration-result {
341     leaf status {
342       type enumeration {
343         enum SUCCESS {
344           description "O-RU has succeeded in calibrating its antenna";
345         }
346         enum FAILURE {
347           description
348             "O-RU attemted to calibrate its antenna, but the procedure failed.";
349         }
350       }
351       mandatory true;
352       description
353         "Status of the antenna calibration procedure which has been triggered
354         by accepting an start-antenna-calibration RPC.";
355     }
356     leaf detailed-reason {
357       when "../status='FAILURE'";
358       type string;
359       description
360         "Detailed reason when the status is FAILURE, e.g.,
361         O-RU cannot complete the antenna calibration
362         because of lack of memory, self-calibration failure, etc";
363     }
364     description
365     "This notification indicates the antenna calibration result";
366   }
367 }