Add API allowing xAPPs to send alarm messages
[ric-plt/xapp-frame-cpp.git] / doc / src / lib / setup.im
1 .if false
2 ==================================================================================
3     Copyright (c) 2020 Nokia
4     Copyright (c) 2020 AT&T Intellectual Property.
5
6    Licensed under the Apache License, Version 2.0 (the "License");
7    you may not use this file except in compliance with the License.
8    You may obtain a copy of the License at
9
10        http://www.apache.org/licenses/LICENSE-2.0
11
12    Unless required by applicable law or agreed to in writing, software
13    distributed under the License is distributed on an "AS IS" BASIS,
14    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15    See the License for the specific language governing permissions and
16    limitations under the License.
17 ==================================================================================
18 .fi
19
20 .if false
21     Mnemonic:   setup.im
22     Abstract:   Provide general setup for all documents. It will include the
23                                 {X}fm common macro definitions (cmd) which provide the ability
24                                 to generate markdown, roff, and RST "source" from {X}fm source
25                                 while still allowing postscript to be generated.
26
27                                 Visit gitlab.com/rouxware/xfm for info on how to bulid
28                                 {X}fm if needed.
29
30     Date:       29 July 2019
31 .fi
32
33
34 .if ! _setup_im
35         .dv _setup_im 1
36
37         .** our imbeds live here
38         .dv lib ../lib
39
40         .** sane default for everything except rst
41         .dv col_width 6.5i
42         .dv textsize 10
43         .dv textfont Helvetica
44         .hn off
45         .tm .75i
46
47         .**  imbed output type specific macro file
48         .gv e OUTPUT_TYPE ot
49         .dv output_type &{ot!txt}
50
51         .** {X}fm package provided common macro definitions
52         .im cmd_master.im
53
54         .gv e XFM_PASS pass
55         .dv pass &{pass!1}
56
57
58         .** check that current version of {X}fm is greater/equal to our minimum req'd
59         .if ! [ "2.3.2" CVGE ]
60                 .gv
61                 .mg ### WARN ###  this document source expects {X}fm version 2.3.2 or greater; found &{_major}.&{_minor}.&_patch
62         .fi
63
64         .gv e XFM_PATH xpath
65         .if ! xpath
66                 .gv e TFM_PATH xpath
67                 .if ! xpath
68                         .mg ### WARNING ###  XFM_PATH should be set to reference the shared imbed files; likely these are in /usr/local/share/xfm
69                 .fi
70         .fi
71
72         .** forward variable reference support
73         .** define a 'subroutine' to add a variable and place it into the forward reference file
74         .** fref_sub.ca contains code to execute by the set_fref macor and fref.ca contains the
75         .** forward references to include during pass2. The macro set_ref will define the variable
76         .** passed as $1 (name) with the value passed as $2 and will add it to the fref.ca file.
77         .**
78         .ca shift start _fref_sub.ca
79                 .** be careful... the next  'ca end' MUST be tab indented before {X} version 2.4.
80                 .** with 2.4 and after it can be space indented
81
82                 .ca expand extend _fref.ca
83                 .dv &vname &vval
84                 .ca end
85 .** this ca end MUST be in col 0
86 .ca end
87         .dv export_var .dv vname $1 ^: .dv vval $2 ^: .dv $1 $2 ^: .im _fref_sub.ca
88         .dv export_fig  .dv vname $1 ^: .gv fig .ev ^`.dv vval ^^&_fig ^: ^`  .im _fref_sub.ca
89         .dv export_tab  .dv vname $1 ^: .gv table .ev ^`.dv vval ^^&_table ^` ^: .im _fref_sub.ca
90         .dv export_pg  .dv vname $1 ^: .gv page .ev ^`.dv vval ^^&_page ^` ^: .im _fref_sub.ca
91
92
93         .if &pass 2 =
94                 .im _fref.ca
95         .ei
96                 .** initialise the forward ref file
97                 .ca start _fref.ca
98                         .** forward reference variables; auto generated
99 .ca end
100         .fi
101
102
103         .** set up for an index when using pfm and snare file is defined
104         .if pfm
105                 .** {X}fm macro definitions are too big
106                 .dh 1 p=14 s=2,1 e=off
107                 .dh 2 p=12 s=1,.5
108                 .dh 3 p=&{textsize!10} s=1,0
109
110                 .if index_snare_file
111                         .ix space .sp 1 .cc 5 %c .ln  ^: .sp 0
112                         .ix term .br %s  `^`   ^`` %d
113                         .ix groupb .sp .5 %s .br .ll -.25i .in +.25i
114                         .ix groupe .sp .1 .in -.25i .ll +.25i
115                         .if ! index_cols
116                                 .dv index_cols 2
117                         .fi
118
119                         .dv index_col_width [ 6.5 &index_cols / .25 &index_cols 1 - * - ]
120                         .dv index_here  .pa .ju off .st &textsize .cd 1 i=1i w=7 ^: .h1 INDEX ^: .pn off .lw 0 .sp 0 .tt ^: .cd &index_cols i=1i w=&{index_col_width}i  g=.25i ^: .in -i .ll &{index_col_width}i .ix insert
121                         .im &index_snare_file
122                 .fi
123         .fi
124
125 .fi