netmsgs  1.2.2
RoadNarrows Robotics Network Messaging Package
AstroMsgs.xml XML Example

The AstroMsgs.xml example.

1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE netmsgs PUBLIC "-//www.roadnarrows.com//DTD NETMSGS 1.0//EN"
3  "http://www.roadnarrows.com/xml/netmsgs/1.0/netmsgs.dtd">
4 
5 <!--
6  - Package: netmsgs
7  -
8  - Program: nmExample
9  -
10  - File: AstroMsg.xml
11  -
12 
13 /*!
14  \file
15 
16  $LastChangedDate$
17  $Rev$
18 
19  \brief Example RoadNarrows NetMsgs XML definitions.
20 
21  \author Robin Knight (robin.knight@roadnarrows.com)
22 
23  - \copyright
24  - \h_copy 2010-2017. RoadNarrows LLC.\n
25  - http://www.roadnarrows.com\n
26  - All Rights Reserved
27 */
28 
29  - Permission is hereby granted, without written agreement and without
30  - license or royalty fees, to use, copy, modify, and distribute this
31  - software and its documentation for any purpose, provided that
32  - (1) The above copyright notice and the following two paragraphs
33  - appear in all copies of the source code and (2) redistributions
34  - including binaries reproduces these notices in the supporting
35  - documentation. Substantial modifications to this software may be
36  - copyrighted by their authors and need not follow the licensing terms
37  - described here, provided that the new terms are clearly indicated in
38  - all files where they apply.
39  -
40  - IN NO EVENT SHALL THE AUTHOR, ROADNARROWS LLC, OR ANY MEMBERS/EMPLOYEES
41  - OF ROADNARROW LLC OR DISTRIBUTORS OF THIS SOFTWARE BE LIABLE TO ANY
42  - PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
43  - DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
44  - EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN ADVISED OF
45  - THE POSSIBILITY OF SUCH DAMAGE.
46  -
47  - THE AUTHOR AND ROADNARROWS LLC SPECIFICALLY DISCLAIM ANY WARRANTIES,
48  - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
49  - FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
50  - "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
51  - PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
52  -
53 -->
54 
55 <netmsgs encoding="itv" endian="big">
56  <!-- ........................................................................
57  - Meta Data to Tweak Source Generation
58  ....................................................................... -->
59  <meta>
60  <brief>Example ITV XML Definitions</brief>
61  <ns>Astro</ns>
62  <prologue lang="h">
63 #include "nmExample.h"
64  </prologue>
65  <epilogue lang="h"></epilogue>
66  <prologue lang="c"></prologue>
67  <epilogue lang="c"></epilogue>
68  <prologue lang="python">
69 ## Minimum star temperature
70 STAR_TEMP_K_MIN = 1000
71 
72 ## Maximum star temperature
73 STAR_TEMP_K_MAX = 50000
74 
75 #
76 # Star constellation designations are greek leters from brightest to dimmest
77 #
78 
79 ## 1st star
80 ALPHA = 0
81 
82 ## 2nd star
83 BETA = 1
84 
85 ## 3rd star
86 GAMMA = 2
87 
88 ## 4th star
89 DELTA = 3
90 
91 ## 5th star
92 EPSILON = 4
93 
94 ## 6th star
95 ZETA = 5
96 
97 ## 7th star
98 ETA = 6
99 
100 ## 8th star
101 THETA = 7
102 
103 ## 9th star
104 IOTA = 8
105 
106 ## 10th star
107 KAPPA = 9
108 
109 ## 11th star
110 LAMBDA = 10
111 
112 ## 12th star
113 MU = 11
114 
115 ## 13th star
116 NU = 12
117 
118 ## 14th star
119 XI = 13
120 
121 ## 15th star
122 OMICRON = 14
123 
124 ## 16th star
125 PI = 15
126  </prologue>
127  <epilogue lang="python"></epilogue>
128  </meta>
129 
130  <!-- ........................................................................
131  - Extended Field Types (Optional)
132  ....................................................................... -->
133 
134  <field_types>
135  <ftypedef ftid="SpectralClass" ftype="char" />
136 
137  <ftypedef ftid="SpectralColor" ftype='string' size="16" />
138 
139  <ftypedef ftid="TempK" ftype="u32" />
140 
141  <ftypedef ftid="Star" ftype="struct">
142  <fielddef fname="Name" ftype="string" size="32" />
143  <fielddef fname="Type" ftype="SpectralClass" />
144  <fielddef fname="Color" ftype="SpectralColor" />
145  <fielddef fname="TempK" ftype="TempK">
146  <min>STAR_TEMP_K_MIN</min>
147  <max>STAR_TEMP_K_MAX</max>
148  </fielddef>
149  <fielddef fname="MassSun" ftype="f32">
150  <min>0.1</min>
151  <max>100.0</max>
152  </fielddef>
153  </ftypedef>
154 
155  <ftypedef ftid="Sun" ftype="Star" />
156 
157  <ftypedef ftid="StarGroup" ftype="Star[]" size="16" />
158 
159  <ftypedef ftid="Constellation" ftype="struct">
160  <fielddef fname="Name" ftype="string" size="32" />
161  <fielddef fname="OldName" ftype="string" disposition="deprecated" />
162  <fielddef fname="Designation" ftype="u8[]" size="16">
163  <min>ALPHA</min>
164  <max>PI</max>
165  </fielddef>
166  <fielddef fname="Star" ftype="StarGroup" />
167  </ftypedef>
168  </field_types>
169 
170 
171  <!-- ........................................................................
172  - Message Definitions
173  ....................................................................... -->
174 
175  <msg_types>
176  <!-- Ok Response -->
177  <msgdef msgid="RspOk">
178  </msgdef>
179 
180  <!-- Error Response -->
181  <msgdef msgid="RspErr">
182  <fielddef fname="ECode" ftype="u8" />
183  <fielddef fname="EMsg" ftype="string">
184  </fielddef>
185  </msgdef>
186 
187  <!-- Zodiac Constellatio Family Command -->
188  <msgdef msgid="CmdZodiac">
189  <fielddef fname="Family" ftype="string" size="32" >
190  <const>"Zodiac"</const></fielddef>
191  <fielddef fname="Constellation" ftype="Constellation" />
192  </msgdef>
193 
194  <!-- Ursa Major Constellatio Family Command -->
195  <msgdef msgid="CmdUrsa">
196  <fielddef fname="Family" ftype="string" size="32">
197  <const>"Ursa Major"</const>
198  </fielddef>
199  <fielddef fname="Constellation" ftype="Constellation" />
200  </msgdef>
201 
202  <!-- Music of the Spheres Command -->
203  <msgdef msgid="CmdMusicOfTheSpheres" disposition="deprecated">
204  <fielddef fname="geometry" ftype="u32" />
205  <fielddef fname="cosmology" ftype="u32" />
206  <fielddef fname="astrology" ftype="u32" />
207  <fielddef fname="harmonics" ftype="u32" />
208  <fielddef fname="music" ftype="u32" />
209  </msgdef>
210 
211  <!-- Fractal -->
212  <msgdef msgid="Fractal">
213  <fielddef fname="Self" ftype="struct">
214  <fielddef fname="Point" ftype="s32[]" size="4" />
215  <fielddef fname="Self" ftype="struct">
216  <fielddef fname="Point" ftype="s32[]" size="4" />
217  <fielddef fname="Self" ftype="struct">
218  <fielddef fname="Point" ftype="s32[]" size="4" />
219  </fielddef>
220  </fielddef>
221  </fielddef>
222  <fielddef fname="Constellation" ftype="Constellation" />
223  </msgdef>
224 
225  <!-- Test Signal -->
226  <msgdef msgid="TstSignal">
227  </msgdef>
228 
229  <!-- Test the Universe Command -->
230  <msgdef msgid="CmdUniverse">
231  <pad />
232  <fielddef fname="Truth" ftype="bool" />
233  <fielddef fname="Aura" ftype="char" />
234  <fielddef fname="Gluon" ftype="u8" />
235  <fielddef fname="Electron" ftype="s8" />
236  <pad count="3" />
237  <fielddef fname="Planet" ftype="u16" />
238  <fielddef fname="StellarObj" ftype="s16" />
239  <fielddef fname="StarSystem" ftype="u32" />
240  <fielddef fname="Galaxy" ftype="s32">
241  <min>-99</min>
242  <max>9909</max>
243  </fielddef>
244  <fielddef fname="GalaxyGroup" ftype="u64" />
245  <fielddef fname="Filament" ftype="s64" />
246  <fielddef fname="Ether" ftype="u32" disposition="deprecated" />
247  <fielddef fname="VisUnivLY" ftype="f32" />
248  <fielddef fname="FullUnivLY" ftype="f64" />
249  <fielddef fname="HiddenDim" ftype="p32" />
250  <fielddef fname="ParallelUniv" ftype="p64" />
251  <fielddef fname="TheUnamed" ftype="string" size="42" />
252  <fielddef fname="Math" ftype="struct">
253  <fielddef fname="One" ftype="u16" />
254  <fielddef fname="Two" ftype="u32" />
255  <fielddef fname="DotDotDot" ftype="u64" />
256  </fielddef>
257  <fielddef fname="Physics" ftype="uint[]" size="53" />
258  <fielddef fname="StarType" ftype="SpectralClass" />
259  <fielddef fname="StarInfo" ftype="Star" />
260  </msgdef>
261  </msg_types>
262 </netmsgs>