Engage Engine API  1.263.9113
Real-time tactical communications engine API
Loading...
Searching...
No Matches
ConfigurationObjects.h
Go to the documentation of this file.
1//
2// Copyright (c) 2019 Rally Tactical Systems, Inc.
3// All rights reserved.
4//
5
20#ifndef ConfigurationObjects_h
21#define ConfigurationObjects_h
22
23#include "Platform.h"
24#include "EngageConstants.h"
25
26#include <iostream>
27#include <cstddef>
28#include <cstdint>
29#include <chrono>
30#include <vector>
31#include <string>
32
33#include <nlohmann/json.hpp>
34
35#ifndef WIN32
36 #pragma GCC diagnostic push
37 #pragma GCC diagnostic ignored "-Wunused-function"
38#endif
39
40#if !defined(ENGAGE_IGNORE_COMPILER_UNUSED_WARNING)
41 #if defined(__GNUC__)
42 #define ENGAGE_IGNORE_COMPILER_UNUSED_WARNING __attribute__((unused))
43 #else
44 #define ENGAGE_IGNORE_COMPILER_UNUSED_WARNING
45 #endif
46#endif // ENGAGE_IGNORE_COMPILER_UNUSED_WARNING
47
48// We'll use a different namespace depending on whether we're building the RTS core code
49// or if this is being included in an app-land project.
50#if defined(RTS_CORE_BUILD)
51namespace ConfigurationObjects
52#else
53namespace AppConfigurationObjects
54#endif
55{
56 static const char *ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT = "_attached";
57
58 //-----------------------------------------------------------
59 #pragma pack(push, 1)
60 typedef struct _DataSeriesHeader_t
61 {
76 uint8_t t;
77
81 uint32_t ts;
82
95 uint8_t it;
96
105 uint8_t im;
106
110 uint8_t vt;
111
115 uint8_t ss;
117
118 typedef struct _DataElementUint8_t
119 {
120 uint8_t ofs;
121 uint8_t val;
123
125 {
126 uint8_t ofs;
127 uint16_t val;
129
131 {
132 uint8_t ofs;
133 uint32_t val;
135
137 {
138 uint8_t ofs;
139 uint64_t val;
141 #pragma pack(pop)
142
143 typedef enum
144 {
145 invalid = 0,
146 uint8 = 1,
147 uint16 = 2,
148 uint32 = 3,
149 uint64 = 4
150 } DataSeriesValueType_t;
151
157 typedef enum
158 {
159 unknown = 0,
160 heartRate = 1,
161 skinTemp = 2,
162 coreTemp = 3,
163 hydration = 4,
164 bloodOxygenation = 5,
165 fatigueLevel = 6,
166 taskEffectiveness = 7
167 } HumanBiometricsTypes_t;
168
169 //-----------------------------------------------------------
170
171 static FILE *_internalFileOpener(const char *fn, const char *mode)
172 {
173 FILE *fp = nullptr;
174
175 #ifndef WIN32
176 fp = fopen(fn, mode);
177 #else
178 if(fopen_s(&fp, fn, mode) != 0)
179 {
180 fp = nullptr;
181 }
182 #endif
183
184 return fp;
185 }
186
187 #define JSON_SERIALIZED_CLASS(_cn) \
188 class _cn; \
189 static void to_json(nlohmann::json& j, const _cn& p); \
190 static void from_json(const nlohmann::json& j, _cn& p);
191
192 #define IMPLEMENT_JSON_DOCUMENTATION(_cn) \
193 public: \
194 static void document(const char *path = nullptr) \
195 { \
196 _cn example; \
197 example.initForDocumenting(); \
198 std::string theJson = example.serialize(3); \
199 std::cout << "------------------------------------------------" << std::endl \
200 << #_cn << std::endl \
201 << theJson << std::endl \
202 << "------------------------------------------------" << std::endl; \
203 \
204 if(path != nullptr && path[0] != 0) \
205 { \
206 std::string fn = path; \
207 fn.append("/"); \
208 fn.append(#_cn); \
209 fn.append(".json"); \
210 \
211 FILE *fp = _internalFileOpener(fn.c_str(), "wt");\
212 \
213 if(fp != nullptr) \
214 { \
215 fputs(theJson.c_str(), fp); \
216 fclose(fp); \
217 } \
218 else \
219 { \
220 std::cout << "ERROR: Cannot write to " << fn << std::endl; \
221 } \
222 } \
223 } \
224 static const char *className() \
225 { \
226 return #_cn; \
227 }
228
229 #define IMPLEMENT_JSON_SERIALIZATION() \
230 public: \
231 bool deserialize(const char *s) \
232 { \
233 try \
234 { \
235 if(s != nullptr && s[0] != 0) \
236 { \
237 from_json(nlohmann::json::parse(s), *this); \
238 } \
239 else \
240 { \
241 return false; \
242 } \
243 } \
244 catch(...) \
245 { \
246 return false; \
247 } \
248 return true; \
249 } \
250 \
251 std::string serialize(const int indent = -1) \
252 { \
253 try \
254 { \
255 nlohmann::json j; \
256 to_json(j, *this); \
257 return j.dump(indent); \
258 } \
259 catch(...) \
260 { \
261 return std::string("{}"); \
262 } \
263 }
264
265 #define IMPLEMENT_WRAPPED_JSON_SERIALIZATION(_cn) \
266 public: \
267 std::string serializeWrapped(const int indent = -1) \
268 { \
269 try \
270 { \
271 nlohmann::json j; \
272 to_json(j, *this); \
273 \
274 std::string rc; \
275 char firstChar[2]; \
276 firstChar[0] = #_cn[0]; \
277 firstChar[1] = 0; \
278 firstChar[0] = tolower(firstChar[0]); \
279 rc.assign("{\""); \
280 rc.append(firstChar); \
281 rc.append((#_cn) + 1); \
282 rc.append("\":"); \
283 rc.append(j.dump(indent)); \
284 rc.append("}"); \
285 \
286 return rc; \
287 } \
288 catch(...) \
289 { \
290 return std::string("{}"); \
291 } \
292 }
293
294 #define TOJSON_IMPL(__var) \
295 {#__var, p.__var}
296
297 #define FROMJSON_IMPL_SIMPLE(__var) \
298 getOptional(#__var, p.__var, j)
299
300 #define FROMJSON_IMPL(__var, __type, __default) \
301 getOptional<__type>(#__var, p.__var, j, __default)
302
303 #define TOJSON_BASE_IMPL() \
304 to_json(j, (ConfigurationObjectBase&)p)
305
306 #define FROMJSON_BASE_IMPL() \
307 from_json(j, (ConfigurationObjectBase&)p);
308
309
310 //-----------------------------------------------------------
311 static std::string EMPTY_STRING;
312
313 template<class T>
314 static void getOptional(const char *name, T& v, const nlohmann::json& j, T def)
315 {
316 try
317 {
318 if(j.contains(name))
319 {
320 j.at(name).get_to(v);
321 }
322 else
323 {
324 v = def;
325 }
326 }
327 catch(...)
328 {
329 v = def;
330 }
331 }
332
333 template<class T>
334 static void getOptional(const char *name, T& v, const nlohmann::json& j)
335 {
336 try
337 {
338 if(j.contains(name))
339 {
340 j.at(name).get_to(v);
341 }
342 }
343 catch(...)
344 {
345 }
346 }
347
348 template<class T>
349 static void getOptionalWithIndicator(const char *name, T& v, const nlohmann::json& j, T def, bool *wasFound)
350 {
351 try
352 {
353 if(j.contains(name))
354 {
355 j.at(name).get_to(v);
356 *wasFound = true;
357 }
358 else
359 {
360 v = def;
361 *wasFound = false;
362 }
363 }
364 catch(...)
365 {
366 v = def;
367 *wasFound = false;
368 }
369 }
370
371 template<class T>
372 static void getOptionalWithIndicator(const char *name, T& v, const nlohmann::json& j, bool *wasFound)
373 {
374 try
375 {
376 if(j.contains(name))
377 {
378 j.at(name).get_to(v);
379 *wasFound = true;
380 }
381 else
382 {
383 *wasFound = false;
384 }
385 }
386 catch(...)
387 {
388 *wasFound = false;
389 }
390 }
391
393 {
394 public:
396 {
397 _documenting = false;
398 }
399
401 {
402 }
403
404 virtual void initForDocumenting()
405 {
406 _documenting = true;
407 }
408
409 virtual std::string toString()
410 {
411 return std::string("");
412 }
413
414 inline virtual bool isDocumenting() const
415 {
416 return _documenting;
417 }
418
419 nlohmann::json _attached;
420
421 protected:
422 bool _documenting;
423 };
424
425 static void to_json(nlohmann::json& j, const ConfigurationObjectBase& p)
426 {
427 try
428 {
429 if(p._attached != nullptr)
430 {
431 j[ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT] = p._attached;
432 }
433 }
434 catch(...)
435 {
436 }
437 }
438 static void from_json(const nlohmann::json& j, ConfigurationObjectBase& p)
439 {
440 try
441 {
442 if(j.contains(ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT))
443 {
444 p._attached = j.at(ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT);
445 }
446 }
447 catch(...)
448 {
449 }
450 }
451
452 //-----------------------------------------------------------
453 JSON_SERIALIZED_CLASS(KvPair)
461 {
462 IMPLEMENT_JSON_SERIALIZATION()
463 IMPLEMENT_JSON_DOCUMENTATION(KvPair)
464
465 public:
467 std::string key;
468
470 std::string value;
471
472 KvPair()
473 {
474 clear();
475 }
476
477 void clear()
478 {
479 key.clear();
480 value.clear();
481 }
482 };
483
484 static void to_json(nlohmann::json& j, const KvPair& p)
485 {
486 j = nlohmann::json{
487 TOJSON_IMPL(key),
488 TOJSON_IMPL(value)
489 };
490 }
491 static void from_json(const nlohmann::json& j, KvPair& p)
492 {
493 p.clear();
494 getOptional<std::string>("key", p.key, j, EMPTY_STRING);
495 getOptional<std::string>("tags", p.value, j, EMPTY_STRING);
496 }
497
498 //-----------------------------------------------------------
499 JSON_SERIALIZED_CLASS(TuningSettings)
501 {
502 IMPLEMENT_JSON_SERIALIZATION()
503 IMPLEMENT_JSON_DOCUMENTATION(TuningSettings)
504
505 public:
508
511
514
515
518
521
524
525
528
531
534
537
539 {
540 clear();
541 }
542
543 void clear()
544 {
545 maxPooledRtpMb = 0;
546 maxPooledRtpObjects = 0;
547 maxActiveRtpObjects = 0;
548
549 maxPooledBlobMb = 0;
550 maxPooledBlobObjects = 0;
551 maxActiveBlobObjects = 0;
552
553 maxPooledBufferMb = 0;
554 maxPooledBufferObjects = 0;
555 maxActiveBufferObjects = 0;
556
557 maxActiveRtpProcessors = 0;
558 }
559
560 virtual void initForDocumenting()
561 {
562 clear();
563 }
564 };
565
566 static void to_json(nlohmann::json& j, const TuningSettings& p)
567 {
568 j = nlohmann::json{
569 TOJSON_IMPL(maxPooledRtpMb),
570 TOJSON_IMPL(maxPooledRtpObjects),
571 TOJSON_IMPL(maxActiveRtpObjects),
572
573 TOJSON_IMPL(maxPooledBlobMb),
574 TOJSON_IMPL(maxPooledBlobObjects),
575 TOJSON_IMPL(maxActiveBlobObjects),
576
577 TOJSON_IMPL(maxPooledBufferMb),
578 TOJSON_IMPL(maxPooledBufferObjects),
579 TOJSON_IMPL(maxActiveBufferObjects),
580
581 TOJSON_IMPL(maxActiveRtpProcessors)
582 };
583 }
584 static void from_json(const nlohmann::json& j, TuningSettings& p)
585 {
586 p.clear();
587 FROMJSON_IMPL(maxPooledRtpMb, uint32_t, 0);
588 FROMJSON_IMPL(maxPooledRtpObjects, uint32_t, 0);
589 FROMJSON_IMPL(maxActiveRtpObjects, uint32_t, 0);
590
591 FROMJSON_IMPL(maxPooledBlobMb, uint32_t, 0);
592 FROMJSON_IMPL(maxPooledBlobObjects, uint32_t, 0);
593 FROMJSON_IMPL(maxActiveBlobObjects, uint32_t, 0);
594
595 FROMJSON_IMPL(maxPooledBufferMb, uint32_t, 0);
596 FROMJSON_IMPL(maxPooledBufferObjects, uint32_t, 0);
597 FROMJSON_IMPL(maxActiveBufferObjects, uint32_t, 0);
598
599 FROMJSON_IMPL(maxActiveRtpProcessors, uint32_t, 0);
600 }
601
602
603 //-----------------------------------------------------------
604 JSON_SERIALIZED_CLASS(FipsCryptoSettings)
606 {
607 IMPLEMENT_JSON_SERIALIZATION()
608 IMPLEMENT_JSON_DOCUMENTATION(FipsCryptoSettings)
609
610 public:
613
615 std::string path;
616
618 bool debug;
619
621 std::string curves;
622
624 std::string ciphers;
625
627 {
628 clear();
629 }
630
631 void clear()
632 {
633 enabled = false;
634 path.clear();
635 debug = false;
636 curves.clear();
637 ciphers.clear();
638 }
639
640 virtual void initForDocumenting()
641 {
642 clear();
643 }
644 };
645
646 static void to_json(nlohmann::json& j, const FipsCryptoSettings& p)
647 {
648 j = nlohmann::json{
649 TOJSON_IMPL(enabled),
650 TOJSON_IMPL(path),
651 TOJSON_IMPL(debug),
652 TOJSON_IMPL(curves),
653 TOJSON_IMPL(ciphers)
654 };
655 }
656 static void from_json(const nlohmann::json& j, FipsCryptoSettings& p)
657 {
658 p.clear();
659 FROMJSON_IMPL_SIMPLE(enabled);
660 FROMJSON_IMPL_SIMPLE(path);
661 FROMJSON_IMPL_SIMPLE(debug);
662 FROMJSON_IMPL_SIMPLE(curves);
663 FROMJSON_IMPL_SIMPLE(ciphers);
664 }
665
666
667 //-----------------------------------------------------------
668 JSON_SERIALIZED_CLASS(WatchdogSettings)
670 {
671 IMPLEMENT_JSON_SERIALIZATION()
672 IMPLEMENT_JSON_DOCUMENTATION(WatchdogSettings)
673
674 public:
677
680
683
686
689
691 {
692 clear();
693 }
694
695 void clear()
696 {
697 enabled = true;
698 intervalMs = 5000;
699 hangDetectionMs = 2000;
700 abortOnHang = true;
701 slowExecutionThresholdMs = 100;
702 }
703
704 virtual void initForDocumenting()
705 {
706 clear();
707 }
708 };
709
710 static void to_json(nlohmann::json& j, const WatchdogSettings& p)
711 {
712 j = nlohmann::json{
713 TOJSON_IMPL(enabled),
714 TOJSON_IMPL(intervalMs),
715 TOJSON_IMPL(hangDetectionMs),
716 TOJSON_IMPL(abortOnHang),
717 TOJSON_IMPL(slowExecutionThresholdMs)
718 };
719 }
720 static void from_json(const nlohmann::json& j, WatchdogSettings& p)
721 {
722 p.clear();
723 getOptional<bool>("enabled", p.enabled, j, true);
724 getOptional<int>("intervalMs", p.intervalMs, j, 5000);
725 getOptional<int>("hangDetectionMs", p.hangDetectionMs, j, 2000);
726 getOptional<bool>("abortOnHang", p.abortOnHang, j, true);
727 getOptional<int>("slowExecutionThresholdMs", p.slowExecutionThresholdMs, j, 100);
728 }
729
730
731 //-----------------------------------------------------------
732 JSON_SERIALIZED_CLASS(FileRecordingRequest)
734 {
735 IMPLEMENT_JSON_SERIALIZATION()
736 IMPLEMENT_JSON_DOCUMENTATION(FileRecordingRequest)
737
738 public:
739 std::string id;
740 std::string fileName;
741 uint32_t maxMs;
742
744 {
745 clear();
746 }
747
748 void clear()
749 {
750 id.clear();
751 fileName.clear();
752 maxMs = 60000;
753 }
754
755 virtual void initForDocumenting()
756 {
757 clear();
758 id = "1-2-3-4-5-6-7-8-9";
759 fileName = "/tmp/test.wav";
760 maxMs = 10000;
761 }
762 };
763
764 static void to_json(nlohmann::json& j, const FileRecordingRequest& p)
765 {
766 j = nlohmann::json{
767 TOJSON_IMPL(id),
768 TOJSON_IMPL(fileName),
769 TOJSON_IMPL(maxMs)
770 };
771 }
772 static void from_json(const nlohmann::json& j, FileRecordingRequest& p)
773 {
774 p.clear();
775 j.at("id").get_to(p.id);
776 j.at("fileName").get_to(p.fileName);
777 getOptional<uint32_t>("maxMs", p.maxMs, j, 60000);
778 }
779
780
781 //-----------------------------------------------------------
782 JSON_SERIALIZED_CLASS(Feature)
784 {
785 IMPLEMENT_JSON_SERIALIZATION()
786 IMPLEMENT_JSON_DOCUMENTATION(Feature)
787
788 public:
789 std::string id;
790 std::string name;
791 std::string description;
792 std::string comments;
793 int count;
794 int used; // NOTE: Ignored during deserialization!
795
796 Feature()
797 {
798 clear();
799 }
800
801 void clear()
802 {
803 id.clear();
804 name.clear();
805 description.clear();
806 comments.clear();
807 count = 0;
808 used = 0;
809 }
810
811 virtual void initForDocumenting()
812 {
813 clear();
814 id = "{af9540d1-3e86-4fa6-8b80-e26daecb61ab}";
815 name = "A sample feature";
816 description = "This is an example of a feature";
817 comments = "These are comments for this feature";
818 count = 42;
819 used = 16;
820 }
821 };
822
823 static void to_json(nlohmann::json& j, const Feature& p)
824 {
825 j = nlohmann::json{
826 TOJSON_IMPL(id),
827 TOJSON_IMPL(name),
828 TOJSON_IMPL(description),
829 TOJSON_IMPL(comments),
830 TOJSON_IMPL(count),
831 TOJSON_IMPL(used)
832 };
833 }
834 static void from_json(const nlohmann::json& j, Feature& p)
835 {
836 p.clear();
837 j.at("id").get_to(p.id);
838 getOptional("name", p.name, j);
839 getOptional("description", p.description, j);
840 getOptional("comments", p.comments, j);
841 getOptional("count", p.count, j, 0);
842
843 // NOTE: Not deserialized!
844 //getOptional("used", p.used, j, 0);
845 }
846
847
848 //-----------------------------------------------------------
849 JSON_SERIALIZED_CLASS(Featureset)
851 {
852 IMPLEMENT_JSON_SERIALIZATION()
853 IMPLEMENT_JSON_DOCUMENTATION(Featureset)
854
855 public:
856 std::string signature;
857 bool lockToDeviceId;
858 std::vector<Feature> features;
859
860 Featureset()
861 {
862 clear();
863 }
864
865 void clear()
866 {
867 signature.clear();
868 lockToDeviceId = false;
869 features.clear();
870 }
871
872 virtual void initForDocumenting()
873 {
874 clear();
875 signature = "c39df3f36c6444e686e47e70fc45cf91e6ed2d8de62d4a1e89f507d567ff48aaabb1a70e54b44377b46fc4a1a2e319e5b77e4abffc444db98f8eb55d709aad5f";
876 lockToDeviceId = false;
877 }
878 };
879
880 static void to_json(nlohmann::json& j, const Featureset& p)
881 {
882 j = nlohmann::json{
883 TOJSON_IMPL(signature),
884 TOJSON_IMPL(lockToDeviceId),
885 TOJSON_IMPL(features)
886 };
887 }
888 static void from_json(const nlohmann::json& j, Featureset& p)
889 {
890 p.clear();
891 getOptional("signature", p.signature, j);
892 getOptional<bool>("lockToDeviceId", p.lockToDeviceId, j, false);
893 getOptional<std::vector<Feature>>("features", p.features, j);
894 }
895
896
897 //-----------------------------------------------------------
898 JSON_SERIALIZED_CLASS(Agc)
908 {
909 IMPLEMENT_JSON_SERIALIZATION()
910 IMPLEMENT_JSON_DOCUMENTATION(Agc)
911
912 public:
915
918
921
924
927
930
931 Agc()
932 {
933 clear();
934 }
935
936 void clear()
937 {
938 enabled = false;
939 minLevel = 0;
940 maxLevel = 255;
941 compressionGainDb = 25;
942 enableLimiter = false;
943 targetLevelDb = 3;
944 }
945 };
946
947 static void to_json(nlohmann::json& j, const Agc& p)
948 {
949 j = nlohmann::json{
950 TOJSON_IMPL(enabled),
951 TOJSON_IMPL(minLevel),
952 TOJSON_IMPL(maxLevel),
953 TOJSON_IMPL(compressionGainDb),
954 TOJSON_IMPL(enableLimiter),
955 TOJSON_IMPL(targetLevelDb)
956 };
957 }
958 static void from_json(const nlohmann::json& j, Agc& p)
959 {
960 p.clear();
961 getOptional<bool>("enabled", p.enabled, j, false);
962 getOptional<int>("minLevel", p.minLevel, j, 0);
963 getOptional<int>("maxLevel", p.maxLevel, j, 255);
964 getOptional<int>("compressionGainDb", p.compressionGainDb, j, 25);
965 getOptional<bool>("enableLimiter", p.enableLimiter, j, false);
966 getOptional<int>("targetLevelDb", p.targetLevelDb, j, 3);
967 }
968
969
970 //-----------------------------------------------------------
971 JSON_SERIALIZED_CLASS(RtpPayloadTypeTranslation)
981 {
982 IMPLEMENT_JSON_SERIALIZATION()
983 IMPLEMENT_JSON_DOCUMENTATION(RtpPayloadTypeTranslation)
984
985 public:
987 uint16_t external;
988
990 uint16_t engage;
991
993 {
994 clear();
995 }
996
997 void clear()
998 {
999 external = 0;
1000 engage = 0;
1001 }
1002
1003 bool matches(const RtpPayloadTypeTranslation& other)
1004 {
1005 return ( (external == other.external) && (engage == other.engage) );
1006 }
1007 };
1008
1009 static void to_json(nlohmann::json& j, const RtpPayloadTypeTranslation& p)
1010 {
1011 j = nlohmann::json{
1012 TOJSON_IMPL(external),
1013 TOJSON_IMPL(engage)
1014 };
1015 }
1016 static void from_json(const nlohmann::json& j, RtpPayloadTypeTranslation& p)
1017 {
1018 p.clear();
1019 getOptional<uint16_t>("external", p.external, j);
1020 getOptional<uint16_t>("engage", p.engage, j);
1021 }
1022
1023 //-----------------------------------------------------------
1024 JSON_SERIALIZED_CLASS(NetworkInterfaceDevice)
1026 {
1027 IMPLEMENT_JSON_SERIALIZATION()
1028 IMPLEMENT_JSON_DOCUMENTATION(NetworkInterfaceDevice)
1029
1030 public:
1031 std::string name;
1032 std::string friendlyName;
1033 std::string description;
1034 int family;
1035 std::string address;
1036 bool available;
1037 bool isLoopback;
1038 bool supportsMulticast;
1039 std::string hardwareAddress;
1040
1042 {
1043 clear();
1044 }
1045
1046 void clear()
1047 {
1048 name.clear();
1049 friendlyName.clear();
1050 description.clear();
1051 family = -1;
1052 address.clear();
1053 available = false;
1054 isLoopback = false;
1055 supportsMulticast = false;
1056 hardwareAddress.clear();
1057 }
1058
1059 virtual void initForDocumenting()
1060 {
1061 clear();
1062 name = "en0";
1063 friendlyName = "Wi-Fi";
1064 description = "A wi-fi adapter";
1065 family = 1;
1066 address = "127.0.0.1";
1067 available = true;
1068 isLoopback = true;
1069 supportsMulticast = false;
1070 hardwareAddress = "DE:AD:BE:EF:01:02:03";
1071 }
1072 };
1073
1074 static void to_json(nlohmann::json& j, const NetworkInterfaceDevice& p)
1075 {
1076 j = nlohmann::json{
1077 TOJSON_IMPL(name),
1078 TOJSON_IMPL(friendlyName),
1079 TOJSON_IMPL(description),
1080 TOJSON_IMPL(family),
1081 TOJSON_IMPL(address),
1082 TOJSON_IMPL(available),
1083 TOJSON_IMPL(isLoopback),
1084 TOJSON_IMPL(supportsMulticast),
1085 TOJSON_IMPL(hardwareAddress)
1086 };
1087 }
1088 static void from_json(const nlohmann::json& j, NetworkInterfaceDevice& p)
1089 {
1090 p.clear();
1091 getOptional("name", p.name, j);
1092 getOptional("friendlyName", p.friendlyName, j);
1093 getOptional("description", p.description, j);
1094 getOptional("family", p.family, j, -1);
1095 getOptional("address", p.address, j);
1096 getOptional("available", p.available, j, false);
1097 getOptional("isLoopback", p.isLoopback, j, false);
1098 getOptional("supportsMulticast", p.supportsMulticast, j, false);
1099 getOptional("hardwareAddress", p.hardwareAddress, j);
1100 }
1101
1102 //-----------------------------------------------------------
1103 JSON_SERIALIZED_CLASS(ListOfNetworkInterfaceDevice)
1105 {
1106 IMPLEMENT_JSON_SERIALIZATION()
1107 IMPLEMENT_JSON_DOCUMENTATION(ListOfNetworkInterfaceDevice)
1108
1109 public:
1110 std::vector<NetworkInterfaceDevice> list;
1111
1113 {
1114 clear();
1115 }
1116
1117 void clear()
1118 {
1119 list.clear();
1120 }
1121 };
1122
1123 static void to_json(nlohmann::json& j, const ListOfNetworkInterfaceDevice& p)
1124 {
1125 j = nlohmann::json{
1126 TOJSON_IMPL(list)
1127 };
1128 }
1129 static void from_json(const nlohmann::json& j, ListOfNetworkInterfaceDevice& p)
1130 {
1131 p.clear();
1132 getOptional<std::vector<NetworkInterfaceDevice>>("list", p.list, j);
1133 }
1134
1135
1136 //-----------------------------------------------------------
1137 JSON_SERIALIZED_CLASS(RtpHeader)
1147 {
1148 IMPLEMENT_JSON_SERIALIZATION()
1149 IMPLEMENT_JSON_DOCUMENTATION(RtpHeader)
1150
1151 public:
1152
1154 int pt;
1155
1158
1160 uint16_t seq;
1161
1163 uint32_t ssrc;
1164
1166 uint32_t ts;
1167
1168 RtpHeader()
1169 {
1170 clear();
1171 }
1172
1173 void clear()
1174 {
1175 pt = -1;
1176 marker = false;
1177 seq = 0;
1178 ssrc = 0;
1179 ts = 0;
1180 }
1181
1182 virtual void initForDocumenting()
1183 {
1184 clear();
1185 pt = 0;
1186 marker = false;
1187 seq = 123;
1188 ssrc = 12345678;
1189 ts = 87654321;
1190 }
1191 };
1192
1193 static void to_json(nlohmann::json& j, const RtpHeader& p)
1194 {
1195 if(p.pt != -1)
1196 {
1197 j = nlohmann::json{
1198 TOJSON_IMPL(pt),
1199 TOJSON_IMPL(marker),
1200 TOJSON_IMPL(seq),
1201 TOJSON_IMPL(ssrc),
1202 TOJSON_IMPL(ts)
1203 };
1204 }
1205 }
1206 static void from_json(const nlohmann::json& j, RtpHeader& p)
1207 {
1208 p.clear();
1209 getOptional<int>("pt", p.pt, j, -1);
1210 getOptional<bool>("marker", p.marker, j, false);
1211 getOptional<uint16_t>("seq", p.seq, j, 0);
1212 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
1213 getOptional<uint32_t>("ts", p.ts, j, 0);
1214 }
1215
1216 //-----------------------------------------------------------
1217 JSON_SERIALIZED_CLASS(Rfc4733Event)
1225 {
1226 IMPLEMENT_JSON_SERIALIZATION()
1227 IMPLEMENT_JSON_DOCUMENTATION(Rfc4733Event)
1228
1229 public:
1230
1232 int id;
1233
1235 bool end;
1236
1239
1242
1245
1246 Rfc4733Event()
1247 {
1248 clear();
1249 }
1250
1251 void clear()
1252 {
1253 id = -1;
1254 end = false;
1255 reserved = 0;
1256 volume = 0;
1257 duration = 0;
1258 }
1259
1260 virtual void initForDocumenting()
1261 {
1262 clear();
1263 id = 0;
1264 end = false;
1265 reserved = 0;
1266 volume = 0;
1267 duration = 0;
1268 }
1269 };
1270
1271 static void to_json(nlohmann::json& j, const Rfc4733Event& p)
1272 {
1273 j = nlohmann::json{
1274 TOJSON_IMPL(id),
1275 TOJSON_IMPL(end),
1276 TOJSON_IMPL(reserved),
1277 TOJSON_IMPL(volume),
1278 TOJSON_IMPL(duration)
1279 };
1280 }
1281 static void from_json(const nlohmann::json& j, Rfc4733Event& p)
1282 {
1283 p.clear();
1284 getOptional<int>("id", p.id, j, -1);
1285 getOptional<bool>("end", p.end, j, false);
1286 getOptional<int>("reserved", p.reserved, j, 0);
1287 getOptional<int>("volume", p.volume, j, 0);
1288 getOptional<int>("duration", p.duration, j, 0);
1289 }
1290
1291 //-----------------------------------------------------------
1292 JSON_SERIALIZED_CLASS(BlobInfo)
1302 {
1303 IMPLEMENT_JSON_SERIALIZATION()
1304 IMPLEMENT_JSON_DOCUMENTATION(BlobInfo)
1305
1306 public:
1310 typedef enum
1311 {
1313 bptUndefined = 0,
1314
1316 bptAppTextUtf8 = 1,
1317
1319 bptJsonTextUtf8 = 2,
1320
1322 bptAppBinary = 3,
1323
1325 bptEngageBinaryHumanBiometrics = 4,
1326
1328 bptAppMimeMessage = 5,
1329
1331 bptRfc4733Events = 6,
1332
1334 bptEngageInternal = 42
1335 } PayloadType_t;
1336
1338 size_t size;
1339
1341 std::string source;
1342
1344 std::string target;
1345
1348
1351
1353 std::string txnId;
1354
1357
1358 BlobInfo()
1359 {
1360 clear();
1361 }
1362
1363 void clear()
1364 {
1365 size = 0;
1366 source.clear();
1367 target.clear();
1368 rtpHeader.clear();
1369 payloadType = PayloadType_t::bptUndefined;
1370 txnId.clear();
1371 txnTimeoutSecs = 0;
1372 }
1373
1374 virtual void initForDocumenting()
1375 {
1376 clear();
1377 rtpHeader.initForDocumenting();
1378 }
1379 };
1380
1381 static void to_json(nlohmann::json& j, const BlobInfo& p)
1382 {
1383 j = nlohmann::json{
1384 TOJSON_IMPL(size),
1385 TOJSON_IMPL(source),
1386 TOJSON_IMPL(target),
1387 TOJSON_IMPL(rtpHeader),
1388 TOJSON_IMPL(payloadType),
1389 TOJSON_IMPL(txnId),
1390 TOJSON_IMPL(txnTimeoutSecs)
1391 };
1392 }
1393 static void from_json(const nlohmann::json& j, BlobInfo& p)
1394 {
1395 p.clear();
1396 getOptional<size_t>("size", p.size, j, 0);
1397 getOptional<std::string>("source", p.source, j, EMPTY_STRING);
1398 getOptional<std::string>("target", p.target, j, EMPTY_STRING);
1399 getOptional<RtpHeader>("rtpHeader", p.rtpHeader, j);
1400 getOptional<BlobInfo::PayloadType_t>("payloadType", p.payloadType, j, BlobInfo::PayloadType_t::bptUndefined);
1401 getOptional<std::string>("txnId", p.txnId, j, EMPTY_STRING);
1402 getOptional<int>("txnTimeoutSecs", p.txnTimeoutSecs, j, 0);
1403 }
1404
1405
1406 //-----------------------------------------------------------
1407 JSON_SERIALIZED_CLASS(TxAudioUri)
1420 {
1421 IMPLEMENT_JSON_SERIALIZATION()
1422 IMPLEMENT_JSON_DOCUMENTATION(TxAudioUri)
1423
1424 public:
1426 std::string uri;
1427
1430
1431 TxAudioUri()
1432 {
1433 clear();
1434 }
1435
1436 void clear()
1437 {
1438 uri.clear();
1439 repeatCount = 0;
1440 }
1441
1442 virtual void initForDocumenting()
1443 {
1444 }
1445 };
1446
1447 static void to_json(nlohmann::json& j, const TxAudioUri& p)
1448 {
1449 j = nlohmann::json{
1450 TOJSON_IMPL(uri),
1451 TOJSON_IMPL(repeatCount)
1452 };
1453 }
1454 static void from_json(const nlohmann::json& j, TxAudioUri& p)
1455 {
1456 p.clear();
1457 getOptional<std::string>("uri", p.uri, j, EMPTY_STRING);
1458 getOptional<int>("repeatCount", p.repeatCount, j, 0);
1459 }
1460
1461
1462 //-----------------------------------------------------------
1463 JSON_SERIALIZED_CLASS(AdvancedTxParams)
1476 {
1477 IMPLEMENT_JSON_SERIALIZATION()
1478 IMPLEMENT_JSON_DOCUMENTATION(AdvancedTxParams)
1479
1480 public:
1481
1483 uint16_t flags;
1484
1486 uint8_t priority;
1487
1490
1493
1495 std::string alias;
1496
1498 bool muted;
1499
1501 uint32_t txId;
1502
1505
1508
1511
1514
1516 {
1517 clear();
1518 }
1519
1520 void clear()
1521 {
1522 flags = 0;
1523 priority = 0;
1524 subchannelTag = 0;
1525 includeNodeId = false;
1526 alias.clear();
1527 muted = false;
1528 txId = 0;
1529 audioUri.clear();
1530 aliasSpecializer = 0;
1531 receiverRxMuteForAliasSpecializer = false;
1532 reBegin = false;
1533 }
1534
1535 virtual void initForDocumenting()
1536 {
1537 }
1538 };
1539
1540 static void to_json(nlohmann::json& j, const AdvancedTxParams& p)
1541 {
1542 j = nlohmann::json{
1543 TOJSON_IMPL(flags),
1544 TOJSON_IMPL(priority),
1545 TOJSON_IMPL(subchannelTag),
1546 TOJSON_IMPL(includeNodeId),
1547 TOJSON_IMPL(alias),
1548 TOJSON_IMPL(muted),
1549 TOJSON_IMPL(txId),
1550 TOJSON_IMPL(audioUri),
1551 TOJSON_IMPL(aliasSpecializer),
1552 TOJSON_IMPL(receiverRxMuteForAliasSpecializer),
1553 TOJSON_IMPL(reBegin)
1554 };
1555 }
1556 static void from_json(const nlohmann::json& j, AdvancedTxParams& p)
1557 {
1558 p.clear();
1559 getOptional<uint16_t>("flags", p.flags, j, 0);
1560 getOptional<uint8_t>("priority", p.priority, j, 0);
1561 getOptional<uint16_t>("subchannelTag", p.subchannelTag, j, 0);
1562 getOptional<bool>("includeNodeId", p.includeNodeId, j, false);
1563 getOptional<std::string>("alias", p.alias, j, EMPTY_STRING);
1564 getOptional<bool>("muted", p.muted, j, false);
1565 getOptional<uint32_t>("txId", p.txId, j, 0);
1566 getOptional<TxAudioUri>("audioUri", p.audioUri, j);
1567 getOptional<uint16_t>("aliasSpecializer", p.aliasSpecializer, j, 0);
1568 getOptional<bool>("receiverRxMuteForAliasSpecializer", p.receiverRxMuteForAliasSpecializer, j, false);
1569 getOptional<bool>("reBegin", p.reBegin, j, false);
1570 }
1571
1572 //-----------------------------------------------------------
1573 JSON_SERIALIZED_CLASS(Identity)
1586 {
1587 IMPLEMENT_JSON_SERIALIZATION()
1588 IMPLEMENT_JSON_DOCUMENTATION(Identity)
1589
1590 public:
1598 std::string nodeId;
1599
1601 std::string userId;
1602
1604 std::string displayName;
1605
1607 std::string avatar;
1608
1609 Identity()
1610 {
1611 clear();
1612 }
1613
1614 void clear()
1615 {
1616 nodeId.clear();
1617 userId.clear();
1618 displayName.clear();
1619 avatar.clear();
1620 }
1621
1622 virtual void initForDocumenting()
1623 {
1624 }
1625 };
1626
1627 static void to_json(nlohmann::json& j, const Identity& p)
1628 {
1629 j = nlohmann::json{
1630 TOJSON_IMPL(nodeId),
1631 TOJSON_IMPL(userId),
1632 TOJSON_IMPL(displayName),
1633 TOJSON_IMPL(avatar)
1634 };
1635 }
1636 static void from_json(const nlohmann::json& j, Identity& p)
1637 {
1638 p.clear();
1639 getOptional<std::string>("nodeId", p.nodeId, j);
1640 getOptional<std::string>("userId", p.userId, j);
1641 getOptional<std::string>("displayName", p.displayName, j);
1642 getOptional<std::string>("avatar", p.avatar, j);
1643 }
1644
1645
1646 //-----------------------------------------------------------
1647 JSON_SERIALIZED_CLASS(Location)
1660 {
1661 IMPLEMENT_JSON_SERIALIZATION()
1662 IMPLEMENT_JSON_DOCUMENTATION(Location)
1663
1664 public:
1665 constexpr static double INVALID_LOCATION_VALUE = -999.999;
1666
1668 uint32_t ts;
1669
1671 double latitude;
1672
1675
1677 double altitude;
1678
1681
1683 double speed;
1684
1685 Location()
1686 {
1687 clear();
1688 }
1689
1690 void clear()
1691 {
1692 ts = 0;
1693 latitude = INVALID_LOCATION_VALUE;
1694 longitude = INVALID_LOCATION_VALUE;
1695 altitude = INVALID_LOCATION_VALUE;
1696 direction = INVALID_LOCATION_VALUE;
1697 speed = INVALID_LOCATION_VALUE;
1698 }
1699
1700 virtual void initForDocumenting()
1701 {
1702 clear();
1703
1704 ts = 123456;
1705 latitude = 123.456;
1706 longitude = 456.789;
1707 altitude = 123;
1708 direction = 1;
1709 speed = 1234;
1710 }
1711 };
1712
1713 static void to_json(nlohmann::json& j, const Location& p)
1714 {
1715 if(p.latitude != Location::INVALID_LOCATION_VALUE && p.longitude != Location::INVALID_LOCATION_VALUE)
1716 {
1717 j = nlohmann::json{
1718 TOJSON_IMPL(latitude),
1719 TOJSON_IMPL(longitude),
1720 };
1721
1722 if(p.ts != 0) j["ts"] = p.ts;
1723 if(p.altitude != Location::INVALID_LOCATION_VALUE) j["altitude"] = p.altitude;
1724 if(p.speed != Location::INVALID_LOCATION_VALUE) j["speed"] = p.speed;
1725 if(p.direction != Location::INVALID_LOCATION_VALUE) j["direction"] = p.direction;
1726 }
1727 }
1728 static void from_json(const nlohmann::json& j, Location& p)
1729 {
1730 p.clear();
1731 getOptional<uint32_t>("ts", p.ts, j, 0);
1732 j.at("latitude").get_to(p.latitude);
1733 j.at("longitude").get_to(p.longitude);
1734 getOptional<double>("altitude", p.altitude, j, Location::INVALID_LOCATION_VALUE);
1735 getOptional<double>("direction", p.direction, j, Location::INVALID_LOCATION_VALUE);
1736 getOptional<double>("speed", p.speed, j, Location::INVALID_LOCATION_VALUE);
1737 }
1738
1739 //-----------------------------------------------------------
1740 JSON_SERIALIZED_CLASS(Power)
1751 {
1752 IMPLEMENT_JSON_SERIALIZATION()
1753 IMPLEMENT_JSON_DOCUMENTATION(Power)
1754
1755 public:
1756
1769
1783
1786
1787 Power()
1788 {
1789 clear();
1790 }
1791
1792 void clear()
1793 {
1794 source = 0;
1795 state = 0;
1796 level = 0;
1797 }
1798
1799 virtual void initForDocumenting()
1800 {
1801 }
1802 };
1803
1804 static void to_json(nlohmann::json& j, const Power& p)
1805 {
1806 if(p.source != 0 && p.state != 0 && p.level != 0)
1807 {
1808 j = nlohmann::json{
1809 TOJSON_IMPL(source),
1810 TOJSON_IMPL(state),
1811 TOJSON_IMPL(level)
1812 };
1813 }
1814 }
1815 static void from_json(const nlohmann::json& j, Power& p)
1816 {
1817 p.clear();
1818 getOptional<int>("source", p.source, j, 0);
1819 getOptional<int>("state", p.state, j, 0);
1820 getOptional<int>("level", p.level, j, 0);
1821 }
1822
1823
1824 //-----------------------------------------------------------
1825 JSON_SERIALIZED_CLASS(Connectivity)
1836 {
1837 IMPLEMENT_JSON_SERIALIZATION()
1838 IMPLEMENT_JSON_DOCUMENTATION(Connectivity)
1839
1840 public:
1854 int type;
1855
1858
1861
1862 Connectivity()
1863 {
1864 clear();
1865 }
1866
1867 void clear()
1868 {
1869 type = 0;
1870 strength = 0;
1871 rating = 0;
1872 }
1873
1874 virtual void initForDocumenting()
1875 {
1876 clear();
1877
1878 type = 1;
1879 strength = 2;
1880 rating = 3;
1881 }
1882 };
1883
1884 static void to_json(nlohmann::json& j, const Connectivity& p)
1885 {
1886 if(p.type != 0)
1887 {
1888 j = nlohmann::json{
1889 TOJSON_IMPL(type),
1890 TOJSON_IMPL(strength),
1891 TOJSON_IMPL(rating)
1892 };
1893 }
1894 }
1895 static void from_json(const nlohmann::json& j, Connectivity& p)
1896 {
1897 p.clear();
1898 getOptional<int>("type", p.type, j, 0);
1899 getOptional<int>("strength", p.strength, j, 0);
1900 getOptional<int>("rating", p.rating, j, 0);
1901 }
1902
1903
1904 //-----------------------------------------------------------
1905 JSON_SERIALIZED_CLASS(PresenceDescriptorGroupItem)
1916 {
1917 IMPLEMENT_JSON_SERIALIZATION()
1918 IMPLEMENT_JSON_DOCUMENTATION(PresenceDescriptorGroupItem)
1919
1920 public:
1922 std::string groupId;
1923
1925 std::string alias;
1926
1928 uint16_t status;
1929
1931 {
1932 clear();
1933 }
1934
1935 void clear()
1936 {
1937 groupId.clear();
1938 alias.clear();
1939 status = 0;
1940 }
1941
1942 virtual void initForDocumenting()
1943 {
1944 groupId = "{123-456}";
1945 alias = "MYALIAS";
1946 status = 0;
1947 }
1948 };
1949
1950 static void to_json(nlohmann::json& j, const PresenceDescriptorGroupItem& p)
1951 {
1952 j = nlohmann::json{
1953 TOJSON_IMPL(groupId),
1954 TOJSON_IMPL(alias),
1955 TOJSON_IMPL(status)
1956 };
1957 }
1958 static void from_json(const nlohmann::json& j, PresenceDescriptorGroupItem& p)
1959 {
1960 p.clear();
1961 getOptional<std::string>("groupId", p.groupId, j);
1962 getOptional<std::string>("alias", p.alias, j);
1963 getOptional<uint16_t>("status", p.status, j);
1964 }
1965
1966
1967 //-----------------------------------------------------------
1968 JSON_SERIALIZED_CLASS(PresenceDescriptor)
1979 {
1980 IMPLEMENT_JSON_SERIALIZATION()
1981 IMPLEMENT_JSON_DOCUMENTATION(PresenceDescriptor)
1982
1983 public:
1984
1990 bool self;
1991
1997 uint32_t ts;
1998
2004 uint32_t nextUpdate;
2005
2008
2010 std::string comment;
2011
2025 uint32_t disposition;
2026
2028 std::vector<PresenceDescriptorGroupItem> groupAliases;
2029
2032
2034 std::string custom;
2035
2038
2041
2044
2046 {
2047 clear();
2048 }
2049
2050 void clear()
2051 {
2052 self = false;
2053 ts = 0;
2054 nextUpdate = 0;
2055 identity.clear();
2056 comment.clear();
2057 disposition = 0;
2058 groupAliases.clear();
2059 location.clear();
2060 custom.clear();
2061 announceOnReceive = false;
2062 connectivity.clear();
2063 power.clear();
2064 }
2065
2066 virtual void initForDocumenting()
2067 {
2068 clear();
2069
2070 self = true;
2071 ts = 123;
2072 nextUpdate = 0;
2073 identity.initForDocumenting();
2074 comment = "This is a comment";
2075 disposition = 123;
2076
2077 PresenceDescriptorGroupItem gi;
2078 gi.initForDocumenting();
2079 groupAliases.push_back(gi);
2080
2081 location.initForDocumenting();
2082 custom = "{}";
2083 announceOnReceive = true;
2084 connectivity.initForDocumenting();
2085 power.initForDocumenting();
2086 }
2087 };
2088
2089 static void to_json(nlohmann::json& j, const PresenceDescriptor& p)
2090 {
2091 j = nlohmann::json{
2092 TOJSON_IMPL(ts),
2093 TOJSON_IMPL(nextUpdate),
2094 TOJSON_IMPL(identity),
2095 TOJSON_IMPL(comment),
2096 TOJSON_IMPL(disposition),
2097 TOJSON_IMPL(groupAliases),
2098 TOJSON_IMPL(location),
2099 TOJSON_IMPL(custom),
2100 TOJSON_IMPL(announceOnReceive),
2101 TOJSON_IMPL(connectivity),
2102 TOJSON_IMPL(power)
2103 };
2104
2105 if(!p.comment.empty()) j["comment"] = p.comment;
2106 if(!p.custom.empty()) j["custom"] = p.custom;
2107
2108 if(p.self)
2109 {
2110 j["self"] = true;
2111 }
2112 }
2113 static void from_json(const nlohmann::json& j, PresenceDescriptor& p)
2114 {
2115 p.clear();
2116 getOptional<bool>("self", p.self, j);
2117 getOptional<uint32_t>("ts", p.ts, j);
2118 getOptional<uint32_t>("nextUpdate", p.nextUpdate, j);
2119 getOptional<Identity>("identity", p.identity, j);
2120 getOptional<std::string>("comment", p.comment, j);
2121 getOptional<uint32_t>("disposition", p.disposition, j);
2122 getOptional<std::vector<PresenceDescriptorGroupItem>>("groupAliases", p.groupAliases, j);
2123 getOptional<Location>("location", p.location, j);
2124 getOptional<std::string>("custom", p.custom, j);
2125 getOptional<bool>("announceOnReceive", p.announceOnReceive, j);
2126 getOptional<Connectivity>("connectivity", p.connectivity, j);
2127 getOptional<Power>("power", p.power, j);
2128 }
2129
2135 typedef enum
2136 {
2139
2142
2145
2147 priVoice = 3
2148 } TxPriority_t;
2149
2155 typedef enum
2156 {
2159
2162
2165
2167 arpIpv6ThenIpv4 = 64
2168 } AddressResolutionPolicy_t;
2169
2170 //-----------------------------------------------------------
2171 JSON_SERIALIZED_CLASS(NetworkTxOptions)
2184 {
2185 IMPLEMENT_JSON_SERIALIZATION()
2186 IMPLEMENT_JSON_DOCUMENTATION(NetworkTxOptions)
2187
2188 public:
2191
2197 int ttl;
2198
2200 {
2201 clear();
2202 }
2203
2204 void clear()
2205 {
2206 priority = priVoice;
2207 ttl = 1;
2208 }
2209
2210 virtual void initForDocumenting()
2211 {
2212 }
2213 };
2214
2215 static void to_json(nlohmann::json& j, const NetworkTxOptions& p)
2216 {
2217 j = nlohmann::json{
2218 TOJSON_IMPL(priority),
2219 TOJSON_IMPL(ttl)
2220 };
2221 }
2222 static void from_json(const nlohmann::json& j, NetworkTxOptions& p)
2223 {
2224 p.clear();
2225 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
2226 getOptional<int>("ttl", p.ttl, j, 1);
2227 }
2228
2229
2230 //-----------------------------------------------------------
2231 JSON_SERIALIZED_CLASS(TcpNetworkTxOptions)
2240 {
2241 IMPLEMENT_JSON_SERIALIZATION()
2242 IMPLEMENT_JSON_DOCUMENTATION(TcpNetworkTxOptions)
2243
2244 public:
2246 {
2247 clear();
2248 }
2249
2250 void clear()
2251 {
2252 priority = priVoice;
2253 ttl = -1;
2254 }
2255
2256 virtual void initForDocumenting()
2257 {
2258 }
2259 };
2260
2261 static void to_json(nlohmann::json& j, const TcpNetworkTxOptions& p)
2262 {
2263 j = nlohmann::json{
2264 TOJSON_IMPL(priority),
2265 TOJSON_IMPL(ttl)
2266 };
2267 }
2268 static void from_json(const nlohmann::json& j, TcpNetworkTxOptions& p)
2269 {
2270 p.clear();
2271 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
2272 getOptional<int>("ttl", p.ttl, j, -1);
2273 }
2274
2275 typedef enum
2276 {
2279
2282
2284 ifIp6 = 6
2285 } IpFamilyType_t;
2286
2287 //-----------------------------------------------------------
2288 JSON_SERIALIZED_CLASS(NetworkAddress)
2300 {
2301 IMPLEMENT_JSON_SERIALIZATION()
2302 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddress)
2303
2304 public:
2306 std::string address;
2307
2309 int port;
2310
2312 {
2313 clear();
2314 }
2315
2316 void clear()
2317 {
2318 address.clear();
2319 port = 0;
2320 }
2321
2322 bool matches(const NetworkAddress& other)
2323 {
2324 if(address.compare(other.address) != 0)
2325 {
2326 return false;
2327 }
2328
2329 if(port != other.port)
2330 {
2331 return false;
2332 }
2333
2334 return true;
2335 }
2336 };
2337
2338 static void to_json(nlohmann::json& j, const NetworkAddress& p)
2339 {
2340 j = nlohmann::json{
2341 TOJSON_IMPL(address),
2342 TOJSON_IMPL(port)
2343 };
2344 }
2345 static void from_json(const nlohmann::json& j, NetworkAddress& p)
2346 {
2347 p.clear();
2348 getOptional<std::string>("address", p.address, j);
2349 getOptional<int>("port", p.port, j);
2350 }
2351
2352
2353 //-----------------------------------------------------------
2354 JSON_SERIALIZED_CLASS(NetworkAddressRxTx)
2366 {
2367 IMPLEMENT_JSON_SERIALIZATION()
2368 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddressRxTx)
2369
2370 public:
2373
2376
2378 {
2379 clear();
2380 }
2381
2382 void clear()
2383 {
2384 rx.clear();
2385 tx.clear();
2386 }
2387 };
2388
2389 static void to_json(nlohmann::json& j, const NetworkAddressRxTx& p)
2390 {
2391 j = nlohmann::json{
2392 TOJSON_IMPL(rx),
2393 TOJSON_IMPL(tx)
2394 };
2395 }
2396 static void from_json(const nlohmann::json& j, NetworkAddressRxTx& p)
2397 {
2398 p.clear();
2399 getOptional<NetworkAddress>("rx", p.rx, j);
2400 getOptional<NetworkAddress>("tx", p.tx, j);
2401 }
2402
2404 typedef enum
2405 {
2408
2410 graptStrict = 1
2411 } GroupRestrictionAccessPolicyType_t;
2412
2413 static bool isValidGroupRestrictionAccessPolicyType(GroupRestrictionAccessPolicyType_t t)
2414 {
2415 return (t == GroupRestrictionAccessPolicyType_t::graptPermissive ||
2416 t == GroupRestrictionAccessPolicyType_t::graptStrict );
2417 }
2418
2420 typedef enum
2421 {
2424
2427
2429 rtBlacklist = 2
2430 } RestrictionType_t;
2431
2432 static bool isValidRestrictionType(RestrictionType_t t)
2433 {
2434 return (t == RestrictionType_t::rtUndefined ||
2435 t == RestrictionType_t::rtWhitelist ||
2436 t == RestrictionType_t::rtBlacklist );
2437 }
2438
2463
2464 static bool isValidRestrictionElementType(RestrictionElementType_t t)
2465 {
2466 return (t == RestrictionElementType_t::retGroupId ||
2467 t == RestrictionElementType_t::retGroupIdPattern ||
2468 t == RestrictionElementType_t::retGenericAccessTagPattern ||
2469 t == RestrictionElementType_t::retCertificateSerialNumberPattern ||
2470 t == RestrictionElementType_t::retCertificateFingerprintPattern ||
2471 t == RestrictionElementType_t::retCertificateSubjectPattern ||
2472 t == RestrictionElementType_t::retCertificateIssuerPattern);
2473 }
2474
2475
2476 //-----------------------------------------------------------
2477 JSON_SERIALIZED_CLASS(NetworkAddressRestrictionList)
2489 {
2490 IMPLEMENT_JSON_SERIALIZATION()
2491 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddressRestrictionList)
2492
2493 public:
2496
2498 std::vector<NetworkAddressRxTx> elements;
2499
2501 {
2502 clear();
2503 }
2504
2505 void clear()
2506 {
2507 type = RestrictionType_t::rtUndefined;
2508 elements.clear();
2509 }
2510 };
2511
2512 static void to_json(nlohmann::json& j, const NetworkAddressRestrictionList& p)
2513 {
2514 j = nlohmann::json{
2515 TOJSON_IMPL(type),
2516 TOJSON_IMPL(elements)
2517 };
2518 }
2519 static void from_json(const nlohmann::json& j, NetworkAddressRestrictionList& p)
2520 {
2521 p.clear();
2522 getOptional<RestrictionType_t>("type", p.type, j, RestrictionType_t::rtUndefined);
2523 getOptional<std::vector<NetworkAddressRxTx>>("elements", p.elements, j);
2524 }
2525
2526 //-----------------------------------------------------------
2527 JSON_SERIALIZED_CLASS(StringRestrictionList)
2539 {
2540 IMPLEMENT_JSON_SERIALIZATION()
2541 IMPLEMENT_JSON_DOCUMENTATION(StringRestrictionList)
2542
2543 public:
2546
2549
2551 std::vector<std::string> elements;
2552
2554 {
2555 type = RestrictionType_t::rtUndefined;
2556 elementsType = RestrictionElementType_t::retGroupId;
2557 clear();
2558 }
2559
2560 void clear()
2561 {
2562 elements.clear();
2563 }
2564 };
2565
2566 static void to_json(nlohmann::json& j, const StringRestrictionList& p)
2567 {
2568 j = nlohmann::json{
2569 TOJSON_IMPL(type),
2570 TOJSON_IMPL(elementsType),
2571 TOJSON_IMPL(elements)
2572 };
2573 }
2574 static void from_json(const nlohmann::json& j, StringRestrictionList& p)
2575 {
2576 p.clear();
2577 getOptional<RestrictionType_t>("type", p.type, j, RestrictionType_t::rtUndefined);
2578 getOptional<RestrictionElementType_t>("elementsType", p.elementsType, j, RestrictionElementType_t::retGroupId);
2579 getOptional<std::vector<std::string>>("elements", p.elements, j);
2580 }
2581
2582
2583 //-----------------------------------------------------------
2584 JSON_SERIALIZED_CLASS(PacketCapturer)
2594 {
2595 IMPLEMENT_JSON_SERIALIZATION()
2596 IMPLEMENT_JSON_DOCUMENTATION(PacketCapturer)
2597
2598 public:
2599 bool enabled;
2600 uint32_t maxMb;
2601 std::string filePrefix;
2602
2604 {
2605 clear();
2606 }
2607
2608 void clear()
2609 {
2610 enabled = false;
2611 maxMb = 10;
2612 filePrefix.clear();
2613 }
2614 };
2615
2616 static void to_json(nlohmann::json& j, const PacketCapturer& p)
2617 {
2618 j = nlohmann::json{
2619 TOJSON_IMPL(enabled),
2620 TOJSON_IMPL(maxMb),
2621 TOJSON_IMPL(filePrefix)
2622 };
2623 }
2624 static void from_json(const nlohmann::json& j, PacketCapturer& p)
2625 {
2626 p.clear();
2627 getOptional<bool>("enabled", p.enabled, j, false);
2628 getOptional<uint32_t>("maxMb", p.maxMb, j, 10);
2629 getOptional<std::string>("filePrefix", p.filePrefix, j, EMPTY_STRING);
2630 }
2631
2632
2633 //-----------------------------------------------------------
2634 JSON_SERIALIZED_CLASS(TransportImpairment)
2644 {
2645 IMPLEMENT_JSON_SERIALIZATION()
2646 IMPLEMENT_JSON_DOCUMENTATION(TransportImpairment)
2647
2648 public:
2655
2657 {
2658 clear();
2659 }
2660
2661 void clear()
2662 {
2663 jitterMs = 0;
2664 lossPercentage = 0;
2665 errorPercentage = 0;
2666 }
2667 };
2668
2669 static void to_json(nlohmann::json& j, const TransportImpairment& p)
2670 {
2671 j = nlohmann::json{
2672 TOJSON_IMPL(jitterMs),
2673 TOJSON_IMPL(lossPercentage),
2674 TOJSON_IMPL(errorPercentage)
2675 };
2676 }
2677 static void from_json(const nlohmann::json& j, TransportImpairment& p)
2678 {
2679 p.clear();
2680 getOptional<int>("jitterMs", p.jitterMs, j, 0);
2681 getOptional<int>("lossPercentage", p.lossPercentage, j, 0);
2682 getOptional<int>("errorPercentage", p.errorPercentage, j, 0);
2683 // Legacy "applicationPercentage" is ignored if present in older JSON.
2684 }
2685
2686 //-----------------------------------------------------------
2687 JSON_SERIALIZED_CLASS(NsmNetworking)
2700 {
2701 IMPLEMENT_JSON_SERIALIZATION()
2702 IMPLEMENT_JSON_DOCUMENTATION(NsmNetworking)
2703
2704 public:
2705 std::string address;
2706 int port;
2707 int ttl;
2708 TxPriority_t priority;
2709 int txOversend;
2710 TransportImpairment rxImpairment;
2711 TransportImpairment txImpairment;
2712 std::string cryptoPassword;
2713 int maxUdpPayloadBytes;
2714
2716 {
2717 clear();
2718 }
2719
2720 void clear()
2721 {
2722 address.clear();
2723 port = 0;
2724 ttl = 1;
2725 priority = TxPriority_t::priVoice;
2726 txOversend = 0;
2727 rxImpairment.clear();
2728 txImpairment.clear();
2729 cryptoPassword.clear();
2730 maxUdpPayloadBytes = 800;
2731 }
2732 };
2733
2734 static void to_json(nlohmann::json& j, const NsmNetworking& p)
2735 {
2736 nlohmann::json pathJson;
2737 to_json(pathJson, p.address);
2738 j = nlohmann::json{
2739 TOJSON_IMPL(port),
2740 TOJSON_IMPL(ttl),
2741 TOJSON_IMPL(priority),
2742 TOJSON_IMPL(txOversend),
2743 TOJSON_IMPL(rxImpairment),
2744 TOJSON_IMPL(txImpairment),
2745 TOJSON_IMPL(cryptoPassword),
2746 TOJSON_IMPL(maxUdpPayloadBytes)
2747 };
2748 }
2749 static void from_json(const nlohmann::json& j, NsmNetworking& p)
2750 {
2751 p.clear();
2752 getOptional<std::string>("address", p.address, j);
2753 getOptional<int>("port", p.port, j, 8513);
2754 getOptional<int>("ttl", p.ttl, j, 1);
2755 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
2756 getOptional<int>("txOversend", p.txOversend, j, 0);
2757 getOptional<TransportImpairment>("rxImpairment", p.rxImpairment, j);
2758 getOptional<TransportImpairment>("txImpairment", p.txImpairment, j);
2759 getOptional("cryptoPassword", p.cryptoPassword, j, EMPTY_STRING);
2760 getOptional<int>("maxUdpPayloadBytes", p.maxUdpPayloadBytes, j, 800);
2761 }
2762
2763 //-----------------------------------------------------------
2764 JSON_SERIALIZED_CLASS(NsmNodeResource)
2771 {
2772 IMPLEMENT_JSON_SERIALIZATION()
2773 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeResource)
2774
2775 public:
2777 std::string id;
2780
2782 {
2783 clear();
2784 }
2785
2786 void clear()
2787 {
2788 id.clear();
2789 priority = -1;
2790 }
2791 };
2792
2793 static void to_json(nlohmann::json& j, const NsmNodeResource& p)
2794 {
2795 j = nlohmann::json{
2796 TOJSON_IMPL(id),
2797 TOJSON_IMPL(priority)
2798 };
2799 }
2800 static void from_json(const nlohmann::json& j, NsmNodeResource& p)
2801 {
2802 p.clear();
2803 getOptional<std::string>("id", p.id, j);
2804 getOptional<int>("priority", p.priority, j, -1);
2805 }
2806
2808 static void nsmConfigurationResourcesFromJson(const nlohmann::json& j, std::vector<NsmNodeResource>& out)
2809 {
2810 out.clear();
2811 if (!j.contains("resources") || !j["resources"].is_array())
2812 {
2813 return;
2814 }
2815 for (const auto& el : j["resources"])
2816 {
2817 if (!el.is_object())
2818 {
2819 continue;
2820 }
2821 NsmNodeResource nr;
2822 nr.clear();
2823 getOptional<std::string>("id", nr.id, el);
2824 getOptional<int>("priority", nr.priority, el, -1);
2825 if (!nr.id.empty())
2826 {
2827 out.push_back(nr);
2828 }
2829 }
2830 }
2831
2832
2833 //-----------------------------------------------------------
2834 JSON_SERIALIZED_CLASS(NsmConfiguration)
2844 {
2845 IMPLEMENT_JSON_SERIALIZATION()
2846 IMPLEMENT_JSON_DOCUMENTATION(NsmConfiguration)
2847
2848 public:
2849
2850 std::string id;
2851 bool favorUptime;
2852 NsmNetworking networking;
2853 std::vector<NsmNodeResource> resources;
2854 int tokenStart;
2855 int tokenEnd;
2856 int intervalSecs;
2857 int transitionSecsFactor;
2862 bool logCommandOutput;
2863
2865 {
2866 clear();
2867 }
2868
2869 void clear()
2870 {
2871 id.clear();
2872 favorUptime = false;
2873 networking.clear();
2874 resources.clear();
2875 tokenStart = 1000000;
2876 tokenEnd = 2000000;
2877 intervalSecs = 1;
2878 transitionSecsFactor = 3;
2879 internalMultiplier = 1;
2880 goingActiveRandomDelayMs = 500;
2881 logCommandOutput = false;
2882 }
2883 };
2884
2885 static void to_json(nlohmann::json& j, const NsmConfiguration& p)
2886 {
2887 j = nlohmann::json{
2888 TOJSON_IMPL(id),
2889 TOJSON_IMPL(favorUptime),
2890 TOJSON_IMPL(networking),
2891 TOJSON_IMPL(resources),
2892 TOJSON_IMPL(tokenStart),
2893 TOJSON_IMPL(tokenEnd),
2894 TOJSON_IMPL(intervalSecs),
2895 TOJSON_IMPL(transitionSecsFactor),
2896 TOJSON_IMPL(internalMultiplier),
2897 TOJSON_IMPL(goingActiveRandomDelayMs),
2898 TOJSON_IMPL(logCommandOutput),
2899 };
2900 }
2901 static void from_json(const nlohmann::json& j, NsmConfiguration& p)
2902 {
2903 p.clear();
2904 getOptional("id", p.id, j);
2905 getOptional<bool>("favorUptime", p.favorUptime, j, false);
2906 getOptional<NsmNetworking>("networking", p.networking, j);
2907 nsmConfigurationResourcesFromJson(j, p.resources);
2908 getOptional<int>("tokenStart", p.tokenStart, j, 1000000);
2909 getOptional<int>("tokenEnd", p.tokenEnd, j, 2000000);
2910 getOptional<int>("intervalSecs", p.intervalSecs, j, 1);
2911 getOptional<int>("transitionSecsFactor", p.transitionSecsFactor, j, 3);
2912 getOptional<int>("internalMultiplier", p.internalMultiplier, j, 1);
2913 getOptional<int>("goingActiveRandomDelayMs", p.goingActiveRandomDelayMs, j, 500);
2914 getOptional<bool>("logCommandOutput", p.logCommandOutput, j, false);
2915 }
2916
2917
2918 //-----------------------------------------------------------
2919 JSON_SERIALIZED_CLASS(Rallypoint)
2928 {
2929 IMPLEMENT_JSON_SERIALIZATION()
2930 IMPLEMENT_JSON_DOCUMENTATION(Rallypoint)
2931
2932 public:
2937 typedef enum
2938 {
2940 rppTlsTcp = 0,
2941
2943 rppTlsWs = 1,
2944
2946 rppInvalid = -1
2947 } RpProtocol_t;
2948
2954
2966 std::string certificate;
2967
2979 std::string certificateKey;
2980
2985
2990
2994 std::vector<std::string> caCertificates;
2995
3000
3005
3008
3011
3017 std::string sni;
3018
3019
3022
3024 std::string path;
3025
3028
3029
3030 Rallypoint()
3031 {
3032 clear();
3033 }
3034
3035 void clear()
3036 {
3037 host.clear();
3038 certificate.clear();
3039 certificateKey.clear();
3040 caCertificates.clear();
3041 verifyPeer = false;
3042 transactionTimeoutMs = 0;
3043 disableMessageSigning = false;
3044 connectionTimeoutSecs = 0;
3045 tcpTxOptions.clear();
3046 sni.clear();
3047 protocol = rppTlsTcp;
3048 path.clear();
3049 additionalProtocols.clear();
3050 }
3051
3052 bool matches(const Rallypoint& other)
3053 {
3054 if(!host.matches(other.host))
3055 {
3056 return false;
3057 }
3058
3059 if(protocol != other.protocol)
3060 {
3061 return false;
3062 }
3063
3064 if(path.compare(other.path) != 0)
3065 {
3066 return false;
3067 }
3068
3069 if(certificate.compare(other.certificate) != 0)
3070 {
3071 return false;
3072 }
3073
3074 if(certificateKey.compare(other.certificateKey) != 0)
3075 {
3076 return false;
3077 }
3078
3079 if(verifyPeer != other.verifyPeer)
3080 {
3081 return false;
3082 }
3083
3084 if(allowSelfSignedCertificate != other.allowSelfSignedCertificate)
3085 {
3086 return false;
3087 }
3088
3089 if(caCertificates.size() != other.caCertificates.size())
3090 {
3091 return false;
3092 }
3093
3094 for(size_t x = 0; x < caCertificates.size(); x++)
3095 {
3096 bool found = false;
3097
3098 for(size_t y = 0; y < other.caCertificates.size(); y++)
3099 {
3100 if(caCertificates[x].compare(other.caCertificates[y]) == 0)
3101 {
3102 found = true;
3103 break;
3104 }
3105 }
3106
3107 if(!found)
3108 {
3109 return false;
3110 }
3111 }
3112
3113 if(transactionTimeoutMs != other.transactionTimeoutMs)
3114 {
3115 return false;
3116 }
3117
3118 if(disableMessageSigning != other.disableMessageSigning)
3119 {
3120 return false;
3121 }
3122 if(connectionTimeoutSecs != other.connectionTimeoutSecs)
3123 {
3124 return false;
3125 }
3126 if(tcpTxOptions.priority != other.tcpTxOptions.priority)
3127 {
3128 return false;
3129 }
3130 if(sni.compare(other.sni) != 0)
3131 {
3132 return false;
3133 }
3134
3135 return true;
3136 }
3137 };
3138
3139 static void to_json(nlohmann::json& j, const Rallypoint& p)
3140 {
3141 j = nlohmann::json{
3142 TOJSON_IMPL(host),
3143 TOJSON_IMPL(certificate),
3144 TOJSON_IMPL(certificateKey),
3145 TOJSON_IMPL(verifyPeer),
3146 TOJSON_IMPL(allowSelfSignedCertificate),
3147 TOJSON_IMPL(caCertificates),
3148 TOJSON_IMPL(transactionTimeoutMs),
3149 TOJSON_IMPL(disableMessageSigning),
3150 TOJSON_IMPL(connectionTimeoutSecs),
3151 TOJSON_IMPL(tcpTxOptions),
3152 TOJSON_IMPL(sni),
3153 TOJSON_IMPL(protocol),
3154 TOJSON_IMPL(path),
3155 TOJSON_IMPL(additionalProtocols)
3156 };
3157 }
3158
3159 static void from_json(const nlohmann::json& j, Rallypoint& p)
3160 {
3161 p.clear();
3162 j.at("host").get_to(p.host);
3163 getOptional("certificate", p.certificate, j);
3164 getOptional("certificateKey", p.certificateKey, j);
3165 getOptional<bool>("verifyPeer", p.verifyPeer, j, true);
3166 getOptional<bool>("allowSelfSignedCertificate", p.allowSelfSignedCertificate, j, false);
3167 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
3168 getOptional<int>("transactionTimeoutMs", p.transactionTimeoutMs, j, 0);
3169 getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
3170 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
3171 getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
3172 getOptional<std::string>("sni", p.sni, j);
3173 getOptional<Rallypoint::RpProtocol_t>("protocol", p.protocol, j, Rallypoint::RpProtocol_t::rppTlsTcp);
3174 getOptional<std::string>("path", p.path, j);
3175 getOptional<std::string>("additionalProtocols", p.additionalProtocols, j);
3176 }
3177
3178 //-----------------------------------------------------------
3179 JSON_SERIALIZED_CLASS(RallypointCluster)
3191 {
3192 IMPLEMENT_JSON_SERIALIZATION()
3193 IMPLEMENT_JSON_DOCUMENTATION(RallypointCluster)
3194
3195 public:
3201 typedef enum
3202 {
3204 csRoundRobin = 0,
3205
3207 csFailback = 1
3208 } ConnectionStrategy_t;
3209
3212
3214 std::vector<Rallypoint> rallypoints;
3215
3218
3221
3224
3226 {
3227 clear();
3228 }
3229
3230 void clear()
3231 {
3232 connectionStrategy = csRoundRobin;
3233 rallypoints.clear();
3234 rolloverSecs = 10;
3235 connectionTimeoutSecs = 5;
3236 transactionTimeoutMs = 10000;
3237 }
3238 };
3239
3240 static void to_json(nlohmann::json& j, const RallypointCluster& p)
3241 {
3242 j = nlohmann::json{
3243 TOJSON_IMPL(connectionStrategy),
3244 TOJSON_IMPL(rallypoints),
3245 TOJSON_IMPL(rolloverSecs),
3246 TOJSON_IMPL(connectionTimeoutSecs),
3247 TOJSON_IMPL(transactionTimeoutMs)
3248 };
3249 }
3250 static void from_json(const nlohmann::json& j, RallypointCluster& p)
3251 {
3252 p.clear();
3253 getOptional<RallypointCluster::ConnectionStrategy_t>("connectionStrategy", p.connectionStrategy, j, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
3254 getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
3255 getOptional<int>("rolloverSecs", p.rolloverSecs, j, 10);
3256 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 5);
3257 getOptional<int>("transactionTimeoutMs", p.transactionTimeoutMs, j, 10000);
3258 }
3259
3260
3261 //-----------------------------------------------------------
3262 JSON_SERIALIZED_CLASS(NetworkDeviceDescriptor)
3273 {
3274 IMPLEMENT_JSON_SERIALIZATION()
3275 IMPLEMENT_JSON_DOCUMENTATION(NetworkDeviceDescriptor)
3276
3277 public:
3283
3285 std::string name;
3286
3288 std::string manufacturer;
3289
3291 std::string model;
3292
3294 std::string hardwareId;
3295
3297 std::string serialNumber;
3298
3300 std::string type;
3301
3303 std::string extra;
3304
3306 {
3307 clear();
3308 }
3309
3310 void clear()
3311 {
3312 deviceId = 0;
3313
3314 name.clear();
3315 manufacturer.clear();
3316 model.clear();
3317 hardwareId.clear();
3318 serialNumber.clear();
3319 type.clear();
3320 extra.clear();
3321 }
3322
3323 virtual std::string toString()
3324 {
3325 char buff[2048];
3326
3327 snprintf(buff, sizeof(buff), "deviceId=%d, name=%s, manufacturer=%s, model=%s, hardwareId=%s, serialNumber=%s, type=%s, extra=%s",
3328 deviceId,
3329 name.c_str(),
3330 manufacturer.c_str(),
3331 model.c_str(),
3332 hardwareId.c_str(),
3333 serialNumber.c_str(),
3334 type.c_str(),
3335 extra.c_str());
3336
3337 return std::string(buff);
3338 }
3339 };
3340
3341 static void to_json(nlohmann::json& j, const NetworkDeviceDescriptor& p)
3342 {
3343 j = nlohmann::json{
3344 TOJSON_IMPL(deviceId),
3345 TOJSON_IMPL(name),
3346 TOJSON_IMPL(manufacturer),
3347 TOJSON_IMPL(model),
3348 TOJSON_IMPL(hardwareId),
3349 TOJSON_IMPL(serialNumber),
3350 TOJSON_IMPL(type),
3351 TOJSON_IMPL(extra)
3352 };
3353 }
3354 static void from_json(const nlohmann::json& j, NetworkDeviceDescriptor& p)
3355 {
3356 p.clear();
3357 getOptional<int>("deviceId", p.deviceId, j, 0);
3358 getOptional("name", p.name, j);
3359 getOptional("manufacturer", p.manufacturer, j);
3360 getOptional("model", p.model, j);
3361 getOptional("hardwareId", p.hardwareId, j);
3362 getOptional("serialNumber", p.serialNumber, j);
3363 getOptional("type", p.type, j);
3364 getOptional("extra", p.extra, j);
3365 }
3366
3367 //-----------------------------------------------------------
3368 JSON_SERIALIZED_CLASS(AudioGate)
3378 {
3379 IMPLEMENT_JSON_SERIALIZATION()
3380 IMPLEMENT_JSON_DOCUMENTATION(AudioGate)
3381
3382 public:
3385
3388
3390 uint32_t hangMs;
3391
3393 uint32_t windowMin;
3394
3396 uint32_t windowMax;
3397
3400
3401
3402 AudioGate()
3403 {
3404 clear();
3405 }
3406
3407 void clear()
3408 {
3409 enabled = false;
3410 useVad = false;
3411 hangMs = 1500;
3412 windowMin = 25;
3413 windowMax = 125;
3414 coefficient = 1.75;
3415 }
3416 };
3417
3418 static void to_json(nlohmann::json& j, const AudioGate& p)
3419 {
3420 j = nlohmann::json{
3421 TOJSON_IMPL(enabled),
3422 TOJSON_IMPL(useVad),
3423 TOJSON_IMPL(hangMs),
3424 TOJSON_IMPL(windowMin),
3425 TOJSON_IMPL(windowMax),
3426 TOJSON_IMPL(coefficient)
3427 };
3428 }
3429 static void from_json(const nlohmann::json& j, AudioGate& p)
3430 {
3431 p.clear();
3432 getOptional<bool>("enabled", p.enabled, j, false);
3433 getOptional<bool>("useVad", p.useVad, j, false);
3434 getOptional<uint32_t>("hangMs", p.hangMs, j, 1500);
3435 getOptional<uint32_t>("windowMin", p.windowMin, j, 25);
3436 getOptional<uint32_t>("windowMax", p.windowMax, j, 125);
3437 getOptional<double>("coefficient", p.coefficient, j, 1.75);
3438 }
3439
3440 //-----------------------------------------------------------
3441 JSON_SERIALIZED_CLASS(TxAudio)
3455 {
3456 IMPLEMENT_JSON_SERIALIZATION()
3457 IMPLEMENT_JSON_DOCUMENTATION(TxAudio)
3458
3459 public:
3465 typedef enum
3466 {
3468 ctExternal = -1,
3469
3471 ctUnknown = 0,
3472
3473 /* G.711 */
3475 ctG711ulaw = 1,
3476
3478 ctG711alaw = 2,
3479
3480
3481 /* GSM */
3483 ctGsm610 = 3,
3484
3485
3486 /* G.729 */
3488 ctG729a = 4,
3489
3490
3491 /* PCM */
3493 ctPcm = 5,
3494
3495 // AMR Narrowband */
3497 ctAmrNb4750 = 10,
3498
3500 ctAmrNb5150 = 11,
3501
3503 ctAmrNb5900 = 12,
3504
3506 ctAmrNb6700 = 13,
3507
3509 ctAmrNb7400 = 14,
3510
3512 ctAmrNb7950 = 15,
3513
3515 ctAmrNb10200 = 16,
3516
3518 ctAmrNb12200 = 17,
3519
3520
3521 /* Opus */
3523 ctOpus6000 = 20,
3524
3526 ctOpus8000 = 21,
3527
3529 ctOpus10000 = 22,
3530
3532 ctOpus12000 = 23,
3533
3535 ctOpus14000 = 24,
3536
3538 ctOpus16000 = 25,
3539
3541 ctOpus18000 = 26,
3542
3544 ctOpus20000 = 27,
3545
3547 ctOpus22000 = 28,
3548
3550 ctOpus24000 = 29,
3551
3552
3553 /* Speex */
3555 ctSpxNb2150 = 30,
3556
3558 ctSpxNb3950 = 31,
3559
3561 ctSpxNb5950 = 32,
3562
3564 ctSpxNb8000 = 33,
3565
3567 ctSpxNb11000 = 34,
3568
3570 ctSpxNb15000 = 35,
3571
3573 ctSpxNb18200 = 36,
3574
3576 ctSpxNb24600 = 37,
3577
3578
3579 /* Codec2 */
3581 ctC2450 = 40,
3582
3584 ctC2700 = 41,
3585
3587 ctC21200 = 42,
3588
3590 ctC21300 = 43,
3591
3593 ctC21400 = 44,
3594
3596 ctC21600 = 45,
3597
3599 ctC22400 = 46,
3600
3602 ctC23200 = 47,
3603
3604
3605 /* MELPe */
3607 ctMelpe600 = 50,
3608
3610 ctMelpe1200 = 51,
3611
3613 ctMelpe2400 = 52,
3614
3615 /* CVSD */
3617 ctCvsd = 60
3618 } TxCodec_t;
3619
3625 typedef enum
3626 {
3628 hetEngageStandard = 0,
3629
3631 hetNatoStanga5643 = 1
3632 } HeaderExtensionType_t;
3633
3636
3639
3641 std::string encoderName;
3642
3645
3648
3650 bool fdx;
3651
3659
3662
3669
3676
3679
3682
3685
3690
3692 uint32_t internalKey;
3693
3696
3699
3701 bool dtx;
3702
3705
3706 TxAudio()
3707 {
3708 clear();
3709 }
3710
3711 void clear()
3712 {
3713 enabled = true;
3714 encoder = TxAudio::TxCodec_t::ctUnknown;
3715 encoderName.clear();
3716 framingMs = 60;
3717 blockCount = 0;
3718 fdx = false;
3719 noHdrExt = false;
3720 maxTxSecs = 0;
3721 extensionSendInterval = 10;
3722 initialHeaderBurst = 5;
3723 trailingHeaderBurst = 5;
3724 startTxNotifications = 5;
3725 customRtpPayloadType = -1;
3726 internalKey = 0;
3727 resetRtpOnTx = true;
3728 enableSmoothing = true;
3729 dtx = false;
3730 smoothedHangTimeMs = 0;
3731 hdrExtType = HeaderExtensionType_t::hetEngageStandard;
3732 }
3733 };
3734
3735 static void to_json(nlohmann::json& j, const TxAudio& p)
3736 {
3737 j = nlohmann::json{
3738 TOJSON_IMPL(enabled),
3739 TOJSON_IMPL(encoder),
3740 TOJSON_IMPL(encoderName),
3741 TOJSON_IMPL(framingMs),
3742 TOJSON_IMPL(blockCount),
3743 TOJSON_IMPL(fdx),
3744 TOJSON_IMPL(noHdrExt),
3745 TOJSON_IMPL(maxTxSecs),
3746 TOJSON_IMPL(extensionSendInterval),
3747 TOJSON_IMPL(initialHeaderBurst),
3748 TOJSON_IMPL(trailingHeaderBurst),
3749 TOJSON_IMPL(startTxNotifications),
3750 TOJSON_IMPL(customRtpPayloadType),
3751 TOJSON_IMPL(resetRtpOnTx),
3752 TOJSON_IMPL(enableSmoothing),
3753 TOJSON_IMPL(dtx),
3754 TOJSON_IMPL(smoothedHangTimeMs),
3755 TOJSON_IMPL(hdrExtType)
3756 };
3757
3758 // internalKey is not serialized
3759 }
3760 static void from_json(const nlohmann::json& j, TxAudio& p)
3761 {
3762 p.clear();
3763 getOptional<bool>("enabled", p.enabled, j, true);
3764 getOptional<TxAudio::TxCodec_t>("encoder", p.encoder, j, TxAudio::TxCodec_t::ctOpus8000);
3765 getOptional<std::string>("encoderName", p.encoderName, j, EMPTY_STRING);
3766 getOptional("framingMs", p.framingMs, j, 60);
3767 getOptional("blockCount", p.blockCount, j, 0);
3768 getOptional("fdx", p.fdx, j, false);
3769 getOptional("noHdrExt", p.noHdrExt, j, false);
3770 getOptional("maxTxSecs", p.maxTxSecs, j, 0);
3771 getOptional("extensionSendInterval", p.extensionSendInterval, j, 10);
3772 getOptional("initialHeaderBurst", p.initialHeaderBurst, j, 5);
3773 getOptional("trailingHeaderBurst", p.trailingHeaderBurst, j, 5);
3774 getOptional("startTxNotifications", p.startTxNotifications, j, 5);
3775 getOptional("customRtpPayloadType", p.customRtpPayloadType, j, -1);
3776 getOptional("resetRtpOnTx", p.resetRtpOnTx, j, true);
3777 getOptional("enableSmoothing", p.enableSmoothing, j, true);
3778 getOptional("dtx", p.dtx, j, false);
3779 getOptional("smoothedHangTimeMs", p.smoothedHangTimeMs, j, 0);
3780 getOptional("hdrExtType", p.hdrExtType, j, TxAudio::HeaderExtensionType_t::hetEngageStandard);
3781
3782 // internalKey is not serialized
3783 }
3784
3785 //-----------------------------------------------------------
3786 JSON_SERIALIZED_CLASS(AudioRegistryDevice)
3797 {
3798 IMPLEMENT_JSON_SERIALIZATION()
3799 IMPLEMENT_JSON_DOCUMENTATION(AudioRegistryDevice)
3800
3801 public:
3803 std::string hardwareId;
3804
3807
3809 std::string name;
3810
3812 std::string manufacturer;
3813
3815 std::string model;
3816
3818 std::string serialNumber;
3819
3820
3822 std::string type;
3823
3825 std::string extra;
3826
3828 {
3829 clear();
3830 }
3831
3832 void clear()
3833 {
3834 hardwareId.clear();
3835 isDefault = false;
3836 name.clear();
3837 manufacturer.clear();
3838 model.clear();
3839 serialNumber.clear();
3840 type.clear();
3841 extra.clear();
3842 }
3843
3844 virtual std::string toString()
3845 {
3846 char buff[2048];
3847
3848 snprintf(buff, sizeof(buff), "hardwareId=%s, isDefault=%d, name=%s, manufacturer=%s, model=%s, serialNumber=%s, type=%s, extra=%s",
3849 hardwareId.c_str(),
3850 (int)isDefault,
3851 name.c_str(),
3852 manufacturer.c_str(),
3853 model.c_str(),
3854 serialNumber.c_str(),
3855 type.c_str(),
3856 extra.c_str());
3857
3858 return std::string(buff);
3859 }
3860 };
3861
3862 static void to_json(nlohmann::json& j, const AudioRegistryDevice& p)
3863 {
3864 j = nlohmann::json{
3865 TOJSON_IMPL(hardwareId),
3866 TOJSON_IMPL(isDefault),
3867 TOJSON_IMPL(name),
3868 TOJSON_IMPL(manufacturer),
3869 TOJSON_IMPL(model),
3870 TOJSON_IMPL(serialNumber),
3871 TOJSON_IMPL(type),
3872 TOJSON_IMPL(extra)
3873 };
3874 }
3875 static void from_json(const nlohmann::json& j, AudioRegistryDevice& p)
3876 {
3877 p.clear();
3878 getOptional<std::string>("hardwareId", p.hardwareId, j, EMPTY_STRING);
3879 getOptional<bool>("isDefault", p.isDefault, j, false);
3880 getOptional("name", p.name, j);
3881 getOptional("manufacturer", p.manufacturer, j);
3882 getOptional("model", p.model, j);
3883 getOptional("serialNumber", p.serialNumber, j);
3884 getOptional("type", p.type, j);
3885 getOptional("extra", p.extra, j);
3886 }
3887
3888
3889 //-----------------------------------------------------------
3890 JSON_SERIALIZED_CLASS(AudioRegistry)
3901 {
3902 IMPLEMENT_JSON_SERIALIZATION()
3903 IMPLEMENT_JSON_DOCUMENTATION(AudioRegistry)
3904
3905 public:
3907 std::vector<AudioRegistryDevice> inputs;
3908
3910 std::vector<AudioRegistryDevice> outputs;
3911
3913 {
3914 clear();
3915 }
3916
3917 void clear()
3918 {
3919 inputs.clear();
3920 outputs.clear();
3921 }
3922
3923 virtual std::string toString()
3924 {
3925 return std::string("");
3926 }
3927 };
3928
3929 static void to_json(nlohmann::json& j, const AudioRegistry& p)
3930 {
3931 j = nlohmann::json{
3932 TOJSON_IMPL(inputs),
3933 TOJSON_IMPL(outputs)
3934 };
3935 }
3936 static void from_json(const nlohmann::json& j, AudioRegistry& p)
3937 {
3938 p.clear();
3939 getOptional<std::vector<AudioRegistryDevice>>("inputs", p.inputs, j);
3940 getOptional<std::vector<AudioRegistryDevice>>("outputs", p.outputs, j);
3941 }
3942
3943 //-----------------------------------------------------------
3944 JSON_SERIALIZED_CLASS(AudioDeviceDescriptor)
3955 {
3956 IMPLEMENT_JSON_SERIALIZATION()
3957 IMPLEMENT_JSON_DOCUMENTATION(AudioDeviceDescriptor)
3958
3959 public:
3960
3962 typedef enum
3963 {
3965 dirUnknown = 0,
3966
3969
3972
3974 dirBoth
3975 } Direction_t;
3976
3982
3990
3998
4001
4009
4012
4014 std::string name;
4015
4017 std::string manufacturer;
4018
4020 std::string model;
4021
4023 std::string hardwareId;
4024
4026 std::string serialNumber;
4027
4030
4032 std::string type;
4033
4035 std::string extra;
4036
4039
4041 {
4042 clear();
4043 }
4044
4045 void clear()
4046 {
4047 deviceId = 0;
4048 samplingRate = 0;
4049 channels = 0;
4050 direction = dirUnknown;
4051 boostPercentage = 0;
4052 isAdad = false;
4053 isDefault = false;
4054
4055 name.clear();
4056 manufacturer.clear();
4057 model.clear();
4058 hardwareId.clear();
4059 serialNumber.clear();
4060 type.clear();
4061 extra.clear();
4062 isPresent = false;
4063 }
4064
4065 virtual std::string toString()
4066 {
4067 char buff[2048];
4068
4069 snprintf(buff, sizeof(buff), "deviceId=%d, samplingRate=%d, channels=%d, direction=%d, boostPercentage=%d, isAdad=%d, name=%s, manufacturer=%s, model=%s, hardwareId=%s, serialNumber=%s, isDefault=%d, type=%s, present=%d, extra=%s",
4070 deviceId,
4071 samplingRate,
4072 channels,
4073 (int)direction,
4074 boostPercentage,
4075 (int)isAdad,
4076 name.c_str(),
4077 manufacturer.c_str(),
4078 model.c_str(),
4079 hardwareId.c_str(),
4080 serialNumber.c_str(),
4081 (int)isDefault,
4082 type.c_str(),
4083 (int)isPresent,
4084 extra.c_str());
4085
4086 return std::string(buff);
4087 }
4088 };
4089
4090 static void to_json(nlohmann::json& j, const AudioDeviceDescriptor& p)
4091 {
4092 j = nlohmann::json{
4093 TOJSON_IMPL(deviceId),
4094 TOJSON_IMPL(samplingRate),
4095 TOJSON_IMPL(channels),
4096 TOJSON_IMPL(direction),
4097 TOJSON_IMPL(boostPercentage),
4098 TOJSON_IMPL(isAdad),
4099 TOJSON_IMPL(name),
4100 TOJSON_IMPL(manufacturer),
4101 TOJSON_IMPL(model),
4102 TOJSON_IMPL(hardwareId),
4103 TOJSON_IMPL(serialNumber),
4104 TOJSON_IMPL(isDefault),
4105 TOJSON_IMPL(type),
4106 TOJSON_IMPL(extra),
4107 TOJSON_IMPL(isPresent)
4108 };
4109 }
4110 static void from_json(const nlohmann::json& j, AudioDeviceDescriptor& p)
4111 {
4112 p.clear();
4113 getOptional<int>("deviceId", p.deviceId, j, 0);
4114 getOptional<int>("samplingRate", p.samplingRate, j, 0);
4115 getOptional<int>("channels", p.channels, j, 0);
4116 getOptional<AudioDeviceDescriptor::Direction_t>("direction", p.direction, j,
4117 AudioDeviceDescriptor::Direction_t::dirUnknown);
4118 getOptional<int>("boostPercentage", p.boostPercentage, j, 0);
4119
4120 getOptional<bool>("isAdad", p.isAdad, j, false);
4121 getOptional("name", p.name, j);
4122 getOptional("manufacturer", p.manufacturer, j);
4123 getOptional("model", p.model, j);
4124 getOptional("hardwareId", p.hardwareId, j);
4125 getOptional("serialNumber", p.serialNumber, j);
4126 getOptional("isDefault", p.isDefault, j);
4127 getOptional("type", p.type, j);
4128 getOptional("extra", p.extra, j);
4129 getOptional<bool>("isPresent", p.isPresent, j, false);
4130 }
4131
4132 //-----------------------------------------------------------
4133 JSON_SERIALIZED_CLASS(ListOfAudioDeviceDescriptor)
4135 {
4136 IMPLEMENT_JSON_SERIALIZATION()
4137 IMPLEMENT_JSON_DOCUMENTATION(ListOfAudioDeviceDescriptor)
4138
4139 public:
4140 std::vector<AudioDeviceDescriptor> list;
4141
4143 {
4144 clear();
4145 }
4146
4147 void clear()
4148 {
4149 list.clear();
4150 }
4151 };
4152
4153 static void to_json(nlohmann::json& j, const ListOfAudioDeviceDescriptor& p)
4154 {
4155 j = nlohmann::json{
4156 TOJSON_IMPL(list)
4157 };
4158 }
4159 static void from_json(const nlohmann::json& j, ListOfAudioDeviceDescriptor& p)
4160 {
4161 p.clear();
4162 getOptional<std::vector<AudioDeviceDescriptor>>("list", p.list, j);
4163 }
4164
4165 //-----------------------------------------------------------
4166 JSON_SERIALIZED_CLASS(Audio)
4175 {
4176 IMPLEMENT_JSON_SERIALIZATION()
4177 IMPLEMENT_JSON_DOCUMENTATION(Audio)
4178
4179 public:
4182
4185
4187 std::string inputHardwareId;
4188
4191
4194
4196 std::string outputHardwareId;
4197
4200
4203
4206
4209
4210 Audio()
4211 {
4212 clear();
4213 }
4214
4215 void clear()
4216 {
4217 enabled = true;
4218 inputId = 0;
4219 inputHardwareId.clear();
4220 inputGain = 0;
4221 outputId = 0;
4222 outputHardwareId.clear();
4223 outputGain = 0;
4224 outputLevelLeft = 100;
4225 outputLevelRight = 100;
4226 outputMuted = false;
4227 }
4228 };
4229
4230 static void to_json(nlohmann::json& j, const Audio& p)
4231 {
4232 j = nlohmann::json{
4233 TOJSON_IMPL(enabled),
4234 TOJSON_IMPL(inputId),
4235 TOJSON_IMPL(inputHardwareId),
4236 TOJSON_IMPL(inputGain),
4237 TOJSON_IMPL(outputId),
4238 TOJSON_IMPL(outputHardwareId),
4239 TOJSON_IMPL(outputLevelLeft),
4240 TOJSON_IMPL(outputLevelRight),
4241 TOJSON_IMPL(outputMuted)
4242 };
4243 }
4244 static void from_json(const nlohmann::json& j, Audio& p)
4245 {
4246 p.clear();
4247 getOptional<bool>("enabled", p.enabled, j, true);
4248 getOptional<int>("inputId", p.inputId, j, 0);
4249 getOptional<std::string>("inputHardwareId", p.inputHardwareId, j, EMPTY_STRING);
4250 getOptional<int>("inputGain", p.inputGain, j, 0);
4251 getOptional<int>("outputId", p.outputId, j, 0);
4252 getOptional<std::string>("outputHardwareId", p.outputHardwareId, j, EMPTY_STRING);
4253 getOptional<int>("outputGain", p.outputGain, j, 0);
4254 getOptional<int>("outputLevelLeft", p.outputLevelLeft, j, 100);
4255 getOptional<int>("outputLevelRight", p.outputLevelRight, j, 100);
4256 getOptional<bool>("outputMuted", p.outputMuted, j, false);
4257 }
4258
4259 //-----------------------------------------------------------
4260 JSON_SERIALIZED_CLASS(TalkerInformation)
4271 {
4272 IMPLEMENT_JSON_SERIALIZATION()
4273 IMPLEMENT_JSON_DOCUMENTATION(TalkerInformation)
4274
4275 public:
4279 typedef enum
4280 {
4282 matNone = 0,
4283
4285 matAnonymous = 1,
4286
4288 matSsrcGenerated = 2
4289 } ManufacturedAliasType_t;
4290
4292 std::string alias;
4293
4295 std::string nodeId;
4296
4298 uint16_t rxFlags;
4299
4302
4304 uint32_t txId;
4305
4308
4311
4314
4316 uint32_t ssrc;
4317
4320
4322 {
4323 clear();
4324 }
4325
4326 void clear()
4327 {
4328 alias.clear();
4329 nodeId.clear();
4330 rxFlags = 0;
4331 txPriority = 0;
4332 txId = 0;
4333 duplicateCount = 0;
4334 aliasSpecializer = 0;
4335 rxMuted = false;
4336 manufacturedAliasType = ManufacturedAliasType_t::matNone;
4337 ssrc = 0;
4338 }
4339 };
4340
4341 static void to_json(nlohmann::json& j, const TalkerInformation& p)
4342 {
4343 j = nlohmann::json{
4344 TOJSON_IMPL(alias),
4345 TOJSON_IMPL(nodeId),
4346 TOJSON_IMPL(rxFlags),
4347 TOJSON_IMPL(txPriority),
4348 TOJSON_IMPL(txId),
4349 TOJSON_IMPL(duplicateCount),
4350 TOJSON_IMPL(aliasSpecializer),
4351 TOJSON_IMPL(rxMuted),
4352 TOJSON_IMPL(manufacturedAliasType),
4353 TOJSON_IMPL(ssrc)
4354 };
4355 }
4356 static void from_json(const nlohmann::json& j, TalkerInformation& p)
4357 {
4358 p.clear();
4359 getOptional<std::string>("alias", p.alias, j, EMPTY_STRING);
4360 getOptional<std::string>("nodeId", p.nodeId, j, EMPTY_STRING);
4361 getOptional<uint16_t>("rxFlags", p.rxFlags, j, 0);
4362 getOptional<int>("txPriority", p.txPriority, j, 0);
4363 getOptional<uint32_t>("txId", p.txId, j, 0);
4364 getOptional<int>("duplicateCount", p.duplicateCount, j, 0);
4365 getOptional<uint16_t>("aliasSpecializer", p.aliasSpecializer, j, 0);
4366 getOptional<bool>("rxMuted", p.rxMuted, j, false);
4367 getOptional<TalkerInformation::ManufacturedAliasType_t>("manufacturedAliasType", p.manufacturedAliasType, j, TalkerInformation::ManufacturedAliasType_t::matNone);
4368 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
4369 }
4370
4371 //-----------------------------------------------------------
4372 JSON_SERIALIZED_CLASS(GroupTalkers)
4385 {
4386 IMPLEMENT_JSON_SERIALIZATION()
4387 IMPLEMENT_JSON_DOCUMENTATION(GroupTalkers)
4388
4389 public:
4391 std::vector<TalkerInformation> list;
4392
4393 GroupTalkers()
4394 {
4395 clear();
4396 }
4397
4398 void clear()
4399 {
4400 list.clear();
4401 }
4402 };
4403
4404 static void to_json(nlohmann::json& j, const GroupTalkers& p)
4405 {
4406 j = nlohmann::json{
4407 TOJSON_IMPL(list)
4408 };
4409 }
4410 static void from_json(const nlohmann::json& j, GroupTalkers& p)
4411 {
4412 p.clear();
4413 getOptional<std::vector<TalkerInformation>>("list", p.list, j);
4414 }
4415
4416 //-----------------------------------------------------------
4417 JSON_SERIALIZED_CLASS(Presence)
4428 {
4429 IMPLEMENT_JSON_SERIALIZATION()
4430 IMPLEMENT_JSON_DOCUMENTATION(Presence)
4431
4432 public:
4436 typedef enum
4437 {
4439 pfUnknown = 0,
4440
4442 pfEngage = 1,
4443
4450 pfCot = 2
4451 } Format_t;
4452
4455
4458
4461
4464
4467
4468 Presence()
4469 {
4470 clear();
4471 }
4472
4473 void clear()
4474 {
4475 format = pfUnknown;
4476 intervalSecs = 30;
4477 listenOnly = false;
4478 minIntervalSecs = 5;
4479 reduceImmediacy = false;
4480 }
4481 };
4482
4483 static void to_json(nlohmann::json& j, const Presence& p)
4484 {
4485 j = nlohmann::json{
4486 TOJSON_IMPL(format),
4487 TOJSON_IMPL(intervalSecs),
4488 TOJSON_IMPL(listenOnly),
4489 TOJSON_IMPL(minIntervalSecs),
4490 TOJSON_IMPL(reduceImmediacy)
4491 };
4492 }
4493 static void from_json(const nlohmann::json& j, Presence& p)
4494 {
4495 p.clear();
4496 getOptional<Presence::Format_t>("format", p.format, j, Presence::Format_t::pfEngage);
4497 getOptional<int>("intervalSecs", p.intervalSecs, j, 30);
4498 getOptional<bool>("listenOnly", p.listenOnly, j, false);
4499 getOptional<int>("minIntervalSecs", p.minIntervalSecs, j, 5);
4500 getOptional<bool>("reduceImmediacy", p.reduceImmediacy, j, false);
4501 }
4502
4503
4504 //-----------------------------------------------------------
4505 JSON_SERIALIZED_CLASS(Advertising)
4516 {
4517 IMPLEMENT_JSON_SERIALIZATION()
4518 IMPLEMENT_JSON_DOCUMENTATION(Advertising)
4519
4520 public:
4523
4526
4529
4530 Advertising()
4531 {
4532 clear();
4533 }
4534
4535 void clear()
4536 {
4537 enabled = false;
4538 intervalMs = 20000;
4539 alwaysAdvertise = false;
4540 }
4541 };
4542
4543 static void to_json(nlohmann::json& j, const Advertising& p)
4544 {
4545 j = nlohmann::json{
4546 TOJSON_IMPL(enabled),
4547 TOJSON_IMPL(intervalMs),
4548 TOJSON_IMPL(alwaysAdvertise)
4549 };
4550 }
4551 static void from_json(const nlohmann::json& j, Advertising& p)
4552 {
4553 p.clear();
4554 getOptional("enabled", p.enabled, j, false);
4555 getOptional<int>("intervalMs", p.intervalMs, j, 20000);
4556 getOptional<bool>("alwaysAdvertise", p.alwaysAdvertise, j, false);
4557 }
4558
4559 //-----------------------------------------------------------
4560 JSON_SERIALIZED_CLASS(GroupPriorityTranslation)
4571 {
4572 IMPLEMENT_JSON_SERIALIZATION()
4573 IMPLEMENT_JSON_DOCUMENTATION(GroupPriorityTranslation)
4574
4575 public:
4578
4581
4584
4586 {
4587 clear();
4588 }
4589
4590 void clear()
4591 {
4592 rx.clear();
4593 tx.clear();
4594 priority = 0;
4595 }
4596 };
4597
4598 static void to_json(nlohmann::json& j, const GroupPriorityTranslation& p)
4599 {
4600 j = nlohmann::json{
4601 TOJSON_IMPL(rx),
4602 TOJSON_IMPL(tx),
4603 TOJSON_IMPL(priority)
4604 };
4605 }
4606 static void from_json(const nlohmann::json& j, GroupPriorityTranslation& p)
4607 {
4608 p.clear();
4609 j.at("rx").get_to(p.rx);
4610 j.at("tx").get_to(p.tx);
4611 FROMJSON_IMPL(priority, int, 0);
4612 }
4613
4614 //-----------------------------------------------------------
4615 JSON_SERIALIZED_CLASS(GroupTimeline)
4628 {
4629 IMPLEMENT_JSON_SERIALIZATION()
4630 IMPLEMENT_JSON_DOCUMENTATION(GroupTimeline)
4631
4632 public:
4635
4638 bool recordAudio;
4639
4641 {
4642 clear();
4643 }
4644
4645 void clear()
4646 {
4647 enabled = true;
4648 maxAudioTimeMs = 30000;
4649 recordAudio = true;
4650 }
4651 };
4652
4653 static void to_json(nlohmann::json& j, const GroupTimeline& p)
4654 {
4655 j = nlohmann::json{
4656 TOJSON_IMPL(enabled),
4657 TOJSON_IMPL(maxAudioTimeMs),
4658 TOJSON_IMPL(recordAudio)
4659 };
4660 }
4661 static void from_json(const nlohmann::json& j, GroupTimeline& p)
4662 {
4663 p.clear();
4664 getOptional("enabled", p.enabled, j, true);
4665 getOptional<int>("maxAudioTimeMs", p.maxAudioTimeMs, j, 30000);
4666 getOptional("recordAudio", p.recordAudio, j, true);
4667 }
4668
4676 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_INTERNAL = "com.rallytac.engage.internal";
4678 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_CORE = "com.rallytac.magellan.core";
4680 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_CISTECH = "com.rallytac.engage.magellan.cistech";
4682 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_TRELLISWARE = "com.rallytac.engage.magellan.trellisware";
4684 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_SILVUS = "com.rallytac.engage.magellan.silvus";
4686 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_PERSISTENT = "com.rallytac.engage.magellan.persistent";
4688 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_DOMO = "com.rallytac.engage.magellan.domo";
4690 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_KENWOOD = "com.rallytac.engage.magellan.kenwood";
4692 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_TAIT = "com.rallytac.engage.magellan.tait";
4694 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_VOCALITY = "com.rallytac.engage.magellan.vocality";
4715
4740
4756 //-----------------------------------------------------------
4757 JSON_SERIALIZED_CLASS(GroupAppTransport)
4768 {
4769 IMPLEMENT_JSON_SERIALIZATION()
4770 IMPLEMENT_JSON_DOCUMENTATION(GroupAppTransport)
4771
4772 public:
4775
4777 std::string id;
4778
4780 {
4781 clear();
4782 }
4783
4784 void clear()
4785 {
4786 enabled = false;
4787 id.clear();
4788 }
4789 };
4790
4791 static void to_json(nlohmann::json& j, const GroupAppTransport& p)
4792 {
4793 j = nlohmann::json{
4794 TOJSON_IMPL(enabled),
4795 TOJSON_IMPL(id)
4796 };
4797 }
4798 static void from_json(const nlohmann::json& j, GroupAppTransport& p)
4799 {
4800 p.clear();
4801 getOptional<bool>("enabled", p.enabled, j, false);
4802 getOptional<std::string>("id", p.id, j);
4803 }
4804
4805 //-----------------------------------------------------------
4806 JSON_SERIALIZED_CLASS(RtpProfile)
4817 {
4818 IMPLEMENT_JSON_SERIALIZATION()
4819 IMPLEMENT_JSON_DOCUMENTATION(RtpProfile)
4820
4821 public:
4827 typedef enum
4828 {
4830 jmStandard = 0,
4831
4833 jmLowLatency = 1,
4834
4836 jmReleaseOnTxEnd = 2
4837 } JitterMode_t;
4838
4841
4844
4847
4850
4853
4856
4859
4862
4865
4868
4871
4874
4877
4880
4883
4886
4890
4891 RtpProfile()
4892 {
4893 clear();
4894 }
4895
4896 void clear()
4897 {
4898 mode = jmStandard;
4899 jitterMaxMs = 10000;
4900 jitterMinMs = 100;
4901 jitterMaxFactor = 8;
4902 jitterTrimPercentage = 10;
4903 jitterUnderrunReductionThresholdMs = 1500;
4904 jitterUnderrunReductionAger = 100;
4905 latePacketSequenceRange = 5;
4906 latePacketTimestampRangeMs = 2000;
4907 inboundProcessorInactivityMs = 500;
4908 jitterForceTrimAtMs = 0;
4909 rtcpPresenceTimeoutMs = 45000;
4910 jitterMaxExceededClipPerc = 10;
4911 jitterMaxExceededClipHangMs = 1500;
4912 zombieLifetimeMs = 15000;
4913 jitterMaxTrimMs = 250;
4914 signalledInboundProcessorInactivityMs = (inboundProcessorInactivityMs * 4);
4915 }
4916 };
4917
4918 static void to_json(nlohmann::json& j, const RtpProfile& p)
4919 {
4920 j = nlohmann::json{
4921 TOJSON_IMPL(mode),
4922 TOJSON_IMPL(jitterMaxMs),
4923 TOJSON_IMPL(inboundProcessorInactivityMs),
4924 TOJSON_IMPL(jitterMinMs),
4925 TOJSON_IMPL(jitterMaxFactor),
4926 TOJSON_IMPL(jitterTrimPercentage),
4927 TOJSON_IMPL(jitterUnderrunReductionThresholdMs),
4928 TOJSON_IMPL(jitterUnderrunReductionAger),
4929 TOJSON_IMPL(latePacketSequenceRange),
4930 TOJSON_IMPL(latePacketTimestampRangeMs),
4931 TOJSON_IMPL(inboundProcessorInactivityMs),
4932 TOJSON_IMPL(jitterForceTrimAtMs),
4933 TOJSON_IMPL(jitterMaxExceededClipPerc),
4934 TOJSON_IMPL(jitterMaxExceededClipHangMs),
4935 TOJSON_IMPL(zombieLifetimeMs),
4936 TOJSON_IMPL(jitterMaxTrimMs),
4937 TOJSON_IMPL(signalledInboundProcessorInactivityMs)
4938 };
4939 }
4940 static void from_json(const nlohmann::json& j, RtpProfile& p)
4941 {
4942 p.clear();
4943 FROMJSON_IMPL(mode, RtpProfile::JitterMode_t, RtpProfile::JitterMode_t::jmStandard);
4944 FROMJSON_IMPL(jitterMaxMs, int, 10000);
4945 FROMJSON_IMPL(jitterMinMs, int, 20);
4946 FROMJSON_IMPL(jitterMaxFactor, int, 8);
4947 FROMJSON_IMPL(jitterTrimPercentage, int, 10);
4948 FROMJSON_IMPL(jitterUnderrunReductionThresholdMs, int, 1500);
4949 FROMJSON_IMPL(jitterUnderrunReductionAger, int, 100);
4950 FROMJSON_IMPL(latePacketSequenceRange, int, 5);
4951 FROMJSON_IMPL(latePacketTimestampRangeMs, int, 2000);
4952 FROMJSON_IMPL(inboundProcessorInactivityMs, int, 500);
4953 FROMJSON_IMPL(jitterForceTrimAtMs, int, 0);
4954 FROMJSON_IMPL(rtcpPresenceTimeoutMs, int, 45000);
4955 FROMJSON_IMPL(jitterMaxExceededClipPerc, int, 10);
4956 FROMJSON_IMPL(jitterMaxExceededClipHangMs, int, 1500);
4957 FROMJSON_IMPL(zombieLifetimeMs, int, 15000);
4958 FROMJSON_IMPL(jitterMaxTrimMs, int, 250);
4959 FROMJSON_IMPL(signalledInboundProcessorInactivityMs, int, (p.inboundProcessorInactivityMs * 4));
4960 }
4961
4962 //-----------------------------------------------------------
4963 JSON_SERIALIZED_CLASS(Tls)
4974 {
4975 IMPLEMENT_JSON_SERIALIZATION()
4976 IMPLEMENT_JSON_DOCUMENTATION(Tls)
4977
4978 public:
4979
4982
4985
4987 std::vector<std::string> caCertificates;
4988
4991
4994
4996 std::vector<std::string> crlSerials;
4997
4998 Tls()
4999 {
5000 clear();
5001 }
5002
5003 void clear()
5004 {
5005 verifyPeers = true;
5006 allowSelfSignedCertificates = false;
5007 caCertificates.clear();
5008 subjectRestrictions.clear();
5009 issuerRestrictions.clear();
5010 crlSerials.clear();
5011 }
5012 };
5013
5014 static void to_json(nlohmann::json& j, const Tls& p)
5015 {
5016 j = nlohmann::json{
5017 TOJSON_IMPL(verifyPeers),
5018 TOJSON_IMPL(allowSelfSignedCertificates),
5019 TOJSON_IMPL(caCertificates),
5020 TOJSON_IMPL(subjectRestrictions),
5021 TOJSON_IMPL(issuerRestrictions),
5022 TOJSON_IMPL(crlSerials)
5023 };
5024 }
5025 static void from_json(const nlohmann::json& j, Tls& p)
5026 {
5027 p.clear();
5028 getOptional<bool>("verifyPeers", p.verifyPeers, j, true);
5029 getOptional<bool>("allowSelfSignedCertificates", p.allowSelfSignedCertificates, j, false);
5030 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
5031 getOptional<StringRestrictionList>("subjectRestrictions", p.subjectRestrictions, j);
5032 getOptional<StringRestrictionList>("issuerRestrictions", p.issuerRestrictions, j);
5033 getOptional<std::vector<std::string>>("crlSerials", p.crlSerials, j);
5034 }
5035
5036 //-----------------------------------------------------------
5037 JSON_SERIALIZED_CLASS(RangerPackets)
5050 {
5051 IMPLEMENT_JSON_SERIALIZATION()
5052 IMPLEMENT_JSON_DOCUMENTATION(RangerPackets)
5053
5054 public:
5057
5060
5062 {
5063 clear();
5064 }
5065
5066 void clear()
5067 {
5068 hangTimerSecs = -1;
5069 count = 5;
5070 }
5071
5072 virtual void initForDocumenting()
5073 {
5074 }
5075 };
5076
5077 static void to_json(nlohmann::json& j, const RangerPackets& p)
5078 {
5079 j = nlohmann::json{
5080 TOJSON_IMPL(hangTimerSecs),
5081 TOJSON_IMPL(count)
5082 };
5083 }
5084 static void from_json(const nlohmann::json& j, RangerPackets& p)
5085 {
5086 p.clear();
5087 getOptional<int>("hangTimerSecs", p.hangTimerSecs, j, 11);
5088 getOptional<int>("count", p.count, j, 5);
5089 }
5090
5091 //-----------------------------------------------------------
5092 JSON_SERIALIZED_CLASS(Source)
5105 {
5106 IMPLEMENT_JSON_SERIALIZATION()
5107 IMPLEMENT_JSON_DOCUMENTATION(Source)
5108
5109 public:
5111 std::string nodeId;
5112
5113 /* NOTE: Not serialized ! */
5114 uint8_t _internal_binary_nodeId[ENGAGE_MAX_NODE_ID_SIZE];
5115
5117 std::string alias;
5118
5119 /* NOTE: Not serialized ! */
5120 uint8_t _internal_binary_alias[ENGAGE_MAX_ALIAS_SIZE];
5121
5122 Source()
5123 {
5124 clear();
5125 }
5126
5127 void clear()
5128 {
5129 nodeId.clear();
5130 memset(_internal_binary_nodeId, 0, sizeof(_internal_binary_nodeId));
5131
5132 alias.clear();
5133 memset(_internal_binary_alias, 0, sizeof(_internal_binary_alias));
5134 }
5135
5136 virtual void initForDocumenting()
5137 {
5138 }
5139 };
5140
5141 static void to_json(nlohmann::json& j, const Source& p)
5142 {
5143 j = nlohmann::json{
5144 TOJSON_IMPL(nodeId),
5145 TOJSON_IMPL(alias)
5146 };
5147 }
5148 static void from_json(const nlohmann::json& j, Source& p)
5149 {
5150 p.clear();
5151 FROMJSON_IMPL_SIMPLE(nodeId);
5152 FROMJSON_IMPL_SIMPLE(alias);
5153 }
5154
5155 //-----------------------------------------------------------
5156 JSON_SERIALIZED_CLASS(GroupBridgeTargetOutputDetail)
5169 {
5170 IMPLEMENT_JSON_SERIALIZATION()
5171 IMPLEMENT_JSON_DOCUMENTATION(GroupBridgeTargetOutputDetail)
5172
5173 public:
5175 typedef enum
5176 {
5180 bomRaw = 0,
5181
5184 bomMultistream = 1,
5185
5188 bomMixedStream = 2,
5189
5191 bomNone = 3
5192 } BridgingOpMode_t;
5193
5196
5199
5201 {
5202 clear();
5203 }
5204
5205 void clear()
5206 {
5207 mode = BridgingOpMode_t::bomRaw;
5208 mixedStreamTxParams.clear();
5209 }
5210
5211 virtual void initForDocumenting()
5212 {
5213 clear();
5214 }
5215 };
5216
5217 static void to_json(nlohmann::json& j, const GroupBridgeTargetOutputDetail& p)
5218 {
5219 j = nlohmann::json{
5220 TOJSON_IMPL(mode),
5221 TOJSON_IMPL(mixedStreamTxParams)
5222 };
5223 }
5224 static void from_json(const nlohmann::json& j, GroupBridgeTargetOutputDetail& p)
5225 {
5226 p.clear();
5227 FROMJSON_IMPL_SIMPLE(mode);
5228 FROMJSON_IMPL_SIMPLE(mixedStreamTxParams);
5229 }
5230
5231 //-----------------------------------------------------------
5232 JSON_SERIALIZED_CLASS(GroupDefaultAudioPriority)
5245 {
5246 IMPLEMENT_JSON_SERIALIZATION()
5247 IMPLEMENT_JSON_DOCUMENTATION(GroupDefaultAudioPriority)
5248
5249 public:
5251 uint8_t tx;
5252
5254 uint8_t rx;
5255
5257 {
5258 clear();
5259 }
5260
5261 void clear()
5262 {
5263 tx = 0;
5264 rx = 0;
5265 }
5266
5267 virtual void initForDocumenting()
5268 {
5269 clear();
5270 }
5271 };
5272
5273 static void to_json(nlohmann::json& j, const GroupDefaultAudioPriority& p)
5274 {
5275 j = nlohmann::json{
5276 TOJSON_IMPL(tx),
5277 TOJSON_IMPL(rx)
5278 };
5279 }
5280 static void from_json(const nlohmann::json& j, GroupDefaultAudioPriority& p)
5281 {
5282 p.clear();
5283 FROMJSON_IMPL_SIMPLE(tx);
5284 FROMJSON_IMPL_SIMPLE(rx);
5285 }
5286
5287 //-----------------------------------------------------------
5288 JSON_SERIALIZED_CLASS(Group)
5300 {
5301 IMPLEMENT_JSON_SERIALIZATION()
5302 IMPLEMENT_JSON_DOCUMENTATION(Group)
5303
5304 public:
5306 typedef enum
5307 {
5309 gtUnknown = 0,
5310
5312 gtAudio = 1,
5313
5315 gtPresence = 2,
5316
5318 gtRaw = 3
5319 } Type_t;
5320
5322 typedef enum
5323 {
5325 iagpAnonymousAlias = 0,
5326
5328 iagpSsrcInHex = 1
5329 } InboundAliasGenerationPolicy_t;
5330
5333
5336
5339
5346 std::string id;
5347
5349 std::string name;
5350
5352 std::string spokenName;
5353
5355 std::string interfaceName;
5356
5359
5362
5365
5368
5371
5373 std::string cryptoPassword;
5374
5377
5379 std::vector<Rallypoint> rallypoints;
5380
5383
5386
5395
5397 std::string alias;
5398
5401
5403 std::string source;
5404
5411
5414
5417
5420
5422 std::vector<std::string> presenceGroupAffinities;
5423
5426
5429
5431 std::vector<RtpPayloadTypeTranslation> inboundRtpPayloadTypeTranslations;
5432
5435
5438
5440 std::string anonymousAlias;
5441
5444
5447
5450
5453
5456
5459
5462
5464 std::vector<uint16_t> specializerAffinities;
5465
5468
5470 std::vector<Source> ignoreSources;
5471
5473 std::string languageCode;
5474
5476 std::string synVoice;
5477
5480
5483
5486
5489
5492
5495
5496 Group()
5497 {
5498 clear();
5499 }
5500
5501 void clear()
5502 {
5503 type = gtUnknown;
5504 bridgeTargetOutputDetail.clear();
5505 defaultAudioPriority.clear();
5506 id.clear();
5507 name.clear();
5508 spokenName.clear();
5509 interfaceName.clear();
5510 rx.clear();
5511 tx.clear();
5512 txOptions.clear();
5513 txAudio.clear();
5514 presence.clear();
5515 cryptoPassword.clear();
5516
5517 alias.clear();
5518
5519 rallypoints.clear();
5520 rallypointCluster.clear();
5521
5522 audio.clear();
5523 timeline.clear();
5524
5525 blockAdvertising = false;
5526
5527 source.clear();
5528
5529 maxRxSecs = 0;
5530
5531 enableMulticastFailover = false;
5532 multicastFailoverSecs = 10;
5533
5534 rtcpPresenceRx.clear();
5535
5536 presenceGroupAffinities.clear();
5537 disablePacketEvents = false;
5538
5539 rfc4733RtpPayloadId = 0;
5540 inboundRtpPayloadTypeTranslations.clear();
5541 priorityTranslation.clear();
5542
5543 stickyTidHangSecs = 10;
5544 anonymousAlias.clear();
5545 lbCrypto = false;
5546
5547 appTransport.clear();
5548 allowLoopback = false;
5549
5550 rtpProfile.clear();
5551 rangerPackets.clear();
5552
5553 _wasDeserialized_rtpProfile = false;
5554
5555 txImpairment.clear();
5556 rxImpairment.clear();
5557
5558 specializerAffinities.clear();
5559
5560 securityLevel = 0;
5561
5562 ignoreSources.clear();
5563
5564 languageCode.clear();
5565 synVoice.clear();
5566
5567 rxCapture.clear();
5568 txCapture.clear();
5569
5570 blobRtpPayloadType = ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE;
5571 inboundAliasGenerationPolicy = iagpAnonymousAlias;
5572 gateIn.clear();
5573
5574 ignoreAudioTraffic = false;
5575 }
5576 };
5577
5578 static void to_json(nlohmann::json& j, const Group& p)
5579 {
5580 j = nlohmann::json{
5581 TOJSON_IMPL(type),
5582 TOJSON_IMPL(bridgeTargetOutputDetail),
5583 TOJSON_IMPL(defaultAudioPriority),
5584 TOJSON_IMPL(id),
5585 TOJSON_IMPL(name),
5586 TOJSON_IMPL(spokenName),
5587 TOJSON_IMPL(interfaceName),
5588 TOJSON_IMPL(rx),
5589 TOJSON_IMPL(tx),
5590 TOJSON_IMPL(txOptions),
5591 TOJSON_IMPL(txAudio),
5592 TOJSON_IMPL(presence),
5593 TOJSON_IMPL(cryptoPassword),
5594 TOJSON_IMPL(alias),
5595
5596 // See below
5597 //TOJSON_IMPL(rallypoints),
5598 //TOJSON_IMPL(rallypointCluster),
5599
5600 TOJSON_IMPL(alias),
5601 TOJSON_IMPL(audio),
5602 TOJSON_IMPL(timeline),
5603 TOJSON_IMPL(blockAdvertising),
5604 TOJSON_IMPL(source),
5605 TOJSON_IMPL(maxRxSecs),
5606 TOJSON_IMPL(enableMulticastFailover),
5607 TOJSON_IMPL(multicastFailoverSecs),
5608 TOJSON_IMPL(rtcpPresenceRx),
5609 TOJSON_IMPL(presenceGroupAffinities),
5610 TOJSON_IMPL(disablePacketEvents),
5611 TOJSON_IMPL(rfc4733RtpPayloadId),
5612 TOJSON_IMPL(inboundRtpPayloadTypeTranslations),
5613 TOJSON_IMPL(priorityTranslation),
5614 TOJSON_IMPL(stickyTidHangSecs),
5615 TOJSON_IMPL(anonymousAlias),
5616 TOJSON_IMPL(lbCrypto),
5617 TOJSON_IMPL(appTransport),
5618 TOJSON_IMPL(allowLoopback),
5619 TOJSON_IMPL(rangerPackets),
5620
5621 TOJSON_IMPL(txImpairment),
5622 TOJSON_IMPL(rxImpairment),
5623
5624 TOJSON_IMPL(specializerAffinities),
5625
5626 TOJSON_IMPL(securityLevel),
5627
5628 TOJSON_IMPL(ignoreSources),
5629
5630 TOJSON_IMPL(languageCode),
5631 TOJSON_IMPL(synVoice),
5632
5633 TOJSON_IMPL(rxCapture),
5634 TOJSON_IMPL(txCapture),
5635
5636 TOJSON_IMPL(blobRtpPayloadType),
5637
5638 TOJSON_IMPL(inboundAliasGenerationPolicy),
5639
5640 TOJSON_IMPL(gateIn),
5641
5642 TOJSON_IMPL(ignoreAudioTraffic)
5643 };
5644
5645 TOJSON_BASE_IMPL();
5646
5647 // TODO: need a better way to indicate whether rtpProfile is present
5648 if(p._wasDeserialized_rtpProfile || p.isDocumenting())
5649 {
5650 j["rtpProfile"] = p.rtpProfile;
5651 }
5652
5653 if(p.isDocumenting())
5654 {
5655 j["rallypointCluster"] = p.rallypointCluster;
5656 j["rallypoints"] = p.rallypoints;
5657 }
5658 else
5659 {
5660 // rallypointCluster takes precedence if it has elements
5661 if(!p.rallypointCluster.rallypoints.empty())
5662 {
5663 j["rallypointCluster"] = p.rallypointCluster;
5664 }
5665 else if(!p.rallypoints.empty())
5666 {
5667 j["rallypoints"] = p.rallypoints;
5668 }
5669 }
5670 }
5671 static void from_json(const nlohmann::json& j, Group& p)
5672 {
5673 p.clear();
5674 j.at("type").get_to(p.type);
5675 getOptional<GroupBridgeTargetOutputDetail>("bridgeTargetOutputDetail", p.bridgeTargetOutputDetail, j);
5676 j.at("id").get_to(p.id);
5677 getOptional<std::string>("name", p.name, j);
5678 getOptional<std::string>("spokenName", p.spokenName, j);
5679 getOptional<std::string>("interfaceName", p.interfaceName, j);
5680 getOptional<NetworkAddress>("rx", p.rx, j);
5681 getOptional<NetworkAddress>("tx", p.tx, j);
5682 getOptional<NetworkTxOptions>("txOptions", p.txOptions, j);
5683 getOptional<std::string>("cryptoPassword", p.cryptoPassword, j);
5684 getOptional<std::string>("alias", p.alias, j);
5685 getOptional<TxAudio>("txAudio", p.txAudio, j);
5686 getOptional<Presence>("presence", p.presence, j);
5687 getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
5688 getOptional<RallypointCluster>("rallypointCluster", p.rallypointCluster, j);
5689 getOptional<Audio>("audio", p.audio, j);
5690 getOptional<GroupTimeline>("timeline", p.timeline, j);
5691 getOptional<bool>("blockAdvertising", p.blockAdvertising, j, false);
5692 getOptional<std::string>("source", p.source, j);
5693 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
5694 getOptional<bool>("enableMulticastFailover", p.enableMulticastFailover, j, false);
5695 getOptional<int>("multicastFailoverSecs", p.multicastFailoverSecs, j, 10);
5696 getOptional<NetworkAddress>("rtcpPresenceRx", p.rtcpPresenceRx, j);
5697 getOptional<std::vector<std::string>>("presenceGroupAffinities", p.presenceGroupAffinities, j);
5698 getOptional<bool>("disablePacketEvents", p.disablePacketEvents, j, false);
5699 getOptional<int>("rfc4733RtpPayloadId", p.rfc4733RtpPayloadId, j, 0);
5700 getOptional<std::vector<RtpPayloadTypeTranslation>>("inboundRtpPayloadTypeTranslations", p.inboundRtpPayloadTypeTranslations, j);
5701 getOptional<GroupPriorityTranslation>("priorityTranslation", p.priorityTranslation, j);
5702 getOptional<GroupDefaultAudioPriority>("defaultAudioPriority", p.defaultAudioPriority, j);
5703 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
5704 getOptional<std::string>("anonymousAlias", p.anonymousAlias, j);
5705 getOptional<bool>("lbCrypto", p.lbCrypto, j, false);
5706 getOptional<GroupAppTransport>("appTransport", p.appTransport, j);
5707 getOptional<bool>("allowLoopback", p.allowLoopback, j, false);
5708 getOptionalWithIndicator<RtpProfile>("rtpProfile", p.rtpProfile, j, &p._wasDeserialized_rtpProfile);
5709 getOptional<RangerPackets>("rangerPackets", p.rangerPackets, j);
5710 getOptional<TransportImpairment>("txImpairment", p.txImpairment, j);
5711 getOptional<TransportImpairment>("rxImpairment", p.rxImpairment, j);
5712 getOptional<std::vector<uint16_t>>("specializerAffinities", p.specializerAffinities, j);
5713 getOptional<uint32_t>("securityLevel", p.securityLevel, j, 0);
5714 getOptional<std::vector<Source>>("ignoreSources", p.ignoreSources, j);
5715 getOptional<std::string>("languageCode", p.languageCode, j);
5716 getOptional<std::string>("synVoice", p.synVoice, j);
5717
5718 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
5719 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
5720
5721 getOptional<uint16_t>("blobRtpPayloadType", p.blobRtpPayloadType, j, ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE);
5722
5723 getOptional<Group::InboundAliasGenerationPolicy_t>("inboundAliasGenerationPolicy", p.inboundAliasGenerationPolicy, j, Group::InboundAliasGenerationPolicy_t::iagpAnonymousAlias);
5724
5725 getOptional<AudioGate>("gateIn", p.gateIn, j);
5726
5727 getOptional<bool>("ignoreAudioTraffic", p.ignoreAudioTraffic, j, false);
5728
5729 FROMJSON_BASE_IMPL();
5730 }
5731
5732
5733 //-----------------------------------------------------------
5734 JSON_SERIALIZED_CLASS(Mission)
5736 {
5737 IMPLEMENT_JSON_SERIALIZATION()
5738 IMPLEMENT_JSON_DOCUMENTATION(Mission)
5739
5740 public:
5741 std::string id;
5742 std::string name;
5743 std::vector<Group> groups;
5744 std::chrono::system_clock::time_point begins;
5745 std::chrono::system_clock::time_point ends;
5746 std::string certStoreId;
5747 int multicastFailoverPolicy;
5748 Rallypoint rallypoint;
5749
5750 void clear()
5751 {
5752 id.clear();
5753 name.clear();
5754 groups.clear();
5755 certStoreId.clear();
5756 multicastFailoverPolicy = 0;
5757 rallypoint.clear();
5758 }
5759 };
5760
5761 static void to_json(nlohmann::json& j, const Mission& p)
5762 {
5763 j = nlohmann::json{
5764 TOJSON_IMPL(id),
5765 TOJSON_IMPL(name),
5766 TOJSON_IMPL(groups),
5767 TOJSON_IMPL(certStoreId),
5768 TOJSON_IMPL(multicastFailoverPolicy),
5769 TOJSON_IMPL(rallypoint)
5770 };
5771 }
5772
5773 static void from_json(const nlohmann::json& j, Mission& p)
5774 {
5775 p.clear();
5776 j.at("id").get_to(p.id);
5777 j.at("name").get_to(p.name);
5778
5779 // Groups are optional
5780 try
5781 {
5782 j.at("groups").get_to(p.groups);
5783 }
5784 catch(...)
5785 {
5786 p.groups.clear();
5787 }
5788
5789 FROMJSON_IMPL(certStoreId, std::string, EMPTY_STRING);
5790 FROMJSON_IMPL(multicastFailoverPolicy, int, 0);
5791 getOptional<Rallypoint>("rallypoint", p.rallypoint, j);
5792 }
5793
5794 //-----------------------------------------------------------
5795 JSON_SERIALIZED_CLASS(LicenseDescriptor)
5806 {
5807 IMPLEMENT_JSON_SERIALIZATION()
5808 IMPLEMENT_JSON_DOCUMENTATION(LicenseDescriptor)
5809
5810 public:
5816 static const int STATUS_OK = 0;
5817 static const int ERR_NULL_ENTITLEMENT_KEY = -1;
5818 static const int ERR_NULL_LICENSE_KEY = -2;
5819 static const int ERR_INVALID_LICENSE_KEY_LEN = -3;
5820 static const int ERR_LICENSE_KEY_VERIFICATION_FAILURE = -4;
5821 static const int ERR_ACTIVATION_CODE_VERIFICATION_FAILURE = -5;
5822 static const int ERR_INVALID_EXPIRATION_DATE = -6;
5823 static const int ERR_GENERAL_FAILURE = -7;
5824 static const int ERR_NOT_INITIALIZED = -8;
5825 static const int ERR_REQUIRES_ACTIVATION = -9;
5826 static const int ERR_LICENSE_NOT_SUITED_FOR_ACTIVATION = -10;
5834 static const uint8_t LIC_CARGO_FLAG_LIMIT_TO_FEATURES = 0x01;
5845 std::string entitlement;
5846
5853 std::string key;
5854
5856 std::string activationCode;
5857
5859 std::string deviceId;
5860
5862 int type;
5863
5865 time_t expires;
5866
5868 std::string expiresFormatted;
5869
5874 uint32_t flags;
5875
5877 std::string cargo;
5878
5880 uint8_t cargoFlags;
5881
5887
5889 std::string manufacturerId;
5890
5892 std::string activationHmac;
5893
5895 {
5896 clear();
5897 }
5898
5899 void clear()
5900 {
5901 entitlement.clear();
5902 key.clear();
5903 activationCode.clear();
5904 type = 0;
5905 expires = 0;
5906 expiresFormatted.clear();
5907 flags = 0;
5908 cargo.clear();
5909 cargoFlags = 0;
5910 deviceId.clear();
5911 status = ERR_NOT_INITIALIZED;
5912 manufacturerId.clear();
5913 activationHmac.clear();
5914 }
5915 };
5916
5917 static void to_json(nlohmann::json& j, const LicenseDescriptor& p)
5918 {
5919 j = nlohmann::json{
5920 //TOJSON_IMPL(entitlement),
5921 {"entitlement", "*entitlement*"},
5922 TOJSON_IMPL(key),
5923 TOJSON_IMPL(activationCode),
5924 TOJSON_IMPL(type),
5925 TOJSON_IMPL(expires),
5926 TOJSON_IMPL(expiresFormatted),
5927 TOJSON_IMPL(flags),
5928 TOJSON_IMPL(deviceId),
5929 TOJSON_IMPL(status),
5930 //TOJSON_IMPL(manufacturerId),
5931 {"manufacturerId", "*manufacturerId*"},
5932 TOJSON_IMPL(cargo),
5933 TOJSON_IMPL(cargoFlags),
5934 TOJSON_IMPL(activationHmac)
5935 };
5936 }
5937
5938 static void from_json(const nlohmann::json& j, LicenseDescriptor& p)
5939 {
5940 p.clear();
5941 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
5942 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
5943 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
5944 FROMJSON_IMPL(type, int, 0);
5945 FROMJSON_IMPL(expires, time_t, 0);
5946 FROMJSON_IMPL(expiresFormatted, std::string, EMPTY_STRING);
5947 FROMJSON_IMPL(flags, uint32_t, 0);
5948 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
5949 FROMJSON_IMPL(status, int, LicenseDescriptor::ERR_NOT_INITIALIZED);
5950 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
5951 FROMJSON_IMPL(cargo, std::string, EMPTY_STRING);
5952 FROMJSON_IMPL(cargoFlags, uint8_t, 0);
5953 FROMJSON_IMPL(activationHmac, std::string, EMPTY_STRING);
5954 }
5955
5956
5957 //-----------------------------------------------------------
5958 JSON_SERIALIZED_CLASS(EngineNetworkingRpUdpStreaming)
5971 {
5972 IMPLEMENT_JSON_SERIALIZATION()
5973 IMPLEMENT_JSON_DOCUMENTATION(EngineNetworkingRpUdpStreaming)
5974
5975 public:
5978
5980 int port;
5981
5984
5987
5989 int ttl;
5990
5992 {
5993 clear();
5994 }
5995
5996 void clear()
5997 {
5998 enabled = false;
5999 port = 0;
6000 keepaliveIntervalSecs = 15;
6001 priority = TxPriority_t::priVoice;
6002 ttl = 64;
6003 }
6004
6005 virtual void initForDocumenting()
6006 {
6007 }
6008 };
6009
6010 static void to_json(nlohmann::json& j, const EngineNetworkingRpUdpStreaming& p)
6011 {
6012 j = nlohmann::json{
6013 TOJSON_IMPL(enabled),
6014 TOJSON_IMPL(port),
6015 TOJSON_IMPL(keepaliveIntervalSecs),
6016 TOJSON_IMPL(priority),
6017 TOJSON_IMPL(ttl)
6018 };
6019 }
6020 static void from_json(const nlohmann::json& j, EngineNetworkingRpUdpStreaming& p)
6021 {
6022 p.clear();
6023 getOptional<bool>("enabled", p.enabled, j, false);
6024 getOptional<int>("port", p.port, j, 0);
6025 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
6026 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
6027 getOptional<int>("ttl", p.ttl, j, 64);
6028 }
6029
6030 //-----------------------------------------------------------
6031 JSON_SERIALIZED_CLASS(EnginePolicyNetworking)
6041 {
6042 IMPLEMENT_JSON_SERIALIZATION()
6043 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNetworking)
6044
6045 public:
6047 std::string defaultNic;
6048
6051
6054
6057
6060
6063
6066
6069
6072
6074 {
6075 clear();
6076 }
6077
6078 void clear()
6079 {
6080 defaultNic.clear();
6081 multicastRejoinSecs = 8;
6082 rallypointRtTestIntervalMs = 60000;
6083 logRtpJitterBufferStats = false;
6084 preventMulticastFailover = false;
6085 addressResolutionPolicy = AddressResolutionPolicy_t::arpIpv6ThenIpv4;
6086 requireMulticast = true;
6087 rpUdpStreaming.clear();
6088 rtpProfile.clear();
6089 }
6090 };
6091
6092 static void to_json(nlohmann::json& j, const EnginePolicyNetworking& p)
6093 {
6094 j = nlohmann::json{
6095 TOJSON_IMPL(defaultNic),
6096 TOJSON_IMPL(multicastRejoinSecs),
6097
6098 TOJSON_IMPL(rallypointRtTestIntervalMs),
6099 TOJSON_IMPL(logRtpJitterBufferStats),
6100 TOJSON_IMPL(preventMulticastFailover),
6101 TOJSON_IMPL(requireMulticast),
6102 TOJSON_IMPL(rpUdpStreaming),
6103 TOJSON_IMPL(rtpProfile),
6104 TOJSON_IMPL(addressResolutionPolicy)
6105 };
6106 }
6107 static void from_json(const nlohmann::json& j, EnginePolicyNetworking& p)
6108 {
6109 p.clear();
6110 FROMJSON_IMPL(defaultNic, std::string, EMPTY_STRING);
6111 FROMJSON_IMPL(multicastRejoinSecs, int, 8);
6112 FROMJSON_IMPL(rallypointRtTestIntervalMs, int, 60000);
6113 FROMJSON_IMPL(logRtpJitterBufferStats, bool, false);
6114 FROMJSON_IMPL(preventMulticastFailover, bool, false);
6115 FROMJSON_IMPL(requireMulticast, bool, true);
6116 getOptional<EngineNetworkingRpUdpStreaming>("rpUdpStreaming", p.rpUdpStreaming, j);
6117 getOptional<RtpProfile>("rtpProfile", p.rtpProfile, j);
6118 getOptional<AddressResolutionPolicy_t>("addressResolutionPolicy", p.addressResolutionPolicy, j, AddressResolutionPolicy_t::arpIpv6ThenIpv4);
6119 }
6120
6121 //-----------------------------------------------------------
6122 JSON_SERIALIZED_CLASS(Aec)
6133 {
6134 IMPLEMENT_JSON_SERIALIZATION()
6135 IMPLEMENT_JSON_DOCUMENTATION(Aec)
6136
6137 public:
6143 typedef enum
6144 {
6146 aecmDefault = 0,
6147
6149 aecmLow = 1,
6150
6152 aecmMedium = 2,
6153
6155 aecmHigh = 3,
6156
6158 aecmVeryHigh = 4,
6159
6161 aecmHighest = 5
6162 } Mode_t;
6163
6166
6169
6172
6174 bool cng;
6175
6176 Aec()
6177 {
6178 clear();
6179 }
6180
6181 void clear()
6182 {
6183 enabled = false;
6184 mode = aecmDefault;
6185 speakerTailMs = 60;
6186 cng = true;
6187 }
6188 };
6189
6190 static void to_json(nlohmann::json& j, const Aec& p)
6191 {
6192 j = nlohmann::json{
6193 TOJSON_IMPL(enabled),
6194 TOJSON_IMPL(mode),
6195 TOJSON_IMPL(speakerTailMs),
6196 TOJSON_IMPL(cng)
6197 };
6198 }
6199 static void from_json(const nlohmann::json& j, Aec& p)
6200 {
6201 p.clear();
6202 FROMJSON_IMPL(enabled, bool, false);
6203 FROMJSON_IMPL(mode, Aec::Mode_t, Aec::Mode_t::aecmDefault);
6204 FROMJSON_IMPL(speakerTailMs, int, 60);
6205 FROMJSON_IMPL(cng, bool, true);
6206 }
6207
6208 //-----------------------------------------------------------
6209 JSON_SERIALIZED_CLASS(Vad)
6220 {
6221 IMPLEMENT_JSON_SERIALIZATION()
6222 IMPLEMENT_JSON_DOCUMENTATION(Vad)
6223
6224 public:
6230 typedef enum
6231 {
6233 vamDefault = 0,
6234
6236 vamLowBitRate = 1,
6237
6239 vamAggressive = 2,
6240
6242 vamVeryAggressive = 3
6243 } Mode_t;
6244
6247
6250
6251 Vad()
6252 {
6253 clear();
6254 }
6255
6256 void clear()
6257 {
6258 enabled = false;
6259 mode = vamDefault;
6260 }
6261 };
6262
6263 static void to_json(nlohmann::json& j, const Vad& p)
6264 {
6265 j = nlohmann::json{
6266 TOJSON_IMPL(enabled),
6267 TOJSON_IMPL(mode)
6268 };
6269 }
6270 static void from_json(const nlohmann::json& j, Vad& p)
6271 {
6272 p.clear();
6273 FROMJSON_IMPL(enabled, bool, false);
6274 FROMJSON_IMPL(mode, Vad::Mode_t, Vad::Mode_t::vamDefault);
6275 }
6276
6277 //-----------------------------------------------------------
6278 JSON_SERIALIZED_CLASS(Bridge)
6289 {
6290 IMPLEMENT_JSON_SERIALIZATION()
6291 IMPLEMENT_JSON_DOCUMENTATION(Bridge)
6292
6293 public:
6295 std::string id;
6296
6298 std::string name;
6299
6301 std::vector<std::string> groups;
6302
6307
6310
6311
6312 Bridge()
6313 {
6314 clear();
6315 }
6316
6317 void clear()
6318 {
6319 id.clear();
6320 name.clear();
6321 groups.clear();
6322 enabled = true;
6323 active = true;
6324 }
6325 };
6326
6327 static void to_json(nlohmann::json& j, const Bridge& p)
6328 {
6329 j = nlohmann::json{
6330 TOJSON_IMPL(id),
6331 TOJSON_IMPL(name),
6332 TOJSON_IMPL(groups),
6333 TOJSON_IMPL(enabled),
6334 TOJSON_IMPL(active)
6335 };
6336 }
6337 static void from_json(const nlohmann::json& j, Bridge& p)
6338 {
6339 p.clear();
6340 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
6341 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
6342 getOptional<std::vector<std::string>>("groups", p.groups, j);
6343 FROMJSON_IMPL(enabled, bool, true);
6344 FROMJSON_IMPL(active, bool, true);
6345 }
6346
6347 //-----------------------------------------------------------
6348 JSON_SERIALIZED_CLASS(AndroidAudio)
6359 {
6360 IMPLEMENT_JSON_SERIALIZATION()
6361 IMPLEMENT_JSON_DOCUMENTATION(AndroidAudio)
6362
6363 public:
6364 constexpr static int INVALID_SESSION_ID = -9999;
6365
6367 int api;
6368
6371
6374
6390
6398
6408
6411
6414
6415
6416 AndroidAudio()
6417 {
6418 clear();
6419 }
6420
6421 void clear()
6422 {
6423 api = 0;
6424 sharingMode = 0;
6425 performanceMode = 12;
6426 usage = 2;
6427 contentType = 1;
6428 inputPreset = 7;
6429 sessionId = AndroidAudio::INVALID_SESSION_ID;
6430 engineMode = 0;
6431 }
6432 };
6433
6434 static void to_json(nlohmann::json& j, const AndroidAudio& p)
6435 {
6436 j = nlohmann::json{
6437 TOJSON_IMPL(api),
6438 TOJSON_IMPL(sharingMode),
6439 TOJSON_IMPL(performanceMode),
6440 TOJSON_IMPL(usage),
6441 TOJSON_IMPL(contentType),
6442 TOJSON_IMPL(inputPreset),
6443 TOJSON_IMPL(sessionId),
6444 TOJSON_IMPL(engineMode)
6445 };
6446 }
6447 static void from_json(const nlohmann::json& j, AndroidAudio& p)
6448 {
6449 p.clear();
6450 FROMJSON_IMPL(api, int, 0);
6451 FROMJSON_IMPL(sharingMode, int, 0);
6452 FROMJSON_IMPL(performanceMode, int, 12);
6453 FROMJSON_IMPL(usage, int, 2);
6454 FROMJSON_IMPL(contentType, int, 1);
6455 FROMJSON_IMPL(inputPreset, int, 7);
6456 FROMJSON_IMPL(sessionId, int, AndroidAudio::INVALID_SESSION_ID);
6457 FROMJSON_IMPL(engineMode, int, 0);
6458 }
6459
6460 //-----------------------------------------------------------
6461 JSON_SERIALIZED_CLASS(Denoiser)
6473 {
6474 IMPLEMENT_JSON_SERIALIZATION()
6475 IMPLEMENT_JSON_DOCUMENTATION(Denoiser)
6476
6477 public:
6479 float mix;
6480
6482 std::string model;
6483
6485 float vadGate;
6486
6487 Denoiser()
6488 {
6489 clear();
6490 }
6491
6492 void clear()
6493 {
6494 mix = 1.0f;
6495 model.clear();
6496 vadGate = 0.0f;
6497 }
6498 };
6499
6500 static void to_json(nlohmann::json& j, const Denoiser& p)
6501 {
6502 j = nlohmann::json{
6503 TOJSON_IMPL(mix),
6504 TOJSON_IMPL(model),
6505 TOJSON_IMPL(vadGate)
6506 };
6507 }
6508 static void from_json(const nlohmann::json& j, Denoiser& p)
6509 {
6510 p.clear();
6511 FROMJSON_IMPL(mix, float, 1.0f);
6512 FROMJSON_IMPL(model, std::string, "");
6513 FROMJSON_IMPL(vadGate, float, 0.0f);
6514 }
6515
6516 //-----------------------------------------------------------
6517 JSON_SERIALIZED_CLASS(EnginePolicyAudio)
6528 {
6529 IMPLEMENT_JSON_SERIALIZATION()
6530 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyAudio)
6531
6532 public:
6535
6538
6541
6544
6547
6550
6553
6556
6559
6562
6565
6568
6571
6574
6577
6580
6581
6583 {
6584 clear();
6585 }
6586
6587 void clear()
6588 {
6589 enabled = true;
6590 hardwareEnabled = true;
6591 internalRate = 16000;
6592 internalChannels = 2;
6593 muteTxOnTx = false;
6594 aec.clear();
6595 vad.clear();
6596 android.clear();
6597 inputAgc.clear();
6598 outputAgc.clear();
6599 denoiseInput = false;
6600 denoiseOutput = false;
6601 denoiser.clear();
6602 saveInputPcm = false;
6603 saveOutputPcm = false;
6604 registry.clear();
6605 }
6606 };
6607
6608 static void to_json(nlohmann::json& j, const EnginePolicyAudio& p)
6609 {
6610 j = nlohmann::json{
6611 TOJSON_IMPL(enabled),
6612 TOJSON_IMPL(hardwareEnabled),
6613 TOJSON_IMPL(internalRate),
6614 TOJSON_IMPL(internalChannels),
6615 TOJSON_IMPL(muteTxOnTx),
6616 TOJSON_IMPL(aec),
6617 TOJSON_IMPL(vad),
6618 TOJSON_IMPL(android),
6619 TOJSON_IMPL(inputAgc),
6620 TOJSON_IMPL(outputAgc),
6621 TOJSON_IMPL(denoiseInput),
6622 TOJSON_IMPL(denoiseOutput),
6623 TOJSON_IMPL(denoiser),
6624 TOJSON_IMPL(saveInputPcm),
6625 TOJSON_IMPL(saveOutputPcm),
6626 TOJSON_IMPL(registry)
6627 };
6628 }
6629 static void from_json(const nlohmann::json& j, EnginePolicyAudio& p)
6630 {
6631 p.clear();
6632 getOptional<bool>("enabled", p.enabled, j, true);
6633 getOptional<bool>("hardwareEnabled", p.hardwareEnabled, j, true);
6634 FROMJSON_IMPL(internalRate, int, 16000);
6635 FROMJSON_IMPL(internalChannels, int, 2);
6636
6637 FROMJSON_IMPL(muteTxOnTx, bool, false);
6638 getOptional<Aec>("aec", p.aec, j);
6639 getOptional<Vad>("vad", p.vad, j);
6640 getOptional<AndroidAudio>("android", p.android, j);
6641 getOptional<Agc>("inputAgc", p.inputAgc, j);
6642 getOptional<Agc>("outputAgc", p.outputAgc, j);
6643 FROMJSON_IMPL(denoiseInput, bool, false);
6644 FROMJSON_IMPL(denoiseOutput, bool, false);
6645 getOptional<Denoiser>("denoiser", p.denoiser, j);
6646 FROMJSON_IMPL(saveInputPcm, bool, false);
6647 FROMJSON_IMPL(saveOutputPcm, bool, false);
6648 getOptional<AudioRegistry>("registry", p.registry, j);
6649 }
6650
6651 //-----------------------------------------------------------
6652 JSON_SERIALIZED_CLASS(SecurityCertificate)
6663 {
6664 IMPLEMENT_JSON_SERIALIZATION()
6665 IMPLEMENT_JSON_DOCUMENTATION(SecurityCertificate)
6666
6667 public:
6668
6674 std::string certificate;
6675
6677 std::string key;
6678
6680 {
6681 clear();
6682 }
6683
6684 void clear()
6685 {
6686 certificate.clear();
6687 key.clear();
6688 }
6689 };
6690
6691 static void to_json(nlohmann::json& j, const SecurityCertificate& p)
6692 {
6693 j = nlohmann::json{
6694 TOJSON_IMPL(certificate),
6695 TOJSON_IMPL(key)
6696 };
6697 }
6698 static void from_json(const nlohmann::json& j, SecurityCertificate& p)
6699 {
6700 p.clear();
6701 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
6702 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
6703 }
6704
6705 // This is where spell checking stops
6706 //-----------------------------------------------------------
6707 JSON_SERIALIZED_CLASS(EnginePolicySecurity)
6708
6709
6719 {
6720 IMPLEMENT_JSON_SERIALIZATION()
6721 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicySecurity)
6722
6723 public:
6724
6736
6744 std::vector<std::string> caCertificates;
6745
6747 {
6748 clear();
6749 }
6750
6751 void clear()
6752 {
6753 certificate.clear();
6754 caCertificates.clear();
6755 }
6756 };
6757
6758 static void to_json(nlohmann::json& j, const EnginePolicySecurity& p)
6759 {
6760 j = nlohmann::json{
6761 TOJSON_IMPL(certificate),
6762 TOJSON_IMPL(caCertificates)
6763 };
6764 }
6765 static void from_json(const nlohmann::json& j, EnginePolicySecurity& p)
6766 {
6767 p.clear();
6768 getOptional("certificate", p.certificate, j);
6769 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
6770 }
6771
6772 //-----------------------------------------------------------
6773 JSON_SERIALIZED_CLASS(EnginePolicyLogging)
6784 {
6785 IMPLEMENT_JSON_SERIALIZATION()
6786 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyLogging)
6787
6788 public:
6789
6806
6809
6811 {
6812 clear();
6813 }
6814
6815 void clear()
6816 {
6817 maxLevel = 4; // ILogger::Level::debug
6818 enableSyslog = false;
6819 }
6820 };
6821
6822 static void to_json(nlohmann::json& j, const EnginePolicyLogging& p)
6823 {
6824 j = nlohmann::json{
6825 TOJSON_IMPL(maxLevel),
6826 TOJSON_IMPL(enableSyslog)
6827 };
6828 }
6829 static void from_json(const nlohmann::json& j, EnginePolicyLogging& p)
6830 {
6831 p.clear();
6832 getOptional("maxLevel", p.maxLevel, j, 4); // ILogger::Level::debug
6833 getOptional("enableSyslog", p.enableSyslog, j);
6834 }
6835
6836
6837 //-----------------------------------------------------------
6838 JSON_SERIALIZED_CLASS(EnginePolicyDatabase)
6840 {
6841 IMPLEMENT_JSON_SERIALIZATION()
6842 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyDatabase)
6843
6844 public:
6845 typedef enum
6846 {
6847 dbtFixedMemory = 0,
6848 dbtPagedMemory = 1,
6849 dbtFixedFile = 2
6850 } DatabaseType_t;
6851
6852 DatabaseType_t type;
6853 std::string fixedFileName;
6854 bool forceMaintenance;
6855 bool reclaimSpace;
6856
6858 {
6859 clear();
6860 }
6861
6862 void clear()
6863 {
6864 type = DatabaseType_t::dbtFixedMemory;
6865 fixedFileName.clear();
6866 forceMaintenance = false;
6867 reclaimSpace = false;
6868 }
6869 };
6870
6871 static void to_json(nlohmann::json& j, const EnginePolicyDatabase& p)
6872 {
6873 j = nlohmann::json{
6874 TOJSON_IMPL(type),
6875 TOJSON_IMPL(fixedFileName),
6876 TOJSON_IMPL(forceMaintenance),
6877 TOJSON_IMPL(reclaimSpace)
6878 };
6879 }
6880 static void from_json(const nlohmann::json& j, EnginePolicyDatabase& p)
6881 {
6882 p.clear();
6883 FROMJSON_IMPL(type, EnginePolicyDatabase::DatabaseType_t, EnginePolicyDatabase::DatabaseType_t::dbtFixedMemory);
6884 FROMJSON_IMPL(fixedFileName, std::string, EMPTY_STRING);
6885 FROMJSON_IMPL(forceMaintenance, bool, false);
6886 FROMJSON_IMPL(reclaimSpace, bool, false);
6887 }
6888
6889
6890 //-----------------------------------------------------------
6891 JSON_SERIALIZED_CLASS(SecureSignature)
6900 {
6901 IMPLEMENT_JSON_SERIALIZATION()
6902 IMPLEMENT_JSON_DOCUMENTATION(SecureSignature)
6903
6904 public:
6905
6907 std::string certificate;
6908
6909 // /** @brief Contains the PEM-formatted text of the certificate's public key */
6910 //std::string publicKey;
6911
6913 std::string signature;
6914
6916 {
6917 clear();
6918 }
6919
6920 void clear()
6921 {
6922 certificate.clear();
6923 //publicKey.clear();
6924 signature.clear();
6925 }
6926 };
6927
6928 static void to_json(nlohmann::json& j, const SecureSignature& p)
6929 {
6930 j = nlohmann::json{
6931 TOJSON_IMPL(certificate),
6932 //TOJSON_IMPL(publicKey),
6933 TOJSON_IMPL(signature)
6934 };
6935 }
6936 static void from_json(const nlohmann::json& j, SecureSignature& p)
6937 {
6938 p.clear();
6939 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
6940 //FROMJSON_IMPL(publicKey, std::string, EMPTY_STRING);
6941 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
6942 }
6943
6944 //-----------------------------------------------------------
6945 JSON_SERIALIZED_CLASS(NamedAudioDevice)
6947 {
6948 IMPLEMENT_JSON_SERIALIZATION()
6949 IMPLEMENT_JSON_DOCUMENTATION(NamedAudioDevice)
6950
6951 public:
6952 std::string name;
6953 std::string manufacturer;
6954 std::string model;
6955 std::string id;
6956 std::string serialNumber;
6957 std::string type;
6958 std::string extra;
6959 bool isDefault;
6960
6962 {
6963 clear();
6964 }
6965
6966 void clear()
6967 {
6968 name.clear();
6969 manufacturer.clear();
6970 model.clear();
6971 id.clear();
6972 serialNumber.clear();
6973 type.clear();
6974 extra.clear();
6975 isDefault = false;
6976 }
6977 };
6978
6979 static void to_json(nlohmann::json& j, const NamedAudioDevice& p)
6980 {
6981 j = nlohmann::json{
6982 TOJSON_IMPL(name),
6983 TOJSON_IMPL(manufacturer),
6984 TOJSON_IMPL(model),
6985 TOJSON_IMPL(id),
6986 TOJSON_IMPL(serialNumber),
6987 TOJSON_IMPL(type),
6988 TOJSON_IMPL(extra),
6989 TOJSON_IMPL(isDefault),
6990 };
6991 }
6992 static void from_json(const nlohmann::json& j, NamedAudioDevice& p)
6993 {
6994 p.clear();
6995 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
6996 getOptional<std::string>("manufacturer", p.manufacturer, j, EMPTY_STRING);
6997 getOptional<std::string>("model", p.model, j, EMPTY_STRING);
6998 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
6999 getOptional<std::string>("serialNumber", p.serialNumber, j, EMPTY_STRING);
7000 getOptional<std::string>("type", p.type, j, EMPTY_STRING);
7001 getOptional<std::string>("extra", p.extra, j, EMPTY_STRING);
7002 getOptional<bool>("isDefault", p.isDefault, j, false);
7003 }
7004
7005
7006 //-----------------------------------------------------------
7007 JSON_SERIALIZED_CLASS(EnginePolicyNamedAudioDevices)
7009 {
7010 IMPLEMENT_JSON_SERIALIZATION()
7011 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNamedAudioDevices)
7012
7013 public:
7014 std::vector<NamedAudioDevice> inputs;
7015 std::vector<NamedAudioDevice> outputs;
7016
7018 {
7019 clear();
7020 }
7021
7022 void clear()
7023 {
7024 inputs.clear();
7025 outputs.clear();
7026 }
7027 };
7028
7029 static void to_json(nlohmann::json& j, const EnginePolicyNamedAudioDevices& p)
7030 {
7031 j = nlohmann::json{
7032 TOJSON_IMPL(inputs),
7033 TOJSON_IMPL(outputs)
7034 };
7035 }
7036 static void from_json(const nlohmann::json& j, EnginePolicyNamedAudioDevices& p)
7037 {
7038 p.clear();
7039 getOptional<std::vector<NamedAudioDevice>>("inputs", p.inputs, j);
7040 getOptional<std::vector<NamedAudioDevice>>("outputs", p.outputs, j);
7041 }
7042
7043 //-----------------------------------------------------------
7044 JSON_SERIALIZED_CLASS(Licensing)
7057 {
7058 IMPLEMENT_JSON_SERIALIZATION()
7059 IMPLEMENT_JSON_DOCUMENTATION(Licensing)
7060
7061 public:
7062
7064 std::string entitlement;
7065
7067 std::string key;
7068
7070 std::string activationCode;
7071
7073 std::string deviceId;
7074
7076 std::string manufacturerId;
7077
7078 Licensing()
7079 {
7080 clear();
7081 }
7082
7083 void clear()
7084 {
7085 entitlement.clear();
7086 key.clear();
7087 activationCode.clear();
7088 deviceId.clear();
7089 manufacturerId.clear();
7090 }
7091 };
7092
7093 static void to_json(nlohmann::json& j, const Licensing& p)
7094 {
7095 j = nlohmann::json{
7096 TOJSON_IMPL(entitlement),
7097 TOJSON_IMPL(key),
7098 TOJSON_IMPL(activationCode),
7099 TOJSON_IMPL(deviceId),
7100 TOJSON_IMPL(manufacturerId)
7101 };
7102 }
7103 static void from_json(const nlohmann::json& j, Licensing& p)
7104 {
7105 p.clear();
7106 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
7107 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
7108 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
7109 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
7110 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
7111 }
7112
7113 //-----------------------------------------------------------
7114 JSON_SERIALIZED_CLASS(DiscoveryMagellan)
7125 {
7126 IMPLEMENT_JSON_SERIALIZATION()
7127 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryMagellan)
7128
7129 public:
7130
7133
7135 std::string interfaceName;
7136
7139
7142
7144 {
7145 clear();
7146 }
7147
7148 void clear()
7149 {
7150 enabled = false;
7151 interfaceName.clear();
7152 security.clear();
7153 tls.clear();
7154 }
7155 };
7156
7157 static void to_json(nlohmann::json& j, const DiscoveryMagellan& p)
7158 {
7159 j = nlohmann::json{
7160 TOJSON_IMPL(enabled),
7161 TOJSON_IMPL(interfaceName),
7162 TOJSON_IMPL(security),
7163 TOJSON_IMPL(tls)
7164 };
7165 }
7166 static void from_json(const nlohmann::json& j, DiscoveryMagellan& p)
7167 {
7168 p.clear();
7169 getOptional("enabled", p.enabled, j, false);
7170 getOptional<Tls>("tls", p.tls, j);
7171 getOptional<SecurityCertificate>("security", p.security, j);
7172 FROMJSON_IMPL(interfaceName, std::string, EMPTY_STRING);
7173 }
7174
7175 //-----------------------------------------------------------
7176 JSON_SERIALIZED_CLASS(DiscoverySsdp)
7187 {
7188 IMPLEMENT_JSON_SERIALIZATION()
7189 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySsdp)
7190
7191 public:
7192
7195
7197 std::string interfaceName;
7198
7201
7203 std::vector<std::string> searchTerms;
7204
7207
7210
7212 {
7213 clear();
7214 }
7215
7216 void clear()
7217 {
7218 enabled = false;
7219 interfaceName.clear();
7220 address.clear();
7221 searchTerms.clear();
7222 ageTimeoutMs = 30000;
7223 advertising.clear();
7224 }
7225 };
7226
7227 static void to_json(nlohmann::json& j, const DiscoverySsdp& p)
7228 {
7229 j = nlohmann::json{
7230 TOJSON_IMPL(enabled),
7231 TOJSON_IMPL(interfaceName),
7232 TOJSON_IMPL(address),
7233 TOJSON_IMPL(searchTerms),
7234 TOJSON_IMPL(ageTimeoutMs),
7235 TOJSON_IMPL(advertising)
7236 };
7237 }
7238 static void from_json(const nlohmann::json& j, DiscoverySsdp& p)
7239 {
7240 p.clear();
7241 getOptional("enabled", p.enabled, j, false);
7242 getOptional<std::string>("interfaceName", p.interfaceName, j);
7243
7244 getOptional<NetworkAddress>("address", p.address, j);
7245 if(p.address.address.empty())
7246 {
7247 p.address.address = "255.255.255.255";
7248 }
7249 if(p.address.port <= 0)
7250 {
7251 p.address.port = 1900;
7252 }
7253
7254 getOptional<std::vector<std::string>>("searchTerms", p.searchTerms, j);
7255 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7256 getOptional<Advertising>("advertising", p.advertising, j);
7257 }
7258
7259 //-----------------------------------------------------------
7260 JSON_SERIALIZED_CLASS(DiscoverySap)
7271 {
7272 IMPLEMENT_JSON_SERIALIZATION()
7273 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySap)
7274
7275 public:
7278
7280 std::string interfaceName;
7281
7284
7287
7290
7291 DiscoverySap()
7292 {
7293 clear();
7294 }
7295
7296 void clear()
7297 {
7298 enabled = false;
7299 interfaceName.clear();
7300 address.clear();
7301 ageTimeoutMs = 30000;
7302 advertising.clear();
7303 }
7304 };
7305
7306 static void to_json(nlohmann::json& j, const DiscoverySap& p)
7307 {
7308 j = nlohmann::json{
7309 TOJSON_IMPL(enabled),
7310 TOJSON_IMPL(interfaceName),
7311 TOJSON_IMPL(address),
7312 TOJSON_IMPL(ageTimeoutMs),
7313 TOJSON_IMPL(advertising)
7314 };
7315 }
7316 static void from_json(const nlohmann::json& j, DiscoverySap& p)
7317 {
7318 p.clear();
7319 getOptional("enabled", p.enabled, j, false);
7320 getOptional<std::string>("interfaceName", p.interfaceName, j);
7321 getOptional<NetworkAddress>("address", p.address, j);
7322 if(p.address.address.empty())
7323 {
7324 p.address.address = "224.2.127.254";
7325 }
7326 if(p.address.port <= 0)
7327 {
7328 p.address.port = 9875;
7329 }
7330
7331 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7332 getOptional<Advertising>("advertising", p.advertising, j);
7333 }
7334
7335 //-----------------------------------------------------------
7336 JSON_SERIALIZED_CLASS(DiscoveryCistech)
7349 {
7350 IMPLEMENT_JSON_SERIALIZATION()
7351 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryCistech)
7352
7353 public:
7354 bool enabled;
7355 std::string interfaceName;
7356 NetworkAddress address;
7357 int ageTimeoutMs;
7358
7360 {
7361 clear();
7362 }
7363
7364 void clear()
7365 {
7366 enabled = false;
7367 interfaceName.clear();
7368 address.clear();
7369 ageTimeoutMs = 30000;
7370 }
7371 };
7372
7373 static void to_json(nlohmann::json& j, const DiscoveryCistech& p)
7374 {
7375 j = nlohmann::json{
7376 TOJSON_IMPL(enabled),
7377 TOJSON_IMPL(interfaceName),
7378 TOJSON_IMPL(address),
7379 TOJSON_IMPL(ageTimeoutMs)
7380 };
7381 }
7382 static void from_json(const nlohmann::json& j, DiscoveryCistech& p)
7383 {
7384 p.clear();
7385 getOptional("enabled", p.enabled, j, false);
7386 getOptional<std::string>("interfaceName", p.interfaceName, j);
7387 getOptional<NetworkAddress>("address", p.address, j);
7388 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7389 }
7390
7391
7392 //-----------------------------------------------------------
7393 JSON_SERIALIZED_CLASS(DiscoveryTrellisware)
7404 {
7405 IMPLEMENT_JSON_SERIALIZATION()
7406 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryTrellisware)
7407
7408 public:
7409
7412
7415
7417 {
7418 clear();
7419 }
7420
7421 void clear()
7422 {
7423 enabled = false;
7424 security.clear();
7425 }
7426 };
7427
7428 static void to_json(nlohmann::json& j, const DiscoveryTrellisware& p)
7429 {
7430 j = nlohmann::json{
7431 TOJSON_IMPL(enabled),
7432 TOJSON_IMPL(security)
7433 };
7434 }
7435 static void from_json(const nlohmann::json& j, DiscoveryTrellisware& p)
7436 {
7437 p.clear();
7438 getOptional("enabled", p.enabled, j, false);
7439 getOptional<SecurityCertificate>("security", p.security, j);
7440 }
7441
7442 //-----------------------------------------------------------
7443 JSON_SERIALIZED_CLASS(DiscoveryConfiguration)
7454 {
7455 IMPLEMENT_JSON_SERIALIZATION()
7456 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryConfiguration)
7457
7458 public:
7461
7464
7467
7470
7473
7475 {
7476 clear();
7477 }
7478
7479 void clear()
7480 {
7481 magellan.clear();
7482 ssdp.clear();
7483 sap.clear();
7484 cistech.clear();
7485 }
7486 };
7487
7488 static void to_json(nlohmann::json& j, const DiscoveryConfiguration& p)
7489 {
7490 j = nlohmann::json{
7491 TOJSON_IMPL(magellan),
7492 TOJSON_IMPL(ssdp),
7493 TOJSON_IMPL(sap),
7494 TOJSON_IMPL(cistech),
7495 TOJSON_IMPL(trellisware)
7496 };
7497 }
7498 static void from_json(const nlohmann::json& j, DiscoveryConfiguration& p)
7499 {
7500 p.clear();
7501 getOptional<DiscoveryMagellan>("magellan", p.magellan, j);
7502 getOptional<DiscoverySsdp>("ssdp", p.ssdp, j);
7503 getOptional<DiscoverySap>("sap", p.sap, j);
7504 getOptional<DiscoveryCistech>("cistech", p.cistech, j);
7505 getOptional<DiscoveryTrellisware>("trellisware", p.trellisware, j);
7506 }
7507
7508
7509 //-----------------------------------------------------------
7510 JSON_SERIALIZED_CLASS(ApiCallPacingLaneSettings)
7519 {
7520 IMPLEMENT_JSON_SERIALIZATION()
7521 IMPLEMENT_JSON_DOCUMENTATION(ApiCallPacingLaneSettings)
7522
7523 public:
7526
7529
7531 {
7532 clear();
7533 }
7534
7535 void clear()
7536 {
7537 intervalMs = 0;
7538 maxQueueDepth = 512;
7539 }
7540
7541 virtual void initForDocumenting()
7542 {
7543 clear();
7544 }
7545 };
7546
7547 static void to_json(nlohmann::json& j, const ApiCallPacingLaneSettings& p)
7548 {
7549 j = nlohmann::json{
7550 TOJSON_IMPL(intervalMs),
7551 TOJSON_IMPL(maxQueueDepth)
7552 };
7553 }
7554 static void from_json(const nlohmann::json& j, ApiCallPacingLaneSettings& p)
7555 {
7556 p.clear();
7557 getOptional<int>("intervalMs", p.intervalMs, j, 0);
7558 getOptional<uint32_t>("maxQueueDepth", p.maxQueueDepth, j, 512);
7559 }
7560
7561 //-----------------------------------------------------------
7562 JSON_SERIALIZED_CLASS(ApiCallPacingSettings)
7574 {
7575 IMPLEMENT_JSON_SERIALIZATION()
7576 IMPLEMENT_JSON_DOCUMENTATION(ApiCallPacingSettings)
7577
7578 public:
7581
7584
7587
7589 {
7590 clear();
7591 }
7592
7593 void clear()
7594 {
7595 topology.clear();
7596 transmission.clear();
7597 configuration.clear();
7598 }
7599
7600 virtual void initForDocumenting()
7601 {
7602 clear();
7603 }
7604 };
7605
7606 static void to_json(nlohmann::json& j, const ApiCallPacingSettings& p)
7607 {
7608 j = nlohmann::json{
7609 TOJSON_IMPL(topology),
7610 TOJSON_IMPL(transmission),
7611 TOJSON_IMPL(configuration)
7612 };
7613 }
7614 static void from_json(const nlohmann::json& j, ApiCallPacingSettings& p)
7615 {
7616 p.clear();
7617 getOptional<ApiCallPacingLaneSettings>("topology", p.topology, j);
7618 getOptional<ApiCallPacingLaneSettings>("transmission", p.transmission, j);
7619 getOptional<ApiCallPacingLaneSettings>("configuration", p.configuration, j);
7620 }
7621
7622 //-----------------------------------------------------------
7623 JSON_SERIALIZED_CLASS(EnginePolicyInternals)
7636 {
7637 IMPLEMENT_JSON_SERIALIZATION()
7638 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyInternals)
7639
7640 public:
7643
7646
7649
7650 int maxRxSecs;
7651
7652 int logTaskQueueStatsIntervalMs;
7653
7654 bool enableLazySpeakerClosure;
7655
7658
7661
7664
7667
7670
7673
7676
7679
7682
7685
7687 {
7688 clear();
7689 }
7690
7691 void clear()
7692 {
7693 watchdog.clear();
7694 housekeeperIntervalMs = 1000;
7695 logTaskQueueStatsIntervalMs = 0;
7696 maxTxSecs = 30;
7697 maxRxSecs = 0;
7698 enableLazySpeakerClosure = false;
7699 rpClusterStrategy = RallypointCluster::ConnectionStrategy_t::csRoundRobin;
7700 rpClusterRolloverSecs = 10;
7701 rtpExpirationCheckIntervalMs = 250;
7702 rpConnectionTimeoutSecs = 0;
7703 rpTransactionTimeoutMs = 0;
7704 stickyTidHangSecs = 10;
7705 uriStreamingIntervalMs = 60;
7706 delayedMicrophoneClosureSecs = 15;
7707 tuning.clear();
7708 apiCallPacing.clear();
7709 }
7710 };
7711
7712 static void to_json(nlohmann::json& j, const EnginePolicyInternals& p)
7713 {
7714 j = nlohmann::json{
7715 TOJSON_IMPL(watchdog),
7716 TOJSON_IMPL(housekeeperIntervalMs),
7717 TOJSON_IMPL(logTaskQueueStatsIntervalMs),
7718 TOJSON_IMPL(maxTxSecs),
7719 TOJSON_IMPL(maxRxSecs),
7720 TOJSON_IMPL(enableLazySpeakerClosure),
7721 TOJSON_IMPL(rpClusterStrategy),
7722 TOJSON_IMPL(rpClusterRolloverSecs),
7723 TOJSON_IMPL(rtpExpirationCheckIntervalMs),
7724 TOJSON_IMPL(rpConnectionTimeoutSecs),
7725 TOJSON_IMPL(rpTransactionTimeoutMs),
7726 TOJSON_IMPL(stickyTidHangSecs),
7727 TOJSON_IMPL(uriStreamingIntervalMs),
7728 TOJSON_IMPL(delayedMicrophoneClosureSecs),
7729 TOJSON_IMPL(tuning),
7730 TOJSON_IMPL(apiCallPacing)
7731 };
7732 }
7733 static void from_json(const nlohmann::json& j, EnginePolicyInternals& p)
7734 {
7735 p.clear();
7736 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
7737 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
7738 getOptional<int>("logTaskQueueStatsIntervalMs", p.logTaskQueueStatsIntervalMs, j, 0);
7739 getOptional<int>("maxTxSecs", p.maxTxSecs, j, 30);
7740 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
7741 getOptional<bool>("enableLazySpeakerClosure", p.enableLazySpeakerClosure, j, false);
7742 getOptional<RallypointCluster::ConnectionStrategy_t>("rpClusterStrategy", p.rpClusterStrategy, j, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
7743 getOptional<int>("rpClusterRolloverSecs", p.rpClusterRolloverSecs, j, 10);
7744 getOptional<int>("rtpExpirationCheckIntervalMs", p.rtpExpirationCheckIntervalMs, j, 250);
7745 getOptional<int>("rpConnectionTimeoutSecs", p.rpConnectionTimeoutSecs, j, 0);
7746 getOptional<int>("rpTransactionTimeoutMs", p.rpTransactionTimeoutMs, j, 0);
7747 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
7748 getOptional<int>("uriStreamingIntervalMs", p.uriStreamingIntervalMs, j, 60);
7749 getOptional<int>("delayedMicrophoneClosureSecs", p.delayedMicrophoneClosureSecs, j, 15);
7750 getOptional<TuningSettings>("tuning", p.tuning, j);
7751 getOptional<ApiCallPacingSettings>("apiCallPacing", p.apiCallPacing, j);
7752 }
7753
7754 //-----------------------------------------------------------
7755 JSON_SERIALIZED_CLASS(EnginePolicyTimelines)
7768 {
7769 IMPLEMENT_JSON_SERIALIZATION()
7770 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyTimelines)
7771
7772 public:
7773
7780
7782 std::string storageRoot;
7783
7786
7789
7792
7795
7798
7801
7804
7813
7816
7819
7822
7824 {
7825 clear();
7826 }
7827
7828 void clear()
7829 {
7830 enabled = true;
7831 storageRoot.clear();
7832 maxStorageMb = 1024; // 1 Gigabyte
7833 maxMemMb = maxStorageMb;
7834 maxAudioEventMemMb = maxMemMb;
7835 maxDiskMb = maxStorageMb;
7836 maxEventAgeSecs = (86400 * 30); // 30 days
7837 groomingIntervalSecs = (60 * 30); // 30 minutes
7838 maxEvents = 1000;
7839 autosaveIntervalSecs = 5;
7840 security.clear();
7841 disableSigningAndVerification = false;
7842 ephemeral = false;
7843 }
7844 };
7845
7846 static void to_json(nlohmann::json& j, const EnginePolicyTimelines& p)
7847 {
7848 j = nlohmann::json{
7849 TOJSON_IMPL(enabled),
7850 TOJSON_IMPL(storageRoot),
7851 TOJSON_IMPL(maxMemMb),
7852 TOJSON_IMPL(maxAudioEventMemMb),
7853 TOJSON_IMPL(maxDiskMb),
7854 TOJSON_IMPL(maxEventAgeSecs),
7855 TOJSON_IMPL(maxEvents),
7856 TOJSON_IMPL(groomingIntervalSecs),
7857 TOJSON_IMPL(autosaveIntervalSecs),
7858 TOJSON_IMPL(security),
7859 TOJSON_IMPL(disableSigningAndVerification),
7860 TOJSON_IMPL(ephemeral)
7861 };
7862 }
7863 static void from_json(const nlohmann::json& j, EnginePolicyTimelines& p)
7864 {
7865 p.clear();
7866 getOptional<bool>("enabled", p.enabled, j, true);
7867 getOptional<std::string>("storageRoot", p.storageRoot, j, EMPTY_STRING);
7868
7869 getOptional<int>("maxStorageMb", p.maxStorageMb, j, 1024);
7870 getOptional<int>("maxMemMb", p.maxMemMb, j, p.maxStorageMb);
7871 getOptional<int>("maxAudioEventMemMb", p.maxAudioEventMemMb, j, p.maxMemMb);
7872 getOptional<int>("maxDiskMb", p.maxDiskMb, j, p.maxStorageMb);
7873 getOptional<long>("maxEventAgeSecs", p.maxEventAgeSecs, j, (86400 * 30));
7874 getOptional<long>("groomingIntervalSecs", p.groomingIntervalSecs, j, (60 * 30));
7875 getOptional<long>("autosaveIntervalSecs", p.autosaveIntervalSecs, j, 5);
7876 getOptional<int>("maxEvents", p.maxEvents, j, 1000);
7877 getOptional<SecurityCertificate>("security", p.security, j);
7878 getOptional<bool>("disableSigningAndVerification", p.disableSigningAndVerification, j, false);
7879 getOptional<bool>("ephemeral", p.ephemeral, j, false);
7880 }
7881
7882
7883 //-----------------------------------------------------------
7884 JSON_SERIALIZED_CLASS(RtpMapEntry)
7895 {
7896 IMPLEMENT_JSON_SERIALIZATION()
7897 IMPLEMENT_JSON_DOCUMENTATION(RtpMapEntry)
7898
7899 public:
7901 std::string name;
7902
7905
7908
7909 RtpMapEntry()
7910 {
7911 clear();
7912 }
7913
7914 void clear()
7915 {
7916 name.clear();
7917 engageType = -1;
7918 rtpPayloadType = -1;
7919 }
7920 };
7921
7922 static void to_json(nlohmann::json& j, const RtpMapEntry& p)
7923 {
7924 j = nlohmann::json{
7925 TOJSON_IMPL(name),
7926 TOJSON_IMPL(engageType),
7927 TOJSON_IMPL(rtpPayloadType)
7928 };
7929 }
7930 static void from_json(const nlohmann::json& j, RtpMapEntry& p)
7931 {
7932 p.clear();
7933 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7934 getOptional<int>("engageType", p.engageType, j, -1);
7935 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
7936 }
7937
7938 //-----------------------------------------------------------
7939 JSON_SERIALIZED_CLASS(ExternalModule)
7950 {
7951 IMPLEMENT_JSON_SERIALIZATION()
7952 IMPLEMENT_JSON_DOCUMENTATION(ExternalModule)
7953
7954 public:
7956 std::string name;
7957
7959 std::string file;
7960
7962 nlohmann::json configuration;
7963
7965 {
7966 clear();
7967 }
7968
7969 void clear()
7970 {
7971 name.clear();
7972 file.clear();
7973 configuration.clear();
7974 }
7975 };
7976
7977 static void to_json(nlohmann::json& j, const ExternalModule& p)
7978 {
7979 j = nlohmann::json{
7980 TOJSON_IMPL(name),
7981 TOJSON_IMPL(file)
7982 };
7983
7984 if(!p.configuration.empty())
7985 {
7986 j["configuration"] = p.configuration;
7987 }
7988 }
7989 static void from_json(const nlohmann::json& j, ExternalModule& p)
7990 {
7991 p.clear();
7992 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7993 getOptional<std::string>("file", p.file, j, EMPTY_STRING);
7994
7995 try
7996 {
7997 p.configuration = j.at("configuration");
7998 }
7999 catch(...)
8000 {
8001 p.configuration.clear();
8002 }
8003 }
8004
8005
8006 //-----------------------------------------------------------
8007 JSON_SERIALIZED_CLASS(ExternalCodecDescriptor)
8018 {
8019 IMPLEMENT_JSON_SERIALIZATION()
8020 IMPLEMENT_JSON_DOCUMENTATION(ExternalCodecDescriptor)
8021
8022 public:
8025
8028
8031
8034
8036 {
8037 clear();
8038 }
8039
8040 void clear()
8041 {
8042 rtpPayloadType = -1;
8043 samplingRate = -1;
8044 channels = -1;
8045 rtpTsMultiplier = 0;
8046 }
8047 };
8048
8049 static void to_json(nlohmann::json& j, const ExternalCodecDescriptor& p)
8050 {
8051 j = nlohmann::json{
8052 TOJSON_IMPL(rtpPayloadType),
8053 TOJSON_IMPL(samplingRate),
8054 TOJSON_IMPL(channels),
8055 TOJSON_IMPL(rtpTsMultiplier)
8056 };
8057 }
8058 static void from_json(const nlohmann::json& j, ExternalCodecDescriptor& p)
8059 {
8060 p.clear();
8061
8062 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
8063 getOptional<int>("samplingRate", p.samplingRate, j, -1);
8064 getOptional<int>("channels", p.channels, j, -1);
8065 getOptional<int>("rtpTsMultiplier", p.rtpTsMultiplier, j, -1);
8066 }
8067
8068 //-----------------------------------------------------------
8069 JSON_SERIALIZED_CLASS(EngineStatusReportConfiguration)
8080 {
8081 IMPLEMENT_JSON_SERIALIZATION()
8082 IMPLEMENT_JSON_DOCUMENTATION(EngineStatusReportConfiguration)
8083
8084 public:
8086 std::string fileName;
8087
8090
8093
8095 std::string runCmd;
8096
8099
8102
8104 {
8105 clear();
8106 }
8107
8108 void clear()
8109 {
8110 fileName.clear();
8111 intervalSecs = 60;
8112 enabled = false;
8113 includeMemoryDetail = false;
8114 includeTaskQueueDetail = false;
8115 runCmd.clear();
8116 }
8117 };
8118
8119 static void to_json(nlohmann::json& j, const EngineStatusReportConfiguration& p)
8120 {
8121 j = nlohmann::json{
8122 TOJSON_IMPL(fileName),
8123 TOJSON_IMPL(intervalSecs),
8124 TOJSON_IMPL(enabled),
8125 TOJSON_IMPL(includeMemoryDetail),
8126 TOJSON_IMPL(includeTaskQueueDetail),
8127 TOJSON_IMPL(runCmd)
8128 };
8129 }
8130 static void from_json(const nlohmann::json& j, EngineStatusReportConfiguration& p)
8131 {
8132 p.clear();
8133 getOptional<std::string>("fileName", p.fileName, j);
8134 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8135 getOptional<bool>("enabled", p.enabled, j, false);
8136 getOptional<std::string>("runCmd", p.runCmd, j);
8137 getOptional<bool>("includeMemoryDetail", p.includeMemoryDetail, j, false);
8138 getOptional<bool>("includeTaskQueueDetail", p.includeTaskQueueDetail, j, false);
8139 }
8140
8141 //-----------------------------------------------------------
8142 JSON_SERIALIZED_CLASS(EnginePolicy)
8155 {
8156 IMPLEMENT_JSON_SERIALIZATION()
8157 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicy)
8158
8159 public:
8160
8162 std::string dataDirectory;
8163
8166
8169
8172
8175
8178
8181
8184
8187
8190
8193
8196
8198 std::vector<ExternalModule> externalCodecs;
8199
8201 std::vector<RtpMapEntry> rtpMap;
8202
8205
8206 EnginePolicy()
8207 {
8208 clear();
8209 }
8210
8211 void clear()
8212 {
8213 dataDirectory.clear();
8214 licensing.clear();
8215 security.clear();
8216 networking.clear();
8217 audio.clear();
8218 discovery.clear();
8219 logging.clear();
8220 internals.clear();
8221 timelines.clear();
8222 database.clear();
8223 featureset.clear();
8224 namedAudioDevices.clear();
8225 externalCodecs.clear();
8226 rtpMap.clear();
8227 statusReport.clear();
8228 }
8229 };
8230
8231 static void to_json(nlohmann::json& j, const EnginePolicy& p)
8232 {
8233 j = nlohmann::json{
8234 TOJSON_IMPL(dataDirectory),
8235 TOJSON_IMPL(licensing),
8236 TOJSON_IMPL(security),
8237 TOJSON_IMPL(networking),
8238 TOJSON_IMPL(audio),
8239 TOJSON_IMPL(discovery),
8240 TOJSON_IMPL(logging),
8241 TOJSON_IMPL(internals),
8242 TOJSON_IMPL(timelines),
8243 TOJSON_IMPL(database),
8244 TOJSON_IMPL(featureset),
8245 TOJSON_IMPL(namedAudioDevices),
8246 TOJSON_IMPL(externalCodecs),
8247 TOJSON_IMPL(rtpMap),
8248 TOJSON_IMPL(statusReport)
8249 };
8250 }
8251 static void from_json(const nlohmann::json& j, EnginePolicy& p)
8252 {
8253 p.clear();
8254 FROMJSON_IMPL_SIMPLE(dataDirectory);
8255 FROMJSON_IMPL_SIMPLE(licensing);
8256 FROMJSON_IMPL_SIMPLE(security);
8257 FROMJSON_IMPL_SIMPLE(networking);
8258 FROMJSON_IMPL_SIMPLE(audio);
8259 FROMJSON_IMPL_SIMPLE(discovery);
8260 FROMJSON_IMPL_SIMPLE(logging);
8261 FROMJSON_IMPL_SIMPLE(internals);
8262 FROMJSON_IMPL_SIMPLE(timelines);
8263 FROMJSON_IMPL_SIMPLE(database);
8264 FROMJSON_IMPL_SIMPLE(featureset);
8265 FROMJSON_IMPL_SIMPLE(namedAudioDevices);
8266 FROMJSON_IMPL_SIMPLE(externalCodecs);
8267 FROMJSON_IMPL_SIMPLE(rtpMap);
8268 FROMJSON_IMPL_SIMPLE(statusReport);
8269 }
8270
8271
8272 //-----------------------------------------------------------
8273 JSON_SERIALIZED_CLASS(TalkgroupAsset)
8284 {
8285 IMPLEMENT_JSON_SERIALIZATION()
8286 IMPLEMENT_JSON_DOCUMENTATION(TalkgroupAsset)
8287
8288 public:
8289
8291 std::string nodeId;
8292
8295
8297 {
8298 clear();
8299 }
8300
8301 void clear()
8302 {
8303 nodeId.clear();
8304 group.clear();
8305 }
8306 };
8307
8308 static void to_json(nlohmann::json& j, const TalkgroupAsset& p)
8309 {
8310 j = nlohmann::json{
8311 TOJSON_IMPL(nodeId),
8312 TOJSON_IMPL(group)
8313 };
8314 }
8315 static void from_json(const nlohmann::json& j, TalkgroupAsset& p)
8316 {
8317 p.clear();
8318 getOptional<std::string>("nodeId", p.nodeId, j);
8319 getOptional<Group>("group", p.group, j);
8320 }
8321
8322 //-----------------------------------------------------------
8323 JSON_SERIALIZED_CLASS(EngageDiscoveredGroup)
8332 {
8333 IMPLEMENT_JSON_SERIALIZATION()
8334 IMPLEMENT_JSON_DOCUMENTATION(EngageDiscoveredGroup)
8335
8336 public:
8338 std::string id;
8339
8341 int type;
8342
8345
8348
8350 {
8351 clear();
8352 }
8353
8354 void clear()
8355 {
8356 id.clear();
8357 type = 0;
8358 rx.clear();
8359 tx.clear();
8360 }
8361 };
8362
8363 static void to_json(nlohmann::json& j, const EngageDiscoveredGroup& p)
8364 {
8365 j = nlohmann::json{
8366 TOJSON_IMPL(id),
8367 TOJSON_IMPL(type),
8368 TOJSON_IMPL(rx),
8369 TOJSON_IMPL(tx)
8370 };
8371 }
8372 static void from_json(const nlohmann::json& j, EngageDiscoveredGroup& p)
8373 {
8374 p.clear();
8375 getOptional<std::string>("id", p.id, j);
8376 getOptional<int>("type", p.type, j, 0);
8377 getOptional<NetworkAddress>("rx", p.rx, j);
8378 getOptional<NetworkAddress>("tx", p.tx, j);
8379 }
8380
8381 //-----------------------------------------------------------
8382 JSON_SERIALIZED_CLASS(RallypointPeer)
8393 {
8394 IMPLEMENT_JSON_SERIALIZATION()
8395 IMPLEMENT_JSON_DOCUMENTATION(RallypointPeer)
8396
8397 public:
8398 typedef enum
8399 {
8401 olpUseRpConfiguration = 0,
8402
8404 olpIsMeshLeaf = 1,
8405
8407 olpNotMeshLeaf = 2
8408 } OutboundLeafPolicy_t;
8409
8410 typedef enum
8411 {
8413 olpUseRpWebSocketTlsConfiguration = 0,
8414
8416 olpUseTlsForWebSocket = 1,
8417
8419 olpDoNotUseTlsForWebSocket = 2
8420 } OutboundWebSocketTlsPolicy_t;
8421
8423 std::string id;
8424
8427
8430
8433
8436
8439
8440 OutboundLeafPolicy_t outboundLeafPolicy;
8441
8444
8446 std::string path;
8447
8450
8457 std::string sni;
8458
8461
8463 {
8464 clear();
8465 }
8466
8467 void clear()
8468 {
8469 id.clear();
8470 enabled = true;
8471 host.clear();
8472 certificate.clear();
8473 connectionTimeoutSecs = 0;
8474 forceIsMeshLeaf = false;
8475 outboundLeafPolicy = OutboundLeafPolicy_t::olpUseRpConfiguration;
8476 protocol = Rallypoint::RpProtocol_t::rppTlsTcp;
8477 path.clear();
8478 additionalProtocols.clear();
8479 sni.clear();
8480 outboundWebSocketTlsPolicy = OutboundWebSocketTlsPolicy_t::olpUseRpWebSocketTlsConfiguration;
8481 }
8482 };
8483
8484 static void to_json(nlohmann::json& j, const RallypointPeer& p)
8485 {
8486 j = nlohmann::json{
8487 TOJSON_IMPL(id),
8488 TOJSON_IMPL(enabled),
8489 TOJSON_IMPL(host),
8490 TOJSON_IMPL(certificate),
8491 TOJSON_IMPL(connectionTimeoutSecs),
8492 TOJSON_IMPL(forceIsMeshLeaf),
8493 TOJSON_IMPL(outboundLeafPolicy),
8494 TOJSON_IMPL(protocol),
8495 TOJSON_IMPL(path),
8496 TOJSON_IMPL(additionalProtocols),
8497 TOJSON_IMPL(sni),
8498 TOJSON_IMPL(outboundWebSocketTlsPolicy)
8499 };
8500 }
8501 static void from_json(const nlohmann::json& j, RallypointPeer& p)
8502 {
8503 p.clear();
8504 j.at("id").get_to(p.id);
8505 getOptional<bool>("enabled", p.enabled, j, true);
8506 getOptional<NetworkAddress>("host", p.host, j);
8507 getOptional<SecurityCertificate>("certificate", p.certificate, j);
8508 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
8509 getOptional<bool>("forceIsMeshLeaf", p.forceIsMeshLeaf, j, false);
8510 getOptional<RallypointPeer::OutboundLeafPolicy_t>("outboundLeafPolicy", p.outboundLeafPolicy, j, RallypointPeer::OutboundLeafPolicy_t::olpUseRpConfiguration);
8511 getOptional<Rallypoint::RpProtocol_t>("protocol", p.protocol, j, Rallypoint::RpProtocol_t::rppTlsTcp);
8512 getOptional<std::string>("path", p.path, j);
8513 getOptional<std::string>("additionalProtocols", p.additionalProtocols, j);
8514 getOptional<std::string>("sni", p.sni, j);
8515 getOptional<RallypointPeer::OutboundWebSocketTlsPolicy_t>("outboundWebSocketTlsPolicy", p.outboundWebSocketTlsPolicy, j, RallypointPeer::OutboundWebSocketTlsPolicy_t::olpUseRpWebSocketTlsConfiguration);
8516 }
8517
8518 //-----------------------------------------------------------
8519 JSON_SERIALIZED_CLASS(RallypointServerLimits)
8530 {
8531 IMPLEMENT_JSON_SERIALIZATION()
8532 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLimits)
8533
8534 public:
8536 uint32_t maxClients;
8537
8539 uint32_t maxPeers;
8540
8543
8546
8549
8552
8555
8558
8561
8564
8567
8570
8573
8576
8579
8581 {
8582 clear();
8583 }
8584
8585 void clear()
8586 {
8587 maxClients = 0;
8588 maxPeers = 0;
8589 maxMulticastReflectors = 0;
8590 maxRegisteredStreams = 0;
8591 maxStreamPaths = 0;
8592 maxRxPacketsPerSec = 0;
8593 maxTxPacketsPerSec = 0;
8594 maxRxBytesPerSec = 0;
8595 maxTxBytesPerSec = 0;
8596 maxQOpsPerSec = 0;
8597 maxInboundBacklog = 64;
8598 lowPriorityQueueThreshold = 64;
8599 normalPriorityQueueThreshold = 256;
8600 denyNewConnectionCpuThreshold = 75;
8601 warnAtCpuThreshold = 65;
8602 }
8603 };
8604
8605 static void to_json(nlohmann::json& j, const RallypointServerLimits& p)
8606 {
8607 j = nlohmann::json{
8608 TOJSON_IMPL(maxClients),
8609 TOJSON_IMPL(maxPeers),
8610 TOJSON_IMPL(maxMulticastReflectors),
8611 TOJSON_IMPL(maxRegisteredStreams),
8612 TOJSON_IMPL(maxStreamPaths),
8613 TOJSON_IMPL(maxRxPacketsPerSec),
8614 TOJSON_IMPL(maxTxPacketsPerSec),
8615 TOJSON_IMPL(maxRxBytesPerSec),
8616 TOJSON_IMPL(maxTxBytesPerSec),
8617 TOJSON_IMPL(maxQOpsPerSec),
8618 TOJSON_IMPL(maxInboundBacklog),
8619 TOJSON_IMPL(lowPriorityQueueThreshold),
8620 TOJSON_IMPL(normalPriorityQueueThreshold),
8621 TOJSON_IMPL(denyNewConnectionCpuThreshold),
8622 TOJSON_IMPL(warnAtCpuThreshold)
8623 };
8624 }
8625 static void from_json(const nlohmann::json& j, RallypointServerLimits& p)
8626 {
8627 p.clear();
8628 getOptional<uint32_t>("maxClients", p.maxClients, j, 0);
8629 getOptional<uint32_t>("maxPeers", p.maxPeers, j, 0);
8630 getOptional<uint32_t>("maxMulticastReflectors", p.maxMulticastReflectors, j, 0);
8631 getOptional<uint32_t>("maxRegisteredStreams", p.maxRegisteredStreams, j, 0);
8632 getOptional<uint32_t>("maxStreamPaths", p.maxStreamPaths, j, 0);
8633 getOptional<uint32_t>("maxRxPacketsPerSec", p.maxRxPacketsPerSec, j, 0);
8634 getOptional<uint32_t>("maxTxPacketsPerSec", p.maxTxPacketsPerSec, j, 0);
8635 getOptional<uint32_t>("maxRxBytesPerSec", p.maxRxBytesPerSec, j, 0);
8636 getOptional<uint32_t>("maxTxBytesPerSec", p.maxTxBytesPerSec, j, 0);
8637 getOptional<uint32_t>("maxQOpsPerSec", p.maxQOpsPerSec, j, 0);
8638 getOptional<uint32_t>("maxInboundBacklog", p.maxInboundBacklog, j, 64);
8639 getOptional<uint32_t>("lowPriorityQueueThreshold", p.lowPriorityQueueThreshold, j, 64);
8640 getOptional<uint32_t>("normalPriorityQueueThreshold", p.normalPriorityQueueThreshold, j, 256);
8641 getOptional<uint32_t>("denyNewConnectionCpuThreshold", p.denyNewConnectionCpuThreshold, j, 75);
8642 getOptional<uint32_t>("warnAtCpuThreshold", p.warnAtCpuThreshold, j, 65);
8643 }
8644
8645 //-----------------------------------------------------------
8646 JSON_SERIALIZED_CLASS(RallypointServerStatusReportConfiguration)
8657 {
8658 IMPLEMENT_JSON_SERIALIZATION()
8659 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerStatusReportConfiguration)
8660
8661 public:
8663 std::string fileName;
8664
8667
8670
8673
8676
8679
8681 std::string runCmd;
8682
8684 {
8685 clear();
8686 }
8687
8688 void clear()
8689 {
8690 fileName.clear();
8691 intervalSecs = 60;
8692 enabled = false;
8693 includeLinks = false;
8694 includePeerLinkDetails = false;
8695 includeClientLinkDetails = false;
8696 runCmd.clear();
8697 }
8698 };
8699
8700 static void to_json(nlohmann::json& j, const RallypointServerStatusReportConfiguration& p)
8701 {
8702 j = nlohmann::json{
8703 TOJSON_IMPL(fileName),
8704 TOJSON_IMPL(intervalSecs),
8705 TOJSON_IMPL(enabled),
8706 TOJSON_IMPL(includeLinks),
8707 TOJSON_IMPL(includePeerLinkDetails),
8708 TOJSON_IMPL(includeClientLinkDetails),
8709 TOJSON_IMPL(runCmd)
8710 };
8711 }
8712 static void from_json(const nlohmann::json& j, RallypointServerStatusReportConfiguration& p)
8713 {
8714 p.clear();
8715 getOptional<std::string>("fileName", p.fileName, j);
8716 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8717 getOptional<bool>("enabled", p.enabled, j, false);
8718 getOptional<bool>("includeLinks", p.includeLinks, j, false);
8719 getOptional<bool>("includePeerLinkDetails", p.includePeerLinkDetails, j, false);
8720 getOptional<bool>("includeClientLinkDetails", p.includeClientLinkDetails, j, false);
8721 getOptional<std::string>("runCmd", p.runCmd, j);
8722 }
8723
8724 //-----------------------------------------------------------
8725 JSON_SERIALIZED_CLASS(RallypointServerLinkGraph)
8727 {
8728 IMPLEMENT_JSON_SERIALIZATION()
8729 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLinkGraph)
8730
8731 public:
8733 std::string fileName;
8734
8737
8740
8743
8748
8750 std::string coreRpStyling;
8751
8753 std::string leafRpStyling;
8754
8756 std::string clientStyling;
8757
8759 std::string runCmd;
8760
8762 {
8763 clear();
8764 }
8765
8766 void clear()
8767 {
8768 fileName.clear();
8769 minRefreshSecs = 5;
8770 enabled = false;
8771 includeDigraphEnclosure = true;
8772 includeClients = false;
8773 coreRpStyling = "[shape=hexagon color=firebrick style=filled]";
8774 leafRpStyling = "[shape=box color=gray style=filled]";
8775 clientStyling.clear();
8776 runCmd.clear();
8777 }
8778 };
8779
8780 static void to_json(nlohmann::json& j, const RallypointServerLinkGraph& p)
8781 {
8782 j = nlohmann::json{
8783 TOJSON_IMPL(fileName),
8784 TOJSON_IMPL(minRefreshSecs),
8785 TOJSON_IMPL(enabled),
8786 TOJSON_IMPL(includeDigraphEnclosure),
8787 TOJSON_IMPL(includeClients),
8788 TOJSON_IMPL(coreRpStyling),
8789 TOJSON_IMPL(leafRpStyling),
8790 TOJSON_IMPL(clientStyling),
8791 TOJSON_IMPL(runCmd)
8792 };
8793 }
8794 static void from_json(const nlohmann::json& j, RallypointServerLinkGraph& p)
8795 {
8796 p.clear();
8797 getOptional<std::string>("fileName", p.fileName, j);
8798 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
8799 getOptional<bool>("enabled", p.enabled, j, false);
8800 getOptional<bool>("includeDigraphEnclosure", p.includeDigraphEnclosure, j, true);
8801 getOptional<bool>("includeClients", p.includeClients, j, false);
8802 getOptional<std::string>("coreRpStyling", p.coreRpStyling, j, "[shape=hexagon color=firebrick style=filled]");
8803 getOptional<std::string>("leafRpStyling", p.leafRpStyling, j, "[shape=box color=gray style=filled]");
8804 getOptional<std::string>("clientStyling", p.clientStyling, j);
8805 getOptional<std::string>("runCmd", p.runCmd, j);
8806 }
8807
8808
8809 //-----------------------------------------------------------
8810 JSON_SERIALIZED_CLASS(RallypointServerStreamStatsExport)
8819 {
8820 IMPLEMENT_JSON_SERIALIZATION()
8821 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerStreamStatsExport)
8822
8823 public:
8825 typedef enum
8826 {
8828 fmtCsv = 0,
8829
8831 fmtJson = 1
8832 } ExportFormat_t;
8833
8835 std::string fileName;
8836
8839
8842
8845
8847 std::string runCmd;
8848
8851
8852
8854 {
8855 clear();
8856 }
8857
8858 void clear()
8859 {
8860 fileName.clear();
8861 intervalSecs = 60;
8862 enabled = false;
8863 resetCountersAfterExport = false;
8864 runCmd.clear();
8865 format = fmtJson;
8866 }
8867 };
8868
8869 static void to_json(nlohmann::json& j, const RallypointServerStreamStatsExport& p)
8870 {
8871 j = nlohmann::json{
8872 TOJSON_IMPL(fileName),
8873 TOJSON_IMPL(intervalSecs),
8874 TOJSON_IMPL(enabled),
8875 TOJSON_IMPL(resetCountersAfterExport),
8876 TOJSON_IMPL(runCmd),
8877 TOJSON_IMPL(format)
8878 };
8879 }
8880 static void from_json(const nlohmann::json& j, RallypointServerStreamStatsExport& p)
8881 {
8882 p.clear();
8883 getOptional<std::string>("fileName", p.fileName, j);
8884 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8885 getOptional<bool>("enabled", p.enabled, j, false);
8886 getOptional<bool>("resetCountersAfterExport", p.resetCountersAfterExport, j, false);
8887 getOptional<std::string>("runCmd", p.runCmd, j);
8888 getOptional<RallypointServerStreamStatsExport::ExportFormat_t>("format", p.format, j, RallypointServerStreamStatsExport::ExportFormat_t::fmtCsv);
8889 }
8890
8891 //-----------------------------------------------------------
8892 JSON_SERIALIZED_CLASS(RallypointServerRouteMap)
8894 {
8895 IMPLEMENT_JSON_SERIALIZATION()
8896 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerRouteMap)
8897
8898 public:
8900 std::string fileName;
8901
8904
8907
8909 std::string runCmd;
8910
8912 {
8913 clear();
8914 }
8915
8916 void clear()
8917 {
8918 fileName.clear();
8919 minRefreshSecs = 5;
8920 enabled = false;
8921 }
8922 };
8923
8924 static void to_json(nlohmann::json& j, const RallypointServerRouteMap& p)
8925 {
8926 j = nlohmann::json{
8927 TOJSON_IMPL(fileName),
8928 TOJSON_IMPL(minRefreshSecs),
8929 TOJSON_IMPL(enabled),
8930 TOJSON_IMPL(runCmd)
8931 };
8932 }
8933 static void from_json(const nlohmann::json& j, RallypointServerRouteMap& p)
8934 {
8935 p.clear();
8936 getOptional<std::string>("fileName", p.fileName, j);
8937 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
8938 getOptional<bool>("enabled", p.enabled, j, false);
8939 getOptional<std::string>("runCmd", p.runCmd, j);
8940 }
8941
8942
8943 //-----------------------------------------------------------
8944 JSON_SERIALIZED_CLASS(ExternalHealthCheckResponder)
8955 {
8956 IMPLEMENT_JSON_SERIALIZATION()
8957 IMPLEMENT_JSON_DOCUMENTATION(ExternalHealthCheckResponder)
8958
8959 public:
8960
8963
8966
8968 {
8969 clear();
8970 }
8971
8972 void clear()
8973 {
8974 listenPort = 0;
8975 immediateClose = true;
8976 }
8977 };
8978
8979 static void to_json(nlohmann::json& j, const ExternalHealthCheckResponder& p)
8980 {
8981 j = nlohmann::json{
8982 TOJSON_IMPL(listenPort),
8983 TOJSON_IMPL(immediateClose)
8984 };
8985 }
8986 static void from_json(const nlohmann::json& j, ExternalHealthCheckResponder& p)
8987 {
8988 p.clear();
8989 getOptional<int>("listenPort", p.listenPort, j, 0);
8990 getOptional<bool>("immediateClose", p.immediateClose, j, true);
8991 }
8992
8993
8994 //-----------------------------------------------------------
8995 JSON_SERIALIZED_CLASS(PeeringConfiguration)
9004 {
9005 IMPLEMENT_JSON_SERIALIZATION()
9006 IMPLEMENT_JSON_DOCUMENTATION(PeeringConfiguration)
9007
9008 public:
9009
9011 std::string id;
9012
9015
9017 std::string comments;
9018
9020 std::vector<RallypointPeer> peers;
9021
9023 {
9024 clear();
9025 }
9026
9027 void clear()
9028 {
9029 id.clear();
9030 version = 0;
9031 comments.clear();
9032 }
9033 };
9034
9035 static void to_json(nlohmann::json& j, const PeeringConfiguration& p)
9036 {
9037 j = nlohmann::json{
9038 TOJSON_IMPL(id),
9039 TOJSON_IMPL(version),
9040 TOJSON_IMPL(comments),
9041 TOJSON_IMPL(peers)
9042 };
9043 }
9044 static void from_json(const nlohmann::json& j, PeeringConfiguration& p)
9045 {
9046 p.clear();
9047 getOptional<std::string>("id", p.id, j);
9048 getOptional<int>("version", p.version, j, 0);
9049 getOptional<std::string>("comments", p.comments, j);
9050 getOptional<std::vector<RallypointPeer>>("peers", p.peers, j);
9051 }
9052
9053 //-----------------------------------------------------------
9054 JSON_SERIALIZED_CLASS(IgmpSnooping)
9063 {
9064 IMPLEMENT_JSON_SERIALIZATION()
9065 IMPLEMENT_JSON_DOCUMENTATION(IgmpSnooping)
9066
9067 public:
9068
9071
9074
9077
9078
9079 IgmpSnooping()
9080 {
9081 clear();
9082 }
9083
9084 void clear()
9085 {
9086 enabled = false;
9087 queryIntervalMs = 125000;
9088 subscriptionTimeoutMs = 0;
9089 }
9090 };
9091
9092 static void to_json(nlohmann::json& j, const IgmpSnooping& p)
9093 {
9094 j = nlohmann::json{
9095 TOJSON_IMPL(enabled),
9096 TOJSON_IMPL(queryIntervalMs),
9097 TOJSON_IMPL(subscriptionTimeoutMs)
9098 };
9099 }
9100 static void from_json(const nlohmann::json& j, IgmpSnooping& p)
9101 {
9102 p.clear();
9103 getOptional<bool>("enabled", p.enabled, j);
9104 getOptional<int>("queryIntervalMs", p.queryIntervalMs, j, 125000);
9105 getOptional<int>("subscriptionTimeoutMs", p.subscriptionTimeoutMs, j, 0);
9106 }
9107
9108
9109 //-----------------------------------------------------------
9110 JSON_SERIALIZED_CLASS(RallypointReflector)
9118 {
9119 IMPLEMENT_JSON_SERIALIZATION()
9120 IMPLEMENT_JSON_DOCUMENTATION(RallypointReflector)
9121
9122 public:
9124 typedef enum
9125 {
9127 drNone = 0,
9128
9130 drRxOnly = 1,
9131
9133 drTxOnly = 2
9134 } DirectionRestriction_t;
9135
9139 std::string id;
9140
9143
9146
9149
9151 std::vector<NetworkAddress> additionalTx;
9152
9155
9157 {
9158 clear();
9159 }
9160
9161 void clear()
9162 {
9163 id.clear();
9164 rx.clear();
9165 tx.clear();
9166 multicastInterfaceName.clear();
9167 additionalTx.clear();
9168 directionRestriction = drNone;
9169 }
9170 };
9171
9172 static void to_json(nlohmann::json& j, const RallypointReflector& p)
9173 {
9174 j = nlohmann::json{
9175 TOJSON_IMPL(id),
9176 TOJSON_IMPL(rx),
9177 TOJSON_IMPL(tx),
9178 TOJSON_IMPL(multicastInterfaceName),
9179 TOJSON_IMPL(additionalTx),
9180 TOJSON_IMPL(directionRestriction)
9181 };
9182 }
9183 static void from_json(const nlohmann::json& j, RallypointReflector& p)
9184 {
9185 p.clear();
9186 j.at("id").get_to(p.id);
9187 j.at("rx").get_to(p.rx);
9188 j.at("tx").get_to(p.tx);
9189 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
9190 getOptional<std::vector<NetworkAddress>>("additionalTx", p.additionalTx, j);
9191 getOptional<RallypointReflector::DirectionRestriction_t>("directionRestriction", p.directionRestriction, j, RallypointReflector::DirectionRestriction_t::drNone);
9192 }
9193
9194
9195 //-----------------------------------------------------------
9196 JSON_SERIALIZED_CLASS(RallypointUdpStreamingIpvX)
9204 {
9205 IMPLEMENT_JSON_SERIALIZATION()
9206 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreamingIpvX)
9207
9208 public:
9211
9214
9216 {
9217 clear();
9218 }
9219
9220 void clear()
9221 {
9222 enabled = true;
9223 external.clear();
9224 }
9225 };
9226
9227 static void to_json(nlohmann::json& j, const RallypointUdpStreamingIpvX& p)
9228 {
9229 j = nlohmann::json{
9230 TOJSON_IMPL(enabled),
9231 TOJSON_IMPL(external)
9232 };
9233 }
9234 static void from_json(const nlohmann::json& j, RallypointUdpStreamingIpvX& p)
9235 {
9236 p.clear();
9237 getOptional<bool>("enabled", p.enabled, j, true);
9238 getOptional<NetworkAddress>("external", p.external, j);
9239 }
9240
9241 //-----------------------------------------------------------
9242 JSON_SERIALIZED_CLASS(RallypointUdpStreaming)
9250 {
9251 IMPLEMENT_JSON_SERIALIZATION()
9252 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreaming)
9253
9254 public:
9256 typedef enum
9257 {
9259 ctUnknown = 0,
9260
9262 ctSharedKeyAes256FullIv = 1,
9263
9265 ctSharedKeyAes256IdxIv = 2,
9266
9268 ctSharedKeyChaCha20FullIv = 3,
9269
9271 ctSharedKeyChaCha20IdxIv = 4
9272 } CryptoType_t;
9273
9276
9279
9282
9285
9288
9291
9294
9296 int ttl;
9297
9298
9300 {
9301 clear();
9302 }
9303
9304 void clear()
9305 {
9306 enabled = true;
9307 cryptoType = CryptoType_t::ctSharedKeyAes256FullIv;
9308 listenPort = 7444;
9309 ipv4.clear();
9310 ipv6.clear();
9311 keepaliveIntervalSecs = 15;
9312 priority = TxPriority_t::priVoice;
9313 ttl = 64;
9314 }
9315 };
9316
9317 static void to_json(nlohmann::json& j, const RallypointUdpStreaming& p)
9318 {
9319 j = nlohmann::json{
9320 TOJSON_IMPL(enabled),
9321 TOJSON_IMPL(cryptoType),
9322 TOJSON_IMPL(listenPort),
9323 TOJSON_IMPL(keepaliveIntervalSecs),
9324 TOJSON_IMPL(ipv4),
9325 TOJSON_IMPL(ipv6),
9326 TOJSON_IMPL(priority),
9327 TOJSON_IMPL(ttl)
9328 };
9329 }
9330 static void from_json(const nlohmann::json& j, RallypointUdpStreaming& p)
9331 {
9332 p.clear();
9333 getOptional<bool>("enabled", p.enabled, j, true);
9334 getOptional<RallypointUdpStreaming::CryptoType_t>("cryptoType", p.cryptoType, j, RallypointUdpStreaming::CryptoType_t::ctSharedKeyAes256FullIv);
9335 getOptional<int>("listenPort", p.listenPort, j, 7444);
9336 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
9337 getOptional<RallypointUdpStreamingIpvX>("ipv4", p.ipv4, j);
9338 getOptional<RallypointUdpStreamingIpvX>("ipv6", p.ipv6, j);
9339 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
9340 getOptional<int>("ttl", p.ttl, j, 64);
9341 }
9342
9343 //-----------------------------------------------------------
9344 JSON_SERIALIZED_CLASS(RallypointRpRtTimingBehavior)
9352 {
9353 IMPLEMENT_JSON_SERIALIZATION()
9354 IMPLEMENT_JSON_DOCUMENTATION(RallypointRpRtTimingBehavior)
9355
9356 public:
9358 typedef enum
9359 {
9362
9365
9368
9371
9373 btDrop = 99
9374 } BehaviorType_t;
9375
9378
9380 uint32_t atOrAboveMs;
9381
9383 std::string runCmd;
9384
9386 {
9387 clear();
9388 }
9389
9390 void clear()
9391 {
9392 behavior = btNone;
9393 atOrAboveMs = 0;
9394 runCmd.clear();
9395 }
9396 };
9397
9398 static void to_json(nlohmann::json& j, const RallypointRpRtTimingBehavior& p)
9399 {
9400 j = nlohmann::json{
9401 TOJSON_IMPL(behavior),
9402 TOJSON_IMPL(atOrAboveMs),
9403 TOJSON_IMPL(runCmd)
9404 };
9405 }
9406 static void from_json(const nlohmann::json& j, RallypointRpRtTimingBehavior& p)
9407 {
9408 p.clear();
9409 getOptional<RallypointRpRtTimingBehavior::BehaviorType_t>("behavior", p.behavior, j, RallypointRpRtTimingBehavior::BehaviorType_t::btNone);
9410 getOptional<uint32_t>("atOrAboveMs", p.atOrAboveMs, j, 0);
9411 getOptional<std::string>("runCmd", p.runCmd, j);
9412 }
9413
9414
9415 //-----------------------------------------------------------
9416 JSON_SERIALIZED_CLASS(RallypointWebsocketSettings)
9424 {
9425 IMPLEMENT_JSON_SERIALIZATION()
9426 IMPLEMENT_JSON_DOCUMENTATION(RallypointWebsocketSettings)
9427
9428 public:
9431
9434
9437
9440
9443
9445 {
9446 clear();
9447 }
9448
9449 void clear()
9450 {
9451 enabled = false;
9452 listenPort = 8443;
9453 certificate.clear();
9454 requireClientCertificate = false;
9455 requireTls = true;
9456 }
9457 };
9458
9459 static void to_json(nlohmann::json& j, const RallypointWebsocketSettings& p)
9460 {
9461 j = nlohmann::json{
9462 TOJSON_IMPL(enabled),
9463 TOJSON_IMPL(listenPort),
9464 TOJSON_IMPL(certificate),
9465 TOJSON_IMPL(requireClientCertificate),
9466 TOJSON_IMPL(requireTls)
9467 };
9468 }
9469 static void from_json(const nlohmann::json& j, RallypointWebsocketSettings& p)
9470 {
9471 p.clear();
9472 getOptional<bool>("enabled", p.enabled, j, false);
9473 getOptional<int>("listenPort", p.listenPort, j, 8443);
9474 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9475 getOptional<bool>("requireClientCertificate", p.requireClientCertificate, j, false);
9476 getOptional<bool>("requireTls", p.requireTls, j, true);
9477 }
9478
9479
9480
9481 //-----------------------------------------------------------
9482 JSON_SERIALIZED_CLASS(RallypointAdvertisingSettings)
9490 {
9491 IMPLEMENT_JSON_SERIALIZATION()
9492 IMPLEMENT_JSON_DOCUMENTATION(RallypointAdvertisingSettings)
9493
9494 public:
9497
9499 std::string hostName;
9500
9502 std::string serviceName;
9503
9505 std::string interfaceName;
9506
9508 int port;
9509
9511 int ttl;
9512
9514 {
9515 clear();
9516 }
9517
9518 void clear()
9519 {
9520 enabled = false;
9521 hostName.clear();
9522 serviceName = "_rallypoint._tcp.local.";
9523 interfaceName.clear();
9524 port = 0;
9525 ttl = 60;
9526 }
9527 };
9528
9529 static void to_json(nlohmann::json& j, const RallypointAdvertisingSettings& p)
9530 {
9531 j = nlohmann::json{
9532 TOJSON_IMPL(enabled),
9533 TOJSON_IMPL(hostName),
9534 TOJSON_IMPL(serviceName),
9535 TOJSON_IMPL(interfaceName),
9536 TOJSON_IMPL(port),
9537 TOJSON_IMPL(ttl)
9538 };
9539 }
9540 static void from_json(const nlohmann::json& j, RallypointAdvertisingSettings& p)
9541 {
9542 p.clear();
9543 getOptional<bool>("enabled", p.enabled, j, false);
9544 getOptional<std::string>("hostName", p.hostName, j);
9545 getOptional<std::string>("serviceName", p.serviceName, j, "_rallypoint._tcp.local.");
9546 getOptional<std::string>("interfaceName", p.interfaceName, j);
9547
9548 getOptional<int>("port", p.port, j, 0);
9549 getOptional<int>("ttl", p.ttl, j, 60);
9550 }
9551
9552
9553
9554
9555 //-----------------------------------------------------------
9556 JSON_SERIALIZED_CLASS(NamedIdentity)
9564 {
9565 IMPLEMENT_JSON_SERIALIZATION()
9566 IMPLEMENT_JSON_DOCUMENTATION(NamedIdentity)
9567
9568 public:
9570 std::string name;
9571
9574
9576 {
9577 clear();
9578 }
9579
9580 void clear()
9581 {
9582 name.clear();
9583 certificate.clear();
9584 }
9585 };
9586
9587 static void to_json(nlohmann::json& j, const NamedIdentity& p)
9588 {
9589 j = nlohmann::json{
9590 TOJSON_IMPL(name),
9591 TOJSON_IMPL(certificate)
9592 };
9593 }
9594 static void from_json(const nlohmann::json& j, NamedIdentity& p)
9595 {
9596 p.clear();
9597 getOptional<std::string>("name", p.name, j);
9598 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9599 }
9600
9601 //-----------------------------------------------------------
9602 JSON_SERIALIZED_CLASS(RallypointExtendedGroupRestriction)
9610 {
9611 IMPLEMENT_JSON_SERIALIZATION()
9612 IMPLEMENT_JSON_DOCUMENTATION(RallypointExtendedGroupRestriction)
9613
9614 public:
9616 std::string id;
9617
9619 std::vector<StringRestrictionList> restrictions;
9620
9622 {
9623 clear();
9624 }
9625
9626 void clear()
9627 {
9628 id.clear();
9629 restrictions.clear();
9630 }
9631 };
9632
9633 static void to_json(nlohmann::json& j, const RallypointExtendedGroupRestriction& p)
9634 {
9635 j = nlohmann::json{
9636 TOJSON_IMPL(id),
9637 TOJSON_IMPL(restrictions)
9638 };
9639 }
9640 static void from_json(const nlohmann::json& j, RallypointExtendedGroupRestriction& p)
9641 {
9642 p.clear();
9643 getOptional<std::string>("id", p.id, j);
9644 getOptional<std::vector<StringRestrictionList>>("restrictions", p.restrictions, j);
9645 }
9646
9647 //-----------------------------------------------------------
9648 JSON_SERIALIZED_CLASS(RtiCloudSettings)
9655 {
9656 IMPLEMENT_JSON_SERIALIZATION()
9657 IMPLEMENT_JSON_DOCUMENTATION(RtiCloudSettings)
9658
9659 public:
9662
9664 std::string enrollmentCode;
9665
9668
9670 {
9671 clear();
9672 }
9673
9674 void clear()
9675 {
9676 enabled = false;
9677 enrollmentCode.clear();
9678 serviceBaseUrlPrefix = "prod.com";
9679 }
9680 };
9681
9682 static void to_json(nlohmann::json& j, const RtiCloudSettings& p)
9683 {
9684 j = nlohmann::json{
9685 TOJSON_IMPL(enabled),
9686 TOJSON_IMPL(enrollmentCode),
9687 TOJSON_IMPL(serviceBaseUrlPrefix)
9688 };
9689 }
9690 static void from_json(const nlohmann::json& j, RtiCloudSettings& p)
9691 {
9692 p.clear();
9693 getOptional<bool>("enabled", p.enabled, j, false);
9694 getOptional<std::string>("enrollmentCode", p.enrollmentCode, j);
9695 getOptional<std::string>("serviceBaseUrlPrefix", p.serviceBaseUrlPrefix, j, "prod.com");
9696 }
9697
9698 //-----------------------------------------------------------
9699 JSON_SERIALIZED_CLASS(NsmNodeScripts)
9706 {
9707 IMPLEMENT_JSON_SERIALIZATION()
9708 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeScripts)
9709
9710 public:
9711 std::string onIdle;
9712 std::string beforeGoingActive;
9713 std::string onGoingActive;
9714 std::string beforeActive;
9715 std::string onActive;
9716 std::string inDashboard;
9717 std::string onStatusReport;
9718
9720 {
9721 clear();
9722 }
9723
9724 void clear()
9725 {
9726 onIdle.clear();
9727 beforeGoingActive.clear();
9728 onGoingActive.clear();
9729 beforeActive.clear();
9730 onActive.clear();
9731 inDashboard.clear();
9732 onStatusReport.clear();
9733 }
9734 };
9735
9736 static void to_json(nlohmann::json& j, const NsmNodeScripts& p)
9737 {
9738 j = nlohmann::json{
9739 TOJSON_IMPL(onIdle),
9740 TOJSON_IMPL(beforeGoingActive),
9741 TOJSON_IMPL(onGoingActive),
9742 TOJSON_IMPL(beforeActive),
9743 TOJSON_IMPL(onActive),
9744 TOJSON_IMPL(inDashboard),
9745 TOJSON_IMPL(onStatusReport)
9746 };
9747 }
9748 static void from_json(const nlohmann::json& j, NsmNodeScripts& p)
9749 {
9750 p.clear();
9751 getOptional<std::string>("onIdle", p.onIdle, j);
9752 getOptional<std::string>("beforeGoingActive", p.beforeGoingActive, j);
9753 getOptional<std::string>("onGoingActive", p.onGoingActive, j);
9754 getOptional<std::string>("beforeActive", p.beforeActive, j);
9755 getOptional<std::string>("onActive", p.onActive, j);
9756 getOptional<std::string>("inDashboard", p.inDashboard, j);
9757 getOptional<std::string>("onStatusReport", p.onStatusReport, j);
9758 }
9759
9760 //-----------------------------------------------------------
9761 JSON_SERIALIZED_CLASS(NsmNodeLogging)
9768 {
9769 IMPLEMENT_JSON_SERIALIZATION()
9770 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeLogging)
9771
9772 public:
9777 bool logCommandOutput;
9778 bool logResourceStates;
9779
9781 {
9782 clear();
9783 }
9784
9785 void clear()
9786 {
9787 level = 3;
9788 dashboard = false;
9789 logCommandOutput = false;
9790 logResourceStates = false;
9791 }
9792 };
9793
9794 static void to_json(nlohmann::json& j, const NsmNodeLogging& p)
9795 {
9796 j = nlohmann::json{
9797 TOJSON_IMPL(level),
9798 TOJSON_IMPL(dashboard),
9799 TOJSON_IMPL(logCommandOutput),
9800 TOJSON_IMPL(logResourceStates)
9801 };
9802 }
9803 static void from_json(const nlohmann::json& j, NsmNodeLogging& p)
9804 {
9805 p.clear();
9806 getOptional<int>("level", p.level, j, 3);
9807 getOptional<bool>("dashboard", p.dashboard, j, false);
9808 getOptional<bool>("logCommandOutput", p.logCommandOutput, j, false);
9809 getOptional<bool>("logResourceStates", p.logResourceStates, j, false);
9810 }
9811
9812 //-----------------------------------------------------------
9813 JSON_SERIALIZED_CLASS(NsmNodePeriodic)
9820 {
9821 IMPLEMENT_JSON_SERIALIZATION()
9822 IMPLEMENT_JSON_DOCUMENTATION(NsmNodePeriodic)
9823
9824 public:
9825 std::string id;
9826 int intervalSecs;
9827 std::string command;
9828
9830 {
9831 clear();
9832 }
9833
9834 void clear()
9835 {
9836 id.clear();
9837 intervalSecs = 1;
9838 command.clear();
9839 }
9840 };
9841
9842 static void to_json(nlohmann::json& j, const NsmNodePeriodic& p)
9843 {
9844 j = nlohmann::json{
9845 TOJSON_IMPL(id),
9846 TOJSON_IMPL(intervalSecs),
9847 TOJSON_IMPL(command)
9848 };
9849 }
9850 static void from_json(const nlohmann::json& j, NsmNodePeriodic& p)
9851 {
9852 p.clear();
9853 getOptional<std::string>("id", p.id, j);
9854 getOptional<int>("intervalSecs", p.intervalSecs, j, 1);
9855 getOptional<std::string>("command", p.command, j);
9856 }
9857
9858 //-----------------------------------------------------------
9859 JSON_SERIALIZED_CLASS(NsmNodeCotLocationPollSettings)
9869 {
9870 IMPLEMENT_JSON_SERIALIZATION()
9871 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeCotLocationPollSettings)
9872
9873 public:
9877 std::string runCmd;
9882
9884 {
9885 clear();
9886 }
9887
9888 void clear()
9889 {
9890 enabled = false;
9891 runCmd.clear();
9892 intervalSecs = 10;
9893 failClosed = true;
9894 }
9895 };
9896
9897 static void to_json(nlohmann::json& j, const NsmNodeCotLocationPollSettings& p)
9898 {
9899 j = nlohmann::json{
9900 TOJSON_IMPL(enabled),
9901 TOJSON_IMPL(runCmd),
9902 TOJSON_IMPL(intervalSecs),
9903 TOJSON_IMPL(failClosed)
9904 };
9905 }
9906 static void from_json(const nlohmann::json& j, NsmNodeCotLocationPollSettings& p)
9907 {
9908 p.clear();
9909 getOptional<bool>("enabled", p.enabled, j, false);
9910 getOptional<std::string>("runCmd", p.runCmd, j);
9911 getOptional<int>("intervalSecs", p.intervalSecs, j, 10);
9912 getOptional<bool>("failClosed", p.failClosed, j, true);
9913 }
9914
9915 //-----------------------------------------------------------
9916 JSON_SERIALIZED_CLASS(NsmNodeCotSettings)
9923 {
9924 IMPLEMENT_JSON_SERIALIZATION()
9925 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeCotSettings)
9926
9927 public:
9928 bool useCot;
9929 std::string uid;
9930 std::string type;
9931 std::string how;
9932 std::string lat;
9933 std::string lon;
9934 std::string ce;
9935 std::string hae;
9936 std::string le;
9938 std::string callsign;
9940 std::string detailJson;
9947
9949 {
9950 clear();
9951 }
9952
9953 void clear()
9954 {
9955 useCot = false;
9956 uid.clear();
9957 type.clear();
9958 how.clear();
9959 lat.clear();
9960 lon.clear();
9961 ce.clear();
9962 hae.clear();
9963 le.clear();
9964 callsign.clear();
9965 detailJson.clear();
9966 announceWhenIdle = false;
9967 idleIntervalSecs = 30;
9968 locationPoll.clear();
9969 }
9970 };
9971
9972 static void to_json(nlohmann::json& j, const NsmNodeCotSettings& p)
9973 {
9974 j = nlohmann::json{
9975 TOJSON_IMPL(useCot),
9976 TOJSON_IMPL(uid),
9977 TOJSON_IMPL(type),
9978 TOJSON_IMPL(how),
9979 TOJSON_IMPL(lat),
9980 TOJSON_IMPL(lon),
9981 TOJSON_IMPL(ce),
9982 TOJSON_IMPL(hae),
9983 TOJSON_IMPL(le),
9984 TOJSON_IMPL(callsign),
9985 TOJSON_IMPL(detailJson),
9986 TOJSON_IMPL(announceWhenIdle),
9987 TOJSON_IMPL(idleIntervalSecs),
9988 TOJSON_IMPL(locationPoll)
9989 };
9990 }
9991 static void from_json(const nlohmann::json& j, NsmNodeCotSettings& p)
9992 {
9993 p.clear();
9994 getOptional<bool>("useCot", p.useCot, j, false);
9995 getOptional<std::string>("uid", p.uid, j);
9996 getOptional<std::string>("type", p.type, j);
9997 getOptional<std::string>("how", p.how, j);
9998 getOptional<std::string>("lat", p.lat, j);
9999 getOptional<std::string>("lon", p.lon, j);
10000 getOptional<std::string>("ce", p.ce, j);
10001 getOptional<std::string>("hae", p.hae, j);
10002 getOptional<std::string>("le", p.le, j);
10003 getOptional<std::string>("callsign", p.callsign, j);
10004 getOptional<std::string>("detailJson", p.detailJson, j);
10005 getOptional<bool>("announceWhenIdle", p.announceWhenIdle, j, false);
10006 getOptional<int>("idleIntervalSecs", p.idleIntervalSecs, j, 30);
10007 getOptional<NsmNodeCotLocationPollSettings>("locationPoll", p.locationPoll, j);
10008 }
10009
10010 //-----------------------------------------------------------
10011 JSON_SERIALIZED_CLASS(StatusUploadConfiguration)
10024 {
10025 IMPLEMENT_JSON_SERIALIZATION()
10026 IMPLEMENT_JSON_DOCUMENTATION(StatusUploadConfiguration)
10027
10028 public:
10030 std::string baseUrl;
10031
10034
10039 std::string apiKey;
10040
10047
10049 {
10050 clear();
10051 }
10052
10053 void clear()
10054 {
10055 baseUrl.clear();
10056 timeoutSecs = 3;
10057 apiKey.clear();
10058 tls.clear();
10059 }
10060 };
10061
10062 static void to_json(nlohmann::json& j, const StatusUploadConfiguration& p)
10063 {
10064 j = nlohmann::json{
10065 TOJSON_IMPL(baseUrl),
10066 TOJSON_IMPL(timeoutSecs),
10067 TOJSON_IMPL(apiKey),
10068 TOJSON_IMPL(tls)
10069 };
10070 }
10071 static void from_json(const nlohmann::json& j, StatusUploadConfiguration& p)
10072 {
10073 p.clear();
10074 getOptional<std::string>("baseUrl", p.baseUrl, j);
10075 getOptional<int>("timeoutSecs", p.timeoutSecs, j, 3);
10076 getOptional<std::string>("apiKey", p.apiKey, j);
10077 getOptional<Tls>("tls", p.tls, j);
10078 }
10079
10080 //-----------------------------------------------------------
10081 JSON_SERIALIZED_CLASS(NsmNodeStatusReportImmediateConfiguration)
10093 {
10094 IMPLEMENT_JSON_SERIALIZATION()
10095 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeStatusReportImmediateConfiguration)
10096
10097 public:
10106
10108 {
10109 clear();
10110 }
10111
10112 void clear()
10113 {
10114 enabled = false;
10115 minIntervalSecs = 3;
10116 onStateChange = true;
10117 onOwnerChange = true;
10118 }
10119 };
10120
10121 static void to_json(nlohmann::json& j, const NsmNodeStatusReportImmediateConfiguration& p)
10122 {
10123 j = nlohmann::json{
10124 TOJSON_IMPL(enabled),
10125 TOJSON_IMPL(minIntervalSecs),
10126 TOJSON_IMPL(onStateChange),
10127 TOJSON_IMPL(onOwnerChange)
10128 };
10129 }
10130 static void from_json(const nlohmann::json& j, NsmNodeStatusReportImmediateConfiguration& p)
10131 {
10132 p.clear();
10133 getOptional<bool>("enabled", p.enabled, j, false);
10134 getOptional<int>("minIntervalSecs", p.minIntervalSecs, j, 3);
10135 getOptional<bool>("onStateChange", p.onStateChange, j, true);
10136 getOptional<bool>("onOwnerChange", p.onOwnerChange, j, true);
10137 }
10138
10139 //-----------------------------------------------------------
10140 JSON_SERIALIZED_CLASS(NsmNodeStatusReportConfiguration)
10151 {
10152 IMPLEMENT_JSON_SERIALIZATION()
10153 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeStatusReportConfiguration)
10154
10155 public:
10157 std::string fileName;
10158
10161
10164
10166 std::string runCmd;
10167
10170
10173
10175 {
10176 clear();
10177 }
10178
10179 void clear()
10180 {
10181 fileName.clear();
10182 intervalSecs = 60;
10183 enabled = false;
10184 includeResourceDetail = false;
10185 runCmd.clear();
10186 immediate.clear();
10187 }
10188 };
10189
10190 static void to_json(nlohmann::json& j, const NsmNodeStatusReportConfiguration& p)
10191 {
10192 j = nlohmann::json{
10193 TOJSON_IMPL(fileName),
10194 TOJSON_IMPL(intervalSecs),
10195 TOJSON_IMPL(enabled),
10196 TOJSON_IMPL(includeResourceDetail),
10197 TOJSON_IMPL(runCmd),
10198 TOJSON_IMPL(immediate)
10199 };
10200 }
10201 static void from_json(const nlohmann::json& j, NsmNodeStatusReportConfiguration& p)
10202 {
10203 p.clear();
10204 getOptional<std::string>("fileName", p.fileName, j);
10205 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
10206 getOptional<bool>("enabled", p.enabled, j, false);
10207 getOptional<std::string>("runCmd", p.runCmd, j);
10208 getOptional<bool>("includeResourceDetail", p.includeResourceDetail, j, false);
10209 getOptional<NsmNodeStatusReportImmediateConfiguration>("immediate", p.immediate, j);
10210 }
10211
10212 //-----------------------------------------------------------
10213 JSON_SERIALIZED_CLASS(NsmNodeElectionGateSettings)
10224 {
10225 IMPLEMENT_JSON_SERIALIZATION()
10226 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeElectionGateSettings)
10227
10228 public:
10232 std::string runCmd;
10237
10239 {
10240 clear();
10241 }
10242
10243 void clear()
10244 {
10245 enabled = false;
10246 runCmd.clear();
10247 intervalSecs = 2;
10248 failClosed = true;
10249 }
10250 };
10251
10252 static void to_json(nlohmann::json& j, const NsmNodeElectionGateSettings& p)
10253 {
10254 j = nlohmann::json{
10255 TOJSON_IMPL(enabled),
10256 TOJSON_IMPL(runCmd),
10257 TOJSON_IMPL(intervalSecs),
10258 TOJSON_IMPL(failClosed)
10259 };
10260 }
10261 static void from_json(const nlohmann::json& j, NsmNodeElectionGateSettings& p)
10262 {
10263 p.clear();
10264 getOptional<bool>("enabled", p.enabled, j, false);
10265 getOptional<std::string>("runCmd", p.runCmd, j);
10266 getOptional<int>("intervalSecs", p.intervalSecs, j, 2);
10267 getOptional<bool>("failClosed", p.failClosed, j, true);
10268 }
10269
10270 //-----------------------------------------------------------
10271 JSON_SERIALIZED_CLASS(NsmNodeActiveHealthCheckSettings)
10284 {
10285 IMPLEMENT_JSON_SERIALIZATION()
10286 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeActiveHealthCheckSettings)
10287
10288 public:
10292 std::string runCmd;
10301
10303 {
10304 clear();
10305 }
10306
10307 void clear()
10308 {
10309 enabled = false;
10310 runCmd.clear();
10311 intervalSecs = 5;
10312 unhealthyGraceMs = 5000;
10313 releaseCooldownSecs = 30;
10314 failClosed = true;
10315 }
10316 };
10317
10318 static void to_json(nlohmann::json& j, const NsmNodeActiveHealthCheckSettings& p)
10319 {
10320 j = nlohmann::json{
10321 TOJSON_IMPL(enabled),
10322 TOJSON_IMPL(runCmd),
10323 TOJSON_IMPL(intervalSecs),
10324 TOJSON_IMPL(unhealthyGraceMs),
10325 TOJSON_IMPL(releaseCooldownSecs),
10326 TOJSON_IMPL(failClosed)
10327 };
10328 }
10329 static void from_json(const nlohmann::json& j, NsmNodeActiveHealthCheckSettings& p)
10330 {
10331 p.clear();
10332 getOptional<bool>("enabled", p.enabled, j, false);
10333 getOptional<std::string>("runCmd", p.runCmd, j);
10334 getOptional<int>("intervalSecs", p.intervalSecs, j, 5);
10335 getOptional<int>("unhealthyGraceMs", p.unhealthyGraceMs, j, 5000);
10336 getOptional<int>("releaseCooldownSecs", p.releaseCooldownSecs, j, 30);
10337 getOptional<bool>("failClosed", p.failClosed, j, true);
10338 }
10339
10340 //-----------------------------------------------------------
10341 JSON_SERIALIZED_CLASS(NsmNode)
10351 {
10352 IMPLEMENT_JSON_SERIALIZATION()
10353 IMPLEMENT_JSON_DOCUMENTATION(NsmNode)
10354
10355 public:
10356
10359
10362
10364 std::string id;
10365
10367 std::string name;
10368
10370 std::string domainId;
10371
10374
10377
10380
10383
10386
10389
10392
10395
10398
10400 std::vector<NsmNodePeriodic> periodics;
10401
10404
10407
10410
10413
10416
10419
10422
10425
10428
10431
10432 NsmNode()
10433 {
10434 clear();
10435 }
10436
10437 void clear()
10438 {
10439 fipsCrypto.clear();
10440 watchdog.clear();
10441 id.clear();
10442 name.clear();
10443 domainId.clear();
10444 multicastInterfaceName.clear();
10445 stateMachine.clear();
10446 defaultPriority = 0;
10447 fixedToken = -1;
10448 dashboardToken = false;
10449 scripts.clear();
10450 logging.clear();
10451 cot.clear();
10452 periodics.clear();
10453 electionGate.clear();
10454 activeHealthCheck.clear();
10455 statusReport.clear();
10456 statusUpload.clear();
10457 configurationCheckSignalName = "rts.7b392d1.${id}";
10458 licensing.clear();
10459 featureset.clear();
10460 rxCapture.clear();
10461 txCapture.clear();
10462 tuning.clear();
10463 ipFamily = IpFamilyType_t::ifIp4;
10464 }
10465 };
10466
10467 static void to_json(nlohmann::json& j, const NsmNode& p)
10468 {
10469 j = nlohmann::json{
10470 TOJSON_IMPL(fipsCrypto),
10471 TOJSON_IMPL(watchdog),
10472 TOJSON_IMPL(id),
10473 TOJSON_IMPL(name),
10474 TOJSON_IMPL(domainId),
10475 TOJSON_IMPL(multicastInterfaceName),
10476 TOJSON_IMPL(stateMachine),
10477 TOJSON_IMPL(defaultPriority),
10478 TOJSON_IMPL(fixedToken),
10479 TOJSON_IMPL(dashboardToken),
10480 TOJSON_IMPL(scripts),
10481 TOJSON_IMPL(logging),
10482 TOJSON_IMPL(cot),
10483 TOJSON_IMPL(periodics),
10484 TOJSON_IMPL(electionGate),
10485 TOJSON_IMPL(activeHealthCheck),
10486 TOJSON_IMPL(statusReport),
10487 TOJSON_IMPL(statusUpload),
10488 TOJSON_IMPL(configurationCheckSignalName),
10489 TOJSON_IMPL(featureset),
10490 TOJSON_IMPL(licensing),
10491 TOJSON_IMPL(ipFamily),
10492 TOJSON_IMPL(rxCapture),
10493 TOJSON_IMPL(txCapture),
10494 TOJSON_IMPL(tuning)
10495 };
10496 }
10497 static void from_json(const nlohmann::json& j, NsmNode& p)
10498 {
10499 p.clear();
10500 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
10501 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
10502 getOptional<std::string>("id", p.id, j);
10503 getOptional<std::string>("name", p.name, j);
10504 getOptional<std::string>("domainId", p.domainId, j);
10505 // Legacy alias from older configs.
10506 if(p.domainId.empty())
10507 {
10508 getOptional<std::string>("domainName", p.domainId, j);
10509 }
10510 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
10511 getOptional<NsmConfiguration>("stateMachine", p.stateMachine, j);
10512 getOptional<int>("defaultPriority", p.defaultPriority, j, 0);
10513 getOptional<int>("fixedToken", p.fixedToken, j, -1);
10514 getOptional<bool>("dashboardToken", p.dashboardToken, j, false);
10515 getOptional<NsmNodeScripts>("scripts", p.scripts, j);
10516 getOptional<NsmNodeLogging>("logging", p.logging, j);
10517 getOptional<NsmNodeCotSettings>("cot", p.cot, j);
10518 getOptional<std::vector<NsmNodePeriodic>>("periodics", p.periodics, j);
10519 getOptional<NsmNodeElectionGateSettings>("electionGate", p.electionGate, j);
10520 getOptional<NsmNodeActiveHealthCheckSettings>("activeHealthCheck", p.activeHealthCheck, j);
10521 getOptional<NsmNodeStatusReportConfiguration>("statusReport", p.statusReport, j);
10522 getOptional<StatusUploadConfiguration>("statusUpload", p.statusUpload, j);
10523 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.7b392d1.${id}");
10524 getOptional<Licensing>("licensing", p.licensing, j);
10525 getOptional<Featureset>("featureset", p.featureset, j);
10526 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
10527 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
10528 getOptional<TuningSettings>("tuning", p.tuning, j);
10529 getOptional<IpFamilyType_t>("ipFamily", p.ipFamily, j, IpFamilyType_t::ifIp4);
10530 }
10531
10533 static inline void nsmNodeFromEmbeddedServerJson(const nlohmann::json &j, const char *key, NsmNode &node)
10534 {
10535 node.clear();
10536 if (!j.contains(key))
10537 {
10538 return;
10539 }
10540
10541 const nlohmann::json &nj = j.at(key);
10542 if (!nj.is_object())
10543 {
10544 return;
10545 }
10546
10547 if (nj.contains("stateMachine") || nj.contains("cot") || nj.contains("scripts")
10548 || nj.contains("periodics") || nj.contains("electionGate") || nj.contains("activeHealthCheck")
10549 || nj.contains("statusReport") || nj.contains("multicastInterfaceName"))
10550 {
10551 nj.get_to(node);
10552 return;
10553 }
10554
10555 nj.get_to(node.stateMachine);
10556 }
10557
10558 //-----------------------------------------------------------
10559 JSON_SERIALIZED_CLASS(NsmSettings)
10577 {
10578 IMPLEMENT_JSON_SERIALIZATION()
10579 IMPLEMENT_JSON_DOCUMENTATION(NsmSettings)
10580
10581 public:
10584
10586 std::vector<NsmNode> nodes;
10587
10588 NsmSettings()
10589 {
10590 clear();
10591 }
10592
10593 void clear()
10594 {
10595 statusReport.clear();
10596 nodes.clear();
10597 }
10598 };
10599
10600 static void to_json(nlohmann::json& j, const NsmSettings& p)
10601 {
10602 j = nlohmann::json{
10603 TOJSON_IMPL(statusReport),
10604 TOJSON_IMPL(nodes)
10605 };
10606 }
10607 static void from_json(const nlohmann::json& j, NsmSettings& p)
10608 {
10609 p.clear();
10610 getOptional<NsmNodeStatusReportConfiguration>("statusReport", p.statusReport, j);
10611 getOptional<std::vector<NsmNode>>("nodes", p.nodes, j);
10612 }
10613
10615 static inline void bridgingServerNsmFromJson(const nlohmann::json &j, NsmSettings &nsm)
10616 {
10617 nsm.clear();
10618 if(j.contains("nsm") && j.at("nsm").is_object())
10619 {
10620 j.at("nsm").get_to(nsm);
10621 return;
10622 }
10623
10624 // Legacy: top-level nsmNodes array
10625 if(j.contains("nsmNodes") && j.at("nsmNodes").is_array())
10626 {
10627 getOptional<std::vector<NsmNode>>("nsmNodes", nsm.nodes, j);
10628 return;
10629 }
10630
10631 // Legacy: singular nsmNode object
10632 if(j.contains("nsmNode") && j.at("nsmNode").is_object())
10633 {
10634 NsmNode node;
10635 nsmNodeFromEmbeddedServerJson(j, "nsmNode", node);
10636 if(!node.id.empty() || !node.stateMachine.networking.address.empty())
10637 {
10638 nsm.nodes.push_back(node);
10639 }
10640 }
10641 }
10642 //-----------------------------------------------------------
10643 JSON_SERIALIZED_CLASS(RallypointServer)
10653 {
10654 IMPLEMENT_JSON_SERIALIZATION()
10655 IMPLEMENT_JSON_DOCUMENTATION(RallypointServer)
10656
10657 public:
10658 typedef enum
10659 {
10660 sptDefault = 0,
10661 sptCertificate = 1,
10662 sptCertPublicKey = 2,
10663 sptCertSubject = 3,
10664 sptCertIssuer = 4,
10665 sptCertFingerprint = 5,
10666 sptCertSerial = 6,
10667 sptSubjectC = 7,
10668 sptSubjectST = 8,
10669 sptSubjectL = 9,
10670 sptSubjectO = 10,
10671 sptSubjectOU = 11,
10672 sptSubjectCN = 12,
10673 sptIssuerC = 13,
10674 sptIssuerST = 14,
10675 sptIssuerL = 15,
10676 sptIssuerO = 16,
10677 sptIssuerOU = 17,
10678 sptIssuerCN = 18
10679 } StreamIdPrivacyType_t;
10680
10682 StreamIdPrivacyType_t streamIdPrivacyType;
10683
10686
10689
10691 std::string id;
10692
10694 std::string name;
10695
10698
10701
10703 std::string interfaceName;
10704
10707
10710
10713
10716
10719
10722
10725
10728
10731
10734
10737
10740
10743
10746
10749
10752
10755
10757 PeeringConfiguration peeringConfiguration; // NOTE: This is NOT serialized
10758
10761
10764
10767
10770
10772 std::vector<RallypointReflector> staticReflectors;
10773
10776
10779
10782
10785
10788
10791
10793 std::vector<RallypointExtendedGroupRestriction> extendedGroupRestrictions;
10794
10797
10800
10803
10806
10808 uint32_t sysFlags;
10809
10812
10815
10818
10821
10824
10827
10830
10833
10835 std::vector<RallypointRpRtTimingBehavior> peerRtBehaviors;
10836
10839
10842
10845
10848
10851
10854
10856 std::string domainName;
10857
10859 std::vector<std::string> allowedDomains;
10860
10862 std::vector<std::string> blockedDomains;
10863
10865 std::vector<std::string> extraDomains;
10866
10869
10871 std::vector<NamedIdentity> additionalIdentities;
10872
10874 {
10875 clear();
10876 }
10877
10878 void clear()
10879 {
10880 fipsCrypto.clear();
10881 watchdog.clear();
10882 id.clear();
10883 name.clear();
10884 listenPort = 7443;
10885 interfaceName.clear();
10886 certificate.clear();
10887 allowMulticastForwarding = false;
10888 peeringConfiguration.clear();
10889 peeringConfigurationFileName.clear();
10890 peeringConfigurationFileCommand.clear();
10891 peeringConfigurationFileCheckSecs = 60;
10892 ioPools = -1;
10893 statusReport.clear();
10894 statusUpload.clear();
10895 limits.clear();
10896 linkGraph.clear();
10897 externalHealthCheckResponder.clear();
10898 allowPeerForwarding = false;
10899 multicastInterfaceName.clear();
10900 tls.clear();
10901 discovery.clear();
10902 forwardDiscoveredGroups = false;
10903 forwardMulticastAddressing = false;
10904 isMeshLeaf = false;
10905 disableMessageSigning = false;
10906 multicastRestrictions.clear();
10907 igmpSnooping.clear();
10908 staticReflectors.clear();
10909 tcpTxOptions.clear();
10910 multicastTxOptions.clear();
10911 certStoreFileName.clear();
10912 certStorePasswordHex.clear();
10913 groupRestrictions.clear();
10914 configurationCheckSignalName = "rts.7b392d1.${id}";
10915 licensing.clear();
10916 featureset.clear();
10917 udpStreaming.clear();
10918 sysFlags = 0;
10919 normalTaskQueueBias = 0;
10920 enableLeafReflectionReverseSubscription = false;
10921 disableLoopDetection = false;
10922 maxSecurityLevel = 0;
10923 routeMap.clear();
10924 streamStatsExport.clear();
10925 maxOutboundPeerConnectionIntervalDeltaSecs = 15;
10926 peerRtTestIntervalMs = 60000;
10927 peerRtBehaviors.clear();
10928 websocket.clear();
10929 nsm.clear();
10930 advertising.clear();
10931 rtiCloud.clear();
10932 extendedGroupRestrictions.clear();
10933 groupRestrictionAccessPolicyType = GroupRestrictionAccessPolicyType_t::graptPermissive;
10934 ipFamily = IpFamilyType_t::ifIp4;
10935 rxCapture.clear();
10936 txCapture.clear();
10937 domainName.clear();
10938 allowedDomains.clear();
10939 blockedDomains.clear();
10940 extraDomains.clear();
10941 tuning.clear();
10942 additionalIdentities.clear();
10943 streamIdPrivacyType = StreamIdPrivacyType_t::sptDefault;
10944 }
10945 };
10946
10947 static void to_json(nlohmann::json& j, const RallypointServer& p)
10948 {
10949 j = nlohmann::json{
10950 TOJSON_IMPL(fipsCrypto),
10951 TOJSON_IMPL(watchdog),
10952 TOJSON_IMPL(id),
10953 TOJSON_IMPL(name),
10954 TOJSON_IMPL(listenPort),
10955 TOJSON_IMPL(interfaceName),
10956 TOJSON_IMPL(certificate),
10957 TOJSON_IMPL(allowMulticastForwarding),
10958 // TOJSON_IMPL(peeringConfiguration), // NOTE: Not serialized!
10959 TOJSON_IMPL(peeringConfigurationFileName),
10960 TOJSON_IMPL(peeringConfigurationFileCommand),
10961 TOJSON_IMPL(peeringConfigurationFileCheckSecs),
10962 TOJSON_IMPL(ioPools),
10963 TOJSON_IMPL(statusReport),
10964 TOJSON_IMPL(statusUpload),
10965 TOJSON_IMPL(limits),
10966 TOJSON_IMPL(linkGraph),
10967 TOJSON_IMPL(externalHealthCheckResponder),
10968 TOJSON_IMPL(allowPeerForwarding),
10969 TOJSON_IMPL(multicastInterfaceName),
10970 TOJSON_IMPL(tls),
10971 TOJSON_IMPL(discovery),
10972 TOJSON_IMPL(forwardDiscoveredGroups),
10973 TOJSON_IMPL(forwardMulticastAddressing),
10974 TOJSON_IMPL(isMeshLeaf),
10975 TOJSON_IMPL(disableMessageSigning),
10976 TOJSON_IMPL(multicastRestrictions),
10977 TOJSON_IMPL(igmpSnooping),
10978 TOJSON_IMPL(staticReflectors),
10979 TOJSON_IMPL(tcpTxOptions),
10980 TOJSON_IMPL(multicastTxOptions),
10981 TOJSON_IMPL(certStoreFileName),
10982 TOJSON_IMPL(certStorePasswordHex),
10983 TOJSON_IMPL(groupRestrictions),
10984 TOJSON_IMPL(configurationCheckSignalName),
10985 TOJSON_IMPL(featureset),
10986 TOJSON_IMPL(licensing),
10987 TOJSON_IMPL(udpStreaming),
10988 TOJSON_IMPL(sysFlags),
10989 TOJSON_IMPL(normalTaskQueueBias),
10990 TOJSON_IMPL(enableLeafReflectionReverseSubscription),
10991 TOJSON_IMPL(disableLoopDetection),
10992 TOJSON_IMPL(maxSecurityLevel),
10993 TOJSON_IMPL(routeMap),
10994 TOJSON_IMPL(streamStatsExport),
10995 TOJSON_IMPL(maxOutboundPeerConnectionIntervalDeltaSecs),
10996 TOJSON_IMPL(peerRtTestIntervalMs),
10997 TOJSON_IMPL(peerRtBehaviors),
10998 TOJSON_IMPL(websocket),
10999 TOJSON_IMPL(nsm),
11000 TOJSON_IMPL(advertising),
11001 TOJSON_IMPL(rtiCloud),
11002 TOJSON_IMPL(extendedGroupRestrictions),
11003 TOJSON_IMPL(groupRestrictionAccessPolicyType),
11004 TOJSON_IMPL(ipFamily),
11005 TOJSON_IMPL(rxCapture),
11006 TOJSON_IMPL(txCapture),
11007 TOJSON_IMPL(domainName),
11008 TOJSON_IMPL(allowedDomains),
11009 TOJSON_IMPL(blockedDomains),
11010 TOJSON_IMPL(extraDomains),
11011 TOJSON_IMPL(tuning),
11012 TOJSON_IMPL(additionalIdentities),
11013 TOJSON_IMPL(streamIdPrivacyType)
11014 };
11015 }
11016 static void from_json(const nlohmann::json& j, RallypointServer& p)
11017 {
11018 p.clear();
11019 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
11020 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
11021 getOptional<std::string>("id", p.id, j);
11022 getOptional<std::string>("name", p.name, j);
11023 getOptional<SecurityCertificate>("certificate", p.certificate, j);
11024 getOptional<std::string>("interfaceName", p.interfaceName, j);
11025 getOptional<int>("listenPort", p.listenPort, j, 7443);
11026 getOptional<bool>("allowMulticastForwarding", p.allowMulticastForwarding, j, false);
11027 //getOptional<PeeringConfiguration>("peeringConfiguration", p.peeringConfiguration, j); // NOTE: Not serialized!
11028 getOptional<std::string>("peeringConfigurationFileName", p.peeringConfigurationFileName, j);
11029 getOptional<std::string>("peeringConfigurationFileCommand", p.peeringConfigurationFileCommand, j);
11030 getOptional<int>("peeringConfigurationFileCheckSecs", p.peeringConfigurationFileCheckSecs, j, 60);
11031 getOptional<int>("ioPools", p.ioPools, j, -1);
11032 getOptional<RallypointServerStatusReportConfiguration>("statusReport", p.statusReport, j);
11033 getOptional<StatusUploadConfiguration>("statusUpload", p.statusUpload, j);
11034 getOptional<RallypointServerLimits>("limits", p.limits, j);
11035 getOptional<RallypointServerLinkGraph>("linkGraph", p.linkGraph, j);
11036 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
11037 getOptional<bool>("allowPeerForwarding", p.allowPeerForwarding, j, false);
11038 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
11039 getOptional<Tls>("tls", p.tls, j);
11040 getOptional<DiscoveryConfiguration>("discovery", p.discovery, j);
11041 getOptional<bool>("forwardDiscoveredGroups", p.forwardDiscoveredGroups, j, false);
11042 getOptional<bool>("forwardMulticastAddressing", p.forwardMulticastAddressing, j, false);
11043 getOptional<bool>("isMeshLeaf", p.isMeshLeaf, j, false);
11044 getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
11045 getOptional<NetworkAddressRestrictionList>("multicastRestrictions", p.multicastRestrictions, j);
11046 getOptional<IgmpSnooping>("igmpSnooping", p.igmpSnooping, j);
11047 getOptional<std::vector<RallypointReflector>>("staticReflectors", p.staticReflectors, j);
11048 getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
11049 getOptional<NetworkTxOptions>("multicastTxOptions", p.multicastTxOptions, j);
11050 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
11051 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
11052 getOptional<StringRestrictionList>("groupRestrictions", p.groupRestrictions, j);
11053 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.7b392d1.${id}");
11054 getOptional<Licensing>("licensing", p.licensing, j);
11055 getOptional<Featureset>("featureset", p.featureset, j);
11056 getOptional<RallypointUdpStreaming>("udpStreaming", p.udpStreaming, j);
11057 getOptional<uint32_t>("sysFlags", p.sysFlags, j, 0);
11058 getOptional<uint32_t>("normalTaskQueueBias", p.normalTaskQueueBias, j, 0);
11059 getOptional<bool>("enableLeafReflectionReverseSubscription", p.enableLeafReflectionReverseSubscription, j, false);
11060 getOptional<bool>("disableLoopDetection", p.disableLoopDetection, j, false);
11061 getOptional<uint32_t>("maxSecurityLevel", p.maxSecurityLevel, j, 0);
11062 getOptional<RallypointServerRouteMap>("routeMap", p.routeMap, j);
11063 getOptional<RallypointServerStreamStatsExport>("streamStatsExport", p.streamStatsExport, j);
11064 getOptional<uint32_t>("maxOutboundPeerConnectionIntervalDeltaSecs", p.maxOutboundPeerConnectionIntervalDeltaSecs, j, 15);
11065 getOptional<int>("peerRtTestIntervalMs", p.peerRtTestIntervalMs, j, 60000);
11066 getOptional<std::vector<RallypointRpRtTimingBehavior>>("peerRtBehaviors", p.peerRtBehaviors, j);
11067 getOptional<RallypointWebsocketSettings>("websocket", p.websocket, j);
11068 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
11069 getOptional<RallypointAdvertisingSettings>("advertising", p.advertising, j);
11070 getOptional<RtiCloudSettings>("rtiCloud", p.rtiCloud, j);
11071 getOptional<std::vector<RallypointExtendedGroupRestriction>>("extendedGroupRestrictions", p.extendedGroupRestrictions, j);
11072 getOptional<GroupRestrictionAccessPolicyType_t>("groupRestrictionAccessPolicyType", p.groupRestrictionAccessPolicyType, j, GroupRestrictionAccessPolicyType_t::graptPermissive);
11073 getOptional<IpFamilyType_t>("ipFamily", p.ipFamily, j, IpFamilyType_t::ifIp4);
11074 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
11075 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
11076 getOptional<std::string>("domainName", p.domainName, j);
11077 getOptional<std::vector<std::string>>("allowedDomains", p.allowedDomains, j);
11078 getOptional<std::vector<std::string>>("blockedDomains", p.blockedDomains, j);
11079 getOptional<std::vector<std::string>>("extraDomains", p.extraDomains, j);
11080 getOptional<TuningSettings>("tuning", p.tuning, j);
11081 getOptional<std::vector<NamedIdentity>>("additionalIdentities", p.additionalIdentities, j);
11082 getOptional<RallypointServer::StreamIdPrivacyType_t>("streamIdPrivacyType", p.streamIdPrivacyType, j, RallypointServer::StreamIdPrivacyType_t::sptDefault);
11083 }
11084
11085
11086 //-----------------------------------------------------------
11087 JSON_SERIALIZED_CLASS(PlatformDiscoveredService)
11098 {
11099 IMPLEMENT_JSON_SERIALIZATION()
11100 IMPLEMENT_JSON_DOCUMENTATION(PlatformDiscoveredService)
11101
11102 public:
11103
11105 std::string id;
11106
11108 std::string type;
11109
11111 std::string name;
11112
11115
11117 std::string uri;
11118
11121
11123 {
11124 clear();
11125 }
11126
11127 void clear()
11128 {
11129 id.clear();
11130 type.clear();
11131 name.clear();
11132 address.clear();
11133 uri.clear();
11134 configurationVersion = 0;
11135 }
11136 };
11137
11138 static void to_json(nlohmann::json& j, const PlatformDiscoveredService& p)
11139 {
11140 j = nlohmann::json{
11141 TOJSON_IMPL(id),
11142 TOJSON_IMPL(type),
11143 TOJSON_IMPL(name),
11144 TOJSON_IMPL(address),
11145 TOJSON_IMPL(uri),
11146 TOJSON_IMPL(configurationVersion)
11147 };
11148 }
11149 static void from_json(const nlohmann::json& j, PlatformDiscoveredService& p)
11150 {
11151 p.clear();
11152 getOptional<std::string>("id", p.id, j);
11153 getOptional<std::string>("type", p.type, j);
11154 getOptional<std::string>("name", p.name, j);
11155 getOptional<NetworkAddress>("address", p.address, j);
11156 getOptional<std::string>("uri", p.uri, j);
11157 getOptional<uint32_t>("configurationVersion", p.configurationVersion, j, 0);
11158 }
11159
11160
11161 //-----------------------------------------------------------
11163 {
11164 public:
11165 typedef enum
11166 {
11167 etUndefined = 0,
11168 etAudio = 1,
11169 etLocation = 2,
11170 etUser = 3
11171 } EventType_t;
11172
11173 typedef enum
11174 {
11175 dNone = 0,
11176 dInbound = 1,
11177 dOutbound = 2,
11178 dBoth = 3,
11179 dUndefined = 4,
11180 } Direction_t;
11181 };
11182
11183
11184 //-----------------------------------------------------------
11185 JSON_SERIALIZED_CLASS(TimelineQueryParameters)
11196 {
11197 IMPLEMENT_JSON_SERIALIZATION()
11198 IMPLEMENT_JSON_DOCUMENTATION(TimelineQueryParameters)
11199
11200 public:
11201
11204
11207
11210
11213
11216
11219
11222
11224 std::string onlyAlias;
11225
11227 std::string onlyNodeId;
11228
11231
11233 std::string sql;
11234
11236 {
11237 clear();
11238 }
11239
11240 void clear()
11241 {
11242 maxCount = 50;
11243 mostRecentFirst = true;
11244 startedOnOrAfter = 0;
11245 endedOnOrBefore = 0;
11246 onlyDirection = 0;
11247 onlyType = 0;
11248 onlyCommitted = true;
11249 onlyAlias.clear();
11250 onlyNodeId.clear();
11251 sql.clear();
11252 onlyTxId = 0;
11253 }
11254 };
11255
11256 static void to_json(nlohmann::json& j, const TimelineQueryParameters& p)
11257 {
11258 j = nlohmann::json{
11259 TOJSON_IMPL(maxCount),
11260 TOJSON_IMPL(mostRecentFirst),
11261 TOJSON_IMPL(startedOnOrAfter),
11262 TOJSON_IMPL(endedOnOrBefore),
11263 TOJSON_IMPL(onlyDirection),
11264 TOJSON_IMPL(onlyType),
11265 TOJSON_IMPL(onlyCommitted),
11266 TOJSON_IMPL(onlyAlias),
11267 TOJSON_IMPL(onlyNodeId),
11268 TOJSON_IMPL(onlyTxId),
11269 TOJSON_IMPL(sql)
11270 };
11271 }
11272 static void from_json(const nlohmann::json& j, TimelineQueryParameters& p)
11273 {
11274 p.clear();
11275 getOptional<long>("maxCount", p.maxCount, j, 50);
11276 getOptional<bool>("mostRecentFirst", p.mostRecentFirst, j, false);
11277 getOptional<uint64_t>("startedOnOrAfter", p.startedOnOrAfter, j, 0);
11278 getOptional<uint64_t>("endedOnOrBefore", p.endedOnOrBefore, j, 0);
11279 getOptional<int>("onlyDirection", p.onlyDirection, j, 0);
11280 getOptional<int>("onlyType", p.onlyType, j, 0);
11281 getOptional<bool>("onlyCommitted", p.onlyCommitted, j, true);
11282 getOptional<std::string>("onlyAlias", p.onlyAlias, j, EMPTY_STRING);
11283 getOptional<std::string>("onlyNodeId", p.onlyNodeId, j, EMPTY_STRING);
11284 getOptional<int>("onlyTxId", p.onlyTxId, j, 0);
11285 getOptional<std::string>("sql", p.sql, j, EMPTY_STRING);
11286 }
11287
11288 //-----------------------------------------------------------
11289 JSON_SERIALIZED_CLASS(CertStoreCertificate)
11297 {
11298 IMPLEMENT_JSON_SERIALIZATION()
11299 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificate)
11300
11301 public:
11303 std::string id;
11304
11306 std::string certificatePem;
11307
11309 std::string privateKeyPem;
11310
11313
11315 std::string tags;
11316
11318 {
11319 clear();
11320 }
11321
11322 void clear()
11323 {
11324 id.clear();
11325 certificatePem.clear();
11326 privateKeyPem.clear();
11327 internalData = nullptr;
11328 tags.clear();
11329 }
11330 };
11331
11332 static void to_json(nlohmann::json& j, const CertStoreCertificate& p)
11333 {
11334 j = nlohmann::json{
11335 TOJSON_IMPL(id),
11336 TOJSON_IMPL(certificatePem),
11337 TOJSON_IMPL(privateKeyPem),
11338 TOJSON_IMPL(tags)
11339 };
11340 }
11341 static void from_json(const nlohmann::json& j, CertStoreCertificate& p)
11342 {
11343 p.clear();
11344 j.at("id").get_to(p.id);
11345 j.at("certificatePem").get_to(p.certificatePem);
11346 getOptional<std::string>("privateKeyPem", p.privateKeyPem, j, EMPTY_STRING);
11347 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
11348 }
11349
11350 //-----------------------------------------------------------
11351 JSON_SERIALIZED_CLASS(CertStore)
11359 {
11360 IMPLEMENT_JSON_SERIALIZATION()
11361 IMPLEMENT_JSON_DOCUMENTATION(CertStore)
11362
11363 public:
11365 std::string id;
11366
11368 std::vector<CertStoreCertificate> certificates;
11369
11371 std::vector<KvPair> kvp;
11372
11373 CertStore()
11374 {
11375 clear();
11376 }
11377
11378 void clear()
11379 {
11380 id.clear();
11381 certificates.clear();
11382 kvp.clear();
11383 }
11384 };
11385
11386 static void to_json(nlohmann::json& j, const CertStore& p)
11387 {
11388 j = nlohmann::json{
11389 TOJSON_IMPL(id),
11390 TOJSON_IMPL(certificates),
11391 TOJSON_IMPL(kvp)
11392 };
11393 }
11394 static void from_json(const nlohmann::json& j, CertStore& p)
11395 {
11396 p.clear();
11397 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11398 getOptional<std::vector<CertStoreCertificate>>("certificates", p.certificates, j);
11399 getOptional<std::vector<KvPair>>("kvp", p.kvp, j);
11400 }
11401
11402 //-----------------------------------------------------------
11403 JSON_SERIALIZED_CLASS(CertStoreCertificateElement)
11411 {
11412 IMPLEMENT_JSON_SERIALIZATION()
11413 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificateElement)
11414
11415 public:
11417 std::string id;
11418
11421
11423 std::string certificatePem;
11424
11426 std::string tags;
11427
11429 {
11430 clear();
11431 }
11432
11433 void clear()
11434 {
11435 id.clear();
11436 hasPrivateKey = false;
11437 tags.clear();
11438 }
11439 };
11440
11441 static void to_json(nlohmann::json& j, const CertStoreCertificateElement& p)
11442 {
11443 j = nlohmann::json{
11444 TOJSON_IMPL(id),
11445 TOJSON_IMPL(hasPrivateKey),
11446 TOJSON_IMPL(tags)
11447 };
11448
11449 if(!p.certificatePem.empty())
11450 {
11451 j["certificatePem"] = p.certificatePem;
11452 }
11453 }
11454 static void from_json(const nlohmann::json& j, CertStoreCertificateElement& p)
11455 {
11456 p.clear();
11457 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11458 getOptional<bool>("hasPrivateKey", p.hasPrivateKey, j, false);
11459 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
11460 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
11461 }
11462
11463 //-----------------------------------------------------------
11464 JSON_SERIALIZED_CLASS(CertStoreDescriptor)
11472 {
11473 IMPLEMENT_JSON_SERIALIZATION()
11474 IMPLEMENT_JSON_DOCUMENTATION(CertStoreDescriptor)
11475
11476 public:
11478 std::string id;
11479
11481 std::string fileName;
11482
11485
11488
11490 std::vector<CertStoreCertificateElement> certificates;
11491
11493 std::vector<KvPair> kvp;
11494
11496 {
11497 clear();
11498 }
11499
11500 void clear()
11501 {
11502 id.clear();
11503 fileName.clear();
11504 version = 0;
11505 flags = 0;
11506 certificates.clear();
11507 kvp.clear();
11508 }
11509 };
11510
11511 static void to_json(nlohmann::json& j, const CertStoreDescriptor& p)
11512 {
11513 j = nlohmann::json{
11514 TOJSON_IMPL(id),
11515 TOJSON_IMPL(fileName),
11516 TOJSON_IMPL(version),
11517 TOJSON_IMPL(flags),
11518 TOJSON_IMPL(certificates),
11519 TOJSON_IMPL(kvp)
11520 };
11521 }
11522 static void from_json(const nlohmann::json& j, CertStoreDescriptor& p)
11523 {
11524 p.clear();
11525 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11526 getOptional<std::string>("fileName", p.fileName, j, EMPTY_STRING);
11527 getOptional<int>("version", p.version, j, 0);
11528 getOptional<int>("flags", p.flags, j, 0);
11529 getOptional<std::vector<CertStoreCertificateElement>>("certificates", p.certificates, j);
11530 getOptional<std::vector<KvPair>>("kvp", p.kvp, j);
11531 }
11532
11533 //-----------------------------------------------------------
11534 JSON_SERIALIZED_CLASS(CertificateSubjectElement)
11542 {
11543 IMPLEMENT_JSON_SERIALIZATION()
11544 IMPLEMENT_JSON_DOCUMENTATION(CertificateSubjectElement)
11545
11546 public:
11548 std::string name;
11549
11551 std::string value;
11552
11554 {
11555 clear();
11556 }
11557
11558 void clear()
11559 {
11560 name.clear();
11561 value.clear();
11562 }
11563 };
11564
11565 static void to_json(nlohmann::json& j, const CertificateSubjectElement& p)
11566 {
11567 j = nlohmann::json{
11568 TOJSON_IMPL(name),
11569 TOJSON_IMPL(value)
11570 };
11571 }
11572 static void from_json(const nlohmann::json& j, CertificateSubjectElement& p)
11573 {
11574 p.clear();
11575 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
11576 getOptional<std::string>("value", p.value, j, EMPTY_STRING);
11577 }
11578
11579
11580 //-----------------------------------------------------------
11581 JSON_SERIALIZED_CLASS(CertificateDescriptor)
11589 {
11590 IMPLEMENT_JSON_SERIALIZATION()
11591 IMPLEMENT_JSON_DOCUMENTATION(CertificateDescriptor)
11592
11593 public:
11595 std::string subject;
11596
11598 std::string issuer;
11599
11602
11605
11607 std::string notBefore;
11608
11610 std::string notAfter;
11611
11613 std::string serial;
11614
11616 std::string fingerprint;
11617
11619 std::vector<CertificateSubjectElement> subjectElements;
11620
11622 std::vector<CertificateSubjectElement> issuerElements;
11623
11625 std::string certificatePem;
11626
11628 std::string publicKeyPem;
11629
11631 {
11632 clear();
11633 }
11634
11635 void clear()
11636 {
11637 subject.clear();
11638 issuer.clear();
11639 selfSigned = false;
11640 version = 0;
11641 notBefore.clear();
11642 notAfter.clear();
11643 serial.clear();
11644 fingerprint.clear();
11645 subjectElements.clear();
11646 issuerElements.clear();
11647 certificatePem.clear();
11648 publicKeyPem.clear();
11649 }
11650 };
11651
11652 static void to_json(nlohmann::json& j, const CertificateDescriptor& p)
11653 {
11654 j = nlohmann::json{
11655 TOJSON_IMPL(subject),
11656 TOJSON_IMPL(issuer),
11657 TOJSON_IMPL(selfSigned),
11658 TOJSON_IMPL(version),
11659 TOJSON_IMPL(notBefore),
11660 TOJSON_IMPL(notAfter),
11661 TOJSON_IMPL(serial),
11662 TOJSON_IMPL(fingerprint),
11663 TOJSON_IMPL(subjectElements),
11664 TOJSON_IMPL(issuerElements),
11665 TOJSON_IMPL(certificatePem),
11666 TOJSON_IMPL(publicKeyPem)
11667 };
11668 }
11669 static void from_json(const nlohmann::json& j, CertificateDescriptor& p)
11670 {
11671 p.clear();
11672 getOptional<std::string>("subject", p.subject, j, EMPTY_STRING);
11673 getOptional<std::string>("issuer", p.issuer, j, EMPTY_STRING);
11674 getOptional<bool>("selfSigned", p.selfSigned, j, false);
11675 getOptional<int>("version", p.version, j, 0);
11676 getOptional<std::string>("notBefore", p.notBefore, j, EMPTY_STRING);
11677 getOptional<std::string>("notAfter", p.notAfter, j, EMPTY_STRING);
11678 getOptional<std::string>("serial", p.serial, j, EMPTY_STRING);
11679 getOptional<std::string>("fingerprint", p.fingerprint, j, EMPTY_STRING);
11680 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
11681 getOptional<std::string>("publicKeyPem", p.publicKeyPem, j, EMPTY_STRING);
11682 getOptional<std::vector<CertificateSubjectElement>>("subjectElements", p.subjectElements, j);
11683 getOptional<std::vector<CertificateSubjectElement>>("issuerElements", p.issuerElements, j);
11684 }
11685
11686
11687 //-----------------------------------------------------------
11688 JSON_SERIALIZED_CLASS(RiffDescriptor)
11699 {
11700 IMPLEMENT_JSON_SERIALIZATION()
11701 IMPLEMENT_JSON_DOCUMENTATION(RiffDescriptor)
11702
11703 public:
11705 std::string file;
11706
11709
11712
11715
11717 std::string meta;
11718
11720 std::string certPem;
11721
11724
11726 std::string signature;
11727
11729 {
11730 clear();
11731 }
11732
11733 void clear()
11734 {
11735 file.clear();
11736 verified = false;
11737 channels = 0;
11738 sampleCount = 0;
11739 meta.clear();
11740 certPem.clear();
11741 certDescriptor.clear();
11742 signature.clear();
11743 }
11744 };
11745
11746 static void to_json(nlohmann::json& j, const RiffDescriptor& p)
11747 {
11748 j = nlohmann::json{
11749 TOJSON_IMPL(file),
11750 TOJSON_IMPL(verified),
11751 TOJSON_IMPL(channels),
11752 TOJSON_IMPL(sampleCount),
11753 TOJSON_IMPL(meta),
11754 TOJSON_IMPL(certPem),
11755 TOJSON_IMPL(certDescriptor),
11756 TOJSON_IMPL(signature)
11757 };
11758 }
11759
11760 static void from_json(const nlohmann::json& j, RiffDescriptor& p)
11761 {
11762 p.clear();
11763 FROMJSON_IMPL(file, std::string, EMPTY_STRING);
11764 FROMJSON_IMPL(verified, bool, false);
11765 FROMJSON_IMPL(channels, int, 0);
11766 FROMJSON_IMPL(sampleCount, int, 0);
11767 FROMJSON_IMPL(meta, std::string, EMPTY_STRING);
11768 FROMJSON_IMPL(certPem, std::string, EMPTY_STRING);
11769 getOptional<CertificateDescriptor>("certDescriptor", p.certDescriptor, j);
11770 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
11771 }
11772
11773
11774 //-----------------------------------------------------------
11775 JSON_SERIALIZED_CLASS(BridgeCreationDetail)
11783 {
11784 IMPLEMENT_JSON_SERIALIZATION()
11785 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(BridgeCreationDetail)
11786 IMPLEMENT_JSON_DOCUMENTATION(BridgeCreationDetail)
11787
11788 public:
11790 typedef enum
11791 {
11793 csUndefined = 0,
11794
11796 csOk = 1,
11797
11799 csNoJson = -1,
11800
11802 csAlreadyExists = -3,
11803
11805 csInvalidConfiguration = -4,
11806
11808 csInvalidJson = -5,
11809
11811 csInsufficientGroups = -6,
11812
11814 csTooManyGroups = -7,
11815
11817 csDuplicateGroup = -8,
11818
11820 csLocalLoopDetected = -9,
11821 } CreationStatus_t;
11822
11824 std::string id;
11825
11828
11830 {
11831 clear();
11832 }
11833
11834 void clear()
11835 {
11836 id.clear();
11837 status = csUndefined;
11838 }
11839 };
11840
11841 static void to_json(nlohmann::json& j, const BridgeCreationDetail& p)
11842 {
11843 j = nlohmann::json{
11844 TOJSON_IMPL(id),
11845 TOJSON_IMPL(status)
11846 };
11847 }
11848 static void from_json(const nlohmann::json& j, BridgeCreationDetail& p)
11849 {
11850 p.clear();
11851 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11852 getOptional<BridgeCreationDetail::CreationStatus_t>("status", p.status, j, BridgeCreationDetail::CreationStatus_t::csUndefined);
11853 }
11854 //-----------------------------------------------------------
11855 JSON_SERIALIZED_CLASS(GroupConnectionDetail)
11863 {
11864 IMPLEMENT_JSON_SERIALIZATION()
11865 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupConnectionDetail)
11866 IMPLEMENT_JSON_DOCUMENTATION(GroupConnectionDetail)
11867
11868 public:
11870 typedef enum
11871 {
11873 ctUndefined = 0,
11874
11876 ctDirectDatagram = 1,
11877
11879 ctRallypoint = 2
11880 } ConnectionType_t;
11881
11883 std::string id;
11884
11887
11889 std::string peer;
11890
11893
11895 std::string reason;
11896
11898 {
11899 clear();
11900 }
11901
11902 void clear()
11903 {
11904 id.clear();
11905 connectionType = ctUndefined;
11906 peer.clear();
11907 asFailover = false;
11908 reason.clear();
11909 }
11910 };
11911
11912 static void to_json(nlohmann::json& j, const GroupConnectionDetail& p)
11913 {
11914 j = nlohmann::json{
11915 TOJSON_IMPL(id),
11916 TOJSON_IMPL(connectionType),
11917 TOJSON_IMPL(peer),
11918 TOJSON_IMPL(asFailover),
11919 TOJSON_IMPL(reason)
11920 };
11921
11922 if(p.asFailover)
11923 {
11924 j["asFailover"] = p.asFailover;
11925 }
11926 }
11927 static void from_json(const nlohmann::json& j, GroupConnectionDetail& p)
11928 {
11929 p.clear();
11930 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11931 getOptional<GroupConnectionDetail::ConnectionType_t>("connectionType", p.connectionType, j, GroupConnectionDetail::ConnectionType_t::ctUndefined);
11932 getOptional<std::string>("peer", p.peer, j, EMPTY_STRING);
11933 getOptional<bool>("asFailover", p.asFailover, j, false);
11934 getOptional<std::string>("reason", p.reason, j, EMPTY_STRING);
11935 }
11936
11937 //-----------------------------------------------------------
11938 JSON_SERIALIZED_CLASS(GroupTxDetail)
11946 {
11947 IMPLEMENT_JSON_SERIALIZATION()
11948 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupTxDetail)
11949 IMPLEMENT_JSON_DOCUMENTATION(GroupTxDetail)
11950
11951 public:
11953 typedef enum
11954 {
11956 txsUndefined = 0,
11957
11959 txsTxStarted = 1,
11960
11962 txsTxEnded = 2,
11963
11965 txsNotAnAudioGroup = -1,
11966
11968 txsNotJoined = -2,
11969
11971 txsNotConnected = -3,
11972
11974 txsAlreadyTransmitting = -4,
11975
11977 txsInvalidParams = -5,
11978
11980 txsPriorityTooLow = -6,
11981
11983 txsRxActiveOnNonFdx = -7,
11984
11986 txsCannotSubscribeToInput = -8,
11987
11989 txsInvalidId = -9,
11990
11992 txsTxEndedWithFailure = -10,
11993
11995 txsBridgedButNotMultistream = -11,
11996
11998 txsAutoEndedDueToNonMultistreamBridge = -12,
11999
12001 txsReBeginWithoutPriorBegin = -13
12002 } TxStatus_t;
12003
12005 std::string id;
12006
12009
12012
12015
12018
12020 uint32_t txId;
12021
12023 {
12024 clear();
12025 }
12026
12027 void clear()
12028 {
12029 id.clear();
12030 status = txsUndefined;
12031 localPriority = 0;
12032 remotePriority = 0;
12033 nonFdxMsHangRemaining = 0;
12034 txId = 0;
12035 }
12036 };
12037
12038 static void to_json(nlohmann::json& j, const GroupTxDetail& p)
12039 {
12040 j = nlohmann::json{
12041 TOJSON_IMPL(id),
12042 TOJSON_IMPL(status),
12043 TOJSON_IMPL(localPriority),
12044 TOJSON_IMPL(txId)
12045 };
12046
12047 // Include remote priority if status is related to that
12048 if(p.status == GroupTxDetail::TxStatus_t::txsPriorityTooLow)
12049 {
12050 j["remotePriority"] = p.remotePriority;
12051 }
12052 else if(p.status == GroupTxDetail::TxStatus_t::txsRxActiveOnNonFdx)
12053 {
12054 j["nonFdxMsHangRemaining"] = p.nonFdxMsHangRemaining;
12055 }
12056 }
12057 static void from_json(const nlohmann::json& j, GroupTxDetail& p)
12058 {
12059 p.clear();
12060 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
12061 getOptional<GroupTxDetail::TxStatus_t>("status", p.status, j, GroupTxDetail::TxStatus_t::txsUndefined);
12062 getOptional<int>("localPriority", p.localPriority, j, 0);
12063 getOptional<int>("remotePriority", p.remotePriority, j, 0);
12064 getOptional<long>("nonFdxMsHangRemaining", p.nonFdxMsHangRemaining, j, 0);
12065 getOptional<uint32_t>("txId", p.txId, j, 0);
12066 }
12067
12068 //-----------------------------------------------------------
12069 JSON_SERIALIZED_CLASS(GroupCreationDetail)
12077 {
12078 IMPLEMENT_JSON_SERIALIZATION()
12079 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupCreationDetail)
12080 IMPLEMENT_JSON_DOCUMENTATION(GroupCreationDetail)
12081
12082 public:
12084 typedef enum
12085 {
12087 csUndefined = 0,
12088
12090 csOk = 1,
12091
12093 csNoJson = -1,
12094
12096 csConflictingRpListAndCluster = -2,
12097
12099 csAlreadyExists = -3,
12100
12102 csInvalidConfiguration = -4,
12103
12105 csInvalidJson = -5,
12106
12108 csCryptoFailure = -6,
12109
12111 csAudioInputFailure = -7,
12112
12114 csAudioOutputFailure = -8,
12115
12117 csUnsupportedAudioEncoder = -9,
12118
12120 csNoLicense = -10,
12121
12123 csInvalidTransport = -11,
12124
12126 csAudioInputDeviceNotFound = -12,
12127
12129 csAudioOutputDeviceNotFound = -13
12130 } CreationStatus_t;
12131
12133 std::string id;
12134
12137
12139 {
12140 clear();
12141 }
12142
12143 void clear()
12144 {
12145 id.clear();
12146 status = csUndefined;
12147 }
12148 };
12149
12150 static void to_json(nlohmann::json& j, const GroupCreationDetail& p)
12151 {
12152 j = nlohmann::json{
12153 TOJSON_IMPL(id),
12154 TOJSON_IMPL(status)
12155 };
12156 }
12157 static void from_json(const nlohmann::json& j, GroupCreationDetail& p)
12158 {
12159 p.clear();
12160 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
12161 getOptional<GroupCreationDetail::CreationStatus_t>("status", p.status, j, GroupCreationDetail::CreationStatus_t::csUndefined);
12162 }
12163
12164
12165 //-----------------------------------------------------------
12166 JSON_SERIALIZED_CLASS(GroupReconfigurationDetail)
12174 {
12175 IMPLEMENT_JSON_SERIALIZATION()
12176 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupReconfigurationDetail)
12177 IMPLEMENT_JSON_DOCUMENTATION(GroupReconfigurationDetail)
12178
12179 public:
12181 typedef enum
12182 {
12184 rsUndefined = 0,
12185
12187 rsOk = 1,
12188
12190 rsNoJson = -1,
12191
12193 rsInvalidConfiguration = -2,
12194
12196 rsInvalidJson = -3,
12197
12199 rsAudioInputFailure = -4,
12200
12202 rsAudioOutputFailure = -5,
12203
12205 rsDoesNotExist = -6,
12206
12208 rsAudioInputInUse = -7,
12209
12211 rsAudioDisabledForGroup = -8,
12212
12214 rsGroupIsNotAudio = -9
12215 } ReconfigurationStatus_t;
12216
12218 std::string id;
12219
12222
12224 {
12225 clear();
12226 }
12227
12228 void clear()
12229 {
12230 id.clear();
12231 status = rsUndefined;
12232 }
12233 };
12234
12235 static void to_json(nlohmann::json& j, const GroupReconfigurationDetail& p)
12236 {
12237 j = nlohmann::json{
12238 TOJSON_IMPL(id),
12239 TOJSON_IMPL(status)
12240 };
12241 }
12242 static void from_json(const nlohmann::json& j, GroupReconfigurationDetail& p)
12243 {
12244 p.clear();
12245 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
12246 getOptional<GroupReconfigurationDetail::ReconfigurationStatus_t>("status", p.status, j, GroupReconfigurationDetail::ReconfigurationStatus_t::rsUndefined);
12247 }
12248
12249
12250 //-----------------------------------------------------------
12251 JSON_SERIALIZED_CLASS(GroupHealthReport)
12259 {
12260 IMPLEMENT_JSON_SERIALIZATION()
12261 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupHealthReport)
12262 IMPLEMENT_JSON_DOCUMENTATION(GroupHealthReport)
12263
12264 public:
12265 std::string id;
12266 uint64_t lastErrorTs;
12267 uint64_t decryptionErrors;
12268 uint64_t encryptionErrors;
12269 uint64_t unsupportDecoderErrors;
12270 uint64_t decoderFailures;
12271 uint64_t decoderStartFailures;
12272 uint64_t inboundRtpPacketAllocationFailures;
12273 uint64_t inboundRtpPacketLoadFailures;
12274 uint64_t latePacketsDiscarded;
12275 uint64_t jitterBufferInsertionFailures;
12276 uint64_t presenceDeserializationFailures;
12277 uint64_t notRtpErrors;
12278 uint64_t generalErrors;
12279 uint64_t inboundRtpProcessorAllocationFailures;
12280
12282 {
12283 clear();
12284 }
12285
12286 void clear()
12287 {
12288 id.clear();
12289 lastErrorTs = 0;
12290 decryptionErrors = 0;
12291 encryptionErrors = 0;
12292 unsupportDecoderErrors = 0;
12293 decoderFailures = 0;
12294 decoderStartFailures = 0;
12295 inboundRtpPacketAllocationFailures = 0;
12296 inboundRtpPacketLoadFailures = 0;
12297 latePacketsDiscarded = 0;
12298 jitterBufferInsertionFailures = 0;
12299 presenceDeserializationFailures = 0;
12300 notRtpErrors = 0;
12301 generalErrors = 0;
12302 inboundRtpProcessorAllocationFailures = 0;
12303 }
12304 };
12305
12306 static void to_json(nlohmann::json& j, const GroupHealthReport& p)
12307 {
12308 j = nlohmann::json{
12309 TOJSON_IMPL(id),
12310 TOJSON_IMPL(lastErrorTs),
12311 TOJSON_IMPL(decryptionErrors),
12312 TOJSON_IMPL(encryptionErrors),
12313 TOJSON_IMPL(unsupportDecoderErrors),
12314 TOJSON_IMPL(decoderFailures),
12315 TOJSON_IMPL(decoderStartFailures),
12316 TOJSON_IMPL(inboundRtpPacketAllocationFailures),
12317 TOJSON_IMPL(inboundRtpPacketLoadFailures),
12318 TOJSON_IMPL(latePacketsDiscarded),
12319 TOJSON_IMPL(jitterBufferInsertionFailures),
12320 TOJSON_IMPL(presenceDeserializationFailures),
12321 TOJSON_IMPL(notRtpErrors),
12322 TOJSON_IMPL(generalErrors),
12323 TOJSON_IMPL(inboundRtpProcessorAllocationFailures)
12324 };
12325 }
12326 static void from_json(const nlohmann::json& j, GroupHealthReport& p)
12327 {
12328 p.clear();
12329 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
12330 getOptional<uint64_t>("lastErrorTs", p.lastErrorTs, j, 0);
12331 getOptional<uint64_t>("decryptionErrors", p.decryptionErrors, j, 0);
12332 getOptional<uint64_t>("encryptionErrors", p.encryptionErrors, j, 0);
12333 getOptional<uint64_t>("unsupportDecoderErrors", p.unsupportDecoderErrors, j, 0);
12334 getOptional<uint64_t>("decoderFailures", p.decoderFailures, j, 0);
12335 getOptional<uint64_t>("decoderStartFailures", p.decoderStartFailures, j, 0);
12336 getOptional<uint64_t>("inboundRtpPacketAllocationFailures", p.inboundRtpPacketAllocationFailures, j, 0);
12337 getOptional<uint64_t>("inboundRtpPacketLoadFailures", p.inboundRtpPacketLoadFailures, j, 0);
12338 getOptional<uint64_t>("latePacketsDiscarded", p.latePacketsDiscarded, j, 0);
12339 getOptional<uint64_t>("jitterBufferInsertionFailures", p.jitterBufferInsertionFailures, j, 0);
12340 getOptional<uint64_t>("presenceDeserializationFailures", p.presenceDeserializationFailures, j, 0);
12341 getOptional<uint64_t>("notRtpErrors", p.notRtpErrors, j, 0);
12342 getOptional<uint64_t>("generalErrors", p.generalErrors, j, 0);
12343 getOptional<uint64_t>("inboundRtpProcessorAllocationFailures", p.inboundRtpProcessorAllocationFailures, j, 0);
12344 }
12345
12346 //-----------------------------------------------------------
12347 JSON_SERIALIZED_CLASS(InboundProcessorStats)
12355 {
12356 IMPLEMENT_JSON_SERIALIZATION()
12357 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(InboundProcessorStats)
12358 IMPLEMENT_JSON_DOCUMENTATION(InboundProcessorStats)
12359
12360 public:
12361 uint32_t ssrc;
12362 double jitter;
12363 uint64_t minRtpSamplesInQueue;
12364 uint64_t maxRtpSamplesInQueue;
12365 uint64_t totalSamplesTrimmed;
12366 uint64_t underruns;
12367 uint64_t overruns;
12368 uint64_t samplesInQueue;
12369 uint64_t totalPacketsReceived;
12370 uint64_t totalPacketsLost;
12371 uint64_t totalPacketsDiscarded;
12372
12374 {
12375 clear();
12376 }
12377
12378 void clear()
12379 {
12380 ssrc = 0;
12381 jitter = 0.0;
12382 minRtpSamplesInQueue = 0;
12383 maxRtpSamplesInQueue = 0;
12384 totalSamplesTrimmed = 0;
12385 underruns = 0;
12386 overruns = 0;
12387 samplesInQueue = 0;
12388 totalPacketsReceived = 0;
12389 totalPacketsLost = 0;
12390 totalPacketsDiscarded = 0;
12391 }
12392 };
12393
12394 static void to_json(nlohmann::json& j, const InboundProcessorStats& p)
12395 {
12396 j = nlohmann::json{
12397 TOJSON_IMPL(ssrc),
12398 TOJSON_IMPL(jitter),
12399 TOJSON_IMPL(minRtpSamplesInQueue),
12400 TOJSON_IMPL(maxRtpSamplesInQueue),
12401 TOJSON_IMPL(totalSamplesTrimmed),
12402 TOJSON_IMPL(underruns),
12403 TOJSON_IMPL(overruns),
12404 TOJSON_IMPL(samplesInQueue),
12405 TOJSON_IMPL(totalPacketsReceived),
12406 TOJSON_IMPL(totalPacketsLost),
12407 TOJSON_IMPL(totalPacketsDiscarded)
12408 };
12409 }
12410 static void from_json(const nlohmann::json& j, InboundProcessorStats& p)
12411 {
12412 p.clear();
12413 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
12414 getOptional<double>("jitter", p.jitter, j, 0.0);
12415 getOptional<uint64_t>("minRtpSamplesInQueue", p.minRtpSamplesInQueue, j, 0);
12416 getOptional<uint64_t>("maxRtpSamplesInQueue", p.maxRtpSamplesInQueue, j, 0);
12417 getOptional<uint64_t>("totalSamplesTrimmed", p.totalSamplesTrimmed, j, 0);
12418 getOptional<uint64_t>("underruns", p.underruns, j, 0);
12419 getOptional<uint64_t>("overruns", p.overruns, j, 0);
12420 getOptional<uint64_t>("samplesInQueue", p.samplesInQueue, j, 0);
12421 getOptional<uint64_t>("totalPacketsReceived", p.totalPacketsReceived, j, 0);
12422 getOptional<uint64_t>("totalPacketsLost", p.totalPacketsLost, j, 0);
12423 getOptional<uint64_t>("totalPacketsDiscarded", p.totalPacketsDiscarded, j, 0);
12424 }
12425
12426 //-----------------------------------------------------------
12427 JSON_SERIALIZED_CLASS(TrafficCounter)
12435 {
12436 IMPLEMENT_JSON_SERIALIZATION()
12437 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(TrafficCounter)
12438 IMPLEMENT_JSON_DOCUMENTATION(TrafficCounter)
12439
12440 public:
12441 uint64_t packets;
12442 uint64_t bytes;
12443 uint64_t errors;
12444
12446 {
12447 clear();
12448 }
12449
12450 void clear()
12451 {
12452 packets = 0;
12453 bytes = 0;
12454 errors = 0;
12455 }
12456 };
12457
12458 static void to_json(nlohmann::json& j, const TrafficCounter& p)
12459 {
12460 j = nlohmann::json{
12461 TOJSON_IMPL(packets),
12462 TOJSON_IMPL(bytes),
12463 TOJSON_IMPL(errors)
12464 };
12465 }
12466 static void from_json(const nlohmann::json& j, TrafficCounter& p)
12467 {
12468 p.clear();
12469 getOptional<uint64_t>("packets", p.packets, j, 0);
12470 getOptional<uint64_t>("bytes", p.bytes, j, 0);
12471 getOptional<uint64_t>("errors", p.errors, j, 0);
12472 }
12473
12474 //-----------------------------------------------------------
12475 JSON_SERIALIZED_CLASS(GroupStats)
12483 {
12484 IMPLEMENT_JSON_SERIALIZATION()
12485 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupStats)
12486 IMPLEMENT_JSON_DOCUMENTATION(GroupStats)
12487
12488 public:
12489 std::string id;
12490 //std::vector<InboundProcessorStats> rtpInbounds;
12491 TrafficCounter rxTraffic;
12492 TrafficCounter txTraffic;
12493
12494 GroupStats()
12495 {
12496 clear();
12497 }
12498
12499 void clear()
12500 {
12501 id.clear();
12502 //rtpInbounds.clear();
12503 rxTraffic.clear();
12504 txTraffic.clear();
12505 }
12506 };
12507
12508 static void to_json(nlohmann::json& j, const GroupStats& p)
12509 {
12510 j = nlohmann::json{
12511 TOJSON_IMPL(id),
12512 //TOJSON_IMPL(rtpInbounds),
12513 TOJSON_IMPL(rxTraffic),
12514 TOJSON_IMPL(txTraffic)
12515 };
12516 }
12517 static void from_json(const nlohmann::json& j, GroupStats& p)
12518 {
12519 p.clear();
12520 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
12521 //getOptional<std::vector<InboundProcessorStats>>("rtpInbounds", p.rtpInbounds, j);
12522 getOptional<TrafficCounter>("rxTraffic", p.rxTraffic, j);
12523 getOptional<TrafficCounter>("txTraffic", p.txTraffic, j);
12524 }
12525
12526 //-----------------------------------------------------------
12527 JSON_SERIALIZED_CLASS(RallypointConnectionDetail)
12535 {
12536 IMPLEMENT_JSON_SERIALIZATION()
12537 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(RallypointConnectionDetail)
12538 IMPLEMENT_JSON_DOCUMENTATION(RallypointConnectionDetail)
12539
12540 public:
12542 std::string internalId;
12543
12545 std::string host;
12546
12548 int port;
12549
12552
12555
12557 {
12558 clear();
12559 }
12560
12561 void clear()
12562 {
12563 internalId.clear();
12564 host.clear();
12565 port = 0;
12566 msToNextConnectionAttempt = 0;
12567 serverProcessingMs = -1.0f;
12568 }
12569 };
12570
12571 static void to_json(nlohmann::json& j, const RallypointConnectionDetail& p)
12572 {
12573 j = nlohmann::json{
12574 TOJSON_IMPL(internalId),
12575 TOJSON_IMPL(host),
12576 TOJSON_IMPL(port)
12577 };
12578
12579 if(p.msToNextConnectionAttempt > 0)
12580 {
12581 j["msToNextConnectionAttempt"] = p.msToNextConnectionAttempt;
12582 }
12583
12584 if(p.serverProcessingMs >= 0.0)
12585 {
12586 j["serverProcessingMs"] = p.serverProcessingMs;
12587 }
12588 }
12589 static void from_json(const nlohmann::json& j, RallypointConnectionDetail& p)
12590 {
12591 p.clear();
12592 getOptional<std::string>("internalId", p.internalId, j, EMPTY_STRING);
12593 getOptional<std::string>("host", p.host, j, EMPTY_STRING);
12594 getOptional<int>("port", p.port, j, 0);
12595 getOptional<uint64_t>("msToNextConnectionAttempt", p.msToNextConnectionAttempt, j, 0);
12596 getOptional<float>("serverProcessingMs", p.serverProcessingMs, j, -1.0);
12597 }
12598
12599 //-----------------------------------------------------------
12600 JSON_SERIALIZED_CLASS(TranslationSession)
12611 {
12612 IMPLEMENT_JSON_SERIALIZATION()
12613 IMPLEMENT_JSON_DOCUMENTATION(TranslationSession)
12614
12615 public:
12617 std::string id;
12618
12620 std::string name;
12621
12623 std::vector<std::string> groups;
12624
12627
12629 {
12630 clear();
12631 }
12632
12633 void clear()
12634 {
12635 id.clear();
12636 name.clear();
12637 groups.clear();
12638 enabled = true;
12639 }
12640 };
12641
12642 static void to_json(nlohmann::json& j, const TranslationSession& p)
12643 {
12644 j = nlohmann::json{
12645 TOJSON_IMPL(id),
12646 TOJSON_IMPL(name),
12647 TOJSON_IMPL(groups),
12648 TOJSON_IMPL(enabled)
12649 };
12650 }
12651 static void from_json(const nlohmann::json& j, TranslationSession& p)
12652 {
12653 p.clear();
12654 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
12655 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
12656 getOptional<std::vector<std::string>>("groups", p.groups, j);
12657 FROMJSON_IMPL(enabled, bool, true);
12658 }
12659
12660 //-----------------------------------------------------------
12661 JSON_SERIALIZED_CLASS(TranslationConfiguration)
12672 {
12673 IMPLEMENT_JSON_SERIALIZATION()
12674 IMPLEMENT_JSON_DOCUMENTATION(TranslationConfiguration)
12675
12676 public:
12678 std::vector<TranslationSession> sessions;
12679
12681 std::vector<Group> groups;
12682
12684 {
12685 clear();
12686 }
12687
12688 void clear()
12689 {
12690 sessions.clear();
12691 groups.clear();
12692 }
12693 };
12694
12695 static void to_json(nlohmann::json& j, const TranslationConfiguration& p)
12696 {
12697 j = nlohmann::json{
12698 TOJSON_IMPL(sessions),
12699 TOJSON_IMPL(groups)
12700 };
12701 }
12702 static void from_json(const nlohmann::json& j, TranslationConfiguration& p)
12703 {
12704 p.clear();
12705 getOptional<std::vector<TranslationSession>>("sessions", p.sessions, j);
12706 getOptional<std::vector<Group>>("groups", p.groups, j);
12707 }
12708
12709 //-----------------------------------------------------------
12710 JSON_SERIALIZED_CLASS(LingoServerStatusReportConfiguration)
12721 {
12722 IMPLEMENT_JSON_SERIALIZATION()
12723 IMPLEMENT_JSON_DOCUMENTATION(LingoServerStatusReportConfiguration)
12724
12725 public:
12727 std::string fileName;
12728
12731
12734
12736 std::string runCmd;
12737
12740
12743
12746
12748 {
12749 clear();
12750 }
12751
12752 void clear()
12753 {
12754 fileName.clear();
12755 intervalSecs = 60;
12756 enabled = false;
12757 includeGroupDetail = false;
12758 includeSessionDetail = false;
12759 includeSessionGroupDetail = false;
12760 runCmd.clear();
12761 }
12762 };
12763
12764 static void to_json(nlohmann::json& j, const LingoServerStatusReportConfiguration& p)
12765 {
12766 j = nlohmann::json{
12767 TOJSON_IMPL(fileName),
12768 TOJSON_IMPL(intervalSecs),
12769 TOJSON_IMPL(enabled),
12770 TOJSON_IMPL(includeGroupDetail),
12771 TOJSON_IMPL(includeSessionDetail),
12772 TOJSON_IMPL(includeSessionGroupDetail),
12773 TOJSON_IMPL(runCmd)
12774 };
12775 }
12776 static void from_json(const nlohmann::json& j, LingoServerStatusReportConfiguration& p)
12777 {
12778 p.clear();
12779 getOptional<std::string>("fileName", p.fileName, j);
12780 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
12781 getOptional<bool>("enabled", p.enabled, j, false);
12782 getOptional<std::string>("runCmd", p.runCmd, j);
12783 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
12784 getOptional<bool>("includeSessionDetail", p.includeSessionDetail, j, false);
12785 getOptional<bool>("includeSessionGroupDetail", p.includeSessionGroupDetail, j, false);
12786 }
12787
12788 //-----------------------------------------------------------
12789 JSON_SERIALIZED_CLASS(LingoServerInternals)
12802 {
12803 IMPLEMENT_JSON_SERIALIZATION()
12804 IMPLEMENT_JSON_DOCUMENTATION(LingoServerInternals)
12805
12806 public:
12809
12812
12815
12817 {
12818 clear();
12819 }
12820
12821 void clear()
12822 {
12823 watchdog.clear();
12824 tuning.clear();
12825 housekeeperIntervalMs = 1000;
12826 }
12827 };
12828
12829 static void to_json(nlohmann::json& j, const LingoServerInternals& p)
12830 {
12831 j = nlohmann::json{
12832 TOJSON_IMPL(watchdog),
12833 TOJSON_IMPL(housekeeperIntervalMs),
12834 TOJSON_IMPL(tuning)
12835 };
12836 }
12837 static void from_json(const nlohmann::json& j, LingoServerInternals& p)
12838 {
12839 p.clear();
12840 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
12841 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
12842 getOptional<TuningSettings>("tuning", p.tuning, j);
12843 }
12844
12845 //-----------------------------------------------------------
12846 JSON_SERIALIZED_CLASS(LingoServerConfiguration)
12856 {
12857 IMPLEMENT_JSON_SERIALIZATION()
12858 IMPLEMENT_JSON_DOCUMENTATION(LingoServerConfiguration)
12859
12860 public:
12862 std::string id;
12863
12866
12869
12872
12875
12878
12881
12884
12887
12890
12893
12896
12899
12902
12905
12907 {
12908 clear();
12909 }
12910
12911 void clear()
12912 {
12913 id.clear();
12914 serviceConfigurationFileCheckSecs = 60;
12915 lingoConfigurationFileName.clear();
12916 lingoConfigurationFileCommand.clear();
12917 lingoConfigurationFileCheckSecs = 60;
12918 statusReport.clear();
12919 externalHealthCheckResponder.clear();
12920 internals.clear();
12921 certStoreFileName.clear();
12922 certStorePasswordHex.clear();
12923 enginePolicy.clear();
12924 configurationCheckSignalName = "rts.22f4ec3.${id}";
12925 fipsCrypto.clear();
12926 proxy.clear();
12927 nsm.clear();
12928 }
12929 };
12930
12931 static void to_json(nlohmann::json& j, const LingoServerConfiguration& p)
12932 {
12933 j = nlohmann::json{
12934 TOJSON_IMPL(id),
12935 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
12936 TOJSON_IMPL(lingoConfigurationFileName),
12937 TOJSON_IMPL(lingoConfigurationFileCommand),
12938 TOJSON_IMPL(lingoConfigurationFileCheckSecs),
12939 TOJSON_IMPL(statusReport),
12940 TOJSON_IMPL(externalHealthCheckResponder),
12941 TOJSON_IMPL(internals),
12942 TOJSON_IMPL(certStoreFileName),
12943 TOJSON_IMPL(certStorePasswordHex),
12944 TOJSON_IMPL(enginePolicy),
12945 TOJSON_IMPL(configurationCheckSignalName),
12946 TOJSON_IMPL(fipsCrypto),
12947 TOJSON_IMPL(proxy),
12948 TOJSON_IMPL(nsm)
12949 };
12950 }
12951 static void from_json(const nlohmann::json& j, LingoServerConfiguration& p)
12952 {
12953 p.clear();
12954 getOptional<std::string>("id", p.id, j);
12955 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
12956 getOptional<std::string>("lingoConfigurationFileName", p.lingoConfigurationFileName, j);
12957 getOptional<std::string>("lingoConfigurationFileCommand", p.lingoConfigurationFileCommand, j);
12958 getOptional<int>("lingoConfigurationFileCheckSecs", p.lingoConfigurationFileCheckSecs, j, 60);
12959 getOptional<LingoServerStatusReportConfiguration>("statusReport", p.statusReport, j);
12960 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
12961 getOptional<LingoServerInternals>("internals", p.internals, j);
12962 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
12963 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
12964 j.at("enginePolicy").get_to(p.enginePolicy);
12965 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.22f4ec3.${id}");
12966 getOptional<FipsCryptoSettings>("fipsCrypo", p.fipsCrypto, j);
12967 getOptional<NetworkAddress>("proxy", p.proxy, j);
12968 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
12969 }
12970
12971
12972 //-----------------------------------------------------------
12973 JSON_SERIALIZED_CLASS(VoiceToVoiceSession)
12984 {
12985 IMPLEMENT_JSON_SERIALIZATION()
12986 IMPLEMENT_JSON_DOCUMENTATION(VoiceToVoiceSession)
12987
12988 public:
12990 std::string id;
12991
12993 std::string name;
12994
12996 std::vector<std::string> groups;
12997
13000
13002 {
13003 clear();
13004 }
13005
13006 void clear()
13007 {
13008 id.clear();
13009 name.clear();
13010 groups.clear();
13011 enabled = true;
13012 }
13013 };
13014
13015 static void to_json(nlohmann::json& j, const VoiceToVoiceSession& p)
13016 {
13017 j = nlohmann::json{
13018 TOJSON_IMPL(id),
13019 TOJSON_IMPL(name),
13020 TOJSON_IMPL(groups),
13021 TOJSON_IMPL(enabled)
13022 };
13023 }
13024 static void from_json(const nlohmann::json& j, VoiceToVoiceSession& p)
13025 {
13026 p.clear();
13027 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
13028 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
13029 getOptional<std::vector<std::string>>("groups", p.groups, j);
13030 FROMJSON_IMPL(enabled, bool, true);
13031 }
13032
13033 //-----------------------------------------------------------
13034 JSON_SERIALIZED_CLASS(LingoConfiguration)
13045 {
13046 IMPLEMENT_JSON_SERIALIZATION()
13047 IMPLEMENT_JSON_DOCUMENTATION(LingoConfiguration)
13048
13049 public:
13051 std::vector<VoiceToVoiceSession> voiceToVoiceSessions;
13052
13054 std::vector<Group> groups;
13055
13057 {
13058 clear();
13059 }
13060
13061 void clear()
13062 {
13063 voiceToVoiceSessions.clear();
13064 groups.clear();
13065 }
13066 };
13067
13068 static void to_json(nlohmann::json& j, const LingoConfiguration& p)
13069 {
13070 j = nlohmann::json{
13071 TOJSON_IMPL(voiceToVoiceSessions),
13072 TOJSON_IMPL(groups)
13073 };
13074 }
13075 static void from_json(const nlohmann::json& j, LingoConfiguration& p)
13076 {
13077 p.clear();
13078 getOptional<std::vector<VoiceToVoiceSession>>("voiceToVoiceSessions", p.voiceToVoiceSessions, j);
13079 getOptional<std::vector<Group>>("groups", p.groups, j);
13080 }
13081
13082 //-----------------------------------------------------------
13083 JSON_SERIALIZED_CLASS(BridgingConfiguration)
13094 {
13095 IMPLEMENT_JSON_SERIALIZATION()
13096 IMPLEMENT_JSON_DOCUMENTATION(BridgingConfiguration)
13097
13098 public:
13100 std::vector<Bridge> bridges;
13101
13103 std::vector<Group> groups;
13104
13106 {
13107 clear();
13108 }
13109
13110 void clear()
13111 {
13112 bridges.clear();
13113 groups.clear();
13114 }
13115 };
13116
13117 static void to_json(nlohmann::json& j, const BridgingConfiguration& p)
13118 {
13119 j = nlohmann::json{
13120 TOJSON_IMPL(bridges),
13121 TOJSON_IMPL(groups)
13122 };
13123 }
13124 static void from_json(const nlohmann::json& j, BridgingConfiguration& p)
13125 {
13126 p.clear();
13127 getOptional<std::vector<Bridge>>("bridges", p.bridges, j);
13128 getOptional<std::vector<Group>>("groups", p.groups, j);
13129 }
13130
13131 //-----------------------------------------------------------
13132 JSON_SERIALIZED_CLASS(BridgingServerStatusReportConfiguration)
13143 {
13144 IMPLEMENT_JSON_SERIALIZATION()
13145 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerStatusReportConfiguration)
13146
13147 public:
13149 std::string fileName;
13150
13153
13156
13158 std::string runCmd;
13159
13162
13165
13168
13170 {
13171 clear();
13172 }
13173
13174 void clear()
13175 {
13176 fileName.clear();
13177 intervalSecs = 60;
13178 enabled = false;
13179 includeGroupDetail = false;
13180 includeBridgeDetail = false;
13181 includeBridgeGroupDetail = false;
13182 runCmd.clear();
13183 }
13184 };
13185
13186 static void to_json(nlohmann::json& j, const BridgingServerStatusReportConfiguration& p)
13187 {
13188 j = nlohmann::json{
13189 TOJSON_IMPL(fileName),
13190 TOJSON_IMPL(intervalSecs),
13191 TOJSON_IMPL(enabled),
13192 TOJSON_IMPL(includeGroupDetail),
13193 TOJSON_IMPL(includeBridgeDetail),
13194 TOJSON_IMPL(includeBridgeGroupDetail),
13195 TOJSON_IMPL(runCmd)
13196 };
13197 }
13198 static void from_json(const nlohmann::json& j, BridgingServerStatusReportConfiguration& p)
13199 {
13200 p.clear();
13201 getOptional<std::string>("fileName", p.fileName, j);
13202 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
13203 getOptional<bool>("enabled", p.enabled, j, false);
13204 getOptional<std::string>("runCmd", p.runCmd, j);
13205 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
13206 getOptional<bool>("includeBridgeDetail", p.includeBridgeDetail, j, false);
13207 getOptional<bool>("includeBridgeGroupDetail", p.includeBridgeGroupDetail, j, false);
13208 }
13209
13210 //-----------------------------------------------------------
13211 JSON_SERIALIZED_CLASS(BridgingServerInternals)
13224 {
13225 IMPLEMENT_JSON_SERIALIZATION()
13226 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerInternals)
13227
13228 public:
13231
13234
13239
13242
13245
13247 {
13248 clear();
13249 }
13250
13251 void clear()
13252 {
13253 watchdog.clear();
13254 tuning.clear();
13255 housekeeperIntervalMs = 1000;
13256 nsmUnhealthyBridgeGraceMs = 5000;
13257 nsmResourceReleaseCooldownMs = 30000;
13258 }
13259 };
13260
13261 static void to_json(nlohmann::json& j, const BridgingServerInternals& p)
13262 {
13263 j = nlohmann::json{
13264 TOJSON_IMPL(watchdog),
13265 TOJSON_IMPL(housekeeperIntervalMs),
13266 TOJSON_IMPL(nsmUnhealthyBridgeGraceMs),
13267 TOJSON_IMPL(nsmResourceReleaseCooldownMs),
13268 TOJSON_IMPL(tuning)
13269 };
13270 }
13271 static void from_json(const nlohmann::json& j, BridgingServerInternals& p)
13272 {
13273 p.clear();
13274 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
13275 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
13276 getOptional<int>("nsmUnhealthyBridgeGraceMs", p.nsmUnhealthyBridgeGraceMs, j, 5000);
13277 getOptional<int>("nsmResourceReleaseCooldownMs", p.nsmResourceReleaseCooldownMs, j, 30000);
13278 getOptional<TuningSettings>("tuning", p.tuning, j);
13279 }
13280
13281 //-----------------------------------------------------------
13282 JSON_SERIALIZED_CLASS(BridgingServerConfiguration)
13292 {
13293 IMPLEMENT_JSON_SERIALIZATION()
13294 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerConfiguration)
13295
13296 public:
13303 typedef enum
13304 {
13306 omRaw = 0,
13307
13310 omMultistream = 1,
13311
13314 omMixedStream = 2,
13315
13317 omADictatedByGroup = 3,
13318 } OpMode_t;
13319
13321 std::string id;
13322
13325
13328
13331
13334
13337
13340
13343
13346
13349
13352
13355
13358
13361
13364
13368
13371
13373 {
13374 clear();
13375 }
13376
13377 void clear()
13378 {
13379 id.clear();
13380 mode = omRaw;
13381 serviceConfigurationFileCheckSecs = 60;
13382 bridgingConfigurationFileName.clear();
13383 bridgingConfigurationFileCommand.clear();
13384 bridgingConfigurationFileCheckSecs = 60;
13385 statusReport.clear();
13386 externalHealthCheckResponder.clear();
13387 internals.clear();
13388 certStoreFileName.clear();
13389 certStorePasswordHex.clear();
13390 enginePolicy.clear();
13391 configurationCheckSignalName = "rts.6cc0651.${id}";
13392 fipsCrypto.clear();
13393 statusUpload.clear();
13394 nsm.clear();
13395 rtiCloud.clear();
13396 }
13397 };
13398
13399 static void to_json(nlohmann::json& j, const BridgingServerConfiguration& p)
13400 {
13401 j = nlohmann::json{
13402 TOJSON_IMPL(id),
13403 TOJSON_IMPL(mode),
13404 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
13405 TOJSON_IMPL(bridgingConfigurationFileName),
13406 TOJSON_IMPL(bridgingConfigurationFileCommand),
13407 TOJSON_IMPL(bridgingConfigurationFileCheckSecs),
13408 TOJSON_IMPL(statusReport),
13409 TOJSON_IMPL(externalHealthCheckResponder),
13410 TOJSON_IMPL(internals),
13411 TOJSON_IMPL(certStoreFileName),
13412 TOJSON_IMPL(certStorePasswordHex),
13413 TOJSON_IMPL(enginePolicy),
13414 TOJSON_IMPL(configurationCheckSignalName),
13415 TOJSON_IMPL(fipsCrypto),
13416 TOJSON_IMPL(statusUpload),
13417 TOJSON_IMPL(nsm),
13418 TOJSON_IMPL(rtiCloud)
13419 };
13420 }
13421 static void from_json(const nlohmann::json& j, BridgingServerConfiguration& p)
13422 {
13423 p.clear();
13424 getOptional<std::string>("id", p.id, j);
13425 getOptional<BridgingServerConfiguration::OpMode_t>("mode", p.mode, j, BridgingServerConfiguration::OpMode_t::omRaw);
13426 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
13427 getOptional<std::string>("bridgingConfigurationFileName", p.bridgingConfigurationFileName, j);
13428 getOptional<std::string>("bridgingConfigurationFileCommand", p.bridgingConfigurationFileCommand, j);
13429 getOptional<int>("bridgingConfigurationFileCheckSecs", p.bridgingConfigurationFileCheckSecs, j, 60);
13430 getOptional<BridgingServerStatusReportConfiguration>("statusReport", p.statusReport, j);
13431 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
13432 getOptional<BridgingServerInternals>("internals", p.internals, j);
13433 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
13434 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
13435 j.at("enginePolicy").get_to(p.enginePolicy);
13436 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.6cc0651.${id}");
13437 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
13438 getOptional<StatusUploadConfiguration>("statusUpload", p.statusUpload, j);
13439 bridgingServerNsmFromJson(j, p.nsm);
13440 getOptional<RtiCloudSettings>("rtiCloud", p.rtiCloud, j);
13441 }
13442
13443
13444 //-----------------------------------------------------------
13445 JSON_SERIALIZED_CLASS(EarGroupsConfiguration)
13456 {
13457 IMPLEMENT_JSON_SERIALIZATION()
13458 IMPLEMENT_JSON_DOCUMENTATION(EarGroupsConfiguration)
13459
13460 public:
13462 std::vector<Group> groups;
13463
13465 {
13466 clear();
13467 }
13468
13469 void clear()
13470 {
13471 groups.clear();
13472 }
13473 };
13474
13475 static void to_json(nlohmann::json& j, const EarGroupsConfiguration& p)
13476 {
13477 j = nlohmann::json{
13478 TOJSON_IMPL(groups)
13479 };
13480 }
13481 static void from_json(const nlohmann::json& j, EarGroupsConfiguration& p)
13482 {
13483 p.clear();
13484 getOptional<std::vector<Group>>("groups", p.groups, j);
13485 }
13486
13487 //-----------------------------------------------------------
13488 JSON_SERIALIZED_CLASS(EarServerStatusReportConfiguration)
13499 {
13500 IMPLEMENT_JSON_SERIALIZATION()
13501 IMPLEMENT_JSON_DOCUMENTATION(EarServerStatusReportConfiguration)
13502
13503 public:
13505 std::string fileName;
13506
13509
13512
13514 std::string runCmd;
13515
13518
13520 {
13521 clear();
13522 }
13523
13524 void clear()
13525 {
13526 fileName.clear();
13527 intervalSecs = 60;
13528 enabled = false;
13529 includeGroupDetail = false;
13530 runCmd.clear();
13531 }
13532 };
13533
13534 static void to_json(nlohmann::json& j, const EarServerStatusReportConfiguration& p)
13535 {
13536 j = nlohmann::json{
13537 TOJSON_IMPL(fileName),
13538 TOJSON_IMPL(intervalSecs),
13539 TOJSON_IMPL(enabled),
13540 TOJSON_IMPL(includeGroupDetail),
13541 TOJSON_IMPL(runCmd)
13542 };
13543 }
13544 static void from_json(const nlohmann::json& j, EarServerStatusReportConfiguration& p)
13545 {
13546 p.clear();
13547 getOptional<std::string>("fileName", p.fileName, j);
13548 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
13549 getOptional<bool>("enabled", p.enabled, j, false);
13550 getOptional<std::string>("runCmd", p.runCmd, j);
13551 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
13552 }
13553
13554 //-----------------------------------------------------------
13555 JSON_SERIALIZED_CLASS(EarServerInternals)
13568 {
13569 IMPLEMENT_JSON_SERIALIZATION()
13570 IMPLEMENT_JSON_DOCUMENTATION(EarServerInternals)
13571
13572 public:
13575
13578
13581
13583 {
13584 clear();
13585 }
13586
13587 void clear()
13588 {
13589 watchdog.clear();
13590 tuning.clear();
13591 housekeeperIntervalMs = 1000;
13592 }
13593 };
13594
13595 static void to_json(nlohmann::json& j, const EarServerInternals& p)
13596 {
13597 j = nlohmann::json{
13598 TOJSON_IMPL(watchdog),
13599 TOJSON_IMPL(housekeeperIntervalMs),
13600 TOJSON_IMPL(tuning)
13601 };
13602 }
13603 static void from_json(const nlohmann::json& j, EarServerInternals& p)
13604 {
13605 p.clear();
13606 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
13607 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
13608 getOptional<TuningSettings>("tuning", p.tuning, j);
13609 }
13610
13611 //-----------------------------------------------------------
13612 JSON_SERIALIZED_CLASS(EarServerConfiguration)
13622 {
13623 IMPLEMENT_JSON_SERIALIZATION()
13624 IMPLEMENT_JSON_DOCUMENTATION(EarServerConfiguration)
13625
13626 public:
13627
13629 std::string id;
13630
13633
13636
13639
13642
13645
13648
13651
13654
13657
13660
13663
13666
13669
13671 {
13672 clear();
13673 }
13674
13675 void clear()
13676 {
13677 id.clear();
13678 serviceConfigurationFileCheckSecs = 60;
13679 groupsConfigurationFileName.clear();
13680 groupsConfigurationFileCommand.clear();
13681 groupsConfigurationFileCheckSecs = 60;
13682 statusReport.clear();
13683 externalHealthCheckResponder.clear();
13684 internals.clear();
13685 certStoreFileName.clear();
13686 certStorePasswordHex.clear();
13687 enginePolicy.clear();
13688 configurationCheckSignalName = "rts.9a164fa.${id}";
13689 fipsCrypto.clear();
13690 nsm.clear();
13691 }
13692 };
13693
13694 static void to_json(nlohmann::json& j, const EarServerConfiguration& p)
13695 {
13696 j = nlohmann::json{
13697 TOJSON_IMPL(id),
13698 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
13699 TOJSON_IMPL(groupsConfigurationFileName),
13700 TOJSON_IMPL(groupsConfigurationFileCommand),
13701 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
13702 TOJSON_IMPL(statusReport),
13703 TOJSON_IMPL(externalHealthCheckResponder),
13704 TOJSON_IMPL(internals),
13705 TOJSON_IMPL(certStoreFileName),
13706 TOJSON_IMPL(certStorePasswordHex),
13707 TOJSON_IMPL(enginePolicy),
13708 TOJSON_IMPL(configurationCheckSignalName),
13709 TOJSON_IMPL(fipsCrypto),
13710 TOJSON_IMPL(nsm)
13711 };
13712 }
13713 static void from_json(const nlohmann::json& j, EarServerConfiguration& p)
13714 {
13715 p.clear();
13716 getOptional<std::string>("id", p.id, j);
13717 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
13718 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
13719 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
13720 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
13721 getOptional<EarServerStatusReportConfiguration>("statusReport", p.statusReport, j);
13722 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
13723 getOptional<EarServerInternals>("internals", p.internals, j);
13724 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
13725 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
13726 j.at("enginePolicy").get_to(p.enginePolicy);
13727 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
13728 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
13729 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
13730 }
13731
13732//-----------------------------------------------------------
13733 JSON_SERIALIZED_CLASS(EngageSemGroupsConfiguration)
13744 {
13745 IMPLEMENT_JSON_SERIALIZATION()
13746 IMPLEMENT_JSON_DOCUMENTATION(EngageSemGroupsConfiguration)
13747
13748 public:
13750 std::vector<Group> groups;
13751
13753 {
13754 clear();
13755 }
13756
13757 void clear()
13758 {
13759 groups.clear();
13760 }
13761 };
13762
13763 static void to_json(nlohmann::json& j, const EngageSemGroupsConfiguration& p)
13764 {
13765 j = nlohmann::json{
13766 TOJSON_IMPL(groups)
13767 };
13768 }
13769 static void from_json(const nlohmann::json& j, EngageSemGroupsConfiguration& p)
13770 {
13771 p.clear();
13772 getOptional<std::vector<Group>>("groups", p.groups, j);
13773 }
13774
13775 //-----------------------------------------------------------
13776 JSON_SERIALIZED_CLASS(EngageSemServerStatusReportConfiguration)
13787 {
13788 IMPLEMENT_JSON_SERIALIZATION()
13789 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerStatusReportConfiguration)
13790
13791 public:
13793 std::string fileName;
13794
13797
13800
13802 std::string runCmd;
13803
13806
13808 {
13809 clear();
13810 }
13811
13812 void clear()
13813 {
13814 fileName.clear();
13815 intervalSecs = 60;
13816 enabled = false;
13817 includeGroupDetail = false;
13818 runCmd.clear();
13819 }
13820 };
13821
13822 static void to_json(nlohmann::json& j, const EngageSemServerStatusReportConfiguration& p)
13823 {
13824 j = nlohmann::json{
13825 TOJSON_IMPL(fileName),
13826 TOJSON_IMPL(intervalSecs),
13827 TOJSON_IMPL(enabled),
13828 TOJSON_IMPL(includeGroupDetail),
13829 TOJSON_IMPL(runCmd)
13830 };
13831 }
13832 static void from_json(const nlohmann::json& j, EngageSemServerStatusReportConfiguration& p)
13833 {
13834 p.clear();
13835 getOptional<std::string>("fileName", p.fileName, j);
13836 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
13837 getOptional<bool>("enabled", p.enabled, j, false);
13838 getOptional<std::string>("runCmd", p.runCmd, j);
13839 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
13840 }
13841
13842 //-----------------------------------------------------------
13843 JSON_SERIALIZED_CLASS(EngageSemServerInternals)
13856 {
13857 IMPLEMENT_JSON_SERIALIZATION()
13858 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerInternals)
13859
13860 public:
13863
13866
13869
13871 {
13872 clear();
13873 }
13874
13875 void clear()
13876 {
13877 watchdog.clear();
13878 tuning.clear();
13879 housekeeperIntervalMs = 1000;
13880 }
13881 };
13882
13883 static void to_json(nlohmann::json& j, const EngageSemServerInternals& p)
13884 {
13885 j = nlohmann::json{
13886 TOJSON_IMPL(watchdog),
13887 TOJSON_IMPL(housekeeperIntervalMs),
13888 TOJSON_IMPL(tuning)
13889 };
13890 }
13891 static void from_json(const nlohmann::json& j, EngageSemServerInternals& p)
13892 {
13893 p.clear();
13894 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
13895 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
13896 getOptional<TuningSettings>("tuning", p.tuning, j);
13897 }
13898
13899 //-----------------------------------------------------------
13900 JSON_SERIALIZED_CLASS(EngageSemServerConfiguration)
13910 {
13911 IMPLEMENT_JSON_SERIALIZATION()
13912 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerConfiguration)
13913
13914 public:
13915
13917 std::string id;
13918
13921
13924
13927
13930
13933
13936
13939
13942
13945
13948
13951
13954
13957
13958 int maxQueueLen;
13959 int minQueuingMs;
13960 int maxQueuingMs;
13961 int minPriority;
13962 int maxPriority;
13963
13965 {
13966 clear();
13967 }
13968
13969 void clear()
13970 {
13971 id.clear();
13972 serviceConfigurationFileCheckSecs = 60;
13973 groupsConfigurationFileName.clear();
13974 groupsConfigurationFileCommand.clear();
13975 groupsConfigurationFileCheckSecs = 60;
13976 statusReport.clear();
13977 externalHealthCheckResponder.clear();
13978 internals.clear();
13979 certStoreFileName.clear();
13980 certStorePasswordHex.clear();
13981 enginePolicy.clear();
13982 configurationCheckSignalName = "rts.9a164fa.${id}";
13983 fipsCrypto.clear();
13984 nsm.clear();
13985
13986 maxQueueLen = 64;
13987 minQueuingMs = 0;
13988 maxQueuingMs = 15000;
13989 minPriority = 0;
13990 maxPriority = 255;
13991 }
13992 };
13993
13994 static void to_json(nlohmann::json& j, const EngageSemServerConfiguration& p)
13995 {
13996 j = nlohmann::json{
13997 TOJSON_IMPL(id),
13998 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
13999 TOJSON_IMPL(groupsConfigurationFileName),
14000 TOJSON_IMPL(groupsConfigurationFileCommand),
14001 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
14002 TOJSON_IMPL(statusReport),
14003 TOJSON_IMPL(externalHealthCheckResponder),
14004 TOJSON_IMPL(internals),
14005 TOJSON_IMPL(certStoreFileName),
14006 TOJSON_IMPL(certStorePasswordHex),
14007 TOJSON_IMPL(enginePolicy),
14008 TOJSON_IMPL(configurationCheckSignalName),
14009 TOJSON_IMPL(fipsCrypto),
14010 TOJSON_IMPL(nsm),
14011 TOJSON_IMPL(maxQueueLen),
14012 TOJSON_IMPL(minQueuingMs),
14013 TOJSON_IMPL(maxQueuingMs),
14014 TOJSON_IMPL(minPriority),
14015 TOJSON_IMPL(maxPriority)
14016 };
14017 }
14018 static void from_json(const nlohmann::json& j, EngageSemServerConfiguration& p)
14019 {
14020 p.clear();
14021 getOptional<std::string>("id", p.id, j);
14022 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
14023 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
14024 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
14025 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
14026 getOptional<EngageSemServerStatusReportConfiguration>("statusReport", p.statusReport, j);
14027 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
14028 getOptional<EngageSemServerInternals>("internals", p.internals, j);
14029 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
14030 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
14031 j.at("enginePolicy").get_to(p.enginePolicy);
14032 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
14033 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
14034 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
14035 getOptional<int>("maxQueueLen", p.maxQueueLen, j, 64);
14036 getOptional<int>("minQueuingMs", p.minQueuingMs, j, 0);
14037 getOptional<int>("maxQueuingMs", p.maxQueuingMs, j, 15000);
14038 getOptional<int>("minPriority", p.minPriority, j, 0);
14039 getOptional<int>("maxPriority", p.maxPriority, j, 255);
14040 }
14041
14042 //-----------------------------------------------------------
14043 JSON_SERIALIZED_CLASS(EngateGroup)
14053 class EngateGroup : public Group
14054 {
14055 IMPLEMENT_JSON_SERIALIZATION()
14056 IMPLEMENT_JSON_DOCUMENTATION(EngateGroup)
14057
14058 public:
14059 bool useVad;
14060 uint32_t inputHangMs;
14061 uint32_t inputActivationPowerThreshold;
14062 uint32_t inputDeactivationPowerThreshold;
14063
14064 EngateGroup()
14065 {
14066 clear();
14067 }
14068
14069 void clear()
14070 {
14071 Group::clear();
14072 useVad = false;
14073 inputHangMs = 750;
14074 inputActivationPowerThreshold = 700;
14075 inputDeactivationPowerThreshold = 125;
14076 }
14077 };
14078
14079 static void to_json(nlohmann::json& j, const EngateGroup& p)
14080 {
14081 nlohmann::json g;
14082 to_json(g, static_cast<const Group&>(p));
14083
14084 j = nlohmann::json{
14085 TOJSON_IMPL(useVad),
14086 TOJSON_IMPL(inputHangMs),
14087 TOJSON_IMPL(inputActivationPowerThreshold),
14088 TOJSON_IMPL(inputDeactivationPowerThreshold)
14089 };
14090 }
14091 static void from_json(const nlohmann::json& j, EngateGroup& p)
14092 {
14093 p.clear();
14094 from_json(j, static_cast<Group&>(p));
14095 getOptional<uint32_t>("inputHangMs", p.inputHangMs, j, 750);
14096 getOptional<uint32_t>("inputActivationPowerThreshold", p.inputActivationPowerThreshold, j, 700);
14097 getOptional<uint32_t>("inputDeactivationPowerThreshold", p.inputDeactivationPowerThreshold, j, 125);
14098 }
14099
14100 //-----------------------------------------------------------
14101 JSON_SERIALIZED_CLASS(EngateGroupsConfiguration)
14112 {
14113 IMPLEMENT_JSON_SERIALIZATION()
14114 IMPLEMENT_JSON_DOCUMENTATION(EngateGroupsConfiguration)
14115
14116 public:
14118 std::vector<EngateGroup> groups;
14119
14121 {
14122 clear();
14123 }
14124
14125 void clear()
14126 {
14127 groups.clear();
14128 }
14129 };
14130
14131 static void to_json(nlohmann::json& j, const EngateGroupsConfiguration& p)
14132 {
14133 j = nlohmann::json{
14134 TOJSON_IMPL(groups)
14135 };
14136 }
14137 static void from_json(const nlohmann::json& j, EngateGroupsConfiguration& p)
14138 {
14139 p.clear();
14140 getOptional<std::vector<EngateGroup>>("groups", p.groups, j);
14141 }
14142
14143 //-----------------------------------------------------------
14144 JSON_SERIALIZED_CLASS(EngateServerStatusReportConfiguration)
14155 {
14156 IMPLEMENT_JSON_SERIALIZATION()
14157 IMPLEMENT_JSON_DOCUMENTATION(EngateServerStatusReportConfiguration)
14158
14159 public:
14161 std::string fileName;
14162
14165
14168
14170 std::string runCmd;
14171
14174
14176 {
14177 clear();
14178 }
14179
14180 void clear()
14181 {
14182 fileName.clear();
14183 intervalSecs = 60;
14184 enabled = false;
14185 includeGroupDetail = false;
14186 runCmd.clear();
14187 }
14188 };
14189
14190 static void to_json(nlohmann::json& j, const EngateServerStatusReportConfiguration& p)
14191 {
14192 j = nlohmann::json{
14193 TOJSON_IMPL(fileName),
14194 TOJSON_IMPL(intervalSecs),
14195 TOJSON_IMPL(enabled),
14196 TOJSON_IMPL(includeGroupDetail),
14197 TOJSON_IMPL(runCmd)
14198 };
14199 }
14200 static void from_json(const nlohmann::json& j, EngateServerStatusReportConfiguration& p)
14201 {
14202 p.clear();
14203 getOptional<std::string>("fileName", p.fileName, j);
14204 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
14205 getOptional<bool>("enabled", p.enabled, j, false);
14206 getOptional<std::string>("runCmd", p.runCmd, j);
14207 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
14208 }
14209
14210 //-----------------------------------------------------------
14211 JSON_SERIALIZED_CLASS(EngateServerInternals)
14224 {
14225 IMPLEMENT_JSON_SERIALIZATION()
14226 IMPLEMENT_JSON_DOCUMENTATION(EngateServerInternals)
14227
14228 public:
14231
14234
14237
14239 {
14240 clear();
14241 }
14242
14243 void clear()
14244 {
14245 watchdog.clear();
14246 tuning.clear();
14247 housekeeperIntervalMs = 1000;
14248 }
14249 };
14250
14251 static void to_json(nlohmann::json& j, const EngateServerInternals& p)
14252 {
14253 j = nlohmann::json{
14254 TOJSON_IMPL(watchdog),
14255 TOJSON_IMPL(housekeeperIntervalMs),
14256 TOJSON_IMPL(tuning)
14257 };
14258 }
14259 static void from_json(const nlohmann::json& j, EngateServerInternals& p)
14260 {
14261 p.clear();
14262 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
14263 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
14264 getOptional<TuningSettings>("tuning", p.tuning, j);
14265 }
14266
14267 //-----------------------------------------------------------
14268 JSON_SERIALIZED_CLASS(EngateServerConfiguration)
14278 {
14279 IMPLEMENT_JSON_SERIALIZATION()
14280 IMPLEMENT_JSON_DOCUMENTATION(EngateServerConfiguration)
14281
14282 public:
14283
14285 std::string id;
14286
14289
14292
14295
14298
14301
14304
14307
14310
14313
14316
14319
14322
14325
14327 {
14328 clear();
14329 }
14330
14331 void clear()
14332 {
14333 id.clear();
14334 serviceConfigurationFileCheckSecs = 60;
14335 groupsConfigurationFileName.clear();
14336 groupsConfigurationFileCommand.clear();
14337 groupsConfigurationFileCheckSecs = 60;
14338 statusReport.clear();
14339 externalHealthCheckResponder.clear();
14340 internals.clear();
14341 certStoreFileName.clear();
14342 certStorePasswordHex.clear();
14343 enginePolicy.clear();
14344 configurationCheckSignalName = "rts.9a164fa.${id}";
14345 fipsCrypto.clear();
14346 nsm.clear();
14347 }
14348 };
14349
14350 static void to_json(nlohmann::json& j, const EngateServerConfiguration& p)
14351 {
14352 j = nlohmann::json{
14353 TOJSON_IMPL(id),
14354 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
14355 TOJSON_IMPL(groupsConfigurationFileName),
14356 TOJSON_IMPL(groupsConfigurationFileCommand),
14357 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
14358 TOJSON_IMPL(statusReport),
14359 TOJSON_IMPL(externalHealthCheckResponder),
14360 TOJSON_IMPL(internals),
14361 TOJSON_IMPL(certStoreFileName),
14362 TOJSON_IMPL(certStorePasswordHex),
14363 TOJSON_IMPL(enginePolicy),
14364 TOJSON_IMPL(configurationCheckSignalName),
14365 TOJSON_IMPL(fipsCrypto),
14366 TOJSON_IMPL(nsm)
14367 };
14368 }
14369 static void from_json(const nlohmann::json& j, EngateServerConfiguration& p)
14370 {
14371 p.clear();
14372 getOptional<std::string>("id", p.id, j);
14373 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
14374 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
14375 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
14376 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
14377 getOptional<EngateServerStatusReportConfiguration>("statusReport", p.statusReport, j);
14378 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
14379 getOptional<EngateServerInternals>("internals", p.internals, j);
14380 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
14381 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
14382 j.at("enginePolicy").get_to(p.enginePolicy);
14383 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
14384 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
14385 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
14386 }
14387
14388 //-----------------------------------------------------------
14389 static inline void dumpExampleConfigurations(const char *path)
14390 {
14391 WatchdogSettings::document();
14392 FileRecordingRequest::document();
14393 Feature::document();
14394 Featureset::document();
14395 Agc::document();
14396 RtpPayloadTypeTranslation::document();
14397 NetworkInterfaceDevice::document();
14398 ListOfNetworkInterfaceDevice::document();
14399 RtpHeader::document();
14400 BlobInfo::document();
14401 TxAudioUri::document();
14402 AdvancedTxParams::document();
14403 Identity::document();
14404 Location::document();
14405 Power::document();
14406 Connectivity::document();
14407 PresenceDescriptorGroupItem::document();
14408 PresenceDescriptor::document();
14409 NetworkTxOptions::document();
14410 TcpNetworkTxOptions::document();
14411 NetworkAddress::document();
14412 NetworkAddressRxTx::document();
14413 NetworkAddressRestrictionList::document();
14414 StringRestrictionList::document();
14415 Rallypoint::document();
14416 RallypointCluster::document();
14417 NetworkDeviceDescriptor::document();
14418 TxAudio::document();
14419 AudioDeviceDescriptor::document();
14420 ListOfAudioDeviceDescriptor::document();
14421 Audio::document();
14422 TalkerInformation::document();
14423 GroupTalkers::document();
14424 Presence::document();
14425 Advertising::document();
14426 GroupPriorityTranslation::document();
14427 GroupTimeline::document();
14428 GroupAppTransport::document();
14429 RtpProfile::document();
14430 Group::document();
14431 Mission::document();
14432 LicenseDescriptor::document();
14433 EngineNetworkingRpUdpStreaming::document();
14434 EnginePolicyNetworking::document();
14435 Aec::document();
14436 Vad::document();
14437 Bridge::document();
14438 AndroidAudio::document();
14439 EnginePolicyAudio::document();
14440 SecurityCertificate::document();
14441 EnginePolicySecurity::document();
14442 EnginePolicyLogging::document();
14443 EnginePolicyDatabase::document();
14444 NamedAudioDevice::document();
14445 EnginePolicyNamedAudioDevices::document();
14446 Licensing::document();
14447 DiscoveryMagellan::document();
14448 DiscoverySsdp::document();
14449 DiscoverySap::document();
14450 DiscoveryCistech::document();
14451 DiscoveryTrellisware::document();
14452 DiscoveryConfiguration::document();
14453 ApiCallPacingLaneSettings::document();
14454 ApiCallPacingSettings::document();
14455 EnginePolicyInternals::document();
14456 EnginePolicyTimelines::document();
14457 RtpMapEntry::document();
14458 ExternalModule::document();
14459 ExternalCodecDescriptor::document();
14460 EnginePolicy::document();
14461 TalkgroupAsset::document();
14462 EngageDiscoveredGroup::document();
14463 RallypointPeer::document();
14464 RallypointServerLimits::document();
14465 RallypointServerStatusReportConfiguration::document();
14466 RallypointServerLinkGraph::document();
14467 ExternalHealthCheckResponder::document();
14468 Tls::document();
14469 PeeringConfiguration::document();
14470 IgmpSnooping::document();
14471 RallypointReflector::document();
14472 RallypointUdpStreaming::document();
14473 RallypointServer::document();
14474 PlatformDiscoveredService::document();
14475 TimelineQueryParameters::document();
14476 CertStoreCertificate::document();
14477 CertStore::document();
14478 CertStoreCertificateElement::document();
14479 CertStoreDescriptor::document();
14480 CertificateDescriptor::document();
14481 BridgeCreationDetail::document();
14482 GroupConnectionDetail::document();
14483 GroupTxDetail::document();
14484 GroupCreationDetail::document();
14485 GroupReconfigurationDetail::document();
14486 GroupHealthReport::document();
14487 InboundProcessorStats::document();
14488 TrafficCounter::document();
14489 GroupStats::document();
14490 RallypointConnectionDetail::document();
14491 BridgingConfiguration::document();
14492 BridgingServerStatusReportConfiguration::document();
14493 StatusUploadConfiguration::document();
14494 BridgingServerInternals::document();
14495 RtiCloudSettings::document();
14496 BridgingServerConfiguration::document();
14497 EarGroupsConfiguration::document();
14498 EarServerStatusReportConfiguration::document();
14499 EarServerInternals::document();
14500 EarServerConfiguration::document();
14501 RangerPackets::document();
14502 TransportImpairment::document();
14503
14504 EngageSemGroupsConfiguration::document();
14505 EngageSemServerStatusReportConfiguration::document();
14506 EngageSemServerInternals::document();
14507 EngageSemServerConfiguration::document();
14508 }
14509}
14510
14511#ifndef WIN32
14512 #pragma GCC diagnostic pop
14513#endif
14514
14515#endif /* ConfigurationObjects_h */
static void nsmNodeFromEmbeddedServerJson(const nlohmann::json &j, const char *key, NsmNode &node)
TxPriority_t
Network Transmission Priority.
AddressResolutionPolicy_t
Address family resolution policy.
#define ENGAGE_IGNORE_COMPILER_UNUSED_WARNING
RestrictionElementType_t
Enum describing restriction element types.
@ retGenericAccessTagPattern
Elements are generic access tags regex patterns.
@ retGroupIdPattern
Elements are group ID regex patterns.
@ retGroupId
A literal group ID.
@ retCertificateIssuerPattern
Elements are X.509 certificate issuer regex patterns.
@ retCertificateSubjectPattern
Elements are X.509 certificate subject regex patterns.
@ retCertificateFingerprintPattern
Elements are X.509 certificate fingerprint regex patterns.
@ retCertificateSerialNumberPattern
Elements are X.509 certificate serial number regex patterns.
static void nsmConfigurationResourcesFromJson(const nlohmann::json &j, std::vector< NsmNodeResource > &out)
Parse stateMachine.resources: array of objects {"id","priority"}.
GroupRestrictionAccessPolicyType_t
Enum describing restriction types.
@ graptStrict
Registration for groups is NOT allowed by default - requires definitive access through something like...
@ graptPermissive
Registration for groups is allowed by default.
static void bridgingServerNsmFromJson(const nlohmann::json &j, NsmSettings &nsm)
RestrictionType_t
Enum describing restriction types.
@ rtWhitelist
Elements are whitelisted.
@ rtBlacklist
Elements are blacklisted.
Configuration when using the engageBeginGroupTxAdvanced API.
TxAudioUri audioUri
[Optional] A URI to stream from instead of the audio input device
uint8_t priority
[Optional, Default: 0] Transmit priority between 0 (lowest) and 255 (highest).
bool receiverRxMuteForAliasSpecializer
[Optional, Default: false] Indicates that the aliasSpecializer must cause receivers to mute this tran...
uint16_t subchannelTag
[Optional, Default: 0] Defines a sub channel within a group. Audio will be opaque to all other client...
bool reBegin
[Optional, Default: false] Indicates that the transmission should be restarted.
uint16_t aliasSpecializer
[Optional, Default: 0] Defines a numeric affinity value to be included in the transmission....
uint16_t flags
[Optional, Default: 0] Combination of the ENGAGE_TXFLAG_xxx flags
std::string alias
[Optional, Default: empty string] The Engage Engine should transmit the user's alias as part of the h...
bool includeNodeId
[Optional, Default: false] The Engage Engine should transmit the NodeId as part of the header extensi...
uint32_t txId
[Optional, Default: 0] Transmission ID
bool muted
[Optional, Default: false] While the microphone should be opened, captured audio should be ignored un...
Defines parameters for advertising of an entity such as a known, public, group.
int intervalMs
[Optional, Default: 20000] Interval at which the advertisement should be sent in milliseconds.
bool enabled
[Optional, Default: false] Enabled advertising
bool alwaysAdvertise
[Optional, Default: false] If true, the node will advertise the item even if it detects other nodes m...
Acoustic Echo Cancellation settings.
int speakerTailMs
[Optional, Default: 60] Milliseconds of speaker tail
bool cng
[Optional, Default: true] Enable comfort noise generation
bool enabled
[Optional, Default: false] Enable acoustic echo cancellation
Mode_t
Acoustic echo cancellation mode enum.
Mode_t mode
[Optional, Default: aecmDefault] Specifies AEC mode. See Mode_t for all modes
bool enabled
[Optional, Default: false] Enables automatic gain control.
int compressionGainDb
[Optional, Default: 25, Minimum = 0, Maximum = 125] Gain in db.
bool enableLimiter
[Optional, Default: false] Enables limiter to prevent overdrive.
int maxLevel
[Optional, Default: 255] Maximum level.
int minLevel
[Optional, Default: 0] Minimum level.
int targetLevelDb
[Optional, Default: 9] Target gain level if there is no compression gain.
Default audio settings for AndroidAudio.
int api
[Optional, Default 0] Android audio API version: 0=Unspecified, 1=AAudio, 2=OpenGLES
int sessionId
[Optional, Default INVALID_SESSION_ID] A session ID from the Android AudioManager
int contentType
[Optional, Default 1] Usage type: 1=Speech 2=Music 3=Movie 4=Sonification
int sharingMode
[Optional, Default 0] Sharing mode: 0=Exclusive, 1=Shared
int performanceMode
[Optional, Default 12] Performance mode: 10=None/Default, 11=PowerSaving, 12=LowLatency
int inputPreset
[Optional, Default 7] Input preset: 1=Generic 5=Camcorder 6=VoiceRecognition 7=VoiceCommunication 9=U...
int usage
[Optional, Default 2] Usage type: 1=Media 2=VoiceCommunication 3=VoiceCommunicationSignalling 4=Alarm...
int engineMode
[Optional, Default 0] 0=use legacy low-level APIs, 1=use high-level Android APIs
Pacing settings for a single Engage API call lane.
int intervalMs
[Optional, Default: 0] Minimum milliseconds between API calls on this lane. 0 disables pacing.
uint32_t maxQueueDepth
[Optional, Default: 512] Maximum number of pending paced calls on this lane. 0 uses the default.
Optional pacing for asynchronous Engage API calls.
ApiCallPacingLaneSettings configuration
[Optional] Pacing for configuration-related API calls.
ApiCallPacingLaneSettings transmission
[Optional] Pacing for transmission-related API calls.
ApiCallPacingLaneSettings topology
[Optional] Pacing for topology mutations (e.g. engageCreateGroup).
int samplingRate
This is the rate that the device will process the PCM audio data at.
std::string name
Name of the device assigned by the platform.
bool isDefault
True if this is the default device for the direction above.
std::string serialNumber
Device serial number (if any)
int channels
Indicates the number of audio channels to process.
std::string hardwareId
Device hardware ID (if any)
std::string manufacturer
Device manufacturer (if any)
Direction_t direction
Audio direction the device supports.
std::string extra
Extra data provided by the platform (if any)
bool isPresent
True if the device is currently present on the system.
int boostPercentage
A percentage at which to gain/attenuate the audio.
bool isAdad
True if the device is an Application-Defined Audio Device.
int deviceId
[Read Only] Unique device identifier assigned by Engage Engine at time of device creation.
double coefficient
[Optional. Default: 1.75] Coefficient by which to multiply the current history average to determine t...
uint32_t hangMs
[Optional. Default: 1500] Hang timer in milliseconds
bool enabled
[Optional. Default: false] Enables the audio gate if true
uint32_t windowMin
[Optional. Default: 25] Number of 10ms history samples to gather before calculating the noise floor -...
bool useVad
[Optional. Default: false] Use voice activity detection rather than audio energy
uint32_t windowMax
[Optional. Default: 125] Maximum number of 10ms history samples - ignored if useVad is true
Used to configure the Audio properties for a group.
int outputLevelRight
[Optional, Default: 100] The percentage at which to set the right audio at.
std::string outputHardwareId
[Optional] Hardware ID of the output audio device to use for this group. If empty,...
bool outputMuted
[Optional, Default: false] Mutes output audio.
std::string inputHardwareId
[Optional] Hardware ID of the input audio device to use for this group. If empty, inputId is used.
bool enabled
[Optional, Default: true] Audio is enabled
int inputId
[Optional, Default: first audio device] Id for the input audio device to use for this group.
int outputGain
[Optional, Default: 0] The percentage at which to gain the output audio.
int outputId
[Optional, Default: first audio device] Id for the output audio device to use for this group.
int inputGain
[Optional, Default: 0] The percentage at which to gain the input audio.
int outputLevelLeft
[Optional, Default: 100] The percentage at which to set the left audio at.
Describes an audio device that is available on the system.
std::string manufacturer
[Optional] Manufacturer
std::string hardwareId
The string identifier used to identify the hardware.
bool isDefault
True if this is the default device.
std::string serialNumber
[Optional] Serial number
std::vector< AudioRegistryDevice > inputs
[Optional] List of input devices to use for the registry.
std::vector< AudioRegistryDevice > outputs
[Optional] List of output devices to use for the registry.
Describes the Blob data being sent used in the engageSendGroupBlob API.
size_t size
[Optional, Default : 0] Size of the payload
RtpHeader rtpHeader
Custom RTP header.
PayloadType_t payloadType
[Optional, Default: bptUndefined] The payload type to send in the blob
std::string target
[Optional, Default: empty string] The nodeId to which this message is targeted. If this is empty,...
std::string source
[Optional, Default: empty string] The nodeId of Engage Engine that sent the message....
int txnTimeoutSecs
[Optional, Default: 0] Number of seconds after which to time out delivery to the target node
PayloadType_t
Payload type. BlobInfo RTP supported Payload types.
std::string txnId
[Optional but required if txnTimeoutSecs is > 0]
Detailed information for a bridge creation.
CreationStatus_t status
The creation status.
bool active
[Optional, Default: true] Runtime activity flag resolved by EBS.
std::vector< std::string > groups
List of group IDs to be included in the session.
bool enabled
[Optional, Default: true] Enable the bridge NOTE: this is only used bt EBS and is ignored when callin...
std::vector< Group > groups
Array of bridges in the configuration.
std::vector< Bridge > bridges
Array of bridges in the configuration.
std::string certStoreFileName
Path to the certificate store.
NsmSettings nsm
[Optional] Embedded NSM settings (shared statusReport + nodes[]). JSON key nsm. Legacy top-level nsmN...
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
RtiCloudSettings rtiCloud
[Optional] Rally Tactical cloud (RTI) integration.
OpMode_t mode
Specifies the default operation mode (see OpMode_t).
EnginePolicy enginePolicy
The policy to be used for the underlying Engage Engine.
BridgingServerStatusReportConfiguration statusReport
Details for producing a status report.
std::string bridgingConfigurationFileCommand
Command-line to execute that returns a bridging configuration.
std::string bridgingConfigurationFileName
Name of a file containing the bridging configuration.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
OpMode_t
Enum describing the default mode the bridging service runs in. Values of omRaw, omMultistream,...
BridgingServerInternals internals
Internal settings.
int bridgingConfigurationFileCheckSecs
Number of seconds between checks to see if the bridging configuration has been updated....
int serviceConfigurationFileCheckSecs
Number of seconds between checks to see if the service configuration has been updated....
std::string id
A unqiue identifier for the bridge server.
StatusUploadConfiguration statusUpload
[Optional] Process-level HTTP upload for status reports (EBS and embedded NSM).
int nsmResourceReleaseCooldownMs
[Optional, Default: 30000] Time to keep an unhealthy NSM resource out of election before rejoining.
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
int nsmUnhealthyBridgeGraceMs
[Optional, Default: 5000] Base time to wait before declaring an owned bridge unhealthy for NSM releas...
TuningSettings tuning
[Optional] Low-level tuning
WatchdogSettings watchdog
[Optional] Settings for the watchdog.
TODO: Configuration for the bridging server status report file.
Description of a certstore certificate element.
bool hasPrivateKey
True if the certificate has a private key associated with it.
Holds a certificate and (optionally) a private key in a certstore.
std::string certificatePem
Certificate in PEM format.
std::string privateKeyPem
Private key in PEM format.
std::vector< CertStoreCertificateElement > certificates
Array of certificate elements.
std::string fileName
Name of the file the certstore resides in.
std::vector< KvPair > kvp
Array of kv pairs.
std::vector< KvPair > kvp
[Optional] Array of KV pairs
std::vector< CertStoreCertificate > certificates
Array of certificates in this store.
std::string id
The ID of the certstore.
std::vector< CertificateSubjectElement > subjectElements
Array of subject elements.
std::string publicKeyPem
PEM version of the public key.
std::vector< CertificateSubjectElement > issuerElements
Array of issuer elements.
bool selfSigned
Indicates whether the certificqte is self-signed.
std::string certificatePem
PEM version of the certificate.
Description of a certificate subject element.
Connectivity Information used as part of the PresenceDescriptor.
int type
Is the type of connectivity the device has to the network.
int strength
Is the strength of the connection connection as reported by the OS - usually in dbm.
int rating
Is the quality of the network connection as reported by the OS - OS dependent.
Noise suppression (RNNoise) tuning settings.
float vadGate
[Optional, Default: 0.0] Min speech probability for full NS; 0 = always apply mix
std::string model
[Optional, Default: ""] Path to RNNoise weights blob; empty = built-in little model
float mix
[Optional, Default: 1.0] Wet/dry mix; 1.0 = fully denoised, 0.0 = original
Configuration for the Discovery features.
DiscoveryMagellan Discovery settings.
Tls tls
[Optional] Details concerning Transport Layer Security.
std::string interfaceName
[Optional, Default: default system interface] The network interface to bind to for discovery packets.
Session Announcement Discovery settings settings.
int ageTimeoutMs
[Optional, Default 30000] Number of milliseconds of no SAP announcment before the advertised entity i...
Advertising advertising
Parameters for advertising.
NetworkAddress address
[Optional, Default 224.2.127.254:9875] IP address and port.
bool enabled
[Optional, Default: false] Enables the Engage Engine to use SAP for asset discovery.
std::string interfaceName
[Optional, Default: default system interface] The network interface to bind to for discovery packets.
Simple Service Discovery Protocol settings.
bool enabled
[Optional, Default: false] Enables the Engage Engine to use SSDP for asset discovery.
std::vector< std::string > searchTerms
[Optional] An array of regex strings to be used to filter SSDP requests and responses.
int ageTimeoutMs
[Optional, Default 30000] Number of milliseconds of no SSDP announcment before the advertised entity ...
Advertising advertising
Parameters for advertising.
std::string interfaceName
[Optional, Default: default system interface] The network interface to bind to for discovery packets.
NetworkAddress address
[Optional, Default 255.255.255.255:1900] IP address and port.
std::vector< Group > groups
Array of groups in the configuration.
std::string id
A unqiue identifier for the EAR server.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
NsmNode nsm
[Optional] Embedded NSM node settings (JSON key nsm; legacy flat NsmConfiguration accepted).
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
int groupsConfigurationFileCheckSecs
Number of seconds between checks to see if the configuration has been updated. Default is 60.
EarServerStatusReportConfiguration statusReport
Details for producing a status report.
std::string certStoreFileName
Path to the certificate store.
std::string groupsConfigurationFileName
Name of a file containing the ear configuration.
int serviceConfigurationFileCheckSecs
Number of seconds between checks to see if the service configuration has been updated....
std::string groupsConfigurationFileCommand
Command-line to execute that returns a configuration.
EnginePolicy enginePolicy
The policy to be used for the underlying Engage Engine.
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
WatchdogSettings watchdog
[Optional] Settings for the EAR's watchdog.
TuningSettings tuning
[Optional] Low-level tuning
TODO: Configuration for the ear server status report file.
std::vector< Group > groups
Array of groups in the configuration.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
EnginePolicy enginePolicy
The policy to be used for the underlying Engage Engine.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
EngageSemServerStatusReportConfiguration statusReport
Details for producing a status report.
std::string id
A unqiue identifier for the EFC server.
std::string certStoreFileName
Path to the certificate store.
std::string groupsConfigurationFileName
Name of a file containing the EFC configuration.
int serviceConfigurationFileCheckSecs
Number of seconds between checks to see if the service configuration has been updated....
std::string groupsConfigurationFileCommand
Command-line to execute that returns a configuration.
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
NsmNode nsm
[Optional] Embedded NSM node settings (JSON key nsm; legacy flat NsmConfiguration accepted).
EngageSemServerInternals internals
Internal settings.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
int groupsConfigurationFileCheckSecs
Number of seconds between checks to see if the configuration has been updated. Default is 60.
WatchdogSettings watchdog
[Optional] Settings for the EFC's watchdog.
TuningSettings tuning
[Optional] Low-level tuning
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
TODO: Configuration for the EFC server status report file.
std::vector< EngateGroup > groups
Array of groups in the configuration.
EngateServerStatusReportConfiguration statusReport
Details for producing a status report.
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
std::string groupsConfigurationFileName
Name of a file containing the ear configuration.
NsmNode nsm
[Optional] Embedded NSM node settings (JSON key nsm; legacy flat NsmConfiguration accepted).
EngateServerInternals internals
Internal settings.
int groupsConfigurationFileCheckSecs
Number of seconds between checks to see if the configuration has been updated. Default is 60.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
std::string certStoreFileName
Path to the certificate store.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
EnginePolicy enginePolicy
The policy to be used for the underlying Engage Engine.
int serviceConfigurationFileCheckSecs
Number of seconds between checks to see if the service configuration has been updated....
std::string id
A unqiue identifier for the EAR server.
std::string groupsConfigurationFileCommand
Command-line to execute that returns a configuration.
TuningSettings tuning
[Optional] Low-level tuning
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
WatchdogSettings watchdog
[Optional] Settings for the EAR's watchdog.
TODO: Configuration for the engate server status report file.
TxPriority_t priority
[Optional, Default: priVoice] Transmission priority. This has meaning on some operating systems based...
int keepaliveIntervalSecs
Optional, Default: 15] Seconds interval at which to send UDP keepalives to Rallypoints....
int ttl
[Optional, Default: 64] Time to live or hop limit is a mechanism that limits the lifespan or lifetime...
int port
[Optional, 0] The port to be used for Rallypoint UDP streaming. A value of 0 will result in an epheme...
bool enabled
[Optional, false] Enables UDP streaming if the RP supports it
Default audio settings for Engage Engine policy.
AudioRegistry registry
[Optional] If specified, this registry will be used to discover the input and output devices
Vad vad
[Optional] Voice activity detection settings
Agc outputAgc
[Optional] Automatic Gain Control for audio outputs
bool saveOutputPcm
[Optional, Default: false] If true, input audio is written to a PCM file in the data directory
bool enabled
[Optional, Default: true] Enables audio processing
AndroidAudio android
[Optional] Android-specific audio settings
int internalRate
[Optional, Default: 16000] Internal sampling rate - 8000 or 16000
bool muteTxOnTx
[Optional, Default: false] Automatically mute TX when TX begins
Denoiser denoiser
[Optional] Noise suppression tuning (mix / model / vadGate)
Agc inputAgc
[Optional] Automatic Gain Control for audio inputs
bool hardwareEnabled
[Optional, Default: true] Enables local machine hardware audio
Aec aec
[Optional] Acoustic echo cancellation settings
bool denoiseInput
[Optional, Default: false] Denoise input
bool saveInputPcm
[Optional, Default: false] If true, input audio is written to a PCM file in the data directory
bool denoiseOutput
[Optional, Default: false] Denoise output
int internalChannels
[Optional, Default: 2] Internal audio channel count rate - 1 or 2
Provides Engage Engine policy configuration.
std::vector< ExternalModule > externalCodecs
Optional external codecs.
EnginePolicyNamedAudioDevices namedAudioDevices
Optional named audio devices (Linux only)
Featureset featureset
Optional feature set.
EnginePolicyDatabase database
Database settings.
EnginePolicyAudio audio
Audio settings.
std::string dataDirectory
Specifies the root of the physical path to store data.
EnginePolicyLogging logging
Logging settings.
DiscoveryConfiguration discovery
Discovery settings.
std::vector< RtpMapEntry > rtpMap
Optional RTP - overrides the default.
EngineStatusReportConfiguration statusReport
Optional statusReport - details for the status report.
EnginePolicyInternals internals
Internal settings.
EnginePolicySecurity security
Security settings.
EnginePolicyTimelines timelines
Timelines settings.
EnginePolicyNetworking networking
Security settings.
TuningSettings tuning
[Optional] Low-level tuning
int stickyTidHangSecs
[Optional, Default: 10] The number of seconds after which "sticky" transmission IDs expire.
int maxTxSecs
[Optional, Default: 30] The default duration the engageBeginGroupTx and engageBeginGroupTxAdvanced fu...
int rpConnectionTimeoutSecs
[Optional, Default: 5] Connection timeout in seconds to RP
ApiCallPacingSettings apiCallPacing
[Optional] Pacing for selected asynchronous Engage API calls.
WatchdogSettings watchdog
[Optional] Settings for the Engine's watchdog.
RallypointCluster::ConnectionStrategy_t rpClusterStrategy
[Optional, Default: csRoundRobin] Specifies the default RP cluster connection strategy to be followed...
int delayedMicrophoneClosureSecs
[Optional, Default: 15] The number of seconds to cache an open microphone before actually closing it.
int rpTransactionTimeoutMs
[Optional, Default: 5] Transaction timeout with RP
int rtpExpirationCheckIntervalMs
[Optional, Default: 250] Interval at which to check for RTP expiration.
int rpClusterRolloverSecs
[Optional, Default: 10] Seconds between switching to a new target in a RP cluster
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
int uriStreamingIntervalMs
[Optional, Default: 60] The packet framing interval for audio streaming from a URI.
int maxLevel
[Optional, Default: 4, Range: 0-4] This is the maximum logging level to display in other words,...
EngineNetworkingRpUdpStreaming rpUdpStreaming
[Optional] Configuration for UDP streaming
std::string defaultNic
The default network interface card the Engage Engine should bind to.
RtpProfile rtpProfile
[Optional] Configuration for RTP profile
AddressResolutionPolicy_t addressResolutionPolicy
[Optional, Default 64] Address resolution policy
int multicastRejoinSecs
[Optional, Default: 8] Number of seconds elapsed between RX of multicast packets before an IGMP rejoi...
bool logRtpJitterBufferStats
[Optional, Default: false] If true, logs RTP jitter buffer statistics periodically
int rallypointRtTestIntervalMs
[Optional, Default: 60000] Milliseconds between sending Rallypoint round-trip test requests
bool requireMulticast
[Optional, Default true] Require multicast support
bool preventMulticastFailover
[Optional, Default: false] Overrides/cancels group-level multicast failover if set to true
Default certificate to use for security operation in the Engage Engine.
SecurityCertificate certificate
The default certificate and private key for the Engine instance.
std::vector< std::string > caCertificates
[Optional] An array of CA certificates to be used for validation of far-end X.509 certificates
long autosaveIntervalSecs
[Default 5] Interval at which events are to be saved from memory to disk (a slow operation)
int maxStorageMb
Specifies the maximum storage space to use.
bool enabled
[Optional, Default: true] Specifies if Time Lines are enabled by default.
int maxDiskMb
Specifies the maximum disk space to use - defaults to maxStorageMb.
SecurityCertificate security
The certificate to use for signing the recording.
int maxAudioEventMemMb
Specifies the maximum number of megabytes to allow for a single audio event's memory block - defaults...
long maxEventAgeSecs
Maximum age of an event after which it is to be erased.
int maxMemMb
Specifies the maximum memory to use - defaults to maxStorageMb.
std::string storageRoot
Specifies where the timeline recordings will be stored physically.
bool ephemeral
[Default false] If true, recordings are automatically purged when the Engine is shut down and/or rein...
bool disableSigningAndVerification
[Default false] If true, prevents signing of events - i.e. no anti-tanpering features will be availab...
int maxEvents
Maximum number of events to be retained.
long groomingIntervalSecs
Interval at which events are to be checked for age-based grooming.
TODO: Configuration for the translation server status report file.
TODO: Configuration to enable external systems to use to check if the service is still running.
Base for a description of an external module.
nlohmann::json configuration
Optional free-form JSON configuration to be passed to the module.
bool debug
[Optional, Default false] If true, requests the crypto engine module to run in debugging mode.
bool enabled
[Optional, Default false] If true, requires FIPS140-2 crypto operation.
std::string curves
[Optional] Specifies the NIST-approved curves to be used for FIPS
std::string path
Path where the crypto engine module is located
std::string ciphers
[Optional] Specifies the NIST-approved ciphers to be used for FIPS
Configuration for the optional custom transport functionality for Group.
bool enabled
[Optional, Default: false] Enables custom feature.
std::string id
The id/name of the transport. This must match the id/name supplied when registering the app transport...
BridgingOpMode_t
Enum describing bridging operation mode types where applicable.
AdvancedTxParams mixedStreamTxParams
[Optional] Parameters to be applied when output is mixed (bomMixedStream)
BridgingOpMode_t mode
[Optional] The output mode
Detailed information for a group connection.
bool asFailover
Indicates whether the connection is for purposes of failover.
ConnectionType_t connectionType
The connection type.
std::string reason
[Optional] Additional reason information
Detailed information for a group creation.
CreationStatus_t status
The creation status.
uint8_t tx
[Optional] The default audio priority
uint8_t rx
[Optional] The default audio RX priority
Detailed information regarding a group's health.
GroupAppTransport appTransport
[Optional] Settings necessary if the group is transported via an application-supplied custom transpor...
std::string source
[Optional, Default: null] Indicates the source of this configuration - e.g. from the application or d...
Presence presence
Presence configuration (see Presence).
std::vector< uint16_t > specializerAffinities
List of specializer IDs that the local node has an affinity for/member of.
std::vector< Source > ignoreSources
[Optional] List of sources to ignore for this group
NetworkAddress rtcpPresenceRx
The network address for receiving RTCP presencing packets.
bool allowLoopback
[Optional, Default: false] Allows for processing of looped back packets - primarily meant for debuggi...
Type_t
Enum describing the group types.
NetworkAddress tx
The network address for transmitting network traffic to.
std::string alias
User alias to transmit as part of the realtime audio stream when using the engageBeginGroupTx API.
int stickyTidHangSecs
[Optional, Default: 10] The number of seconds after which "sticky" transmission IDs expire.
TxAudio txAudio
Audio transmit options such as codec, framing size etc (see TxAudio).
int maxRxSecs
[Optional, Default: 0] Maximum number of seconds the Engine will receive for on this group.
PacketCapturer txCapture
Details for capture of transmitted packets
NetworkTxOptions txOptions
Transmit options for the group (see NetworkTxOptions).
std::string synVoice
Name of the synthesis voice to use for the group
TransportImpairment rxImpairment
[Optional] The RX impairment to apply
std::string languageCode
ISO 639-2 language code for the group
std::string cryptoPassword
Password to be used for encryption. Note that this is not the encryption key but, rather,...
std::vector< std::string > presenceGroupAffinities
List of presence group IDs with which this group has an affinity.
GroupTimeline timeline
Audio timeline is configuration.
GroupPriorityTranslation priorityTranslation
[Optional] Describe how traffic for this group on a different addressing scheme translates to priorit...
bool disablePacketEvents
[Optional, Default: false] Disable packet events.
bool blockAdvertising
[Optional, Default: false] Set this to true if you do not want the Engine to advertise this Group on ...
bool ignoreAudioTraffic
[Optional, Default: false] Indicates that the group should ignore traffic that is audio-related
std::string interfaceName
The name of the network interface to use for multicasting for this group. If not provided,...
bool _wasDeserialized_rtpProfile
[Internal - not serialized
bool enableMulticastFailover
[Optional, Default: false] Set this to true to enable failover to multicast operation if a Rallypoint...
std::string name
The human readable name for the group.
NetworkAddress rx
The network address for receiving network traffic on.
Type_t type
Specifies the group type (see Type_t).
GroupDefaultAudioPriority defaultAudioPriority
Default audio priority for the group (see GroupDefaultAudioPriority).
uint16_t blobRtpPayloadType
[Optional, Default: ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE] The RTP payload type to be used for blobs s...
std::vector< Rallypoint > rallypoints
[DEPRECATED] List of Rallypoint (s) the Group should use to connect to a Rallypoint router....
RtpProfile rtpProfile
[Optional] RTP profile the group
std::vector< RtpPayloadTypeTranslation > inboundRtpPayloadTypeTranslations
[Optional] A vector of translations from external entity RTP payload types to those used by Engage
int multicastFailoverSecs
[Optional, Default: 10] Specifies the number fo seconds to wait after Rallypoint connection failure t...
InboundAliasGenerationPolicy_t
Enum describing the alias generation policy.
RangerPackets rangerPackets
[Optional] Ranger packet options
int rfc4733RtpPayloadId
[Optional, Default: 0] The RTP payload ID by which to identify (RX and TX) payloads encoded according...
uint32_t securityLevel
[Optional, Default: 0] The security classification level of the group.
PacketCapturer rxCapture
Details for capture of received packets
GroupBridgeTargetOutputDetail bridgeTargetOutputDetail
Output details for when the group is a target in a bridge (see GroupBridgeTargetOutputDetail).
std::string id
Unique identity for the group.
AudioGate gateIn
[Optional] Inbound gating of audio - only audio allowed through by the gate will be processed
RallypointCluster rallypointCluster
Cluster of one or more Rallypoints the group may use.
TransportImpairment txImpairment
[Optional] The TX impairment to apply
Audio audio
Sets audio properties like which audio device to use, audio gain etc (see Audio).
bool lbCrypto
[Optional, Default: false] Use low-bandwidth crypto
std::string spokenName
The group name as spoken - typically by a text-to-speech system
InboundAliasGenerationPolicy_t inboundAliasGenerationPolicy
[Optional, Default: iagpAnonymousAlias]
std::string anonymousAlias
[Optional] Alias to use for inbound streams that do not have an alias component
Details for priority transmission based on unique network addressing.
Detailed information for a group reconfiguration.
ReconfigurationStatus_t status
The creation status.
List of TalkerInformation objects.
std::vector< TalkerInformation > list
List of TalkerInformation objects.
Configuration for Timeline functionality for Group.
bool enabled
[Optional, Default: true] Enables timeline feature.
int maxAudioTimeMs
[Optional, Default: 30000] Maximum audio block size to record in milliseconds.
Detailed information for a group transmit.
int remotePriority
Remote TX priority (optional)
long nonFdxMsHangRemaining
Milliseconds of hang time remaining on a non-FDX group (optional)
int localPriority
Local TX priority (optional)
uint32_t txId
Transmission ID (optional)
std::string displayName
[Optional, Default: empty string] The display name to be used for the user.
std::string userId
[Optional, Default: empty string] The user ID to be used to represent the user.
std::string nodeId
[Optional, Default: Auto Generated] This is the Node ID to use to represent instance on the network.
std::string avatar
[Optional, Default: empty string] This is a application defined field used to indicate a users avatar...
Configuration for IGMP snooping.
int queryIntervalMs
[Optional, Default 125000] Interval between sending IGMP membership queries. If 0,...
int subscriptionTimeoutMs
[Optional, Default 0] Typically calculated according to RFC specifications. Set a value here to manua...
bool enabled
Enables IGMP. Default is false.
Detailed statistics for an inbound processor.
Helper class for serializing and deserializing the LicenseDescriptor JSON.
std::string activationHmac
The HMAC to be used for activation purposes.
std::string entitlement
Entitlement key to use for the product.
std::string cargo
Reserved for internal use.
std::string manufacturerId
[Read only] Manufacturer ID.
std::string key
License Key to be used for the application.
uint8_t cargoFlags
Reserved for internal use.
int type
[Read only] 0 = unknown, 1 = perpetual, 2 = expires
std::string deviceId
[Read only] Unique device identifier generated by the Engine.
time_t expires
[Read only] The time that the license key or activation code expires in Unix timestamp - Zulu/UTC.
std::string activationCode
If the key required activation, this is the activation code generated using the entitlement,...
std::string expiresFormatted
[Read only] The time that the license key or activation code expires formatted in ISO 8601 format,...
std::string deviceId
Device Identifier. See LicenseDescriptor::deviceId for details.
std::string manufacturerId
Manufacturer ID to use for the product. See LicenseDescriptor::manufacturerId for details.
std::string activationCode
Activation Code issued for the license key. See LicenseDescriptor::activationCode for details.
std::string key
License key. See LicenseDescriptor::key for details.
std::string entitlement
Entitlement key to use for the product. See LicenseDescriptor::entitlement for details.
std::vector< Group > groups
Array of groups in the configuration.
std::vector< VoiceToVoiceSession > voiceToVoiceSessions
Array of voiceToVoice sessions in the configuration.
Configuration for the linguistics server.
LingoServerStatusReportConfiguration statusReport
Details for producing a status report.
std::string lingoConfigurationFileName
Name of a file containing the linguistics configuration.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
std::string id
A unqiue identifier for the linguistics server.
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
std::string lingoConfigurationFileCommand
Command-line to execute that returns a linguistics configuration.
LingoServerInternals internals
Internal settings.
EnginePolicy enginePolicy
The policy to be used for the underlying Engage Engine.
NsmNode nsm
[Optional] Embedded NSM node settings (JSON key nsm; legacy flat NsmConfiguration accepted).
int lingoConfigurationFileCheckSecs
Number of seconds between checks to see if the linguistics configuration has been updated....
std::string certStoreFileName
Path to the certificate store.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
NetworkAddress proxy
Address and port of the proxy.
int serviceConfigurationFileCheckSecs
Number of seconds between checks to see if the service configuration has been updated....
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
WatchdogSettings watchdog
[Optional] Settings for the watchdog.
TuningSettings tuning
[Optional] Low-level tuning
TODO: Configuration for the translation server status report file.
Location information used as part of the PresenceDescriptor.
double longitude
Its the longitudinal position using the Signed degrees format (DDD.dddd) format. Valid range is -180 ...
double altitude
[Optional, Default: INVALID_LOCATION_VALUE] The altitude above sea level in meters.
uint32_t ts
[Read Only: Unix timestamp - Zulu/UTC] Indicates the timestamp that the location was recorded.
double latitude
Its the latitude position using the using the Signed degrees format (DDD.dddd). Valid range is -90 to...
double direction
[Optional, Default: INVALID_LOCATION_VALUE] Direction the endpoint is traveling in degrees....
double speed
[Optional, Default: INVALID_LOCATION_VALUE] The speed the endpoint is traveling at in meters per seco...
Defines settings for a named identity.
SecurityCertificate certificate
The identity certificate.
RestrictionType_t type
Type indicating how the elements are to be treated.
std::vector< NetworkAddressRxTx > elements
List of elements.
std::string manufacturer
Device manufacturer (if any)
int deviceId
[Read Only] Unique device identifier assigned by Engage Engine at time of device creation.
std::string extra
Extra data provided by the platform (if any)
std::string hardwareId
Device hardware ID (if any)
std::string serialNumber
Device serial number (if any)
std::string name
Name of the device assigned by the platform.
int ttl
[Optional, Default: 1] Time to live or hop limit is a mechanism that limits the lifespan or lifetime ...
TxPriority_t priority
[Optional, Default: priVoice] Transmission priority. This has meaning on some operating systems based...
int goingActiveRandomDelayMs
[Optional, Default: 500] Random delay in ms before entering GOING_ACTIVE (spread elections).
int internalMultiplier
[Optional, Default: 1] Scales TX interval and transition wait (testing / timing).
Optional per-resource health gate while ACTIVE.
int unhealthyGraceMs
[Optional, Default: 5000] Ms unhealthy before voluntary release.
int releaseCooldownSecs
[Optional, Default: 30] Seconds to suppress re-election after release.
bool enabled
[Optional, Default: false] When true, poll runCmd while resources are ACTIVE.
bool failClosed
[Optional, Default: true] When true, runCmd failure/timeout is treated as unhealthy.
std::string runCmd
Shell command; trimmed stdout must be 1 (healthy) or 0 (unhealthy).
int intervalSecs
[Optional, Default: 5] Seconds between health polls per ACTIVE resource.
Periodic external command to refresh CoT point location.
std::string runCmd
Shell command returning JSON: {"lat":"…","lon":"…"[, "ce","hae","le"]}.
int intervalSecs
[Optional, Default: 10] Seconds between polls.
bool failClosed
[Optional, Default: true] When true, poll failure retains the last fix.
bool enabled
[Optional, Default: false] When true, runCmd is polled for location.
Cursor-on-Target envelope for NSM wire payloads (optional).
std::string callsign
Optional CoT contact callsign (emitted as detail/contact/@callsign ).
int idleIntervalSecs
CoT presence interval for fully idle nodes when announceWhenIdle is true (default 30).
NsmNodeCotLocationPollSettings locationPoll
Optional periodic command to refresh CoT point location.
std::string detailJson
Optional JSON object serialized as string for extra CoT detail elements.
bool announceWhenIdle
When useCot is true, fully idle nodes TX full resource state at idleIntervalSecs (default false).
Optional external gate for NSM election wire participation.
std::string runCmd
Shell command; trimmed stdout must be 1 (participate) or 0 (idle).
int intervalSecs
[Optional, Default: 2] Seconds between runCmd polls.
bool failClosed
[Optional, Default: true] When true, runCmd failure/timeout is treated as 0.
bool enabled
[Optional, Default: false] When true, election participation follows runCmd.
Configuration for a Nsm node.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
NsmNodeStatusReportConfiguration statusReport
Details for producing a status report.
NsmNodeElectionGateSettings electionGate
Optional external gate for election wire participation (Seeker active/standby, etc....
NsmNodeActiveHealthCheckSettings activeHealthCheck
Optional per-resource health monitoring while ACTIVE.
WatchdogSettings watchdog
[Optional] Settings for the node's watchdog.
StatusUploadConfiguration statusUpload
[Optional] Process-level status report HTTP upload (standalone nsmd). Ignored when embedded; host pas...
NsmNodeLogging logging
Console / syslog logging.
Licensing licensing
Licensing settings.
Featureset featureset
Optional feature set.
std::string id
Unique identifier for this process instance (also used as default state machine id when stateMachine....
int defaultPriority
[Optional, Default: 0] Election priority byte when a resource omits priority or uses -1 (see NsmNodeR...
bool dashboardToken
[Optional, Default: false] When true with dashboard logging, show resource token in the UI.
std::vector< NsmNodePeriodic > periodics
Periodic commands (JSON output, external token range, etc.).
PacketCapturer txCapture
Details for capture of transmitted packets
NsmNodeScripts scripts
Lifecycle hook scripts.
std::string multicastInterfaceName
Multicast bind / subscription NIC (SO_BINDTODEVICE / IP_ADD_MEMBERSHIP).
std::string name
Human-readable label for operators.
IpFamilyType_t ipFamily
[Optional, Default IpFamilyType_t::ifIp4] Address family for interface validation and logging.
int fixedToken
[Optional, Default: -1] Fixed global token for testing; >= 0 forces that token, -1 uses random per el...
TuningSettings tuning
[Optional] Low-level tuning
PacketCapturer rxCapture
Details for capture of received packets
std::string domainId
Logical domain id for this election channel. Required and unique when more than one NSM node is confi...
NsmNodeCotSettings cot
Optional CoT wrapping for wire payloads.
NsmConfiguration stateMachine
Core NSM protocol and networking configuration (UDP, tokens, timing).
Console / syslog logging behaviour for nsmd.
bool dashboard
[Optional, Default: false] Full-screen dashboard instead of line logs.
int level
[Optional, Default: 3] ILogger level (fatal=0 ... debug=5).
Scheduled command (e.g. external token range discovery).
One logical resource in the NSM state machine with its election priority (high byte of token).
int priority
[Optional, Default: -1] Priority byte for token MSB; -1 means use NsmNode.defaultPriority when loaded...
External hook scripts for state transitions and reporting.
Optional event-driven status report updates (throttled).
int minIntervalSecs
[Optional, Default: 3] Minimum seconds between immediate reports (flood control).
bool onStateChange
[Optional, Default: true] Report on local resource state transitions.
bool onOwnerChange
[Optional, Default: true] Report when the perceived owner changes.
bool enabled
[Optional, Default: false] Enable immediate reports on significant events.
Embedded NSM settings for multi-node hosts (e.g. EBS).
NsmNodeStatusReportConfiguration statusReport
Shared status-report settings applied to each node (fileName may use ${id} = node id).
std::vector< NsmNode > nodes
Embedded NSM election fabrics (one per MANET / multicast domain).
Description of a packet capturer.
int version
TODO: A version number for the domain configuration. Change this whenever you update your configurati...
std::string id
An identifier useful for organizations that track different domain configurations by ID.
std::vector< RallypointPeer > peers
List of Rallypoint peers to connect to.
uint32_t configurationVersion
Internal configuration version.
Device Power Information used as part of the PresenceDescriptor.
int state
[Optional, Default: 0] Is the current state that the power system is in.
int source
[Optional, Default: 0] Is the source the power is being delivered from
int level
[Optional, Default: 0] Is the current level of the battery or power system as a percentage....
Group Alias used as part of the PresenceDescriptor.
uint16_t status
Status flags for the user's participation on the group.
std::string groupId
Group Id the alias is associated with.
Represents an endpoints presence properties. Used in engageUpdatePresenceDescriptor API and PFN_ENGAG...
Power power
[Optional, Default: see Power] Device power information like charging state, battery level,...
std::string custom
[Optional, Default: empty string] Custom string application can use of presence descriptor....
bool self
[Read Only] Indicates that this presence declaration was generated by the Engage Engine the applicati...
uint32_t nextUpdate
[Read Only, Unix timestamp - Zulu/UTC] Indicates the next time the presence descriptor will be sent.
std::vector< PresenceDescriptorGroupItem > groupAliases
[Read Only] List of group items associated with this presence descriptor.
Identity identity
[Optional, Default see Identity] Endpoint's identity information.
bool announceOnReceive
[Read Only] Indicates that the Engine will announce its PresenceDescriptor in response to this messag...
uint32_t ts
[Read Only, Unix timestamp - Zulu/UTC] Indicates the timestamp that the message was originally sent.
std::string comment
[Optional] No defined limit on size but the total size of the serialized JSON object must fit inside ...
Connectivity connectivity
[Optional, Default: see Connectivity] Device connectivity information like wifi/cellular,...
uint32_t disposition
[Optional] Indicates the users disposition
Location location
[Optional, Default: see Location] Location information
Describes how the Presence is configured for a group of type Group::gtPresence in Group::Type_t.
Format_t format
Format to be used to represent presence information.
bool reduceImmediacy
[Optional, Default: false] Instructs the Engage Engine reduce the immediacy of presence announcements...
bool listenOnly
Instructs the Engage Engine to not transmit presence descriptor.
int minIntervalSecs
[Optional, Default: 5] The minimum interval to send at to prevent network flooding
int intervalSecs
[Optional, Default: 30] The interval in seconds at which to send the presence descriptor on the prese...
Defines settings for Rallypoint advertising.
std::string interfaceName
The multicast network interface for mDNS.
std::string serviceName
[Optional, Default "_rallypoint._tcp.local."] The service name
std::string hostName
[Optional] This Rallypoint's DNS-SD host name
int port
[Default: RP port] The multicast network interface for mDNS
bool enabled
[Default: false] Advertising is enabled
int rolloverSecs
Seconds between switching to a new target.
int transactionTimeoutMs
[Optional, Default: 10000] Default transaction time in milliseconds to any RP in the cluster
int connectionTimeoutSecs
[Optional, Default: 5] Default connection timeout in seconds to any RP in the cluster
std::vector< Rallypoint > rallypoints
List of Rallypoints.
ConnectionStrategy_t connectionStrategy
[Optional, Default: csRoundRobin] Specifies the connection strategy to be followed....
Detailed information for a rallypoint connection.
float serverProcessingMs
Server processing time in milliseconds - used for roundtrip reports.
uint64_t msToNextConnectionAttempt
Milliseconds until next connection attempt.
Defines settings for Rallypoint extended group restrictions.
std::vector< StringRestrictionList > restrictions
Restrictions.
int transactionTimeoutMs
[Optional, Default 10000] Number of milliseconds that a transaction may take before the link is consi...
bool allowSelfSignedCertificate
[Optional, Default false] Allows the Rallypoint to accept self-signed certificates from the far-end
std::string sni
[Optional] A user-defined string sent as the Server Name Indication (SNI) field in the TLS setup....
std::vector< std::string > caCertificates
[Optional] A vector of certificates (raw content, file names, or certificate store elements) used to ...
std::string certificate
This is the X509 certificate to use for mutual authentication.
bool verifyPeer
[Optional, Default true] Indicates whether the connection peer is to be verified by checking the vali...
bool disableMessageSigning
[Optional, Default false] Indicates whether to forego ECSDA signing of control-plane messages.
NetworkAddress host
This is the host address for the Engine to connect to the RallyPoint service.
std::string additionalProtocols
[Optional, Default: ""] Additional protocols to use for the Rallypoint connection (only used for WebS...
RpProtocol_t protocol
[Optional, Default: rppTlsTcp] Specifies the protocol to be used for the Rallypoint connection....
std::string certificateKey
This is the private key used to generate the X509 certificate.
int connectionTimeoutSecs
[Optional, Default: 5] Connection timeout in seconds to the RP
TcpNetworkTxOptions tcpTxOptions
[Optional] Tx options for the TCP link
std::string path
[Optional, Default: ""] Path to use for the RP connection (only used for WebSocket)
SecurityCertificate certificate
Internal certificate detail.
std::string additionalProtocols
[Optional, Default: ""] Additional protocols to use for the peer (only used for WebSocket)
bool forceIsMeshLeaf
Internal enablement setting.
int connectionTimeoutSecs
[Optional, Default: 0 - OS platform default] Connection timeout in seconds to the peer
NetworkAddress host
Internal host detail.
std::string sni
[Optional] A user-defined string sent as the Server Name Indication (SNI) field in the TLS setup when...
std::string path
[Optional, Default: ""] Path to use for the peer (only used for WebSocket)
bool enabled
Internal enablement setting.
OutboundWebSocketTlsPolicy_t outboundWebSocketTlsPolicy
Internal enablement setting.
Rallypoint::RpProtocol_t protocol
[Optional, Default: Rallypoint::RpProtocol_t::rppTlsTcp] Protocol to use for the peer
Definition of a static group for Rallypoints.
NetworkAddress rx
The network address for receiving network traffic on.
std::string id
Unique identity for the group.
std::vector< NetworkAddress > additionalTx
[Optional] Vector of additional TX addresses .
NetworkAddress tx
The network address for transmitting network traffic to.
DirectionRestriction_t directionRestriction
[Optional] Restriction of direction of traffic flow
DirectionRestriction_t
Enum describing direction(s) for the reflector.
std::string multicastInterfaceName
[Optional] The name of the NIC on which to send and receive multicast traffic.
Defines a behavior for a Rallypoint peer roundtrip time.
BehaviorType_t behavior
Specifies the streaming mode type (see BehaviorType_t).
Configuration for the Rallypoint server.
uint32_t maxSecurityLevel
[Optional, Default 0] Sets the maximum item security level that can be registered with the RP
bool forwardDiscoveredGroups
Enables automatic forwarding of discovered multicast traffic to peer Rallypoints.
std::string interfaceName
Name of the NIC to bind to for listening for incoming TCP connections.
NetworkTxOptions multicastTxOptions
Tx options for multicast.
bool disableMessageSigning
Set to true to forgo DSA signing of messages. Doing so is is a security risk but can be useful on CPU...
SecurityCertificate certificate
X.509 certificate and private key that identifies the Rallypoint.
std::string multicastInterfaceName
The name of the NIC on which to send and receive multicast traffic.
StringRestrictionList groupRestrictions
Group IDs to be restricted (inclusive or exclusive)
std::string peeringConfigurationFileName
Name of a file containing a JSON array of Rallypoint peers to connect to.
NsmNode nsm
[Optional] Embedded NSM node settings (JSON key nsm; legacy flat NsmConfiguration accepted).
uint32_t sysFlags
[Optional, Default 0] Internal system flags
int listenPort
TCP port to listen on. Default is 7443.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
NetworkAddressRestrictionList multicastRestrictions
Multicasts to be restricted (inclusive or exclusive)
uint32_t normalTaskQueueBias
[Optional, Default 0] Sets the queue's normal task bias
std::string name
A human-readable name for the Rallypoint.
PacketCapturer txCapture
Details for capture of transmitted packets
StatusUploadConfiguration statusUpload
Process-level HTTP POST settings for status / link / route uploads.
std::vector< RallypointReflector > staticReflectors
Vector of static groups.
bool enableLeafReflectionReverseSubscription
If enabled, causes a domain leaf to reverse-subscribe to a core node upon the core subscribing and a ...
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
IpFamilyType_t ipFamily
[Optional, Default IpFamilyType_t::ifIp4] Address familiy to be used for listening
int peerRtTestIntervalMs
[Optional, Default: 60000] Milliseconds between sending round-trip test requests to peers
WatchdogSettings watchdog
[Optional] Settings for the Rallypoint's watchdog.
DiscoveryConfiguration discovery
Details discovery capabilities.
bool isMeshLeaf
Indicates whether this Rallypoint is part of a core domain or hangs off the periphery as a leaf node.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
GroupRestrictionAccessPolicyType_t groupRestrictionAccessPolicyType
The policy employed to allow group registration.
RallypointServerStreamStatsExport streamStatsExport
Details for exporting stream statistics.
PacketCapturer rxCapture
Details for capture of received packets
std::vector< std::string > extraDomains
[Optional] List of additional domains that can be reached via this RP
uint32_t maxOutboundPeerConnectionIntervalDeltaSecs
[Optional, Default 15] Sets the delta value for the maximum number of seconds to delay when attemptin...
TuningSettings tuning
[Optional] Low-level tuning
RallypointAdvertisingSettings advertising
[Optional] Settings for advertising.
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the Rallypoint's interaction with an external health-checker such as a load-balanc...
std::vector< RallypointExtendedGroupRestriction > extendedGroupRestrictions
Extended group restrictions.
int ioPools
Number of threading pools to create for network I/O. Default is -1 which creates 1 I/O pool per CPU c...
RallypointServerStatusReportConfiguration statusReport
Details for producing a status report.
std::vector< NamedIdentity > additionalIdentities
[Optional] List of additional named identities
IgmpSnooping igmpSnooping
IGMP snooping configuration.
RallypointServerLinkGraph linkGraph
Details for producing a Graphviz-compatible link graph.
RallypointServerLimits limits
Details for capacity limits and determining processing load.
PeeringConfiguration peeringConfiguration
Internal - not serialized.
std::string domainName
[Optional] This Rallypoint's domain name
bool allowMulticastForwarding
Allows traffic received on unicast links to be forwarded to the multicast network.
RallypointWebsocketSettings websocket
[Optional] Settings for websocket operation
std::string peeringConfigurationFileCommand
Command-line to execute that returns a JSON array of Rallypoint peers to connect to.
RallypointServerRouteMap routeMap
Details for producing a report containing the route map.
StreamIdPrivacyType_t streamIdPrivacyType
[Optional, default sptDefault] Modes for stream ID transformation.
bool allowPeerForwarding
Set to true to allow forwarding of packets received from other Rallypoints to all other Rallypoints....
TcpNetworkTxOptions tcpTxOptions
Tx options for TCP.
RallypointUdpStreaming udpStreaming
Optional configuration for high-performance UDP streaming.
bool forwardMulticastAddressing
Enables forwarding of multicast addressing to peer Rallypoints.
std::vector< RallypointRpRtTimingBehavior > peerRtBehaviors
[Optional] Array of behaviors for roundtrip times to peers
std::string id
A unqiue identifier for the Rallypoint.
bool disableLoopDetection
If true, turns off loop detection.
std::vector< std::string > blockedDomains
[Optional] List of domains that explictly MAY NOT connect to this RP
std::vector< std::string > allowedDomains
[Optional] List of domains that explicitly MAY connect to this RP
std::string certStoreFileName
Path to the certificate store.
int peeringConfigurationFileCheckSecs
Number of seconds between checks to see if the peering configuration has been updated....
Tls tls
Details concerning Transport Layer Security.
RtiCloudSettings rtiCloud
[Optional] Rally Tactical cloud (RTI) integration.
TODO: Configuration for Rallypoint limits.
uint32_t maxQOpsPerSec
Maximum number of queue operations per second (0 = unlimited)
uint32_t maxInboundBacklog
Maximum number of inbound backlog requests the Rallypoint will accept.
uint32_t normalPriorityQueueThreshold
Number of normal priority queue operations after which new connections will not be accepted.
uint32_t maxPeers
Maximum number of peers (0 = unlimited)
uint32_t maxTxBytesPerSec
Maximum number of bytes transmitted per second (0 = unlimited)
uint32_t maxTxPacketsPerSec
Maximum number of packets transmitted per second (0 = unlimited)
uint32_t maxRegisteredStreams
Maximum number of registered streams (0 = unlimited)
uint32_t maxClients
Maximum number of clients (0 = unlimited)
uint32_t maxMulticastReflectors
Maximum number of multicastReflectors (0 = unlimited)
uint32_t maxStreamPaths
Maximum number of bidirectional stream paths (0 = unlimited)
uint32_t lowPriorityQueueThreshold
Number of low priority queue operations after which new connections will not be accepted.
uint32_t maxRxBytesPerSec
Maximum number of bytes received per second (0 = unlimited)
uint32_t denyNewConnectionCpuThreshold
The CPU utilization threshold percentage (0-100) beyond which new connections are denied.
uint32_t maxRxPacketsPerSec
Maximum number of packets received per second (0 = unlimited)
uint32_t warnAtCpuThreshold
The CPU utilization threshold percentage (0-100) beyond which warnings are logged.
TODO: Configuration for the Rallypoint status report file.
ExportFormat_t
Enum describing format(s) for the stream stats export.
Streaming configuration for RP clients.
int listenPort
UDP port to listen on. Default is 7444.
TxPriority_t priority
[Optional, Default: priVoice] Transmission priority. This has meaning on some operating systems based...
bool enabled
[Optional, Default true] If true, enables UDP streaming unless turned off on a per-family basis.
CryptoType_t cryptoType
[Optional, Default ctSharedKeyAes256FullIv] The crypto method to be used
int ttl
[Optional, Default: 64] Time to live or hop limit.
CryptoType_t
Enum describing UDP streaming modes.
int keepaliveIntervalSecs
[Optional, Default: 15] Interval (seconds) at which to send UDP keepalives
bool enabled
[Optional, Default true] If true, enables UDP streaming for vX.
NetworkAddress external
Network address for external entities to transmit to. Defaults to the address of the local interface ...
Defines settings for Rallypoint websockets functionality.
SecurityCertificate certificate
Certificate to be used for WebSockets.
bool requireTls
[Default: false] Indicates whether TLS is required
bool enabled
[Default: false] Websocket is enabled
bool requireClientCertificate
[Default: false] Indicates whether the client is required to present a certificate
int count
[Optional, Default: 5] Number of ranger packets to send when a new interval starts
int hangTimerSecs
[Optional, Default: -1] Number of seconds since last packet transmission before 'count' packets are s...
bool end
Indicates whether this is the end of the event.
Helper class for serializing and deserializing the RiffDescriptor JSON.
CertificateDescriptor certDescriptor
[Optional] X.509 certificate parsed into a CertificateDescriptor object.
std::string meta
[Optional] Meta data associated with the file - typically a stringified JSON object.
bool verified
True if the ECDSA signature is verified.
std::string signature
[Optional] ECDSA signature
std::string certPem
[Optional] X.509 certificate in PEM format used to sign the RIFF file.
std::string file
Name of the RIFF file.
Optional Rally Tactical cloud (RTI) integration (Rallypoint, Engage Bridge Service,...
std::string serviceBaseUrlPrefix
[Optional, Default: "prod.com"] Prefix used to construct default RTI SaaS base URL as "<prefix>....
std::string enrollmentCode
Enrollment code for the RTI cloud service.
bool enabled
Master switch: when true, the product uses RTI cloud HTTP APIs (token + heartbeat).
RTP header information as per RFC 3550.
uint32_t ssrc
Psuedo-random synchronization source.
uint16_t seq
Packet sequence number.
bool marker
Indicates whether this is the start of the media stream burst.
int pt
A valid RTP payload between 0 and 127 See IANA Real-Time Transport Protocol (RTP) Parameters
uint32_t ts
Media sample timestamp.
An RTP map entry.
std::string name
Name of the CODEC.
int engageType
An integer representing the codec type.
int rtpPayloadType
The RTP payload type identifier.
uint16_t engage
The payload type used by Engage.
uint16_t external
The payload type used by the external entity.
Configuration for the optional RtpProfile.
int signalledInboundProcessorInactivityMs
[Optional, Default: inboundProcessorInactivityMs * 4] The number of milliseconds of RTP inactivity on...
int jitterUnderrunReductionAger
[Optional, Default: 100] Number of jitter buffer operations after which to reduce any underrun
int jitterMinMs
[Optional, Default: 100] Low-water mark for jitter buffers that are in a buffering state.
int jitterMaxFactor
[Optional, Default: 8] The factor by which to multiply the jitter buffer's active low-water to determ...
int inboundProcessorInactivityMs
[Optional, Default: 500] The number of milliseconds of RTP inactivity before heuristically determinin...
JitterMode_t mode
[Optional, Default: jmStandard] Specifies the operation mode (see JitterMode_t).
int jitterForceTrimAtMs
[Optional, Default: 0] Forces trimming of the jitter buffer if the queue length is greater (and not z...
int latePacketSequenceRange
[Optional, Default: 5] The delta in RTP sequence numbers in order to heuristically determine the star...
int jitterMaxExceededClipHangMs
[Optional, Default: 1500] Number of milliseconds for which the jitter buffer may exceed max before cl...
int jitterTrimPercentage
[Optional, Default: 10] The percentage of the overall jitter buffer sample count to trim when potenti...
int jitterMaxTrimMs
[Optional, Default: 250] Maximum number of milliseconds to be trimmed from a jitter buffer at any one...
int jitterMaxMs
[Optional, Default: 10000] Maximum number of milliseconds allowed in the queue
int latePacketTimestampRangeMs
[Optional, Default: 500] The delta in milliseconds in order to heuristically determine the start of a...
int jitterMaxExceededClipPerc
[Optional, Default: 10] Percentage by which maximum number of samples in the queue exceeded computed ...
int zombieLifetimeMs
[Optional, Default: 15000] The number of milliseconds that a "zombified" RTP processor is kept around...
int rtcpPresenceTimeoutMs
[Optional, Default: 45000] Timeout for RTCP presence.
int jitterUnderrunReductionThresholdMs
[Optional, Default: 1500] Number of milliseconds of error-free operations in a jitter buffer before t...
Configuration for a secure signature.
std::string signature
Contains the signature.
std::string certificate
Contains the PEM-formatted text of the certificate.
Configuration for a Security Certificate used in various configurations.
std::string key
As for above but for certificate's private key.
std::string certificate
Contains the PEM-formatted text of the certificate, OR, a reference to a PEM file denoted by "@file:/...
std::string alias
[Optional] An alias
std::string nodeId
[Optional] A node ID
Process-level HTTP POST settings for status report uploads.
RestrictionType_t type
Type indicating how the elements are to be treated.
std::vector< std::string > elements
List of elements.
RestrictionElementType_t elementsType
Type indicating what kind of data each element contains.
Contains talker information used in providing a list in GroupTalkers.
uint32_t txId
Transmission ID associated with a talker's transmission.
uint32_t ssrc
The RTS SSRC associated with a talker's transmission.
int duplicateCount
Number of duplicates detected.
int txPriority
Priority associated with a talker's transmission.
std::string alias
The user alias to represent as a "talker".
std::string nodeId
The nodeId the talker is originating from.
ManufacturedAliasType_t manufacturedAliasType
The method used to "manufacture" the alias.
ManufacturedAliasType_t
Manufactured alias type If an alias is "manufactured" then the alias is not a real user but is instea...
bool rxMuted
Indicates if RX is muted for this talker.
uint16_t rxFlags
Flags associated with a talker's transmission.
uint16_t aliasSpecializer
The numeric specializer (if any) associated with the alias.
std::string nodeId
A unique identifier for the asset.
Parameters for querying the group timeline.
bool onlyCommitted
Include only committed (not in-progress) events.
uint64_t startedOnOrAfter
Include events that started on or after this UNIX millisecond timestamp.
long maxCount
Maximum number of records to return.
uint64_t endedOnOrBefore
Include events that ended on or after this UNIX millisecond timestamp.
std::string sql
Ignore all other settings for SQL construction and use this query string instead.
bool mostRecentFirst
Sorted results with most recent timestamp first.
std::string onlyNodeId
Include events for this transmitter node ID.
int onlyDirection
Include events for this direction.
int onlyTxId
Include events for this transmission ID.
std::string onlyAlias
Include events for this transmitter alias.
TODO: Transport Security Layer (TLS) settings.
bool verifyPeers
[Optional, Default: true] When true, checks the far-end certificate validity and Engage-specific TLS ...
StringRestrictionList subjectRestrictions
[NOT USED AT THIS TIME]
std::vector< std::string > caCertificates
[Optional] Array of CA certificates (PEM or "@" file/certstore references) to be used to validate far...
StringRestrictionList issuerRestrictions
[NOT USED AT THIS TIME]
bool allowSelfSignedCertificates
[Optional, Default: false] When true, accepts far-end certificates that are self-signed.
std::vector< std::string > crlSerials
[Optional] Array of serial numbers certificates that have been revoked
std::vector< TranslationSession > sessions
Array of sessions in the configuration.
std::vector< Group > groups
Array of groups in the configuration.
std::vector< std::string > groups
List of group IDs to be included in the session.
bool enabled
[Optional, Default: true] Enable the session
Description of a transport impairment.
int lossPercentage
[Optional, Default: 0] Percentage of packets to drop (0-100).
int jitterMs
[Optional, Default: 0] Max random delay in milliseconds applied to a packet.
int errorPercentage
[Optional, Default: 0] When > 0, percentage of packets forced to error path.
uint32_t maxActiveBlobObjects
[Optional, Default 0 (no max)] Maximum number of blob objects allowed to be active
uint32_t maxActiveRtpProcessors
[Optional, Default 0 (no max)] Maximum number concurrent RTP processors
uint32_t maxPooledBufferMb
[Optional, Default 0 (no max)] Maximum number of buffer bytes allowed to be pooled
uint32_t maxActiveBufferObjects
[Optional, Default 0 (no max)] Maximum number of buffer objects allowed to be active
uint32_t maxPooledBufferObjects
[Optional, Default 0 (no max)] Maximum number of buffer objects allowed to be pooled
uint32_t maxPooledRtpObjects
[Optional, Default 0 (no max)] Maximum number of RTP objects allowed to be pooled
uint32_t maxPooledBlobMb
[Optional, Default 0 (no max)] Maximum number of blob bytes allowed to be pooled
uint32_t maxPooledRtpMb
[Optional, Default 0 (no max)] Maximum number of RTP bytes allowed to be pooled
uint32_t maxActiveRtpObjects
[Optional, Default 0 (no max)] Maximum number of RTP objects allowed to be active
uint32_t maxPooledBlobObjects
[Optional, Default 0 (no max)] Maximum number of blob objects allowed to be pooled
Configuration for the audio transmit properties for a group.
int startTxNotifications
[Optional, Default: 5] Number of start TX notifications to send when TX is about to begin.
int framingMs
[Optional, Default: 60] Audio sample framing size in milliseconds.
HeaderExtensionType_t hdrExtType
[Optional, Default: hetEngageStandard] The header extension type to use. See HeaderExtensionType_t fo...
int maxTxSecs
[Optional, Default: 0] Maximum number of seconds the Engine will transmit for.
uint32_t internalKey
[INTERNAL] The Engine-assigned key for the codec
bool enabled
[Optional, Default: true] Audio transmission is enabled
bool fdx
[Optional, Default: false] Indicates if full duplex audio is supported.
int initialHeaderBurst
[Optional, Default: 5] Number of headers to send at the beginning of a talk burst.
bool resetRtpOnTx
[Optional, Default: true] Resets RTP counters on each new transmission.
bool dtx
[Optional, Default: false] Support discontinuous transmission on those CODECs that allow it
std::string encoderName
[Optional] The name of the external codec - overrides encoder
TxCodec_t encoder
[Optional, Default: ctOpus8000] Specifies the Codec Type to use for the transmission....
HeaderExtensionType_t
Header extension types.
int blockCount
[Optional, Default: 0] If >0, derives framingMs based on the encoder's internal operation
int smoothedHangTimeMs
[Optional, Default: 0] Hang timer for ongoing TX - only applicable if enableSmoothing is true
int customRtpPayloadType
[Optional, Default: -1] The custom RTP payload type to use for transmission. A value of -1 causes the...
bool noHdrExt
[Optional, Default: false] Set to true whether to disable header extensions.
bool enableSmoothing
[Optional, Default: true] Smooth input audio
int trailingHeaderBurst
[Optional, Default: 5] Number of headers to send at the conclusion of a talk burst.
int extensionSendInterval
[Optional, Default: 10] The number of packets when to periodically send the header extension.
Optional audio streaming from a URI for engageBeginGroupTxAdvanced.
int repeatCount
[Optional, Default: 0] Number of times to repeat
Voice Activity Detection settings.
bool enabled
[Optional, Default: false] Enable VAD
Mode_t mode
[Optional, Default: vamDefault] Specifies VAD mode. See Mode_t for all modes
std::vector< std::string > groups
List of group IDs to be included in the session.
bool enabled
[Optional, Default: true] Enable the session
int intervalMs
[Optional, Default: 5000] Interval at which checks are made.
int hangDetectionMs
[Optional, Default: 2000] Number of milliseconds that must pass before a hang is assumed.
int slowExecutionThresholdMs
[Optional, Default: 100] Maximum number of milliseconds that a task may take before being considered ...
bool abortOnHang
[Optional, Default: true] If true, aborts the process if a hang is detected.
bool enabled
[Optional, Default: true] Enables/disables a watchdog.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * OID_RTS_PEM
Rally Tactical Systems' PEN as assigned by IANA.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * OID_RTS_CERT_SUBJ_ACCESS_TAGS
The link to the Rallypoint is down.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_EXCLUDED_SERIAL
The Rallypoint denied the registration request because the far-end's certificate serial number has be...
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_SECURITY_CLASSIFICATION_LEVEL_TOO_HIGH
The Rallypoint has denied the registration because the registration is for a security level not allow...
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_ON_BLACKLIST
The Rallypoint denied the registration request because the far-end does appears in blackist criteria.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_EXCLUDED_FINGERPRINT
The Rallypoint denied the registration request because the far-end's certificate fingerprint has been...
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_NO_ISSUER
The Rallypoint denied the registration request because the far-end's certificate does not have an an ...
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_GENERAL_DENIAL
The Rallypoint has denied the registration for no specific reason.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_NO_ACCESS_TAG
The Rallypoint denied the registration request because the far-end's certificate does not have an acc...
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_NO_SUBJECT
The Rallypoint denied the registration request because the far-end's certificate does not have an an ...
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_NOT_ALLOWED
The Rallypoint is not accepting registration for the group at this time.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_EXCLUDED_SUBJECT
The Rallypoint denied the registration request because the far-end's certificate subject has been exc...
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_NO_LINK
The link to the Rallypoint is down.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_NO_SERIAL
The Rallypoint denied the registration request because the far-end's certificate does not have an an ...
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_NO_FINGERPRINT
The Rallypoint denied the registration request because the far-end's certificate does not have an an ...
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_EXCLUDED_ISSUER
The Rallypoint denied the registration request because the far-end's certificate issuer has been excl...
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_EXCLUDED_ACCESS_TAG
The Rallypoint denied the registration request because the far-end's certificate does not have an acc...
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_UNREGISTERED
The group has been gracefully unregistered from the Rallypoint.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_NO_REAON
No particular reason was provided.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_DISCONNECTED_REASON_NOT_ON_WHITELIST
The Rallypoint denied the registration request because the far-end does not appear in any whitelist c...
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_SOURCE_ENGAGE_MAGELLAN_DOMO
The source is Domo Tactical via Magellan discovery.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_SOURCE_ENGAGE_MAGELLAN_CISTECH
The source is CISTECH via Magellan discovery.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_SOURCE_ENGAGE_MAGELLAN_CORE
The source is a Magellan-capable entity.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_SOURCE_ENGAGE_INTERNAL
Internal to Engage.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_SOURCE_ENGAGE_MAGELLAN_TAIT
The source is Tait via Magellan discovery.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_SOURCE_ENGAGE_MAGELLAN_TRELLISWARE
The source is Trellisware via Magellan discovery.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_SOURCE_ENGAGE_MAGELLAN_SILVUS
The source is Silvus via Magellan discovery.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_SOURCE_ENGAGE_MAGELLAN_VOCALITY
The source is Vocality via Magellan discovery.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_SOURCE_ENGAGE_MAGELLAN_PERSISTENT
The source is Persistent Systems via Magellan discovery.
static ENGAGE_IGNORE_COMPILER_UNUSED_WARNING const char * GROUP_SOURCE_ENGAGE_MAGELLAN_KENWOOD
The source is Kenwood via Magellan discovery.
static const uint8_t ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE
The default RTP payload type Engage uses for RTP blob messaging.
uint8_t t
DataSeries Type. Currently supported types.
uint8_t it
Increment type. Valid Types:
uint32_t ts
Timestamp representing the number of seconds elapsed since January 1, 1970 - based on traditional Uni...
uint8_t im
Increment multiplier. The increment multiplier is an additional field that allows you apply a multipl...