Devuan fork of gpsd
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1224 lines
69 KiB

  1. /*
  2. * This is code generated by jsongen.py. Do not hand-hack it!
  3. */
  4. #define NITEMS(x) (int)(sizeof(x)/sizeof(x[0]))
  5. const struct json_attr_t json_ais1[] = {
  6. AIS_HEADER
  7. {"status", t_uinteger, .addr.uinteger = &ais->type1.status,
  8. .dflt.uinteger = 0},
  9. {"status_text", t_ignore},
  10. {"turn", t_integer, .addr.integer = &ais->type1.turn,
  11. .dflt.integer = AIS_TURN_NOT_AVAILABLE},
  12. {"speed", t_uinteger, .addr.uinteger = &ais->type1.speed,
  13. .dflt.uinteger = AIS_SPEED_NOT_AVAILABLE},
  14. {"accuracy", t_boolean, .addr.boolean = &ais->type1.accuracy,
  15. .dflt.boolean = false},
  16. {"lon", t_integer, .addr.integer = &ais->type1.lon,
  17. .dflt.integer = AIS_LON_NOT_AVAILABLE},
  18. {"lat", t_integer, .addr.integer = &ais->type1.lat,
  19. .dflt.integer = AIS_LAT_NOT_AVAILABLE},
  20. {"course", t_uinteger, .addr.uinteger = &ais->type1.course,
  21. .dflt.uinteger = AIS_COURSE_NOT_AVAILABLE},
  22. {"heading", t_uinteger, .addr.uinteger = &ais->type1.heading,
  23. .dflt.uinteger = AIS_HEADING_NOT_AVAILABLE},
  24. {"second", t_uinteger, .addr.uinteger = &ais->type1.second,
  25. .dflt.uinteger = AIS_SEC_NOT_AVAILABLE},
  26. {"maneuver", t_uinteger, .addr.uinteger = &ais->type1.maneuver,
  27. .dflt.uinteger = AIS_SEC_INOPERATIVE},
  28. {"raim", t_boolean, .addr.boolean = &ais->type1.raim,
  29. .dflt.boolean = false},
  30. {"radio", t_uinteger, .addr.uinteger = &ais->type1.radio,
  31. .dflt.uinteger = 0},
  32. {NULL}
  33. };
  34. char timestamp[JSON_VAL_MAX+1];
  35. const struct json_attr_t json_ais4[] = {
  36. AIS_HEADER
  37. {"timestamp", t_string, .addr.string = timestamp,
  38. .len = sizeof(timestamp)},
  39. {"accuracy", t_boolean, .addr.boolean = &ais->type4.accuracy,
  40. .dflt.boolean = true},
  41. {"lon", t_integer, .addr.integer = &ais->type4.lon,
  42. .dflt.integer = AIS_LON_NOT_AVAILABLE},
  43. {"lat", t_integer, .addr.integer = &ais->type4.lat,
  44. .dflt.integer = AIS_LAT_NOT_AVAILABLE},
  45. {"epfd", t_uinteger, .addr.uinteger = &ais->type4.epfd,
  46. .dflt.uinteger = 0},
  47. {"epfd_text", t_ignore},
  48. {"raim", t_boolean, .addr.boolean = &ais->type4.raim,
  49. .dflt.boolean = false},
  50. {"radio", t_uinteger, .addr.uinteger = &ais->type4.radio,
  51. .dflt.uinteger = 0},
  52. {NULL}
  53. };
  54. char eta[JSON_VAL_MAX+1];
  55. const struct json_attr_t json_ais5[] = {
  56. AIS_HEADER
  57. {"imo", t_uinteger, .addr.uinteger = &ais->type5.imo,
  58. .dflt.uinteger = 0},
  59. {"ais_version", t_uinteger, .addr.uinteger = &ais->type5.ais_version,
  60. .dflt.uinteger = 0},
  61. {"callsign", t_string, .addr.string = ais->type5.callsign,
  62. .len = sizeof(ais->type5.callsign)},
  63. {"shipname", t_string, .addr.string = ais->type5.shipname,
  64. .len = sizeof(ais->type5.shipname)},
  65. {"shiptype", t_uinteger, .addr.uinteger = &ais->type5.shiptype,
  66. .dflt.uinteger = 0},
  67. {"shiptype_text", t_ignore},
  68. {"to_bow", t_uinteger, .addr.uinteger = &ais->type5.to_bow,
  69. .dflt.uinteger = 0},
  70. {"to_stern", t_uinteger, .addr.uinteger = &ais->type5.to_stern,
  71. .dflt.uinteger = 0},
  72. {"to_port", t_uinteger, .addr.uinteger = &ais->type5.to_port,
  73. .dflt.uinteger = 0},
  74. {"to_starboard", t_uinteger, .addr.uinteger = &ais->type5.to_starboard,
  75. .dflt.uinteger = 0},
  76. {"epfd", t_uinteger, .addr.uinteger = &ais->type5.epfd,
  77. .dflt.uinteger = 0},
  78. {"epfd_text", t_ignore},
  79. {"eta", t_string, .addr.string = eta,
  80. .len = sizeof(eta)},
  81. {"draught", t_uinteger, .addr.uinteger = &ais->type5.draught,
  82. .dflt.uinteger = 0},
  83. {"destination", t_string, .addr.string = ais->type5.destination,
  84. .len = sizeof(ais->type5.destination)},
  85. {"dte", t_uinteger, .addr.uinteger = &ais->type5.dte,
  86. .dflt.uinteger = 1},
  87. {NULL}
  88. };
  89. char data[JSON_VAL_MAX+1];
  90. const struct json_attr_t json_ais6[] = {
  91. AIS_HEADER
  92. AIS_TYPE6
  93. {"data", t_string, .addr.string = data,
  94. .len = sizeof(data)},
  95. {NULL}
  96. };
  97. const struct json_attr_t json_ais6_fid10[] = {
  98. AIS_HEADER
  99. AIS_TYPE6
  100. {"ana_int", t_uinteger, .addr.uinteger = &ais->type6.dac235fid10.ana_int,
  101. .dflt.uinteger = 0},
  102. {"ana_ext1", t_uinteger, .addr.uinteger = &ais->type6.dac235fid10.ana_ext1,
  103. .dflt.uinteger = 0},
  104. {"ana_ext2", t_uinteger, .addr.uinteger = &ais->type6.dac235fid10.ana_ext2,
  105. .dflt.uinteger = 0},
  106. {"racon", t_uinteger, .addr.uinteger = &ais->type6.dac235fid10.racon,
  107. .dflt.uinteger = 0},
  108. {"racon_text", t_ignore},
  109. {"light", t_uinteger, .addr.uinteger = &ais->type6.dac235fid10.light,
  110. .dflt.uinteger = 0},
  111. {"light_text", t_ignore},
  112. {"alarm", t_boolean, .addr.boolean = &ais->type6.dac235fid10.alarm,
  113. .dflt.boolean = false},
  114. {"stat_ext", t_uinteger, .addr.uinteger = &ais->type6.dac235fid10.stat_ext,
  115. .dflt.uinteger = 0},
  116. {"off_pos", t_boolean, .addr.boolean = &ais->type6.dac235fid10.off_pos,
  117. .dflt.boolean = false},
  118. {NULL}
  119. };
  120. char departure[JSON_VAL_MAX+1];
  121. const struct json_attr_t json_ais6_fid12[] = {
  122. AIS_HEADER
  123. AIS_TYPE6
  124. {"lastport", t_string, .addr.string = ais->type6.dac1fid12.lastport,
  125. .len = sizeof(ais->type6.dac1fid12.lastport)},
  126. {"departure", t_string, .addr.string = departure,
  127. .len = sizeof(departure)},
  128. {"nextport", t_string, .addr.string = ais->type6.dac1fid12.nextport,
  129. .len = sizeof(ais->type6.dac1fid12.nextport)},
  130. {"eta", t_string, .addr.string = eta,
  131. .len = sizeof(eta)},
  132. {"dangerous", t_string, .addr.string = ais->type6.dac1fid12.dangerous,
  133. .len = sizeof(ais->type6.dac1fid12.dangerous)},
  134. {"imdcat", t_string, .addr.string = ais->type6.dac1fid12.imdcat,
  135. .len = sizeof(ais->type6.dac1fid12.imdcat)},
  136. {"unid", t_uinteger, .addr.uinteger = &ais->type6.dac1fid12.unid,
  137. .dflt.uinteger = 0},
  138. {"amount", t_uinteger, .addr.uinteger = &ais->type6.dac1fid12.amount,
  139. .dflt.uinteger = 0},
  140. {"unit", t_uinteger, .addr.uinteger = &ais->type6.dac1fid12.unit,
  141. .dflt.uinteger = 0},
  142. {NULL}
  143. };
  144. const struct json_attr_t json_ais6_fid15[] = {
  145. AIS_HEADER
  146. AIS_TYPE6
  147. {"airdraught", t_uinteger, .addr.uinteger = &ais->type6.dac1fid15.airdraught,
  148. .dflt.uinteger = 0},
  149. {NULL}
  150. };
  151. const struct json_attr_t json_ais6_fid16[] = {
  152. AIS_HEADER
  153. AIS_TYPE6
  154. {"persons", t_uinteger, .addr.uinteger = &ais->type6.dac1fid16.persons,
  155. .dflt.uinteger = 0},
  156. {NULL}
  157. };
  158. char arrival[JSON_VAL_MAX+1];
  159. const struct json_attr_t json_ais6_fid18[] = {
  160. AIS_HEADER
  161. AIS_TYPE6
  162. {"linkage", t_uinteger, .addr.uinteger = &ais->type6.dac1fid18.linkage,
  163. .dflt.uinteger = 0},
  164. {"arrival", t_string, .addr.string = arrival,
  165. .len = sizeof(arrival)},
  166. {"portname", t_string, .addr.string = ais->type6.dac1fid18.portname,
  167. .len = sizeof(ais->type6.dac1fid18.portname)},
  168. {"destination", t_string, .addr.string = ais->type6.dac1fid18.destination,
  169. .len = sizeof(ais->type6.dac1fid18.destination)},
  170. {"lon", t_integer, .addr.integer = &ais->type6.dac1fid18.lon,
  171. .dflt.integer = AIS_LON3_NOT_AVAILABLE},
  172. {"lat", t_integer, .addr.integer = &ais->type6.dac1fid18.lat,
  173. .dflt.integer = AIS_LAT3_NOT_AVAILABLE},
  174. {NULL}
  175. };
  176. char berth_name[JSON_VAL_MAX+1];
  177. const struct json_attr_t json_ais6_fid20[] = {
  178. AIS_HEADER
  179. AIS_TYPE6
  180. {"linkage", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.linkage,
  181. .dflt.uinteger = 0},
  182. {"berth_length", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.berth_length,
  183. .dflt.uinteger = 0},
  184. {"berth_depth", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.berth_depth,
  185. .dflt.uinteger = 0},
  186. {"position", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.position,
  187. .dflt.uinteger = 0},
  188. {"position_text", t_ignore},
  189. {"arrival", t_string, .addr.string = arrival,
  190. .len = sizeof(arrival)},
  191. {"availability", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.availability,
  192. .dflt.uinteger = 0},
  193. {"agent", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.agent,
  194. .dflt.uinteger = 0},
  195. {"fuel", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.fuel,
  196. .dflt.uinteger = 0},
  197. {"chandler", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.chandler,
  198. .dflt.uinteger = 0},
  199. {"stevedore", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.stevedore,
  200. .dflt.uinteger = 0},
  201. {"electrical", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.electrical,
  202. .dflt.uinteger = 0},
  203. {"water", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.water,
  204. .dflt.uinteger = 0},
  205. {"customs", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.customs,
  206. .dflt.uinteger = 0},
  207. {"cartage", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.cartage,
  208. .dflt.uinteger = 0},
  209. {"crane", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.crane,
  210. .dflt.uinteger = 0},
  211. {"lift", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.lift,
  212. .dflt.uinteger = 0},
  213. {"medical", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.medical,
  214. .dflt.uinteger = 0},
  215. {"navrepair", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.navrepair,
  216. .dflt.uinteger = 0},
  217. {"provisions", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.provisions,
  218. .dflt.uinteger = 0},
  219. {"shiprepair", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.shiprepair,
  220. .dflt.uinteger = 0},
  221. {"surveyor", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.surveyor,
  222. .dflt.uinteger = 0},
  223. {"steam", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.steam,
  224. .dflt.uinteger = 0},
  225. {"tugs", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.tugs,
  226. .dflt.uinteger = 0},
  227. {"solidwaste", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.solidwaste,
  228. .dflt.uinteger = 0},
  229. {"liquidwaste", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.liquidwaste,
  230. .dflt.uinteger = 0},
  231. {"hazardouswaste",t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.hazardouswaste,
  232. .dflt.uinteger = 0},
  233. {"ballast", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.ballast,
  234. .dflt.uinteger = 0},
  235. {"additional", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.additional,
  236. .dflt.uinteger = 0},
  237. {"regional1", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.regional1,
  238. .dflt.uinteger = 0},
  239. {"regional2", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.regional2,
  240. .dflt.uinteger = 0},
  241. {"future1", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.future1,
  242. .dflt.uinteger = 0},
  243. {"future2", t_uinteger, .addr.uinteger = &ais->type6.dac1fid20.future2,
  244. .dflt.uinteger = 0},
  245. {"berth_name", t_string, .addr.string = berth_name,
  246. .len = sizeof(berth_name)},
  247. {"berth_lon", t_integer, .addr.integer = &ais->type6.dac1fid20.berth_lon,
  248. .dflt.integer = AIS_LON3_NOT_AVAILABLE},
  249. {"berth_lat", t_integer, .addr.integer = &ais->type6.dac1fid20.berth_lat,
  250. .dflt.integer = AIS_LAT3_NOT_AVAILABLE},
  251. {NULL}
  252. };
  253. const struct json_attr_t json_ais6_fid21[] = {
  254. AIS_HEADER
  255. AIS_TYPE6
  256. {"country", t_string, .addr.string = ais->type6.dac200fid21.country,
  257. .len = sizeof(ais->type6.dac200fid21.country)},
  258. {"locode", t_string, .addr.string = ais->type6.dac200fid21.locode,
  259. .len = sizeof(ais->type6.dac200fid21.locode)},
  260. {"section", t_string, .addr.string = ais->type6.dac200fid21.section,
  261. .len = sizeof(ais->type6.dac200fid21.section)},
  262. {"terminal", t_string, .addr.string = ais->type6.dac200fid21.terminal,
  263. .len = sizeof(ais->type6.dac200fid21.terminal)},
  264. {"hectometre", t_string, .addr.string = ais->type6.dac200fid21.hectometre,
  265. .len = sizeof(ais->type6.dac200fid21.hectometre)},
  266. {"eta", t_string, .addr.string = eta,
  267. .len = sizeof(eta)},
  268. {"tugs", t_uinteger, .addr.uinteger = &ais->type6.dac200fid21.tugs,
  269. .dflt.uinteger = 0},
  270. {"airdraught", t_uinteger, .addr.uinteger = &ais->type6.dac200fid21.airdraught,
  271. .dflt.uinteger = 0},
  272. {NULL}
  273. };
  274. char rta[JSON_VAL_MAX+1];
  275. const struct json_attr_t json_ais6_fid22[] = {
  276. AIS_HEADER
  277. AIS_TYPE6
  278. {"country", t_string, .addr.string = ais->type6.dac200fid22.country,
  279. .len = sizeof(ais->type6.dac200fid22.country)},
  280. {"locode", t_string, .addr.string = ais->type6.dac200fid22.locode,
  281. .len = sizeof(ais->type6.dac200fid22.locode)},
  282. {"section", t_string, .addr.string = ais->type6.dac200fid22.section,
  283. .len = sizeof(ais->type6.dac200fid22.section)},
  284. {"terminal", t_string, .addr.string = ais->type6.dac200fid22.terminal,
  285. .len = sizeof(ais->type6.dac200fid22.terminal)},
  286. {"hectometre", t_string, .addr.string = ais->type6.dac200fid22.hectometre,
  287. .len = sizeof(ais->type6.dac200fid22.hectometre)},
  288. {"rta", t_string, .addr.string = rta,
  289. .len = sizeof(rta)},
  290. {"status", t_uinteger, .addr.uinteger = &ais->type6.dac200fid22.status,
  291. .dflt.uinteger = DAC200FID22_STATUS_NOT_AVAILABLE},
  292. {NULL}
  293. };
  294. const struct json_attr_t json_ais6_fid25_cargos_subtype[] = {
  295. {"code", t_uinteger,STRUCTOBJECT(struct cargo_t, code),
  296. .dflt.uinteger = 0},
  297. {"subtype", t_uinteger,STRUCTOBJECT(struct cargo_t, subtype),
  298. .dflt.uinteger = 0},
  299. {NULL}
  300. };
  301. const struct json_attr_t json_ais6_fid25[] = {
  302. AIS_HEADER
  303. AIS_TYPE6
  304. {"unit", t_uinteger, .addr.uinteger = &ais->type6.dac1fid25.unit,
  305. .dflt.uinteger = 0},
  306. {"amount", t_uinteger, .addr.uinteger = &ais->type6.dac1fid25.amount,
  307. .dflt.uinteger = 0},
  308. {"cargos", t_array, STRUCTARRAY(ais->type6.dac1fid25.cargos, json_ais6_fid25_cargos_subtype, &ais->type6.dac1fid25.ncargos)},
  309. {NULL}
  310. };
  311. char start[JSON_VAL_MAX+1];
  312. const struct json_attr_t json_ais6_fid28_waypoints_subtype[] = {
  313. {"lon", t_integer, STRUCTOBJECT(struct waypoint_t, lon),
  314. .dflt.integer = AIS_LON4_NOT_AVAILABLE},
  315. {"lat", t_integer, STRUCTOBJECT(struct waypoint_t, lat),
  316. .dflt.integer = AIS_LAT4_NOT_AVAILABLE},
  317. {NULL}
  318. };
  319. const struct json_attr_t json_ais6_fid28[] = {
  320. AIS_HEADER
  321. AIS_TYPE6
  322. {"linkage", t_uinteger, .addr.uinteger = &ais->type6.dac1fid28.linkage,
  323. .dflt.uinteger = 0},
  324. {"sender", t_uinteger, .addr.uinteger = &ais->type6.dac1fid28.sender,
  325. .dflt.uinteger = 0},
  326. {"rtype", t_uinteger, .addr.uinteger = &ais->type6.dac1fid28.rtype,
  327. .dflt.uinteger = 0},
  328. {"rtype_text", t_ignore},
  329. {"start", t_string, .addr.string = start,
  330. .len = sizeof(start)},
  331. {"duration", t_uinteger, .addr.uinteger = &ais->type6.dac1fid28.duration,
  332. .dflt.uinteger = 0},
  333. {"waypoints", t_array, STRUCTARRAY(ais->type6.dac1fid28.waypoints, json_ais6_fid28_waypoints_subtype, &ais->type6.dac1fid28.waycount)},
  334. {NULL}
  335. };
  336. const struct json_attr_t json_ais6_fid30[] = {
  337. AIS_HEADER
  338. AIS_TYPE6
  339. {"linkage", t_uinteger, .addr.uinteger = &ais->type6.dac1fid30.linkage,
  340. .dflt.uinteger = 0},
  341. {"text", t_string, .addr.string = ais->type6.dac1fid30.text,
  342. .len = sizeof(ais->type6.dac1fid30.text)},
  343. {NULL}
  344. };
  345. const struct json_attr_t json_ais6_fid32_tidals_subtype[] = {
  346. {"lon", t_integer, STRUCTOBJECT(struct tidal_t, lon),
  347. .dflt.integer = AIS_LON3_NOT_AVAILABLE},
  348. {"lat", t_integer, STRUCTOBJECT(struct tidal_t, lat),
  349. .dflt.integer = AIS_LAT3_NOT_AVAILABLE},
  350. {"from_hour", t_uinteger,STRUCTOBJECT(struct tidal_t, from_hour),
  351. .dflt.uinteger = AIS_MONTH_NOT_AVAILABLE},
  352. {"from_min", t_uinteger,STRUCTOBJECT(struct tidal_t, from_min),
  353. .dflt.uinteger = AIS_MINUTE_NOT_AVAILABLE},
  354. {"to_hour", t_uinteger,STRUCTOBJECT(struct tidal_t, to_hour),
  355. .dflt.uinteger = AIS_HOUR_NOT_AVAILABLE},
  356. {"to_min", t_uinteger,STRUCTOBJECT(struct tidal_t, to_min),
  357. .dflt.uinteger = AIS_MINUTE_NOT_AVAILABLE},
  358. {"cdir", t_uinteger,STRUCTOBJECT(struct tidal_t, cdir),
  359. .dflt.uinteger = DAC1FID32_CDIR_NOT_AVAILABLE},
  360. {"cspeed", t_uinteger,STRUCTOBJECT(struct tidal_t, cspeed),
  361. .dflt.uinteger = DAC1FID32_CSPEED_NOT_AVAILABLE},
  362. {NULL}
  363. };
  364. const struct json_attr_t json_ais6_fid32[] = {
  365. AIS_HEADER
  366. AIS_TYPE6
  367. {"month", t_uinteger, .addr.uinteger = &ais->type6.dac1fid32.month,
  368. .dflt.uinteger = AIS_MONTH_NOT_AVAILABLE},
  369. {"day", t_uinteger, .addr.uinteger = &ais->type6.dac1fid32.day,
  370. .dflt.uinteger = AIS_DAY_NOT_AVAILABLE},
  371. {"tidals", t_array, STRUCTARRAY(ais->type6.dac1fid32.tidals, json_ais6_fid32_tidals_subtype, &ais->type6.dac1fid32.ntidals)},
  372. {NULL}
  373. };
  374. const struct json_attr_t json_ais6_fid55[] = {
  375. AIS_HEADER
  376. AIS_TYPE6
  377. {"crew", t_uinteger, .addr.uinteger = &ais->type6.dac200fid55.crew,
  378. .dflt.uinteger = DAC200FID55_COUNT_NOT_AVAILABLE},
  379. {"passengers", t_uinteger, .addr.uinteger = &ais->type6.dac200fid55.passengers,
  380. .dflt.uinteger = DAC200FID55_COUNT_NOT_AVAILABLE},
  381. {"personnel", t_uinteger, .addr.uinteger = &ais->type6.dac200fid55.personnel,
  382. .dflt.uinteger = DAC200FID55_COUNT_NOT_AVAILABLE},
  383. {NULL}
  384. };
  385. const struct json_attr_t json_ais7[] = {
  386. AIS_HEADER
  387. {"mmsi1", t_uinteger, .addr.uinteger = &ais->type7.mmsi1,
  388. .dflt.uinteger = 0},
  389. {"mmsi2", t_uinteger, .addr.uinteger = &ais->type7.mmsi2,
  390. .dflt.uinteger = 0},
  391. {"mmsi3", t_uinteger, .addr.uinteger = &ais->type7.mmsi3,
  392. .dflt.uinteger = 0},
  393. {"mmsi4", t_uinteger, .addr.uinteger = &ais->type7.mmsi4,
  394. .dflt.uinteger = 0},
  395. {"seqno1", t_uinteger, .addr.uinteger = &ais->type7.seqno1,
  396. .dflt.uinteger = 0},
  397. {"seqno2", t_uinteger, .addr.uinteger = &ais->type7.seqno2,
  398. .dflt.uinteger = 0},
  399. {"seqno3", t_uinteger, .addr.uinteger = &ais->type7.seqno3,
  400. .dflt.uinteger = 0},
  401. {"seqno4", t_uinteger, .addr.uinteger = &ais->type7.seqno4,
  402. .dflt.uinteger = 0},
  403. {NULL}
  404. };
  405. const struct json_attr_t json_ais8[] = {
  406. AIS_HEADER
  407. AIS_TYPE8
  408. {"data", t_string, .addr.string = data,
  409. .len = sizeof(data)},
  410. {NULL}
  411. };
  412. const struct json_attr_t json_ais8_fid10[] = {
  413. AIS_HEADER
  414. AIS_TYPE8
  415. {"vin", t_string, .addr.string = ais->type8.dac200fid10.vin,
  416. .len = sizeof(ais->type8.dac200fid10.vin)},
  417. {"length", t_uinteger, .addr.uinteger = &ais->type8.dac200fid10.length,
  418. .dflt.uinteger = 0},
  419. {"beam", t_uinteger, .addr.uinteger = &ais->type8.dac200fid10.beam,
  420. .dflt.uinteger = 0},
  421. {"shiptype", t_uinteger, .addr.uinteger = &ais->type8.dac200fid10.shiptype,
  422. .dflt.uinteger = 0},
  423. {"shiptype_text", t_ignore},
  424. {"hazard", t_uinteger, .addr.uinteger = &ais->type8.dac200fid10.hazard,
  425. .dflt.uinteger = 0},
  426. {"hazard_text", t_ignore},
  427. {"draught", t_uinteger, .addr.uinteger = &ais->type8.dac200fid10.draught,
  428. .dflt.uinteger = 0},
  429. {"loaded", t_uinteger, .addr.uinteger = &ais->type8.dac200fid10.loaded,
  430. .dflt.uinteger = 0},
  431. {"loaded_text", t_ignore},
  432. {"speed_q", t_boolean, .addr.boolean = &ais->type8.dac200fid10.speed_q,
  433. .dflt.boolean = false},
  434. {"course_q", t_boolean, .addr.boolean = &ais->type8.dac200fid10.course_q,
  435. .dflt.boolean = false},
  436. {"heading_q", t_boolean, .addr.boolean = &ais->type8.dac200fid10.heading_q,
  437. .dflt.boolean = false},
  438. {NULL}
  439. };
  440. const struct json_attr_t json_ais8_fid11[] = {
  441. AIS_HEADER
  442. AIS_TYPE8
  443. {"lat", t_integer, .addr.integer = &ais->type8.dac1fid11.lat,
  444. .dflt.integer = DAC1FID11_LAT_NOT_AVAILABLE},
  445. {"lon", t_integer, .addr.integer = &ais->type8.dac1fid11.lon,
  446. .dflt.integer = DAC1FID11_LON_NOT_AVAILABLE},
  447. {"timestamp", t_string, .addr.string = timestamp,
  448. .len = sizeof(timestamp)},
  449. {"wspeed", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.wspeed,
  450. .dflt.uinteger = DAC1FID11_WSPEED_NOT_AVAILABLE},
  451. {"wgust", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.wgust,
  452. .dflt.uinteger = DAC1FID11_WSPEED_NOT_AVAILABLE},
  453. {"wdir", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.wdir,
  454. .dflt.uinteger = DAC1FID11_WDIR_NOT_AVAILABLE},
  455. {"wgustdir", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.wgustdir,
  456. .dflt.uinteger = DAC1FID11_WDIR_NOT_AVAILABLE},
  457. {"airtemp", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.airtemp,
  458. .dflt.uinteger = DAC1FID11_AIRTEMP_NOT_AVAILABLE},
  459. {"humidity", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.humidity,
  460. .dflt.uinteger = DAC1FID11_HUMIDITY_NOT_AVAILABLE},
  461. {"dewpoint", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.dewpoint,
  462. .dflt.uinteger = DAC1FID11_DEWPOINT_NOT_AVAILABLE},
  463. {"pressure", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.pressure,
  464. .dflt.uinteger = DAC1FID11_PRESSURE_NOT_AVAILABLE},
  465. {"pressuretend", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.pressuretend,
  466. .dflt.uinteger = DAC1FID11_PRESSURETREND_NOT_AVAILABLE},
  467. {"visibility", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.visibility,
  468. .dflt.uinteger = DAC1FID11_VISIBILITY_NOT_AVAILABLE},
  469. {"waterlevel", t_integer, .addr.integer = &ais->type8.dac1fid11.waterlevel,
  470. .dflt.integer = DAC1FID11_WATERLEVEL_NOT_AVAILABLE},
  471. {"leveltrend", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.leveltrend,
  472. .dflt.uinteger = DAC1FID11_WATERLEVELTREND_NOT_AVAILABLE},
  473. {"cspeed", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.cspeed,
  474. .dflt.uinteger = DAC1FID11_CSPEED_NOT_AVAILABLE},
  475. {"cdir", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.cdir,
  476. .dflt.uinteger = DAC1FID11_CDIR_NOT_AVAILABLE},
  477. {"cspeed2", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.cspeed2,
  478. .dflt.uinteger = DAC1FID11_CSPEED_NOT_AVAILABLE},
  479. {"cdir2", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.cdir2,
  480. .dflt.uinteger = DAC1FID11_CDIR_NOT_AVAILABLE},
  481. {"cdepth2", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.cdepth2,
  482. .dflt.uinteger = DAC1FID11_CDEPTH_NOT_AVAILABLE},
  483. {"cspeed3", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.cspeed3,
  484. .dflt.uinteger = DAC1FID11_CSPEED_NOT_AVAILABLE},
  485. {"cdir3", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.cdir3,
  486. .dflt.uinteger = DAC1FID11_CDIR_NOT_AVAILABLE},
  487. {"cdepth3", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.cdepth3,
  488. .dflt.uinteger = DAC1FID11_CDEPTH_NOT_AVAILABLE},
  489. {"waveheight", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.waveheight,
  490. .dflt.uinteger = DAC1FID11_WAVEHEIGHT_NOT_AVAILABLE},
  491. {"waveperiod", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.waveperiod,
  492. .dflt.uinteger = DAC1FID11_WAVEPERIOD_NOT_AVAILABLE},
  493. {"wavedir", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.wavedir,
  494. .dflt.uinteger = DAC1FID11_WAVEDIR_NOT_AVAILABLE},
  495. {"swellheight", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.swellheight,
  496. .dflt.uinteger = DAC1FID11_WAVEHEIGHT_NOT_AVAILABLE},
  497. {"swellperiod", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.swellperiod,
  498. .dflt.uinteger = DAC1FID11_WAVEPERIOD_NOT_AVAILABLE},
  499. {"swelldir", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.swelldir,
  500. .dflt.uinteger = DAC1FID11_WAVEDIR_NOT_AVAILABLE},
  501. {"seastate", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.seastate,
  502. .dflt.uinteger = DAC1FID11_SEASTATE_NOT_AVAILABLE},
  503. {"watertemp", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.watertemp,
  504. .dflt.uinteger = DAC1FID11_WATERTEMP_NOT_AVAILABLE},
  505. {"preciptype", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.preciptype,
  506. .dflt.uinteger = DAC1FID11_PRECIPTYPE_NOT_AVAILABLE},
  507. {"preciptype_text", t_ignore},
  508. {"salinity", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.salinity,
  509. .dflt.uinteger = DAC1FID11_SALINITY_NOT_AVAILABLE},
  510. {"ice", t_uinteger, .addr.uinteger = &ais->type8.dac1fid11.ice,
  511. .dflt.uinteger = DAC1FID11_ICE_NOT_AVAILABLE},
  512. {"ice_text", t_ignore},
  513. {NULL}
  514. };
  515. char closefrom[JSON_VAL_MAX+1];
  516. char closeto[JSON_VAL_MAX+1];
  517. const struct json_attr_t json_ais8_fid13[] = {
  518. AIS_HEADER
  519. AIS_TYPE8
  520. {"reason", t_string, .addr.string = ais->type8.dac1fid13.reason,
  521. .len = sizeof(ais->type8.dac1fid13.reason)},
  522. {"closefrom", t_string, .addr.string = closefrom,
  523. .len = sizeof(closefrom)},
  524. {"closeto", t_string, .addr.string = closeto,
  525. .len = sizeof(closeto)},
  526. {"radius", t_uinteger, .addr.uinteger = &ais->type8.dac1fid13.radius,
  527. .dflt.uinteger = AIS_DAC1FID13_RADIUS_NOT_AVAILABLE},
  528. {"extunit", t_uinteger, .addr.uinteger = &ais->type8.dac1fid13.extunit,
  529. .dflt.uinteger = AIS_DAC1FID13_EXTUNIT_NOT_AVAILABLE},
  530. {"fday", t_uinteger, .addr.uinteger = &ais->type8.dac1fid13.fday,
  531. .dflt.uinteger = AIS_DAY_NOT_AVAILABLE},
  532. {"fmonth", t_uinteger, .addr.uinteger = &ais->type8.dac1fid13.fmonth,
  533. .dflt.uinteger = AIS_MONTH_NOT_AVAILABLE},
  534. {"fhour", t_uinteger, .addr.uinteger = &ais->type8.dac1fid13.fhour,
  535. .dflt.uinteger = AIS_HOUR_NOT_AVAILABLE},
  536. {"fminute", t_uinteger, .addr.uinteger = &ais->type8.dac1fid13.fminute,
  537. .dflt.uinteger = AIS_MINUTE_NOT_AVAILABLE},
  538. {"tday", t_uinteger, .addr.uinteger = &ais->type8.dac1fid13.tday,
  539. .dflt.uinteger = AIS_DAY_NOT_AVAILABLE},
  540. {"tmonth", t_uinteger, .addr.uinteger = &ais->type8.dac1fid13.tmonth,
  541. .dflt.uinteger = AIS_MONTH_NOT_AVAILABLE},
  542. {"thour", t_uinteger, .addr.uinteger = &ais->type8.dac1fid13.thour,
  543. .dflt.uinteger = AIS_HOUR_NOT_AVAILABLE},
  544. {"tminute", t_uinteger, .addr.uinteger = &ais->type8.dac1fid13.tminute,
  545. .dflt.uinteger = AIS_MINUTE_NOT_AVAILABLE},
  546. {NULL}
  547. };
  548. const struct json_attr_t json_ais8_fid15[] = {
  549. AIS_HEADER
  550. AIS_TYPE8
  551. {"airdraught", t_uinteger, .addr.uinteger = &ais->type8.dac1fid15.airdraught,
  552. .dflt.uinteger = 0},
  553. {NULL}
  554. };
  555. const struct json_attr_t json_ais8_fid16[] = {
  556. AIS_HEADER
  557. AIS_TYPE8
  558. {"persons", t_uinteger, .addr.uinteger = &ais->type8.dac1fid16.persons,
  559. .dflt.uinteger = 0},
  560. {NULL}
  561. };
  562. const struct json_attr_t json_ais8_fid17_targets_subtype[] = {
  563. {"idtype", t_uinteger,STRUCTOBJECT(struct target_t, idtype),
  564. .dflt.uinteger = DAC1FID17_IDTYPE_OTHER},
  565. {"id.mmsi", t_uinteger,STRUCTOBJECT(struct target_t, id.mmsi),
  566. .dflt.uinteger = 0},
  567. {"id.imo", t_uinteger,STRUCTOBJECT(struct target_t, id.imo),
  568. .dflt.uinteger = 0},
  569. {"id.callsign", t_string, STRUCTOBJECT(struct target_t, id.callsign),
  570. .len = DAC1FID17_ID_LENGTH},
  571. {"id.other", t_string, STRUCTOBJECT(struct target_t, id.other),
  572. .len = DAC1FID17_ID_LENGTH},
  573. {"lat", t_integer, STRUCTOBJECT(struct target_t, lat),
  574. .dflt.integer = AIS_LAT3_NOT_AVAILABLE},
  575. {"lon", t_integer, STRUCTOBJECT(struct target_t, lon),
  576. .dflt.integer = AIS_LON3_NOT_AVAILABLE},
  577. {"course", t_uinteger,STRUCTOBJECT(struct target_t, course),
  578. .dflt.uinteger = DAC1FID17_COURSE_NOT_AVAILABLE},
  579. {"second", t_uinteger,STRUCTOBJECT(struct target_t, second),
  580. .dflt.uinteger = AIS_SECOND_NOT_AVAILABLE},
  581. {"speed", t_uinteger,STRUCTOBJECT(struct target_t, speed),
  582. .dflt.uinteger = DAC1FID17_SPEED_NOT_AVAILABLE},
  583. {NULL}
  584. };
  585. const struct json_attr_t json_ais8_fid17[] = {
  586. AIS_HEADER
  587. AIS_TYPE8
  588. {"targets", t_array, STRUCTARRAY(ais->type8.dac1fid17.targets, json_ais8_fid17_targets_subtype, &ais->type8.dac1fid17.ntargets)},
  589. {NULL}
  590. };
  591. const struct json_attr_t json_ais8_fid19[] = {
  592. AIS_HEADER
  593. AIS_TYPE8
  594. {"linkage", t_uinteger, .addr.uinteger = &ais->type8.dac1fid19.linkage,
  595. .dflt.uinteger = 0},
  596. {"station", t_string, .addr.string = ais->type8.dac1fid19.station,
  597. .len = sizeof(ais->type8.dac1fid19.station)},
  598. {"lon", t_integer, .addr.integer = &ais->type8.dac1fid19.lon,
  599. .dflt.integer = AIS_LON3_NOT_AVAILABLE},
  600. {"lat", t_integer, .addr.integer = &ais->type8.dac1fid19.lat,
  601. .dflt.integer = AIS_LAT3_NOT_AVAILABLE},
  602. {"status", t_uinteger, .addr.uinteger = &ais->type8.dac1fid19.status,
  603. .dflt.uinteger = 0},
  604. {"signal", t_uinteger, .addr.uinteger = &ais->type8.dac1fid19.signal,
  605. .dflt.uinteger = 0},
  606. {"signal_text", t_ignore},
  607. {"hour", t_uinteger, .addr.uinteger = &ais->type8.dac1fid19.hour,
  608. .dflt.uinteger = AIS_HOUR_NOT_AVAILABLE},
  609. {"minute", t_uinteger, .addr.uinteger = &ais->type8.dac1fid19.minute,
  610. .dflt.uinteger = AIS_MINUTE_NOT_AVAILABLE},
  611. {"nextsignal", t_uinteger, .addr.uinteger = &ais->type8.dac1fid19.nextsignal,
  612. .dflt.uinteger = 0},
  613. {"nextsignal_type", t_ignore},
  614. {NULL}
  615. };
  616. char end[JSON_VAL_MAX+1];
  617. const struct json_attr_t json_ais8_fid23[] = {
  618. AIS_HEADER
  619. AIS_TYPE8
  620. {"start", t_string, .addr.string = start,
  621. .len = sizeof(start)},
  622. {"end", t_string, .addr.string = end,
  623. .len = sizeof(end)},
  624. {"start_lon", t_integer, .addr.integer = &ais->type8.dac200fid23.start_lon,
  625. .dflt.integer = AIS_LON4_NOT_AVAILABLE},
  626. {"start_lat", t_integer, .addr.integer = &ais->type8.dac200fid23.start_lat,
  627. .dflt.integer = AIS_LAT4_NOT_AVAILABLE},
  628. {"end_lon", t_integer, .addr.integer = &ais->type8.dac200fid23.end_lon,
  629. .dflt.integer = AIS_LON4_NOT_AVAILABLE},
  630. {"end_lat", t_integer, .addr.integer = &ais->type8.dac200fid23.end_lat,
  631. .dflt.integer = AIS_LAT4_NOT_AVAILABLE},
  632. {"type", t_uinteger, .addr.uinteger = &ais->type8.dac200fid23.type,
  633. .dflt.uinteger = DAC200FID23_TYPE_UNKNOWN},
  634. {"type_text", t_ignore},
  635. {"min", t_integer, .addr.integer = &ais->type8.dac200fid23.min,
  636. .dflt.integer = DAC200FID23_MIN_UNKNOWN},
  637. {"max", t_integer, .addr.integer = &ais->type8.dac200fid23.max,
  638. .dflt.integer = DAC200FID23_MAX_UNKNOWN},
  639. {"intensity", t_uinteger, .addr.uinteger = &ais->type8.dac200fid23.intensity,
  640. .dflt.uinteger = DAC200FID23_CLASS_UNKNOWN},
  641. {"intensity_text", t_ignore},
  642. {"wind", t_uinteger, .addr.uinteger = &ais->type8.dac200fid23.wind,
  643. .dflt.uinteger = DAC200FID23_WIND_UNKNOWN},
  644. {"wind_text", t_ignore},
  645. {NULL}
  646. };
  647. const struct json_attr_t json_ais8_fid24_gauges_subtype[] = {
  648. {"id", t_uinteger,STRUCTOBJECT(struct gauge_t, id),
  649. .dflt.uinteger = DAC200FID24_GAUGE_ID_UNKNOWN},
  650. {"level", t_integer, STRUCTOBJECT(struct gauge_t, level),
  651. .dflt.integer = DAC200FID24_GAUGE_LEVEL_UNKNOWN},
  652. {NULL}
  653. };
  654. const struct json_attr_t json_ais8_fid24[] = {
  655. AIS_HEADER
  656. AIS_TYPE8
  657. {"country", t_string, .addr.string = ais->type8.dac200fid24.country,
  658. .len = sizeof(ais->type8.dac200fid24.country)},
  659. {"gauges", t_array, STRUCTARRAY(ais->type8.dac200fid24.gauges, json_ais8_fid24_gauges_subtype, &ais->type8.dac200fid24.ngauges)},
  660. {NULL}
  661. };
  662. const struct json_attr_t json_ais8_fid27_waypoints_subtype[] = {
  663. {"lon", t_integer, STRUCTOBJECT(struct waypoint_t, lon),
  664. .dflt.integer = AIS_LON4_NOT_AVAILABLE},
  665. {"lat", t_integer, STRUCTOBJECT(struct waypoint_t, lat),
  666. .dflt.integer = AIS_LAT4_NOT_AVAILABLE},
  667. {NULL}
  668. };
  669. const struct json_attr_t json_ais8_fid27[] = {
  670. AIS_HEADER
  671. AIS_TYPE8
  672. {"linkage", t_uinteger, .addr.uinteger = &ais->type8.dac1fid27.linkage,
  673. .dflt.uinteger = 0},
  674. {"sender", t_uinteger, .addr.uinteger = &ais->type8.dac1fid27.sender,
  675. .dflt.uinteger = 0},
  676. {"rtype", t_uinteger, .addr.uinteger = &ais->type8.dac1fid27.rtype,
  677. .dflt.uinteger = 0},
  678. {"rtype_text", t_ignore},
  679. {"start", t_string, .addr.string = start,
  680. .len = sizeof(start)},
  681. {"duration", t_uinteger, .addr.uinteger = &ais->type8.dac1fid27.duration,
  682. .dflt.uinteger = 0},
  683. {"waypoints", t_array, STRUCTARRAY(ais->type8.dac1fid27.waypoints, json_ais8_fid27_waypoints_subtype, &ais->type8.dac1fid27.waycount)},
  684. {NULL}
  685. };
  686. const struct json_attr_t json_ais8_fid29[] = {
  687. AIS_HEADER
  688. AIS_TYPE8
  689. {"linkage", t_uinteger, .addr.uinteger = &ais->type8.dac1fid29.linkage,
  690. .dflt.uinteger = 0},
  691. {"text", t_string, .addr.string = ais->type8.dac1fid29.text,
  692. .len = sizeof(ais->type8.dac1fid29.text)},
  693. {NULL}
  694. };
  695. const struct json_attr_t json_ais8_fid31[] = {
  696. AIS_HEADER
  697. AIS_TYPE8
  698. {"lon", t_integer, .addr.integer = &ais->type8.dac1fid31.lon,
  699. .dflt.integer = DAC1FID31_LON_NOT_AVAILABLE},
  700. {"lat", t_integer, .addr.integer = &ais->type8.dac1fid31.lat,
  701. .dflt.integer = DAC1FID31_LAT_NOT_AVAILABLE},
  702. {"accuracy", t_boolean, .addr.boolean = &ais->type8.dac1fid31.accuracy,
  703. .dflt.boolean = false},
  704. {"timestamp", t_string, .addr.string = timestamp,
  705. .len = sizeof(timestamp)},
  706. {"wspeed", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.wspeed,
  707. .dflt.uinteger = DAC1FID31_WIND_NOT_AVAILABLE},
  708. {"wgust", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.wgust,
  709. .dflt.uinteger = DAC1FID31_WIND_NOT_AVAILABLE},
  710. {"wdir", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.wdir,
  711. .dflt.uinteger = DAC1FID31_DIR_NOT_AVAILABLE},
  712. {"wgustdir", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.wgustdir,
  713. .dflt.uinteger = DAC1FID31_DIR_NOT_AVAILABLE},
  714. {"airtemp", t_integer, .addr.integer = &ais->type8.dac1fid31.airtemp,
  715. .dflt.integer = DAC1FID31_AIRTEMP_NOT_AVAILABLE},
  716. {"humidity", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.humidity,
  717. .dflt.uinteger = DAC1FID31_HUMIDITY_NOT_AVAILABLE},
  718. {"dewpoint", t_integer, .addr.integer = &ais->type8.dac1fid31.dewpoint,
  719. .dflt.integer = DAC1FID31_DEWPOINT_NOT_AVAILABLE},
  720. {"pressure", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.pressure,
  721. .dflt.uinteger = DAC1FID31_PRESSURE_NOT_AVAILABLE},
  722. {"pressuretend", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.pressuretend,
  723. .dflt.uinteger = DAC1FID31_PRESSURETEND_NOT_AVAILABLE},
  724. {"visgreater", t_boolean, .addr.boolean = &ais->type8.dac1fid31.visgreater,
  725. .dflt.boolean = false},
  726. {"visibility", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.visibility,
  727. .dflt.uinteger = DAC1FID31_VISIBILITY_NOT_AVAILABLE},
  728. {"waterlevel", t_integer, .addr.integer = &ais->type8.dac1fid31.waterlevel,
  729. .dflt.integer = DAC1FID31_WATERLEVEL_NOT_AVAILABLE},
  730. {"leveltrend", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.leveltrend,
  731. .dflt.uinteger = DAC1FID31_WATERLEVELTREND_NOT_AVAILABLE},
  732. {"cspeed", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.cspeed,
  733. .dflt.uinteger = DAC1FID31_CSPEED_NOT_AVAILABLE},
  734. {"cdir", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.cdir,
  735. .dflt.uinteger = DAC1FID31_DIR_NOT_AVAILABLE},
  736. {"cspeed2", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.cspeed2,
  737. .dflt.uinteger = DAC1FID31_CSPEED_NOT_AVAILABLE},
  738. {"cdir2", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.cdir2,
  739. .dflt.uinteger = DAC1FID31_DIR_NOT_AVAILABLE},
  740. {"cdepth2", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.cdepth2,
  741. .dflt.uinteger = DAC1FID31_CDEPTH_NOT_AVAILABLE},
  742. {"cspeed3", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.cspeed3,
  743. .dflt.uinteger = DAC1FID31_CSPEED_NOT_AVAILABLE},
  744. {"cdir3", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.cdir3,
  745. .dflt.uinteger = DAC1FID31_DIR_NOT_AVAILABLE},
  746. {"cdepth3", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.cdepth3,
  747. .dflt.uinteger = DAC1FID31_CDEPTH_NOT_AVAILABLE},
  748. {"waveheight", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.waveheight,
  749. .dflt.uinteger = DAC1FID31_HEIGHT_NOT_AVAILABLE},
  750. {"waveperiod", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.waveperiod,
  751. .dflt.uinteger = DAC1FID31_PERIOD_NOT_AVAILABLE},
  752. {"wavedir", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.wavedir,
  753. .dflt.uinteger = DAC1FID31_DIR_NOT_AVAILABLE},
  754. {"swellheight", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.swellheight,
  755. .dflt.uinteger = DAC1FID31_HEIGHT_NOT_AVAILABLE},
  756. {"swellperiod", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.swellperiod,
  757. .dflt.uinteger = DAC1FID31_PERIOD_NOT_AVAILABLE},
  758. {"swelldir", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.swelldir,
  759. .dflt.uinteger = DAC1FID31_DIR_NOT_AVAILABLE},
  760. {"seastate", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.seastate,
  761. .dflt.uinteger = DAC1FID31_SEASTATE_NOT_AVAILABLE},
  762. {"watertemp", t_integer, .addr.integer = &ais->type8.dac1fid31.watertemp,
  763. .dflt.integer = DAC1FID31_WATERTEMP_NOT_AVAILABLE},
  764. {"preciptype", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.preciptype,
  765. .dflt.uinteger = DAC1FID31_PRECIPTYPE_NOT_AVAILABLE},
  766. {"preciptype_text", t_ignore},
  767. {"salinity", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.salinity,
  768. .dflt.uinteger = DAC1FID31_SALINITY_NOT_AVAILABLE},
  769. {"ice", t_uinteger, .addr.uinteger = &ais->type8.dac1fid31.ice,
  770. .dflt.uinteger = DAC1FID31_ICE_NOT_AVAILABLE},
  771. {NULL}
  772. };
  773. const struct json_attr_t json_ais8_fid40[] = {
  774. AIS_HEADER
  775. AIS_TYPE8
  776. {"form", t_uinteger, .addr.uinteger = &ais->type8.dac200fid40.form,
  777. .dflt.uinteger = DAC200FID40_FORM_UNKNOWN},
  778. {"facing", t_uinteger, .addr.uinteger = &ais->type8.dac200fid40.facing,
  779. .dflt.uinteger = DAC200FID40_FACING_UNKNOWN},
  780. {"direction", t_uinteger, .addr.uinteger = &ais->type8.dac200fid40.direction,
  781. .dflt.uinteger = DAC200FID40_DIRECTION_UNKNOWN},
  782. {"direction_text", t_ignore},
  783. {"status", t_uinteger, .addr.uinteger = &ais->type8.dac200fid40.status,
  784. .dflt.uinteger = DAC200FID40_STATUS_UNKNOWN},
  785. {"status_text", t_ignore},
  786. {NULL}
  787. };
  788. const struct json_attr_t json_ais9[] = {
  789. AIS_HEADER
  790. {"alt", t_uinteger, .addr.uinteger = &ais->type9.alt,
  791. .dflt.uinteger = AIS_ALT_NOT_AVAILABLE},
  792. {"speed", t_uinteger, .addr.uinteger = &ais->type9.speed,
  793. .dflt.uinteger = AIS_SPEED_NOT_AVAILABLE},
  794. {"accuracy", t_boolean, .addr.boolean = &ais->type9.accuracy,
  795. .dflt.boolean = false},
  796. {"lon", t_integer, .addr.integer = &ais->type9.lon,
  797. .dflt.integer = AIS_LON_NOT_AVAILABLE},
  798. {"lat", t_integer, .addr.integer = &ais->type9.lat,
  799. .dflt.integer = AIS_LAT_NOT_AVAILABLE},
  800. {"course", t_uinteger, .addr.uinteger = &ais->type9.course,
  801. .dflt.uinteger = AIS_COURSE_NOT_AVAILABLE},
  802. {"second", t_uinteger, .addr.uinteger = &ais->type9.second,
  803. .dflt.uinteger = AIS_SEC_NOT_AVAILABLE},
  804. {"regional", t_uinteger, .addr.uinteger = &ais->type9.regional,
  805. .dflt.uinteger = 0},
  806. {"dte", t_uinteger, .addr.uinteger = &ais->type9.dte,
  807. .dflt.uinteger = 1},
  808. {"raim", t_boolean, .addr.boolean = &ais->type9.raim,
  809. .dflt.boolean = false},
  810. {"radio", t_uinteger, .addr.uinteger = &ais->type9.radio,
  811. .dflt.uinteger = 0},
  812. {NULL}
  813. };
  814. const struct json_attr_t json_ais10[] = {
  815. AIS_HEADER
  816. {"dest_mmsi", t_uinteger, .addr.uinteger = &ais->type10.dest_mmsi,
  817. .dflt.uinteger = 0},
  818. {NULL}
  819. };
  820. const struct json_attr_t json_ais12[] = {
  821. AIS_HEADER
  822. {"seqno", t_uinteger, .addr.uinteger = &ais->type12.seqno,
  823. .dflt.uinteger = 0},
  824. {"dest_mmsi", t_uinteger, .addr.uinteger = &ais->type12.dest_mmsi,
  825. .dflt.uinteger = 0},
  826. {"retransmit", t_boolean, .addr.boolean = &ais->type12.retransmit,
  827. .dflt.boolean = 0},
  828. {"text", t_string, .addr.string = ais->type12.text,
  829. .len = sizeof(ais->type12.text)},
  830. {NULL}
  831. };
  832. const struct json_attr_t json_ais14[] = {
  833. AIS_HEADER
  834. {"text", t_string, .addr.string = ais->type14.text,
  835. .len = sizeof(ais->type14.text)},
  836. {NULL}
  837. };
  838. const struct json_attr_t json_ais15[] = {
  839. AIS_HEADER
  840. {"mmsi1", t_uinteger, .addr.uinteger = &ais->type15.mmsi1,
  841. .dflt.uinteger = 0},
  842. {"type1_1", t_uinteger, .addr.uinteger = &ais->type15.type1_1,
  843. .dflt.uinteger = 0},
  844. {"offset1_1", t_uinteger, .addr.uinteger = &ais->type15.offset1_1,
  845. .dflt.uinteger = 0},
  846. {"type1_2", t_uinteger, .addr.uinteger = &ais->type15.type1_2,
  847. .dflt.uinteger = 0},
  848. {"offset1_2", t_uinteger, .addr.uinteger = &ais->type15.offset1_2,
  849. .dflt.uinteger = 0},
  850. {"mmsi2", t_uinteger, .addr.uinteger = &ais->type15.mmsi2,
  851. .dflt.uinteger = 0},
  852. {"type2_1", t_uinteger, .addr.uinteger = &ais->type15.type2_1,
  853. .dflt.uinteger = 0},
  854. {"offset2_1", t_uinteger, .addr.uinteger = &ais->type15.offset2_1,
  855. .dflt.uinteger = 0},
  856. {NULL}
  857. };
  858. const struct json_attr_t json_ais16[] = {
  859. AIS_HEADER
  860. {"mmsi1", t_uinteger, .addr.uinteger = &ais->type16.mmsi1,
  861. .dflt.uinteger = 0},
  862. {"offset1", t_uinteger, .addr.uinteger = &ais->type16.offset1,
  863. .dflt.uinteger = 0},
  864. {"increment1", t_uinteger, .addr.uinteger = &ais->type16.increment1,
  865. .dflt.uinteger = 0},
  866. {"mmsi2", t_uinteger, .addr.uinteger = &ais->type16.mmsi2,
  867. .dflt.uinteger = 0},
  868. {"offset2", t_uinteger, .addr.uinteger = &ais->type16.offset2,
  869. .dflt.uinteger = 0},
  870. {"increment2", t_uinteger, .addr.uinteger = &ais->type16.increment2,
  871. .dflt.uinteger = 0},
  872. {NULL}
  873. };
  874. const struct json_attr_t json_ais17[] = {
  875. AIS_HEADER
  876. {"lon", t_integer, .addr.integer = &ais->type17.lon,
  877. .dflt.integer = AIS_GNS_LON_NOT_AVAILABLE},
  878. {"lat", t_integer, .addr.integer = &ais->type17.lat,
  879. .dflt.integer = AIS_GNS_LAT_NOT_AVAILABLE},
  880. {"data", t_string, .addr.string = data,
  881. .len = sizeof(data)},
  882. {NULL}
  883. };
  884. const struct json_attr_t json_ais18[] = {
  885. AIS_HEADER
  886. {"reserved", t_uinteger, .addr.uinteger = &ais->type18.reserved,
  887. .dflt.uinteger = 0},
  888. {"speed", t_uinteger, .addr.uinteger = &ais->type18.speed,
  889. .dflt.uinteger = AIS_SPEED_NOT_AVAILABLE},
  890. {"accuracy", t_boolean, .addr.boolean = &ais->type18.accuracy,
  891. .dflt.boolean = false},
  892. {"lon", t_integer, .addr.integer = &ais->type18.lon,
  893. .dflt.integer = AIS_LON_NOT_AVAILABLE},
  894. {"lat", t_integer, .addr.integer = &ais->type18.lat,
  895. .dflt.integer = AIS_LAT_NOT_AVAILABLE},
  896. {"course", t_uinteger, .addr.uinteger = &ais->type18.course,
  897. .dflt.uinteger = AIS_COURSE_NOT_AVAILABLE},
  898. {"heading", t_uinteger, .addr.uinteger = &ais->type18.heading,
  899. .dflt.uinteger = AIS_HEADING_NOT_AVAILABLE},
  900. {"second", t_uinteger, .addr.uinteger = &ais->type18.second,
  901. .dflt.uinteger = AIS_SEC_NOT_AVAILABLE},
  902. {"regional", t_uinteger, .addr.uinteger = &ais->type18.regional,
  903. .dflt.uinteger = 0},
  904. {"cs", t_boolean, .addr.boolean = &ais->type18.cs,
  905. .dflt.boolean = false},
  906. {"display", t_boolean, .addr.boolean = &ais->type18.display,
  907. .dflt.boolean = false},
  908. {"dsc", t_boolean, .addr.boolean = &ais->type18.dsc,
  909. .dflt.boolean = false},
  910. {"band", t_boolean, .addr.boolean = &ais->type18.band,
  911. .dflt.boolean = false},
  912. {"msg22", t_boolean, .addr.boolean = &ais->type18.msg22,
  913. .dflt.boolean = false},
  914. {"raim", t_boolean, .addr.boolean = &ais->type18.raim,
  915. .dflt.boolean = false},
  916. {"radio", t_uinteger, .addr.uinteger = &ais->type18.radio,
  917. .dflt.uinteger = 0},
  918. {NULL}
  919. };
  920. const struct json_attr_t json_ais19[] = {
  921. AIS_HEADER
  922. {"reserved", t_uinteger, .addr.uinteger = &ais->type19.reserved,
  923. .dflt.uinteger = 0},
  924. {"speed", t_uinteger, .addr.uinteger = &ais->type19.speed,
  925. .dflt.uinteger = AIS_SPEED_NOT_AVAILABLE},
  926. {"accuracy", t_boolean, .addr.boolean = &ais->type19.accuracy,
  927. .dflt.boolean = false},
  928. {"lon", t_integer, .addr.integer = &ais->type19.lon,
  929. .dflt.integer = AIS_LON_NOT_AVAILABLE},
  930. {"lat", t_integer, .addr.integer = &ais->type19.lat,
  931. .dflt.integer = AIS_LAT_NOT_AVAILABLE},
  932. {"course", t_uinteger, .addr.uinteger = &ais->type19.course,
  933. .dflt.uinteger = AIS_COURSE_NOT_AVAILABLE},
  934. {"heading", t_uinteger, .addr.uinteger = &ais->type19.heading,
  935. .dflt.uinteger = AIS_HEADING_NOT_AVAILABLE},
  936. {"second", t_uinteger, .addr.uinteger = &ais->type19.second,
  937. .dflt.uinteger = AIS_SEC_NOT_AVAILABLE},
  938. {"regional", t_uinteger, .addr.uinteger = &ais->type19.regional,
  939. .dflt.uinteger = 0},
  940. {"shipname", t_string, .addr.string = ais->type19.shipname,
  941. .len = sizeof(ais->type19.shipname)},
  942. {"shiptype", t_uinteger, .addr.uinteger = &ais->type19.shiptype,
  943. .dflt.uinteger = 0},
  944. {"shiptype_text", t_ignore},
  945. {"to_bow", t_uinteger, .addr.uinteger = &ais->type19.to_bow,
  946. .dflt.uinteger = 0},
  947. {"to_stern", t_uinteger, .addr.uinteger = &ais->type19.to_stern,
  948. .dflt.uinteger = 0},
  949. {"to_port", t_uinteger, .addr.uinteger = &ais->type19.to_port,
  950. .dflt.uinteger = 0},
  951. {"to_starboard", t_uinteger, .addr.uinteger = &ais->type19.to_starboard,
  952. .dflt.uinteger = 0},
  953. {"epfd", t_uinteger, .addr.uinteger = &ais->type19.epfd,
  954. .dflt.uinteger = 0},
  955. {"epfd_text", t_ignore},
  956. {"raim", t_boolean, .addr.boolean = &ais->type19.raim,
  957. .dflt.boolean = false},
  958. {"dte", t_uinteger, .addr.uinteger = &ais->type19.dte,
  959. .dflt.uinteger = 1},
  960. {"assigned", t_boolean, .addr.boolean = &ais->type19.assigned,
  961. .dflt.boolean = false},
  962. {NULL}
  963. };
  964. const struct json_attr_t json_ais20[] = {
  965. AIS_HEADER
  966. {"offset1", t_uinteger, .addr.uinteger = &ais->type20.offset1,
  967. .dflt.uinteger = 0},
  968. {"number1", t_uinteger, .addr.uinteger = &ais->type20.number1,
  969. .dflt.uinteger = 0},
  970. {"timeout1", t_uinteger, .addr.uinteger = &ais->type20.timeout1,
  971. .dflt.uinteger = 0},
  972. {"increment1", t_uinteger, .addr.uinteger = &ais->type20.increment1,
  973. .dflt.uinteger = 0},
  974. {"offset2", t_uinteger, .addr.uinteger = &ais->type20.offset2,
  975. .dflt.uinteger = 0},
  976. {"number2", t_uinteger, .addr.uinteger = &ais->type20.number2,
  977. .dflt.uinteger = 0},
  978. {"timeout2", t_uinteger, .addr.uinteger = &ais->type20.timeout2,
  979. .dflt.uinteger = 0},
  980. {"increment2", t_uinteger, .addr.uinteger = &ais->type20.increment2,
  981. .dflt.uinteger = 0},
  982. {"offset3", t_uinteger, .addr.uinteger = &ais->type20.offset3,
  983. .dflt.uinteger = 0},
  984. {"number3", t_uinteger, .addr.uinteger = &ais->type20.number3,
  985. .dflt.uinteger = 0},
  986. {"timeout3", t_uinteger, .addr.uinteger = &ais->type20.timeout3,
  987. .dflt.uinteger = 0},
  988. {"increment3", t_uinteger, .addr.uinteger = &ais->type20.increment3,
  989. .dflt.uinteger = 0},
  990. {"offset4", t_uinteger, .addr.uinteger = &ais->type20.offset4,
  991. .dflt.uinteger = 0},
  992. {"number4", t_uinteger, .addr.uinteger = &ais->type20.number4,
  993. .dflt.uinteger = 0},
  994. {"timeout4", t_uinteger, .addr.uinteger = &ais->type20.timeout4,
  995. .dflt.uinteger = 0},
  996. {"increment4", t_uinteger, .addr.uinteger = &ais->type20.increment4,
  997. .dflt.uinteger = 0},
  998. {NULL}
  999. };
  1000. const struct json_attr_t json_ais21[] = {
  1001. AIS_HEADER
  1002. {"aid_type", t_uinteger, .addr.uinteger = &ais->type21.aid_type,
  1003. .dflt.uinteger = 0},
  1004. {"aid_type_text", t_ignore},
  1005. {"name", t_string, .addr.string = ais->type21.name,
  1006. .len = sizeof(ais->type21.name)},
  1007. {"accuracy", t_boolean, .addr.boolean = &ais->type21.accuracy,
  1008. .dflt.boolean = false},
  1009. {"lon", t_integer, .addr.integer = &ais->type21.lon,
  1010. .dflt.integer = AIS_LON_NOT_AVAILABLE},
  1011. {"lat", t_integer, .addr.integer = &ais->type21.lat,
  1012. .dflt.integer = AIS_LAT_NOT_AVAILABLE},
  1013. {"to_bow", t_uinteger, .addr.uinteger = &ais->type21.to_bow,
  1014. .dflt.uinteger = 0},
  1015. {"to_stern", t_uinteger, .addr.uinteger = &ais->type21.to_stern,
  1016. .dflt.uinteger = 0},
  1017. {"to_port", t_uinteger, .addr.uinteger = &ais->type21.to_port,
  1018. .dflt.uinteger = 0},
  1019. {"to_starboard", t_uinteger, .addr.uinteger = &ais->type21.to_starboard,
  1020. .dflt.uinteger = 0},
  1021. {"epfd", t_uinteger, .addr.uinteger = &ais->type21.epfd,
  1022. .dflt.uinteger = 0},
  1023. {"epfd_text", t_ignore},
  1024. {"second", t_uinteger, .addr.uinteger = &ais->type21.second,
  1025. .dflt.uinteger = 0},
  1026. {"regional", t_uinteger, .addr.uinteger = &ais->type21.regional,
  1027. .dflt.uinteger = 0},
  1028. {"off_position", t_boolean, .addr.boolean = &ais->type21.off_position,
  1029. .dflt.boolean = false},
  1030. {"raim", t_boolean, .addr.boolean = &ais->type21.raim,
  1031. .dflt.boolean = false},
  1032. {"virtual_aid", t_boolean, .addr.boolean = &ais->type21.virtual_aid,
  1033. .dflt.boolean = false},
  1034. {NULL}
  1035. };
  1036. const struct json_attr_t json_ais22[] = {
  1037. AIS_HEADER
  1038. {"channel_a", t_uinteger, .addr.uinteger = &ais->type22.channel_a,
  1039. .dflt.uinteger = 0},
  1040. {"channel_b", t_uinteger, .addr.uinteger = &ais->type22.channel_b,
  1041. .dflt.uinteger = 0},
  1042. {"txrx", t_uinteger, .addr.uinteger = &ais->type22.txrx,
  1043. .dflt.uinteger = 0},
  1044. {"power", t_boolean, .addr.boolean = &ais->type22.power,
  1045. .dflt.boolean = false},
  1046. {"ne_lon", t_integer, .addr.integer = &ais->type22.area.ne_lon,
  1047. .dflt.integer = AIS_GNS_LON_NOT_AVAILABLE},
  1048. {"ne_lat", t_integer, .addr.integer = &ais->type22.area.ne_lat,
  1049. .dflt.integer = AIS_GNS_LAT_NOT_AVAILABLE},
  1050. {"sw_lon", t_integer, .addr.integer = &ais->type22.area.sw_lon,
  1051. .dflt.integer = AIS_GNS_LON_NOT_AVAILABLE},
  1052. {"sw_lat", t_integer, .addr.integer = &ais->type22.area.sw_lat,
  1053. .dflt.integer = AIS_GNS_LAT_NOT_AVAILABLE},
  1054. {"dest1", t_uinteger, .addr.uinteger = &ais->type22.mmsi.dest1,
  1055. .dflt.uinteger = 0},
  1056. {"dest2", t_uinteger, .addr.uinteger = &ais->type22.mmsi.dest2,
  1057. .dflt.uinteger = 0},
  1058. {"addressed", t_boolean, .addr.boolean = &ais->type22.addressed,
  1059. .dflt.boolean = false},
  1060. {"band_a", t_boolean, .addr.boolean = &ais->type22.band_a,
  1061. .dflt.boolean = false},
  1062. {"band_b", t_boolean, .addr.boolean = &ais->type22.band_b,
  1063. .dflt.boolean = false},
  1064. {"zonesize", t_uinteger, .addr.uinteger = &ais->type22.zonesize,
  1065. .dflt.uinteger = 0},
  1066. {NULL}
  1067. };
  1068. const struct json_attr_t json_ais23[] = {
  1069. AIS_HEADER
  1070. {"ne_lon", t_integer, .addr.integer = &ais->type23.ne_lon,
  1071. .dflt.integer = AIS_GNS_LON_NOT_AVAILABLE},
  1072. {"ne_lat", t_integer, .addr.integer = &ais->type23.ne_lat,
  1073. .dflt.integer = AIS_GNS_LAT_NOT_AVAILABLE},
  1074. {"sw_lon", t_integer, .addr.integer = &ais->type23.sw_lon,
  1075. .dflt.integer = AIS_GNS_LON_NOT_AVAILABLE},
  1076. {"sw_lat", t_integer, .addr.integer = &ais->type23.sw_lat,
  1077. .dflt.integer = AIS_GNS_LAT_NOT_AVAILABLE},
  1078. {"stationtype", t_uinteger, .addr.uinteger = &ais->type23.stationtype,
  1079. .dflt.uinteger = 0},
  1080. {"stationtype_text", t_ignore},
  1081. {"shiptype", t_uinteger, .addr.uinteger = &ais->type23.shiptype,
  1082. .dflt.uinteger = 0},
  1083. {"shiptype_text", t_ignore},
  1084. {"txrx", t_uinteger, .addr.uinteger = &ais->type23.txrx,
  1085. .dflt.uinteger = 0},
  1086. {"interval", t_uinteger, .addr.uinteger = &ais->type23.interval,
  1087. .dflt.uinteger = 0},
  1088. {"quiet", t_uinteger, .addr.uinteger = &ais->type23.quiet,
  1089. .dflt.uinteger = 0},
  1090. {NULL}
  1091. };
  1092. const struct json_attr_t json_ais24[] = {
  1093. AIS_HEADER
  1094. {"shipname", t_string, .addr.string = ais->type24.shipname,
  1095. .len = sizeof(ais->type24.shipname)},
  1096. {"shiptype", t_uinteger, .addr.uinteger = &ais->type24.shiptype,
  1097. .dflt.uinteger = 0},
  1098. {"shiptype_text", t_ignore},
  1099. {"vendorid", t_string, .addr.string = ais->type24.vendorid,
  1100. .len = sizeof(ais->type24.vendorid)},
  1101. {"model", t_uinteger, .addr.uinteger = &ais->type24.model,
  1102. .dflt.uinteger = 0},
  1103. {"serial", t_uinteger, .addr.uinteger = &ais->type24.serial,
  1104. .dflt.uinteger = 0},
  1105. {"callsign", t_string, .addr.string = ais->type24.callsign,
  1106. .len = sizeof(ais->type24.callsign)},
  1107. {"mothership_mmsi",t_uinteger, .addr.uinteger = &ais->type24.mothership_mmsi,
  1108. .dflt.uinteger = 0},
  1109. {"to_bow", t_uinteger, .addr.uinteger = &ais->type24.dim.to_bow,
  1110. .dflt.uinteger = 0},
  1111. {"to_stern", t_uinteger, .addr.uinteger = &ais->type24.dim.to_stern,
  1112. .dflt.uinteger = 0},
  1113. {"to_port", t_uinteger, .addr.uinteger = &ais->type24.dim.to_port,
  1114. .dflt.uinteger = 0},
  1115. {"to_starboard", t_uinteger, .addr.uinteger = &ais->type24.dim.to_starboard,
  1116. .dflt.uinteger = 0},
  1117. {NULL}
  1118. };
  1119. const struct json_attr_t json_ais25[] = {
  1120. AIS_HEADER
  1121. {"addressed", t_boolean, .addr.boolean = &ais->type25.addressed,
  1122. .dflt.boolean = false},
  1123. {"structured", t_boolean, .addr.boolean = &ais->type25.structured,
  1124. .dflt.boolean = false},
  1125. {"dest_mmsi", t_uinteger, .addr.uinteger = &ais->type25.dest_mmsi,
  1126. .dflt.uinteger = 0},
  1127. {"app_id", t_uinteger, .addr.uinteger = &ais->type25.app_id,
  1128. .dflt.uinteger = 0},
  1129. {"data", t_string, .addr.string = data,
  1130. .len = sizeof(data)},
  1131. {NULL}
  1132. };
  1133. const struct json_attr_t json_ais26[] = {
  1134. AIS_HEADER
  1135. {"addressed", t_boolean, .addr.boolean = &ais->type26.addressed,
  1136. .dflt.boolean = false},
  1137. {"structured", t_boolean, .addr.boolean = &ais->type26.structured,
  1138. .dflt.boolean = false},
  1139. {"dest_mmsi", t_uinteger, .addr.uinteger = &ais->type26.dest_mmsi,
  1140. .dflt.uinteger = 0},
  1141. {"app_id", t_uinteger, .addr.uinteger = &ais->type26.app_id,
  1142. .dflt.uinteger = 0},
  1143. {"data", t_string, .addr.string = data,
  1144. .len = sizeof(data)},
  1145. {"radio", t_uinteger, .addr.uinteger = &ais->type26.radio,
  1146. .dflt.uinteger = 0},
  1147. {NULL}
  1148. };
  1149. const struct json_attr_t json_ais27[] = {
  1150. AIS_HEADER
  1151. {"status", t_uinteger, .addr.uinteger = &ais->type27.status,
  1152. .dflt.uinteger = 0},
  1153. {"speed", t_uinteger, .addr.uinteger = &ais->type27.speed,
  1154. .dflt.uinteger = AIS_LONGRANGE_SPEED_NOT_AVAILABLE},
  1155. {"accuracy", t_boolean, .addr.boolean = &ais->type27.accuracy,
  1156. .dflt.boolean = false},
  1157. {"lon", t_integer, .addr.integer = &ais->type27.lon,
  1158. .dflt.integer = AIS_LONGRANGE_LON_NOT_AVAILABLE},
  1159. {"lat", t_integer, .addr.integer = &ais->type27.lat,
  1160. .dflt.integer = AIS_LONGRANGE_LAT_NOT_AVAILABLE},
  1161. {"course", t_uinteger, .addr.uinteger = &ais->type27.course,
  1162. .dflt.uinteger = AIS_LONGRANGE_COURSE_NOT_AVAILABLE},
  1163. {"raim", t_boolean, .addr.boolean = &ais->type27.raim,
  1164. .dflt.boolean = false},
  1165. {"gnss", t_boolean, .addr.boolean = &ais->type27.gnss,
  1166. .dflt.boolean = true},
  1167. {NULL}
  1168. };
  1169. /* Generated code ends. */