blob: 0ff9321ae941598209ac7f104b960d53388fe40b [file] [log] [blame]
Sylvain Munaut341542b2009-12-22 21:53:22 +01001/*
2 * rrlp.c
3 *
4 * RRLP implementation
5 *
6 *
7 * Copyright (C) 2009 Sylvain Munaut <tnt@246tNt.com>
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 */
22
23
24#include <errno.h>
25
26#include "gps.h"
27#include "rrlp.h"
28
29#include <PDU.h>
30#include <GPS-AssistData.h>
31#include <NavigationModel.h>
32#include <IonosphericModel.h>
33#include <UTCModel.h>
34#include <Almanac.h>
35#include <RefLocation.h>
36#include <ReferenceTime.h>
37
38
39/* ------------------------------------------------------------------------ */
40/* RRLP Assistance request decoding */
41/* ---------------------------------------------------------------------{{{ */
42/* Decode and validate the assistance data request messages.
43 * See section 10.10 of
44 * . ETSI TS 149 031 V8.1.0 (2009-01)
45 * . 3GPP TS 49.031 version 8.1.0 Release 8
46 */
47
48/* Packed structure from 49.031 spec (RGA = Request GPS Assistance) */
49
50#define RRLP_RGA0_ALMANAC (1<<0)
51#define RRLP_RGA0_UTC_MODEL (1<<1)
52#define RRLP_RGA0_IONO_MODEL (1<<2)
53#define RRLP_RGA0_NAV_MODEL (1<<3)
54#define RRLP_RGA0_DGPS (1<<4)
55#define RRLP_RGA0_REF_LOC (1<<5)
56#define RRLP_RGA0_REF_TIME (1<<6)
57#define RRLP_RGA0_ACQ_ASSIST (1<<7)
58
59#define RRLP_RGA1_REALTIME_INT (1<<0)
60#define RRLP_RGA1_EPH_EXT (1<<1)
61#define RRLP_RGA1_EPH_EXT_CHECK (1<<2)
62
63struct rrlp_rga_hdr {
64 uint8_t items0;
65 uint8_t items1;
66} __attribute__((packed));
67
68struct rrlp_rga_eph_sv {
69 uint8_t sv_id; /* [7:6] reserved, [5:0] sv_id */
70 uint8_t iode; /* latest eph in the MS memory in hours */
71} __attribute__((packed));
72
73struct rrlp_rga_eph {
74 uint8_t wn_hi; /* [7:6] = wn[9:8] */
75 uint8_t wn_lo; /* wn[7:0] */
76 uint8_t toe; /* latest eph in the MS memory in hours */
77 uint8_t nsat_tmtoe; /* [7:4] nstat, [3:0] T-Toe limit */
78 struct rrlp_rga_eph_sv svs[0];
79} __attribute__((packed));
80
81struct rrlp_rga_eph_ext {
82 uint8_t validity; /* in 4 hours units */
83} __attribute__((packed));
84
85struct rrlp_rga_eph_ext_check {
86 /* weeks are in gps week modulo 4 */
87 uint8_t wn_begin_end; /* [7:4] begin, [3:0] end */
88 uint8_t tow_begin;
89 uint8_t tow_end;
90} __attribute__((packed));
91
92
93/* Parsing function */
94
95int
96rrlp_decode_assistance_request(
97 struct rrlp_assist_req *ar,
98 void *req, int req_len)
99{
100 struct rrlp_rga_hdr *hdr = NULL;
101 struct rrlp_rga_eph *eph = NULL;
102 struct rrlp_rga_eph_ext *eph_ext = NULL;
103 struct rrlp_rga_eph_ext_check *eph_ext_check = NULL;
104 int p = 0;
105
106 /* Reset */
107 ar->req_elems = 0;
108 ar->eph_svs = 0;
109
110 /* Parse message */
111 hdr = req;
112 p += sizeof(struct rrlp_rga_hdr);
113 if (p > req_len)
114 return -1;
115
116 if (hdr->items0 & RRLP_RGA0_NAV_MODEL) {
117 eph = req + p;
118 p += sizeof(struct rrlp_rga_eph);
119 if (p > req_len)
120 return -1;
121 p += (eph->nsat_tmtoe >> 4) * sizeof(struct rrlp_rga_eph_sv);
122 if (p > req_len)
123 return -1;
124 }
125
126 if (hdr->items1 & RRLP_RGA1_EPH_EXT) {
127 eph_ext = req + p;
128 p += sizeof(struct rrlp_rga_eph_ext);
129 if (p > req_len)
130 return -1;
131 }
132
133 if (hdr->items1 & RRLP_RGA1_EPH_EXT_CHECK) {
134 eph_ext_check = req + p;
135 p += sizeof(struct rrlp_rga_eph_ext_check);
136 if (p > req_len)
137 return -1;
138 }
139
140 if (p != req_len)
141 return -2; /* not all bytes consumed ??? */
142
143 /* Print a warning for unsupported requests */
144 if ((eph_ext != NULL) ||
145 (eph_ext_check != NULL) ||
146 (hdr->items0 & (RRLP_RGA0_DGPS | RRLP_RGA0_ACQ_ASSIST)) ||
147 (hdr->items1 & RRLP_RGA1_REALTIME_INT)) {
148 fprintf(stderr, "[w] Unsupported assistance data requested, ignored ...\n");
149 }
150
151 /* Copy the request */
152 if (hdr->items0 & RRLP_RGA0_ALMANAC)
153 ar->req_elems |= RRLP_AR_ALMANAC;
154
155 if (hdr->items0 & RRLP_RGA0_UTC_MODEL)
156 ar->req_elems |= RRLP_AR_UTC_MODEL;
157
158 if (hdr->items0 & RRLP_RGA0_IONO_MODEL)
159 ar->req_elems |= RRLP_AR_IONO_MODEL;
160
161 if (hdr->items0 & RRLP_RGA0_REF_LOC)
162 ar->req_elems |= RRLP_AR_REF_LOC;
163
164 if (hdr->items0 & RRLP_RGA0_REF_TIME)
165 ar->req_elems |= RRLP_AR_REF_TIME;
166
167 if (hdr->items0 & RRLP_RGA0_NAV_MODEL) {
168 int i, n_svs = eph->nsat_tmtoe >> 4;
169 ar->req_elems |= RRLP_AR_EPHEMERIS;
170 for (i=0; i<n_svs; i++)
171 ar->eph_svs |= (1ULL << (eph->svs[i].sv_id - 1));
172 }
173
174 return 0;
175}
176
177/* }}} */
178
179
180/* ------------------------------------------------------------------------ */
181/* RRLP elements fill */
182/* ---------------------------------------------------------------------{{{ */
183
184static void
185_rrlp_fill_navigation_model_element(
186 struct NavModelElement *rrlp_nme,
187 struct gps_ephemeris_sv *gps_eph_sv)
188{
189 struct UncompressedEphemeris *rrlp_eph;
190
191 rrlp_nme->satStatus.present = SatStatus_PR_newSatelliteAndModelUC;
192 rrlp_nme->satelliteID = gps_eph_sv->sv_id;
193
194 rrlp_eph = &rrlp_nme->satStatus.choice.newSatelliteAndModelUC;
195
196 rrlp_eph->ephemCodeOnL2 = gps_eph_sv->code_on_l2;
197 rrlp_eph->ephemURA = gps_eph_sv->sv_ura;
198 rrlp_eph->ephemSVhealth = gps_eph_sv->sv_health;
199 rrlp_eph->ephemIODC = gps_eph_sv->iodc;
200 rrlp_eph->ephemL2Pflag = gps_eph_sv->l2_p_flag;
201 rrlp_eph->ephemTgd = gps_eph_sv->t_gd;
202 rrlp_eph->ephemToc = gps_eph_sv->t_oc;
203 rrlp_eph->ephemAF2 = gps_eph_sv->a_f2;
204 rrlp_eph->ephemAF1 = gps_eph_sv->a_f1;
205 rrlp_eph->ephemAF0 = gps_eph_sv->a_f0;
206 rrlp_eph->ephemCrs = gps_eph_sv->c_rs;
207 rrlp_eph->ephemDeltaN = gps_eph_sv->delta_n;
208 rrlp_eph->ephemM0 = gps_eph_sv->m_0;
209 rrlp_eph->ephemCuc = gps_eph_sv->c_uc;
210 rrlp_eph->ephemE = gps_eph_sv->e;
211 rrlp_eph->ephemCus = gps_eph_sv->c_us;
212 rrlp_eph->ephemAPowerHalf = gps_eph_sv->a_powhalf;
213 rrlp_eph->ephemToe = gps_eph_sv->t_oe;
214 rrlp_eph->ephemFitFlag = gps_eph_sv->fit_flag;
215 rrlp_eph->ephemAODA = gps_eph_sv->aodo;
216 rrlp_eph->ephemCic = gps_eph_sv->c_ic;
217 rrlp_eph->ephemOmegaA0 = gps_eph_sv->omega_0;
218 rrlp_eph->ephemCis = gps_eph_sv->c_is;
219 rrlp_eph->ephemI0 = gps_eph_sv->i_0;
220 rrlp_eph->ephemCrc = gps_eph_sv->c_rc;
221 rrlp_eph->ephemW = gps_eph_sv->w;
222 rrlp_eph->ephemOmegaADot = gps_eph_sv->omega_dot;
223 rrlp_eph->ephemIDot = gps_eph_sv->idot;
224
225 rrlp_eph->ephemSF1Rsvd.reserved1 = gps_eph_sv->_rsvd1;
226 rrlp_eph->ephemSF1Rsvd.reserved2 = gps_eph_sv->_rsvd2;
227 rrlp_eph->ephemSF1Rsvd.reserved3 = gps_eph_sv->_rsvd3;
228 rrlp_eph->ephemSF1Rsvd.reserved4 = gps_eph_sv->_rsvd4;
229}
230
231static void
232_rrlp_fill_almanac_element(
233 struct AlmanacElement *rrlp_ae,
234 struct gps_almanac_sv *gps_alm_sv)
235{
236 rrlp_ae->satelliteID = gps_alm_sv->sv_id;
237
238 rrlp_ae->almanacE = gps_alm_sv->e;
239 rrlp_ae->alamanacToa = gps_alm_sv->t_oa;
240 rrlp_ae->almanacKsii = gps_alm_sv->ksii;
241 rrlp_ae->almanacOmegaDot = gps_alm_sv->omega_dot;
242 rrlp_ae->almanacSVhealth = gps_alm_sv->sv_health;
243 rrlp_ae->almanacAPowerHalf = gps_alm_sv->a_powhalf;
244 rrlp_ae->almanacOmega0 = gps_alm_sv->omega_0;
245 rrlp_ae->almanacW = gps_alm_sv->w;
246 rrlp_ae->almanacM0 = gps_alm_sv->m_0;
247 rrlp_ae->almanacAF0 = gps_alm_sv->a_f0;
248 rrlp_ae->almanacAF1 = gps_alm_sv->a_f1;
249
250}
251
252static void
253_rrlp_fill_ionospheric_model(
254 struct IonosphericModel *rrlp_iono,
255 struct gps_ionosphere_model *gps_iono)
256{
257 rrlp_iono->alfa0 = gps_iono->alpha_0;
258 rrlp_iono->alfa1 = gps_iono->alpha_1;
259 rrlp_iono->alfa2 = gps_iono->alpha_2;
260 rrlp_iono->alfa3 = gps_iono->alpha_3;
261 rrlp_iono->beta0 = gps_iono->beta_0;
262 rrlp_iono->beta1 = gps_iono->beta_1;
263 rrlp_iono->beta2 = gps_iono->beta_2;
264 rrlp_iono->beta3 = gps_iono->beta_3;
265}
266
267static void
268_rrlp_fill_utc_model(
269 struct UTCModel *rrlp_utc,
270 struct gps_utc_model *gps_utc)
271{
272 rrlp_utc->utcA1 = gps_utc->a1;
273 rrlp_utc->utcA0 = gps_utc->a0;
274 rrlp_utc->utcTot = gps_utc->t_ot;
275 rrlp_utc->utcWNt = gps_utc->wn_t & 0xff;
276 rrlp_utc->utcDeltaTls = gps_utc->delta_t_ls;
277 rrlp_utc->utcWNlsf = gps_utc->wn_lsf & 0xff;
278 rrlp_utc->utcDN = gps_utc->dn;
279 rrlp_utc->utcDeltaTlsf = gps_utc->delta_t_lsf;
280}
281
282/* }}} */
283
284
285/* ------------------------------------------------------------------------ */
286/* RRLP Assistance PDU Generation */
287/* ---------------------------------------------------------------------{{{ */
288
289struct PDU *
290_rrlp_create_gps_assist_pdu(int refnum, struct GPS_AssistData **o_gps_ad)
291{
292 struct PDU *pdu;
293 struct GPS_AssistData *gps_ad;
294
295 pdu = calloc(1, sizeof(*pdu));
296 if (!pdu)
297 return NULL;
298
299 gps_ad = calloc(1, sizeof(*gps_ad));
300 if (!gps_ad) {
301 free(pdu);
302 return NULL;
303 }
304
305 if (o_gps_ad)
306 *o_gps_ad = gps_ad;
307
308 pdu->referenceNumber = refnum;
309 pdu->component.present = RRLP_Component_PR_assistanceData;
310 pdu->component.choice.assistanceData.gps_AssistData = gps_ad;
311
312 return pdu;
313}
314
315static int
316_rrlp_add_ionospheric_model(
317 struct GPS_AssistData *rrlp_gps_ad,
318 struct gps_assist_data *gps_ad)
319{
320 struct IonosphericModel *rrlp_iono;
321
322 if (!(gps_ad->fields & GPS_FIELD_IONOSPHERE))
323 return -EINVAL;
324
325 rrlp_iono = calloc(1, sizeof(*rrlp_iono));
326 if (!rrlp_iono)
327 return -ENOMEM;
328 rrlp_gps_ad->controlHeader.ionosphericModel = rrlp_iono;
329
330 _rrlp_fill_ionospheric_model(rrlp_iono, &gps_ad->ionosphere);
331
332 return 0;
333}
334
335static int
336_rrlp_add_utc_model(
337 struct GPS_AssistData *rrlp_gps_ad,
338 struct gps_assist_data *gps_ad)
339{
340 struct UTCModel *rrlp_utc;
341
342 if (!(gps_ad->fields & GPS_FIELD_UTC))
343 return -EINVAL;
344
345 rrlp_utc = calloc(1, sizeof(*rrlp_utc));
346 if (!rrlp_utc)
347 return -ENOMEM;
348 rrlp_gps_ad->controlHeader.utcModel = rrlp_utc;
349
350 _rrlp_fill_utc_model(rrlp_utc, &gps_ad->utc);
351
352 return 0;
353}
354
355static int
356_rrlp_add_reference_location(
357 struct GPS_AssistData *rrlp_gps_ad,
358 struct gps_assist_data *gps_ad)
359{
360 struct RefLocation *rrlp_refloc;
361
362 /* FIXME: Check if info is in gps_ad */
363
364 rrlp_refloc = calloc(1, sizeof(*rrlp_refloc));
365 if (!rrlp_refloc)
366 return -ENOMEM;
367 rrlp_gps_ad->controlHeader.refLocation = rrlp_refloc;
368
369 /* FIXME */
370 {
371 uint8_t gps_loc[] = {
372 0x80, /* Ellipsoid Point with altitude */
373 0x48, 0x0f, 0x93, /* 50.667778 N */
374 0x03, 0x47, 0x87, /* 4.611667 E */
375 0x00, 0x72, /* 114m */
376 };
377 uint8_t *b = malloc(sizeof(gps_loc));
378 memcpy(b, gps_loc, sizeof(gps_loc));
379 rrlp_refloc->threeDLocation.buf = b;
380 rrlp_refloc->threeDLocation.size = sizeof(gps_loc);
381 }
382
383 return 0;
384}
385
386static int
387_rrlp_add_reference_time(
388 struct GPS_AssistData *rrlp_gps_ad,
389 struct gps_assist_data *gps_ad)
390{
391 struct ReferenceTime *rrlp_reftime;
392
393 /* FIXME: Check if info is in gps_ad */
394
395 rrlp_reftime = calloc(1, sizeof(*rrlp_reftime));
396 if (!rrlp_reftime)
397 return -ENOMEM;
398 rrlp_gps_ad->controlHeader.referenceTime = rrlp_reftime;
399
400 /* FIXME */
401// rrlp_reftime.gpsTime.gpsTOW23b = g_gps_tow / 80; /* 23 bits */
402// rrlp_reftime.gpsTime.gpsWeek = g_gps_week & 0x3ff; /* 10 bits */
403
404 return 0;
405}
406
407static int
408_rrlp_add_almanac(
409 struct GPS_AssistData *rrlp_gps_ad,
410 struct gps_assist_data *gps_ad, int *start, int count)
411{
412 int i;
413 struct Almanac *rrlp_alm;
414 struct gps_almanac *gps_alm = &gps_ad->almanac;
415
416 if (!(gps_ad->fields & GPS_FIELD_ALMANAC))
417 return -EINVAL;
418
419 rrlp_alm = calloc(1, sizeof(*rrlp_alm));
420 if (!rrlp_alm)
421 return -ENOMEM;
422 rrlp_gps_ad->controlHeader.almanac = rrlp_alm;
423
424 rrlp_alm->alamanacWNa = gps_alm->wna;
425 if (count == -1)
426 count = gps_alm->n_sv - *start;
427 for (i=*start; (i<*start+count) && (i<gps_alm->n_sv); i++) {
428 struct AlmanacElement *ae;
429 ae = calloc(1, sizeof(*ae));
430 if (!ae)
431 return -ENOMEM;
432 _rrlp_fill_almanac_element(ae, &gps_alm->svs[i]);
433 ASN_SEQUENCE_ADD(&rrlp_alm->almanacList.list, ae);
434 }
435
436 *start = i;
437
438 return i < gps_alm->n_sv;
439}
440
441static int
442_rrlp_add_ephemeris(
443 struct GPS_AssistData *rrlp_gps_ad,
444 struct gps_assist_data *gps_ad, int *start, int count, uint64_t mask)
445{
446 int i, j;
447 struct NavigationModel *rrlp_nav;
448 struct gps_ephemeris *gps_eph = &gps_ad->ephemeris;
449
450 if (!(gps_ad->fields & GPS_FIELD_EPHEMERIS))
451 return -EINVAL;
452
453 rrlp_nav = calloc(1, sizeof(*rrlp_nav));
454 if (!rrlp_nav)
455 return -ENOMEM;
456 rrlp_gps_ad->controlHeader.navigationModel = rrlp_nav;
457
458 if (count == -1)
459 count = gps_eph->n_sv - *start;
460 for (i=*start,j=0; (j<count) && (i<gps_eph->n_sv); i++) {
461 if (!(mask & (1ULL<<(gps_eph->svs[i].sv_id-1))))
462 continue;
463 struct NavModelElement *nme;
464 nme = calloc(1, sizeof(*nme));
465 if (!nme)
466 return -ENOMEM;
467 _rrlp_fill_navigation_model_element(nme, &gps_eph->svs[i]);
468 ASN_SEQUENCE_ADD(&rrlp_nav->navModelList.list, nme);
469 j++;
470 }
471
472 *start = i;
473
474 return i < gps_eph->n_sv;
475}
476
477
478#define MAX_PDUS 64
479
480int
481rrlp_gps_assist_pdus(
482 struct gps_assist_data *gps_ad, struct rrlp_assist_req *req,
483 void **o_pdu, int *o_len, int o_max_pdus)
484{
485 struct PDU *lst_pdu[MAX_PDUS];
486 int lst_cnt = 0;
487
488 struct PDU *rrlp_pdu = NULL;
489 struct GPS_AssistData *rrlp_gps_ad = NULL;
490 uint32_t re = req->req_elems;
491 int i, rv = 0;
492
493 /* IonosphericModel, UTCModel, RefLocation, ReferenceTime */
494 if (re & (RRLP_AR_IONO_MODEL |
495 RRLP_AR_UTC_MODEL |
496 RRLP_AR_REF_TIME |
497 RRLP_AR_REF_LOC))
498 {
499 int pdu_has_data = 0;
500
501 rrlp_pdu = _rrlp_create_gps_assist_pdu(1, &rrlp_gps_ad);
502 if (!rrlp_pdu) {
503 rv = -ENOMEM;
504 goto error;
505 }
506
507 if (re & RRLP_AR_IONO_MODEL)
508 if (!_rrlp_add_ionospheric_model(rrlp_gps_ad, gps_ad))
509 pdu_has_data = 1;
510
511 if (re & RRLP_AR_UTC_MODEL)
512 if (!_rrlp_add_utc_model(rrlp_gps_ad, gps_ad))
513 pdu_has_data = 1;
514
515 if (re & RRLP_AR_REF_TIME)
516 if (!_rrlp_add_reference_time(rrlp_gps_ad, gps_ad))
517 pdu_has_data = 1;
518
519 if (re & RRLP_AR_REF_LOC)
520 if (!_rrlp_add_reference_location(rrlp_gps_ad, gps_ad))
521 pdu_has_data = 1;
522
523 if (pdu_has_data) {
524 lst_pdu[lst_cnt++] = rrlp_pdu;
525 rrlp_pdu = NULL;
526 }
527 }
528
529 /* Almanac */
530 if (re & RRLP_AR_ALMANAC) {
531 i = 0;
532 do {
533 if (!(gps_ad->fields & GPS_FIELD_ALMANAC))
534 break;
535
536 if (!rrlp_pdu) {
537 rrlp_pdu = _rrlp_create_gps_assist_pdu(1, &rrlp_gps_ad);
538 if (!rrlp_pdu) {
539 rv = -ENOMEM;
540 goto error;
541 }
542 }
543
544 rv = _rrlp_add_almanac(rrlp_gps_ad, gps_ad, &i, 10);
545 if (rv < 0)
546 goto error;
547
548 lst_pdu[lst_cnt++] = rrlp_pdu;
549 rrlp_pdu = NULL;
550 } while (rv);
551 }
552
553 /* Ephemeris */
554 if (re & RRLP_AR_EPHEMERIS) {
555 i = 0;
556 do {
557 if (!(gps_ad->fields & GPS_FIELD_EPHEMERIS))
558 break;
559
560 if (!rrlp_pdu) {
561 rrlp_pdu = _rrlp_create_gps_assist_pdu(1, &rrlp_gps_ad);
562 if (!rrlp_pdu) {
563 rv = -ENOMEM;
564 goto error;
565 }
566 }
567
568 rv = _rrlp_add_ephemeris(rrlp_gps_ad, gps_ad, &i, 2, req->eph_svs);
569
570 lst_pdu[lst_cnt++] = rrlp_pdu;
571 rrlp_pdu = NULL;
572
573 } while (rv);
574 }
575
576 /* Serialize & Release all PDUs */
577 for (i=0; i<lst_cnt && i<o_max_pdus; i++) {
Sylvain Munautd3164442009-12-28 00:04:56 +0100578 /* Pseudo segmentation flags */
579 MoreAssDataToBeSent_t *mad = calloc(1, sizeof(*mad));
580 *mad = (i == (lst_cnt-1)) ?
581 MoreAssDataToBeSent_noMoreMessages :
582 MoreAssDataToBeSent_moreMessagesOnTheWay;
583 lst_pdu[i]->component.choice.assistanceData.moreAssDataToBeSent = mad;
584
585 /* Serialization */
Sylvain Munaut341542b2009-12-22 21:53:22 +0100586 // asn_fprint(stdout, &asn_DEF_PDU, lst_pdu[i]);
587 rv = uper_encode_to_new_buffer(&asn_DEF_PDU, NULL, lst_pdu[i], &o_pdu[i]);
588 if (rv < 0)
589 goto error;
590 o_len[i] = rv;
591 }
592
Sylvain Munaut90e46f52009-12-28 00:00:45 +0100593 rv = lst_cnt;
Sylvain Munaut341542b2009-12-22 21:53:22 +0100594
595 /* Release ASN.1 objects */
596error:
597 if (rrlp_pdu)
598 asn_DEF_PDU.free_struct(&asn_DEF_PDU, (void*)rrlp_pdu, 0);
599
600 for (i=0; i<lst_cnt; i++)
601 asn_DEF_PDU.free_struct(&asn_DEF_PDU, lst_pdu[i], 0);
602
603 return rv;
604}
605
606/* }}} */
607