File: aprx-config.xsd

package info (click to toggle)
aprx 2.9.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,332 kB
  • sloc: ansic: 15,809; sh: 604; makefile: 159
file content (263 lines) | stat: -rw-r--r-- 8,741 bytes parent folder | download | duplicates (4)
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<?xml version="1.0" encoding="utf-8"?> <!-- -*- xml -*- -->
<xs:schema targetNamespace="uri:aprx:config"
           xmlns:ax="uri:aprx:config"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:ht="uri:apache:config"
           elementFormDefault="qualified"> 

  <xs:annotation>
    <xs:documentation>

       The Aprx uses following configuration schema, which took its model very much
       from how Apache HTTPD configuration is done.

       To denote elements without &lt; .. &gt; around them as Apache does, we use
       "uri:apache:config" style bits, like:  &lt;ht:element&gt;

       Because Apache's configuration predates XML and schemas, there has never been
       proper XML-like schema for it or anything alike it, nor is this intended to be
       validatable by XML tools.

       The overall syntax is line oriented, along with \ -characters at the end of line
       as continuation markers to append next line in place of that character plus the
       end-of-line character(s).

       Anywhere (except when previous line ends with \ -character) if the first non-white-space
       character is '#' the whole line is comment, and is discarded.

       Lines containing only white-space characters are also comments and are discarded.

       Presence of non-quoted '#' at the tails of parameter lines should also behave as
       comment, but it is not universal.

       Presence of extra parameter values is not always flagged as an error.

    </xs:documentation>
  </xs:annotation>
   

  <xs:complexType name="AprxConfig">
    <xs:annotation>
      <xs:documentation>
        The overall Aprx config contains parameter groups, and one top-level
        parameter label.
        
        The "mycall" parameter label must be before anything else.
        The &lt;interface> and &lt;aprsis> groups follow, and
        the rest that use those interfaces then follow.
        The &lt;logging> group can be anywhere.
        Each group can occur multiple times.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <ht:element Name="mycall"     type="ax:Ax25CallsignType" />
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element Name="aprsis"     type="ax:AprsisGroupType"       />
        <xs:element Name="interface"  type="ax:InterfaceGroupType"    />
        <xs:element Name="logging"    type="ax:LoggingGroupType"      />
      </xs:choice>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element Name="telemetry"  type="ax:TelemetryGroupType"    />
        <xs:element Name="digipeater" type="ax:DigipeaterGroupType"   />
        <xs:element Name="beacon"     type="ax:BeaconGroupType"       />
        <xs:element Name="logging"    type="ax:LoggingGroupType"      />
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <!--  
       Primitive data types
  -->


  <xs:complexType name="Interval">
    <xs:annotation>
      <xs:documentation>
        The Aprx configuration has flexible time interval definitions.
        
        A string of  decimal numbers followed by multiplier character:
        
             12 d 2 h 20 m 24 s
             50 h 70 m 200 s
             200 s 3 h
        
        Whatever notation is easiest to understand for the use.

        The multipliers are single characters and case insensitive.
        Embedding white-space is permitted for readability.
        ("d" = days, "h" = hours, "m" = minutes, "s" = seconds)

      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:string">
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="Ax25CallsignType">
    <xs:annotation>
      <xs:documentation>
        This is ASCII representation of AX.25 callsign.
        Up to 6 upper-case letters (A-Z) and digits (0-9), then
        possibly a minus ('-') and decimal number 0 to 15.
        By convention a "-0" is never used.
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:string">
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>


  <xs:complexType name="AprsisCallsignType">
    <xs:annotation>
      <xs:documentation>
        This is more relaxed form of AX.25 callsign:
        Regular expression:
            [a-zA-Z0-9]{1,6}($|-[a-zA-Z0-9]{1,2})
        Or verbally:
            Up to 6 alphanumeric characters + optional
            tail of a minus ('-') followed by one or two
            alphanumeric characters. Also lowercase letters
            are allowed in alphanumerics.
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:string">
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>


  <!--  
       Group types
  -->

  <xs:complexType name="AprsisGroupType">
    <xs:annotation>
      <xs:documentation>
        The APRSIS group defines communication parameters to APRS-IS network.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <ht:element Name="login"   type="ax:AprsisCallsignType">
          <xs:annotation>
            <xs:documentation>
              The Login parameter for APRS-IS network.

              The Aprx will calculate correct authentication parameter
              for that login value.
            </xs:documentation>
          </xs:annotation>
        </ht:element>
        <ht:element Name="server"  type="ax:AprsisServerParameterType">
          <xs:annotation>
            <xs:documentation>
              Defines server to which the Aprx connects for the APRS-IS
              service.

                    serverhost [portnum]

              Chosen servers should be regional round-robin ones, see
              http://www.aprs2.net/
                   noam.aprs2.net
                   soam.aprs2.net
                   euro.aprs2.net
                   asia.aprs2.net
                   aunz.aprs2.net
              or the global pool:
                   rotate.aprs2.net

              You SHOULD NOT connect to any specific one, as none of
              the servers are behind a load-balancing fail-over mechanisms.

            </xs:documentation>
          </xs:annotation>
        </ht:element>
        <ht:element Name="heartbeat-timeout" type="ax:IntervalType">
          <!-- default value: 120 second -->
        </ht:element>
        <ht:element Name="filter"  type="ax:AprsisFilterParameterType">
          <xs:annotation>
            <xs:documentation>
              One white-space terminated parameter that is fed to APRS-IS
              server immediately after a login.

              If multiple filters are needed, they are defined with
              successive 'filter' parameter entries.
            </xs:documentation>
          </xs:annotation>
        </ht:element>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="InterfaceGroupType">
    <xs:annotation>
      <xs:documentation>
      </xs:documentation>
    </xs:annotation>
  </xs:complexType>

  <xs:complexType name="TelemetryGroupType">
    <xs:annotation>
      <xs:documentation>
      </xs:documentation>
    </xs:annotation>
  </xs:complexType>

  <xs:complexType name="DigipeaterGroupType">
    <xs:annotation>
      <xs:documentation>
      </xs:documentation>
    </xs:annotation>
  </xs:complexType>

  <xs:complexType name="BeaconGroupType">
    <xs:annotation>
      <xs:documentation>
      </xs:documentation>
    </xs:annotation>
  </xs:complexType>

  <xs:complexType name="LoggingGroupType">
    <xs:annotation>
      <xs:documentation>
        The Logging group defines how the Aprx does logs.
        Without it, or any parameters inside it, no logging happens.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <ht:element Name="aprxlog"     type="ax:filename">
        </ht:element>
        <ht:element Name="dprslog"     type="ax:filename">
        </ht:element>
        <ht:element Name="rflog"       type="ax:filename">
        </ht:element>
        <ht:element Name="pidfile"     type="ax:filename">
        </ht:element>
        <ht:element Name="erlangfile"  type="ax:filename">
        </ht:element>
        <ht:element Name="erlang-loglevel"  type="ax:???">
        </ht:element>
        <ht:element Name="erlanglog"        type="ax:???">
        </ht:element>
        <ht:element Name="erlang-log1min"   type="ax:???">
        </ht:element>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>
  

  <!--
      <xs:annotation>
        <xs:documentation>
        </xs:documentation>
      </xs:annotation>
  -->

</xs:schema>