Engage Engine API  1.263.9103
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:
2649 int applicationPercentage;
2650 int jitterMs;
2651 int lossPercentage;
2654
2656 {
2657 clear();
2658 }
2659
2660 void clear()
2661 {
2662 applicationPercentage = 0;
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(applicationPercentage),
2673 TOJSON_IMPL(jitterMs),
2674 TOJSON_IMPL(lossPercentage),
2675 TOJSON_IMPL(errorPercentage)
2676 };
2677 }
2678 static void from_json(const nlohmann::json& j, TransportImpairment& p)
2679 {
2680 p.clear();
2681 getOptional<int>("applicationPercentage", p.applicationPercentage, j, 0);
2682 getOptional<int>("jitterMs", p.jitterMs, j, 0);
2683 getOptional<int>("lossPercentage", p.lossPercentage, j, 0);
2684 getOptional<int>("errorPercentage", p.errorPercentage, j, 0);
2685 }
2686
2687 //-----------------------------------------------------------
2688 JSON_SERIALIZED_CLASS(NsmNetworking)
2701 {
2702 IMPLEMENT_JSON_SERIALIZATION()
2703 IMPLEMENT_JSON_DOCUMENTATION(NsmNetworking)
2704
2705 public:
2706 std::string address;
2707 int port;
2708 int ttl;
2709 TxPriority_t priority;
2710 int txOversend;
2711 TransportImpairment rxImpairment;
2712 TransportImpairment txImpairment;
2713 std::string cryptoPassword;
2714 int maxUdpPayloadBytes;
2715
2717 {
2718 clear();
2719 }
2720
2721 void clear()
2722 {
2723 address.clear();
2724 port = 0;
2725 ttl = 1;
2726 priority = TxPriority_t::priVoice;
2727 txOversend = 0;
2728 rxImpairment.clear();
2729 txImpairment.clear();
2730 cryptoPassword.clear();
2731 maxUdpPayloadBytes = 800;
2732 }
2733 };
2734
2735 static void to_json(nlohmann::json& j, const NsmNetworking& p)
2736 {
2737 nlohmann::json pathJson;
2738 to_json(pathJson, p.address);
2739 j = nlohmann::json{
2740 TOJSON_IMPL(port),
2741 TOJSON_IMPL(ttl),
2742 TOJSON_IMPL(priority),
2743 TOJSON_IMPL(txOversend),
2744 TOJSON_IMPL(rxImpairment),
2745 TOJSON_IMPL(txImpairment),
2746 TOJSON_IMPL(cryptoPassword),
2747 TOJSON_IMPL(maxUdpPayloadBytes)
2748 };
2749 }
2750 static void from_json(const nlohmann::json& j, NsmNetworking& p)
2751 {
2752 p.clear();
2753 getOptional<std::string>("address", p.address, j);
2754 getOptional<int>("port", p.port, j, 8513);
2755 getOptional<int>("ttl", p.ttl, j, 1);
2756 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
2757 getOptional<int>("txOversend", p.txOversend, j, 0);
2758 getOptional<TransportImpairment>("rxImpairment", p.rxImpairment, j);
2759 getOptional<TransportImpairment>("txImpairment", p.txImpairment, j);
2760 getOptional("cryptoPassword", p.cryptoPassword, j, EMPTY_STRING);
2761 getOptional<int>("maxUdpPayloadBytes", p.maxUdpPayloadBytes, j, 800);
2762 }
2763
2764 //-----------------------------------------------------------
2765 JSON_SERIALIZED_CLASS(NsmNodeResource)
2772 {
2773 IMPLEMENT_JSON_SERIALIZATION()
2774 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeResource)
2775
2776 public:
2778 std::string id;
2781
2783 {
2784 clear();
2785 }
2786
2787 void clear()
2788 {
2789 id.clear();
2790 priority = -1;
2791 }
2792 };
2793
2794 static void to_json(nlohmann::json& j, const NsmNodeResource& p)
2795 {
2796 j = nlohmann::json{
2797 TOJSON_IMPL(id),
2798 TOJSON_IMPL(priority)
2799 };
2800 }
2801 static void from_json(const nlohmann::json& j, NsmNodeResource& p)
2802 {
2803 p.clear();
2804 getOptional<std::string>("id", p.id, j);
2805 getOptional<int>("priority", p.priority, j, -1);
2806 }
2807
2809 static void nsmConfigurationResourcesFromJson(const nlohmann::json& j, std::vector<NsmNodeResource>& out)
2810 {
2811 out.clear();
2812 if (!j.contains("resources") || !j["resources"].is_array())
2813 {
2814 return;
2815 }
2816 for (const auto& el : j["resources"])
2817 {
2818 if (!el.is_object())
2819 {
2820 continue;
2821 }
2822 NsmNodeResource nr;
2823 nr.clear();
2824 getOptional<std::string>("id", nr.id, el);
2825 getOptional<int>("priority", nr.priority, el, -1);
2826 if (!nr.id.empty())
2827 {
2828 out.push_back(nr);
2829 }
2830 }
2831 }
2832
2833
2834 //-----------------------------------------------------------
2835 JSON_SERIALIZED_CLASS(NsmConfiguration)
2845 {
2846 IMPLEMENT_JSON_SERIALIZATION()
2847 IMPLEMENT_JSON_DOCUMENTATION(NsmConfiguration)
2848
2849 public:
2850
2851 std::string id;
2852 bool favorUptime;
2853 NsmNetworking networking;
2854 std::vector<NsmNodeResource> resources;
2855 int tokenStart;
2856 int tokenEnd;
2857 int intervalSecs;
2858 int transitionSecsFactor;
2863 bool logCommandOutput;
2864
2866 {
2867 clear();
2868 }
2869
2870 void clear()
2871 {
2872 id.clear();
2873 favorUptime = false;
2874 networking.clear();
2875 resources.clear();
2876 tokenStart = 1000000;
2877 tokenEnd = 2000000;
2878 intervalSecs = 1;
2879 transitionSecsFactor = 3;
2880 internalMultiplier = 1;
2881 goingActiveRandomDelayMs = 500;
2882 logCommandOutput = false;
2883 }
2884 };
2885
2886 static void to_json(nlohmann::json& j, const NsmConfiguration& p)
2887 {
2888 j = nlohmann::json{
2889 TOJSON_IMPL(id),
2890 TOJSON_IMPL(favorUptime),
2891 TOJSON_IMPL(networking),
2892 TOJSON_IMPL(resources),
2893 TOJSON_IMPL(tokenStart),
2894 TOJSON_IMPL(tokenEnd),
2895 TOJSON_IMPL(intervalSecs),
2896 TOJSON_IMPL(transitionSecsFactor),
2897 TOJSON_IMPL(internalMultiplier),
2898 TOJSON_IMPL(goingActiveRandomDelayMs),
2899 TOJSON_IMPL(logCommandOutput),
2900 };
2901 }
2902 static void from_json(const nlohmann::json& j, NsmConfiguration& p)
2903 {
2904 p.clear();
2905 getOptional("id", p.id, j);
2906 getOptional<bool>("favorUptime", p.favorUptime, j, false);
2907 getOptional<NsmNetworking>("networking", p.networking, j);
2908 nsmConfigurationResourcesFromJson(j, p.resources);
2909 getOptional<int>("tokenStart", p.tokenStart, j, 1000000);
2910 getOptional<int>("tokenEnd", p.tokenEnd, j, 2000000);
2911 getOptional<int>("intervalSecs", p.intervalSecs, j, 1);
2912 getOptional<int>("transitionSecsFactor", p.transitionSecsFactor, j, 3);
2913 getOptional<int>("internalMultiplier", p.internalMultiplier, j, 1);
2914 getOptional<int>("goingActiveRandomDelayMs", p.goingActiveRandomDelayMs, j, 500);
2915 getOptional<bool>("logCommandOutput", p.logCommandOutput, j, false);
2916 }
2917
2918
2919 //-----------------------------------------------------------
2920 JSON_SERIALIZED_CLASS(Rallypoint)
2929 {
2930 IMPLEMENT_JSON_SERIALIZATION()
2931 IMPLEMENT_JSON_DOCUMENTATION(Rallypoint)
2932
2933 public:
2938 typedef enum
2939 {
2941 rppTlsTcp = 0,
2942
2944 rppTlsWs = 1,
2945
2947 rppInvalid = -1
2948 } RpProtocol_t;
2949
2955
2967 std::string certificate;
2968
2980 std::string certificateKey;
2981
2986
2991
2995 std::vector<std::string> caCertificates;
2996
3001
3006
3009
3012
3018 std::string sni;
3019
3020
3023
3025 std::string path;
3026
3029
3030
3031 Rallypoint()
3032 {
3033 clear();
3034 }
3035
3036 void clear()
3037 {
3038 host.clear();
3039 certificate.clear();
3040 certificateKey.clear();
3041 caCertificates.clear();
3042 verifyPeer = false;
3043 transactionTimeoutMs = 0;
3044 disableMessageSigning = false;
3045 connectionTimeoutSecs = 0;
3046 tcpTxOptions.clear();
3047 sni.clear();
3048 protocol = rppTlsTcp;
3049 path.clear();
3050 additionalProtocols.clear();
3051 }
3052
3053 bool matches(const Rallypoint& other)
3054 {
3055 if(!host.matches(other.host))
3056 {
3057 return false;
3058 }
3059
3060 if(protocol != other.protocol)
3061 {
3062 return false;
3063 }
3064
3065 if(path.compare(other.path) != 0)
3066 {
3067 return false;
3068 }
3069
3070 if(certificate.compare(other.certificate) != 0)
3071 {
3072 return false;
3073 }
3074
3075 if(certificateKey.compare(other.certificateKey) != 0)
3076 {
3077 return false;
3078 }
3079
3080 if(verifyPeer != other.verifyPeer)
3081 {
3082 return false;
3083 }
3084
3085 if(allowSelfSignedCertificate != other.allowSelfSignedCertificate)
3086 {
3087 return false;
3088 }
3089
3090 if(caCertificates.size() != other.caCertificates.size())
3091 {
3092 return false;
3093 }
3094
3095 for(size_t x = 0; x < caCertificates.size(); x++)
3096 {
3097 bool found = false;
3098
3099 for(size_t y = 0; y < other.caCertificates.size(); y++)
3100 {
3101 if(caCertificates[x].compare(other.caCertificates[y]) == 0)
3102 {
3103 found = true;
3104 break;
3105 }
3106 }
3107
3108 if(!found)
3109 {
3110 return false;
3111 }
3112 }
3113
3114 if(transactionTimeoutMs != other.transactionTimeoutMs)
3115 {
3116 return false;
3117 }
3118
3119 if(disableMessageSigning != other.disableMessageSigning)
3120 {
3121 return false;
3122 }
3123 if(connectionTimeoutSecs != other.connectionTimeoutSecs)
3124 {
3125 return false;
3126 }
3127 if(tcpTxOptions.priority != other.tcpTxOptions.priority)
3128 {
3129 return false;
3130 }
3131 if(sni.compare(other.sni) != 0)
3132 {
3133 return false;
3134 }
3135
3136 return true;
3137 }
3138 };
3139
3140 static void to_json(nlohmann::json& j, const Rallypoint& p)
3141 {
3142 j = nlohmann::json{
3143 TOJSON_IMPL(host),
3144 TOJSON_IMPL(certificate),
3145 TOJSON_IMPL(certificateKey),
3146 TOJSON_IMPL(verifyPeer),
3147 TOJSON_IMPL(allowSelfSignedCertificate),
3148 TOJSON_IMPL(caCertificates),
3149 TOJSON_IMPL(transactionTimeoutMs),
3150 TOJSON_IMPL(disableMessageSigning),
3151 TOJSON_IMPL(connectionTimeoutSecs),
3152 TOJSON_IMPL(tcpTxOptions),
3153 TOJSON_IMPL(sni),
3154 TOJSON_IMPL(protocol),
3155 TOJSON_IMPL(path),
3156 TOJSON_IMPL(additionalProtocols)
3157 };
3158 }
3159
3160 static void from_json(const nlohmann::json& j, Rallypoint& p)
3161 {
3162 p.clear();
3163 j.at("host").get_to(p.host);
3164 getOptional("certificate", p.certificate, j);
3165 getOptional("certificateKey", p.certificateKey, j);
3166 getOptional<bool>("verifyPeer", p.verifyPeer, j, true);
3167 getOptional<bool>("allowSelfSignedCertificate", p.allowSelfSignedCertificate, j, false);
3168 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
3169 getOptional<int>("transactionTimeoutMs", p.transactionTimeoutMs, j, 0);
3170 getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
3171 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
3172 getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
3173 getOptional<std::string>("sni", p.sni, j);
3174 getOptional<Rallypoint::RpProtocol_t>("protocol", p.protocol, j, Rallypoint::RpProtocol_t::rppTlsTcp);
3175 getOptional<std::string>("path", p.path, j);
3176 getOptional<std::string>("additionalProtocols", p.additionalProtocols, j);
3177 }
3178
3179 //-----------------------------------------------------------
3180 JSON_SERIALIZED_CLASS(RallypointCluster)
3192 {
3193 IMPLEMENT_JSON_SERIALIZATION()
3194 IMPLEMENT_JSON_DOCUMENTATION(RallypointCluster)
3195
3196 public:
3202 typedef enum
3203 {
3205 csRoundRobin = 0,
3206
3208 csFailback = 1
3209 } ConnectionStrategy_t;
3210
3213
3215 std::vector<Rallypoint> rallypoints;
3216
3219
3222
3225
3227 {
3228 clear();
3229 }
3230
3231 void clear()
3232 {
3233 connectionStrategy = csRoundRobin;
3234 rallypoints.clear();
3235 rolloverSecs = 10;
3236 connectionTimeoutSecs = 5;
3237 transactionTimeoutMs = 10000;
3238 }
3239 };
3240
3241 static void to_json(nlohmann::json& j, const RallypointCluster& p)
3242 {
3243 j = nlohmann::json{
3244 TOJSON_IMPL(connectionStrategy),
3245 TOJSON_IMPL(rallypoints),
3246 TOJSON_IMPL(rolloverSecs),
3247 TOJSON_IMPL(connectionTimeoutSecs),
3248 TOJSON_IMPL(transactionTimeoutMs)
3249 };
3250 }
3251 static void from_json(const nlohmann::json& j, RallypointCluster& p)
3252 {
3253 p.clear();
3254 getOptional<RallypointCluster::ConnectionStrategy_t>("connectionStrategy", p.connectionStrategy, j, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
3255 getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
3256 getOptional<int>("rolloverSecs", p.rolloverSecs, j, 10);
3257 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 5);
3258 getOptional<int>("transactionTimeoutMs", p.transactionTimeoutMs, j, 10000);
3259 }
3260
3261
3262 //-----------------------------------------------------------
3263 JSON_SERIALIZED_CLASS(NetworkDeviceDescriptor)
3274 {
3275 IMPLEMENT_JSON_SERIALIZATION()
3276 IMPLEMENT_JSON_DOCUMENTATION(NetworkDeviceDescriptor)
3277
3278 public:
3284
3286 std::string name;
3287
3289 std::string manufacturer;
3290
3292 std::string model;
3293
3295 std::string hardwareId;
3296
3298 std::string serialNumber;
3299
3301 std::string type;
3302
3304 std::string extra;
3305
3307 {
3308 clear();
3309 }
3310
3311 void clear()
3312 {
3313 deviceId = 0;
3314
3315 name.clear();
3316 manufacturer.clear();
3317 model.clear();
3318 hardwareId.clear();
3319 serialNumber.clear();
3320 type.clear();
3321 extra.clear();
3322 }
3323
3324 virtual std::string toString()
3325 {
3326 char buff[2048];
3327
3328 snprintf(buff, sizeof(buff), "deviceId=%d, name=%s, manufacturer=%s, model=%s, hardwareId=%s, serialNumber=%s, type=%s, extra=%s",
3329 deviceId,
3330 name.c_str(),
3331 manufacturer.c_str(),
3332 model.c_str(),
3333 hardwareId.c_str(),
3334 serialNumber.c_str(),
3335 type.c_str(),
3336 extra.c_str());
3337
3338 return std::string(buff);
3339 }
3340 };
3341
3342 static void to_json(nlohmann::json& j, const NetworkDeviceDescriptor& p)
3343 {
3344 j = nlohmann::json{
3345 TOJSON_IMPL(deviceId),
3346 TOJSON_IMPL(name),
3347 TOJSON_IMPL(manufacturer),
3348 TOJSON_IMPL(model),
3349 TOJSON_IMPL(hardwareId),
3350 TOJSON_IMPL(serialNumber),
3351 TOJSON_IMPL(type),
3352 TOJSON_IMPL(extra)
3353 };
3354 }
3355 static void from_json(const nlohmann::json& j, NetworkDeviceDescriptor& p)
3356 {
3357 p.clear();
3358 getOptional<int>("deviceId", p.deviceId, j, 0);
3359 getOptional("name", p.name, j);
3360 getOptional("manufacturer", p.manufacturer, j);
3361 getOptional("model", p.model, j);
3362 getOptional("hardwareId", p.hardwareId, j);
3363 getOptional("serialNumber", p.serialNumber, j);
3364 getOptional("type", p.type, j);
3365 getOptional("extra", p.extra, j);
3366 }
3367
3368 //-----------------------------------------------------------
3369 JSON_SERIALIZED_CLASS(AudioGate)
3379 {
3380 IMPLEMENT_JSON_SERIALIZATION()
3381 IMPLEMENT_JSON_DOCUMENTATION(AudioGate)
3382
3383 public:
3386
3389
3391 uint32_t hangMs;
3392
3394 uint32_t windowMin;
3395
3397 uint32_t windowMax;
3398
3401
3402
3403 AudioGate()
3404 {
3405 clear();
3406 }
3407
3408 void clear()
3409 {
3410 enabled = false;
3411 useVad = false;
3412 hangMs = 1500;
3413 windowMin = 25;
3414 windowMax = 125;
3415 coefficient = 1.75;
3416 }
3417 };
3418
3419 static void to_json(nlohmann::json& j, const AudioGate& p)
3420 {
3421 j = nlohmann::json{
3422 TOJSON_IMPL(enabled),
3423 TOJSON_IMPL(useVad),
3424 TOJSON_IMPL(hangMs),
3425 TOJSON_IMPL(windowMin),
3426 TOJSON_IMPL(windowMax),
3427 TOJSON_IMPL(coefficient)
3428 };
3429 }
3430 static void from_json(const nlohmann::json& j, AudioGate& p)
3431 {
3432 p.clear();
3433 getOptional<bool>("enabled", p.enabled, j, false);
3434 getOptional<bool>("useVad", p.useVad, j, false);
3435 getOptional<uint32_t>("hangMs", p.hangMs, j, 1500);
3436 getOptional<uint32_t>("windowMin", p.windowMin, j, 25);
3437 getOptional<uint32_t>("windowMax", p.windowMax, j, 125);
3438 getOptional<double>("coefficient", p.coefficient, j, 1.75);
3439 }
3440
3441 //-----------------------------------------------------------
3442 JSON_SERIALIZED_CLASS(TxAudio)
3456 {
3457 IMPLEMENT_JSON_SERIALIZATION()
3458 IMPLEMENT_JSON_DOCUMENTATION(TxAudio)
3459
3460 public:
3466 typedef enum
3467 {
3469 ctExternal = -1,
3470
3472 ctUnknown = 0,
3473
3474 /* G.711 */
3476 ctG711ulaw = 1,
3477
3479 ctG711alaw = 2,
3480
3481
3482 /* GSM */
3484 ctGsm610 = 3,
3485
3486
3487 /* G.729 */
3489 ctG729a = 4,
3490
3491
3492 /* PCM */
3494 ctPcm = 5,
3495
3496 // AMR Narrowband */
3498 ctAmrNb4750 = 10,
3499
3501 ctAmrNb5150 = 11,
3502
3504 ctAmrNb5900 = 12,
3505
3507 ctAmrNb6700 = 13,
3508
3510 ctAmrNb7400 = 14,
3511
3513 ctAmrNb7950 = 15,
3514
3516 ctAmrNb10200 = 16,
3517
3519 ctAmrNb12200 = 17,
3520
3521
3522 /* Opus */
3524 ctOpus6000 = 20,
3525
3527 ctOpus8000 = 21,
3528
3530 ctOpus10000 = 22,
3531
3533 ctOpus12000 = 23,
3534
3536 ctOpus14000 = 24,
3537
3539 ctOpus16000 = 25,
3540
3542 ctOpus18000 = 26,
3543
3545 ctOpus20000 = 27,
3546
3548 ctOpus22000 = 28,
3549
3551 ctOpus24000 = 29,
3552
3553
3554 /* Speex */
3556 ctSpxNb2150 = 30,
3557
3559 ctSpxNb3950 = 31,
3560
3562 ctSpxNb5950 = 32,
3563
3565 ctSpxNb8000 = 33,
3566
3568 ctSpxNb11000 = 34,
3569
3571 ctSpxNb15000 = 35,
3572
3574 ctSpxNb18200 = 36,
3575
3577 ctSpxNb24600 = 37,
3578
3579
3580 /* Codec2 */
3582 ctC2450 = 40,
3583
3585 ctC2700 = 41,
3586
3588 ctC21200 = 42,
3589
3591 ctC21300 = 43,
3592
3594 ctC21400 = 44,
3595
3597 ctC21600 = 45,
3598
3600 ctC22400 = 46,
3601
3603 ctC23200 = 47,
3604
3605
3606 /* MELPe */
3608 ctMelpe600 = 50,
3609
3611 ctMelpe1200 = 51,
3612
3614 ctMelpe2400 = 52,
3615
3616 /* CVSD */
3618 ctCvsd = 60
3619 } TxCodec_t;
3620
3626 typedef enum
3627 {
3629 hetEngageStandard = 0,
3630
3632 hetNatoStanga5643 = 1
3633 } HeaderExtensionType_t;
3634
3637
3640
3642 std::string encoderName;
3643
3646
3649
3651 bool fdx;
3652
3660
3663
3670
3677
3680
3683
3686
3691
3693 uint32_t internalKey;
3694
3697
3700
3702 bool dtx;
3703
3706
3707 TxAudio()
3708 {
3709 clear();
3710 }
3711
3712 void clear()
3713 {
3714 enabled = true;
3715 encoder = TxAudio::TxCodec_t::ctUnknown;
3716 encoderName.clear();
3717 framingMs = 60;
3718 blockCount = 0;
3719 fdx = false;
3720 noHdrExt = false;
3721 maxTxSecs = 0;
3722 extensionSendInterval = 10;
3723 initialHeaderBurst = 5;
3724 trailingHeaderBurst = 5;
3725 startTxNotifications = 5;
3726 customRtpPayloadType = -1;
3727 internalKey = 0;
3728 resetRtpOnTx = true;
3729 enableSmoothing = true;
3730 dtx = false;
3731 smoothedHangTimeMs = 0;
3732 hdrExtType = HeaderExtensionType_t::hetEngageStandard;
3733 }
3734 };
3735
3736 static void to_json(nlohmann::json& j, const TxAudio& p)
3737 {
3738 j = nlohmann::json{
3739 TOJSON_IMPL(enabled),
3740 TOJSON_IMPL(encoder),
3741 TOJSON_IMPL(encoderName),
3742 TOJSON_IMPL(framingMs),
3743 TOJSON_IMPL(blockCount),
3744 TOJSON_IMPL(fdx),
3745 TOJSON_IMPL(noHdrExt),
3746 TOJSON_IMPL(maxTxSecs),
3747 TOJSON_IMPL(extensionSendInterval),
3748 TOJSON_IMPL(initialHeaderBurst),
3749 TOJSON_IMPL(trailingHeaderBurst),
3750 TOJSON_IMPL(startTxNotifications),
3751 TOJSON_IMPL(customRtpPayloadType),
3752 TOJSON_IMPL(resetRtpOnTx),
3753 TOJSON_IMPL(enableSmoothing),
3754 TOJSON_IMPL(dtx),
3755 TOJSON_IMPL(smoothedHangTimeMs),
3756 TOJSON_IMPL(hdrExtType)
3757 };
3758
3759 // internalKey is not serialized
3760 }
3761 static void from_json(const nlohmann::json& j, TxAudio& p)
3762 {
3763 p.clear();
3764 getOptional<bool>("enabled", p.enabled, j, true);
3765 getOptional<TxAudio::TxCodec_t>("encoder", p.encoder, j, TxAudio::TxCodec_t::ctOpus8000);
3766 getOptional<std::string>("encoderName", p.encoderName, j, EMPTY_STRING);
3767 getOptional("framingMs", p.framingMs, j, 60);
3768 getOptional("blockCount", p.blockCount, j, 0);
3769 getOptional("fdx", p.fdx, j, false);
3770 getOptional("noHdrExt", p.noHdrExt, j, false);
3771 getOptional("maxTxSecs", p.maxTxSecs, j, 0);
3772 getOptional("extensionSendInterval", p.extensionSendInterval, j, 10);
3773 getOptional("initialHeaderBurst", p.initialHeaderBurst, j, 5);
3774 getOptional("trailingHeaderBurst", p.trailingHeaderBurst, j, 5);
3775 getOptional("startTxNotifications", p.startTxNotifications, j, 5);
3776 getOptional("customRtpPayloadType", p.customRtpPayloadType, j, -1);
3777 getOptional("resetRtpOnTx", p.resetRtpOnTx, j, true);
3778 getOptional("enableSmoothing", p.enableSmoothing, j, true);
3779 getOptional("dtx", p.dtx, j, false);
3780 getOptional("smoothedHangTimeMs", p.smoothedHangTimeMs, j, 0);
3781 getOptional("hdrExtType", p.hdrExtType, j, TxAudio::HeaderExtensionType_t::hetEngageStandard);
3782
3783 // internalKey is not serialized
3784 }
3785
3786 //-----------------------------------------------------------
3787 JSON_SERIALIZED_CLASS(AudioRegistryDevice)
3798 {
3799 IMPLEMENT_JSON_SERIALIZATION()
3800 IMPLEMENT_JSON_DOCUMENTATION(AudioRegistryDevice)
3801
3802 public:
3804 std::string hardwareId;
3805
3808
3810 std::string name;
3811
3813 std::string manufacturer;
3814
3816 std::string model;
3817
3819 std::string serialNumber;
3820
3821
3823 std::string type;
3824
3826 std::string extra;
3827
3829 {
3830 clear();
3831 }
3832
3833 void clear()
3834 {
3835 hardwareId.clear();
3836 isDefault = false;
3837 name.clear();
3838 manufacturer.clear();
3839 model.clear();
3840 serialNumber.clear();
3841 type.clear();
3842 extra.clear();
3843 }
3844
3845 virtual std::string toString()
3846 {
3847 char buff[2048];
3848
3849 snprintf(buff, sizeof(buff), "hardwareId=%s, isDefault=%d, name=%s, manufacturer=%s, model=%s, serialNumber=%s, type=%s, extra=%s",
3850 hardwareId.c_str(),
3851 (int)isDefault,
3852 name.c_str(),
3853 manufacturer.c_str(),
3854 model.c_str(),
3855 serialNumber.c_str(),
3856 type.c_str(),
3857 extra.c_str());
3858
3859 return std::string(buff);
3860 }
3861 };
3862
3863 static void to_json(nlohmann::json& j, const AudioRegistryDevice& p)
3864 {
3865 j = nlohmann::json{
3866 TOJSON_IMPL(hardwareId),
3867 TOJSON_IMPL(isDefault),
3868 TOJSON_IMPL(name),
3869 TOJSON_IMPL(manufacturer),
3870 TOJSON_IMPL(model),
3871 TOJSON_IMPL(serialNumber),
3872 TOJSON_IMPL(type),
3873 TOJSON_IMPL(extra)
3874 };
3875 }
3876 static void from_json(const nlohmann::json& j, AudioRegistryDevice& p)
3877 {
3878 p.clear();
3879 getOptional<std::string>("hardwareId", p.hardwareId, j, EMPTY_STRING);
3880 getOptional<bool>("isDefault", p.isDefault, j, false);
3881 getOptional("name", p.name, j);
3882 getOptional("manufacturer", p.manufacturer, j);
3883 getOptional("model", p.model, j);
3884 getOptional("serialNumber", p.serialNumber, j);
3885 getOptional("type", p.type, j);
3886 getOptional("extra", p.extra, j);
3887 }
3888
3889
3890 //-----------------------------------------------------------
3891 JSON_SERIALIZED_CLASS(AudioRegistry)
3902 {
3903 IMPLEMENT_JSON_SERIALIZATION()
3904 IMPLEMENT_JSON_DOCUMENTATION(AudioRegistry)
3905
3906 public:
3908 std::vector<AudioRegistryDevice> inputs;
3909
3911 std::vector<AudioRegistryDevice> outputs;
3912
3914 {
3915 clear();
3916 }
3917
3918 void clear()
3919 {
3920 inputs.clear();
3921 outputs.clear();
3922 }
3923
3924 virtual std::string toString()
3925 {
3926 return std::string("");
3927 }
3928 };
3929
3930 static void to_json(nlohmann::json& j, const AudioRegistry& p)
3931 {
3932 j = nlohmann::json{
3933 TOJSON_IMPL(inputs),
3934 TOJSON_IMPL(outputs)
3935 };
3936 }
3937 static void from_json(const nlohmann::json& j, AudioRegistry& p)
3938 {
3939 p.clear();
3940 getOptional<std::vector<AudioRegistryDevice>>("inputs", p.inputs, j);
3941 getOptional<std::vector<AudioRegistryDevice>>("outputs", p.outputs, j);
3942 }
3943
3944 //-----------------------------------------------------------
3945 JSON_SERIALIZED_CLASS(AudioDeviceDescriptor)
3956 {
3957 IMPLEMENT_JSON_SERIALIZATION()
3958 IMPLEMENT_JSON_DOCUMENTATION(AudioDeviceDescriptor)
3959
3960 public:
3961
3963 typedef enum
3964 {
3966 dirUnknown = 0,
3967
3970
3973
3975 dirBoth
3976 } Direction_t;
3977
3983
3991
3999
4002
4010
4013
4015 std::string name;
4016
4018 std::string manufacturer;
4019
4021 std::string model;
4022
4024 std::string hardwareId;
4025
4027 std::string serialNumber;
4028
4031
4033 std::string type;
4034
4036 std::string extra;
4037
4040
4042 {
4043 clear();
4044 }
4045
4046 void clear()
4047 {
4048 deviceId = 0;
4049 samplingRate = 0;
4050 channels = 0;
4051 direction = dirUnknown;
4052 boostPercentage = 0;
4053 isAdad = false;
4054 isDefault = false;
4055
4056 name.clear();
4057 manufacturer.clear();
4058 model.clear();
4059 hardwareId.clear();
4060 serialNumber.clear();
4061 type.clear();
4062 extra.clear();
4063 isPresent = false;
4064 }
4065
4066 virtual std::string toString()
4067 {
4068 char buff[2048];
4069
4070 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",
4071 deviceId,
4072 samplingRate,
4073 channels,
4074 (int)direction,
4075 boostPercentage,
4076 (int)isAdad,
4077 name.c_str(),
4078 manufacturer.c_str(),
4079 model.c_str(),
4080 hardwareId.c_str(),
4081 serialNumber.c_str(),
4082 (int)isDefault,
4083 type.c_str(),
4084 (int)isPresent,
4085 extra.c_str());
4086
4087 return std::string(buff);
4088 }
4089 };
4090
4091 static void to_json(nlohmann::json& j, const AudioDeviceDescriptor& p)
4092 {
4093 j = nlohmann::json{
4094 TOJSON_IMPL(deviceId),
4095 TOJSON_IMPL(samplingRate),
4096 TOJSON_IMPL(channels),
4097 TOJSON_IMPL(direction),
4098 TOJSON_IMPL(boostPercentage),
4099 TOJSON_IMPL(isAdad),
4100 TOJSON_IMPL(name),
4101 TOJSON_IMPL(manufacturer),
4102 TOJSON_IMPL(model),
4103 TOJSON_IMPL(hardwareId),
4104 TOJSON_IMPL(serialNumber),
4105 TOJSON_IMPL(isDefault),
4106 TOJSON_IMPL(type),
4107 TOJSON_IMPL(extra),
4108 TOJSON_IMPL(isPresent)
4109 };
4110 }
4111 static void from_json(const nlohmann::json& j, AudioDeviceDescriptor& p)
4112 {
4113 p.clear();
4114 getOptional<int>("deviceId", p.deviceId, j, 0);
4115 getOptional<int>("samplingRate", p.samplingRate, j, 0);
4116 getOptional<int>("channels", p.channels, j, 0);
4117 getOptional<AudioDeviceDescriptor::Direction_t>("direction", p.direction, j,
4118 AudioDeviceDescriptor::Direction_t::dirUnknown);
4119 getOptional<int>("boostPercentage", p.boostPercentage, j, 0);
4120
4121 getOptional<bool>("isAdad", p.isAdad, j, false);
4122 getOptional("name", p.name, j);
4123 getOptional("manufacturer", p.manufacturer, j);
4124 getOptional("model", p.model, j);
4125 getOptional("hardwareId", p.hardwareId, j);
4126 getOptional("serialNumber", p.serialNumber, j);
4127 getOptional("isDefault", p.isDefault, j);
4128 getOptional("type", p.type, j);
4129 getOptional("extra", p.extra, j);
4130 getOptional<bool>("isPresent", p.isPresent, j, false);
4131 }
4132
4133 //-----------------------------------------------------------
4134 JSON_SERIALIZED_CLASS(ListOfAudioDeviceDescriptor)
4136 {
4137 IMPLEMENT_JSON_SERIALIZATION()
4138 IMPLEMENT_JSON_DOCUMENTATION(ListOfAudioDeviceDescriptor)
4139
4140 public:
4141 std::vector<AudioDeviceDescriptor> list;
4142
4144 {
4145 clear();
4146 }
4147
4148 void clear()
4149 {
4150 list.clear();
4151 }
4152 };
4153
4154 static void to_json(nlohmann::json& j, const ListOfAudioDeviceDescriptor& p)
4155 {
4156 j = nlohmann::json{
4157 TOJSON_IMPL(list)
4158 };
4159 }
4160 static void from_json(const nlohmann::json& j, ListOfAudioDeviceDescriptor& p)
4161 {
4162 p.clear();
4163 getOptional<std::vector<AudioDeviceDescriptor>>("list", p.list, j);
4164 }
4165
4166 //-----------------------------------------------------------
4167 JSON_SERIALIZED_CLASS(Audio)
4176 {
4177 IMPLEMENT_JSON_SERIALIZATION()
4178 IMPLEMENT_JSON_DOCUMENTATION(Audio)
4179
4180 public:
4183
4186
4188 std::string inputHardwareId;
4189
4192
4195
4197 std::string outputHardwareId;
4198
4201
4204
4207
4210
4211 Audio()
4212 {
4213 clear();
4214 }
4215
4216 void clear()
4217 {
4218 enabled = true;
4219 inputId = 0;
4220 inputHardwareId.clear();
4221 inputGain = 0;
4222 outputId = 0;
4223 outputHardwareId.clear();
4224 outputGain = 0;
4225 outputLevelLeft = 100;
4226 outputLevelRight = 100;
4227 outputMuted = false;
4228 }
4229 };
4230
4231 static void to_json(nlohmann::json& j, const Audio& p)
4232 {
4233 j = nlohmann::json{
4234 TOJSON_IMPL(enabled),
4235 TOJSON_IMPL(inputId),
4236 TOJSON_IMPL(inputHardwareId),
4237 TOJSON_IMPL(inputGain),
4238 TOJSON_IMPL(outputId),
4239 TOJSON_IMPL(outputHardwareId),
4240 TOJSON_IMPL(outputLevelLeft),
4241 TOJSON_IMPL(outputLevelRight),
4242 TOJSON_IMPL(outputMuted)
4243 };
4244 }
4245 static void from_json(const nlohmann::json& j, Audio& p)
4246 {
4247 p.clear();
4248 getOptional<bool>("enabled", p.enabled, j, true);
4249 getOptional<int>("inputId", p.inputId, j, 0);
4250 getOptional<std::string>("inputHardwareId", p.inputHardwareId, j, EMPTY_STRING);
4251 getOptional<int>("inputGain", p.inputGain, j, 0);
4252 getOptional<int>("outputId", p.outputId, j, 0);
4253 getOptional<std::string>("outputHardwareId", p.outputHardwareId, j, EMPTY_STRING);
4254 getOptional<int>("outputGain", p.outputGain, j, 0);
4255 getOptional<int>("outputLevelLeft", p.outputLevelLeft, j, 100);
4256 getOptional<int>("outputLevelRight", p.outputLevelRight, j, 100);
4257 getOptional<bool>("outputMuted", p.outputMuted, j, false);
4258 }
4259
4260 //-----------------------------------------------------------
4261 JSON_SERIALIZED_CLASS(TalkerInformation)
4272 {
4273 IMPLEMENT_JSON_SERIALIZATION()
4274 IMPLEMENT_JSON_DOCUMENTATION(TalkerInformation)
4275
4276 public:
4280 typedef enum
4281 {
4283 matNone = 0,
4284
4286 matAnonymous = 1,
4287
4289 matSsrcGenerated = 2
4290 } ManufacturedAliasType_t;
4291
4293 std::string alias;
4294
4296 std::string nodeId;
4297
4299 uint16_t rxFlags;
4300
4303
4305 uint32_t txId;
4306
4309
4312
4315
4317 uint32_t ssrc;
4318
4321
4323 {
4324 clear();
4325 }
4326
4327 void clear()
4328 {
4329 alias.clear();
4330 nodeId.clear();
4331 rxFlags = 0;
4332 txPriority = 0;
4333 txId = 0;
4334 duplicateCount = 0;
4335 aliasSpecializer = 0;
4336 rxMuted = false;
4337 manufacturedAliasType = ManufacturedAliasType_t::matNone;
4338 ssrc = 0;
4339 }
4340 };
4341
4342 static void to_json(nlohmann::json& j, const TalkerInformation& p)
4343 {
4344 j = nlohmann::json{
4345 TOJSON_IMPL(alias),
4346 TOJSON_IMPL(nodeId),
4347 TOJSON_IMPL(rxFlags),
4348 TOJSON_IMPL(txPriority),
4349 TOJSON_IMPL(txId),
4350 TOJSON_IMPL(duplicateCount),
4351 TOJSON_IMPL(aliasSpecializer),
4352 TOJSON_IMPL(rxMuted),
4353 TOJSON_IMPL(manufacturedAliasType),
4354 TOJSON_IMPL(ssrc)
4355 };
4356 }
4357 static void from_json(const nlohmann::json& j, TalkerInformation& p)
4358 {
4359 p.clear();
4360 getOptional<std::string>("alias", p.alias, j, EMPTY_STRING);
4361 getOptional<std::string>("nodeId", p.nodeId, j, EMPTY_STRING);
4362 getOptional<uint16_t>("rxFlags", p.rxFlags, j, 0);
4363 getOptional<int>("txPriority", p.txPriority, j, 0);
4364 getOptional<uint32_t>("txId", p.txId, j, 0);
4365 getOptional<int>("duplicateCount", p.duplicateCount, j, 0);
4366 getOptional<uint16_t>("aliasSpecializer", p.aliasSpecializer, j, 0);
4367 getOptional<bool>("rxMuted", p.rxMuted, j, false);
4368 getOptional<TalkerInformation::ManufacturedAliasType_t>("manufacturedAliasType", p.manufacturedAliasType, j, TalkerInformation::ManufacturedAliasType_t::matNone);
4369 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
4370 }
4371
4372 //-----------------------------------------------------------
4373 JSON_SERIALIZED_CLASS(GroupTalkers)
4386 {
4387 IMPLEMENT_JSON_SERIALIZATION()
4388 IMPLEMENT_JSON_DOCUMENTATION(GroupTalkers)
4389
4390 public:
4392 std::vector<TalkerInformation> list;
4393
4394 GroupTalkers()
4395 {
4396 clear();
4397 }
4398
4399 void clear()
4400 {
4401 list.clear();
4402 }
4403 };
4404
4405 static void to_json(nlohmann::json& j, const GroupTalkers& p)
4406 {
4407 j = nlohmann::json{
4408 TOJSON_IMPL(list)
4409 };
4410 }
4411 static void from_json(const nlohmann::json& j, GroupTalkers& p)
4412 {
4413 p.clear();
4414 getOptional<std::vector<TalkerInformation>>("list", p.list, j);
4415 }
4416
4417 //-----------------------------------------------------------
4418 JSON_SERIALIZED_CLASS(Presence)
4429 {
4430 IMPLEMENT_JSON_SERIALIZATION()
4431 IMPLEMENT_JSON_DOCUMENTATION(Presence)
4432
4433 public:
4437 typedef enum
4438 {
4440 pfUnknown = 0,
4441
4443 pfEngage = 1,
4444
4451 pfCot = 2
4452 } Format_t;
4453
4456
4459
4462
4465
4468
4469 Presence()
4470 {
4471 clear();
4472 }
4473
4474 void clear()
4475 {
4476 format = pfUnknown;
4477 intervalSecs = 30;
4478 listenOnly = false;
4479 minIntervalSecs = 5;
4480 reduceImmediacy = false;
4481 }
4482 };
4483
4484 static void to_json(nlohmann::json& j, const Presence& p)
4485 {
4486 j = nlohmann::json{
4487 TOJSON_IMPL(format),
4488 TOJSON_IMPL(intervalSecs),
4489 TOJSON_IMPL(listenOnly),
4490 TOJSON_IMPL(minIntervalSecs),
4491 TOJSON_IMPL(reduceImmediacy)
4492 };
4493 }
4494 static void from_json(const nlohmann::json& j, Presence& p)
4495 {
4496 p.clear();
4497 getOptional<Presence::Format_t>("format", p.format, j, Presence::Format_t::pfEngage);
4498 getOptional<int>("intervalSecs", p.intervalSecs, j, 30);
4499 getOptional<bool>("listenOnly", p.listenOnly, j, false);
4500 getOptional<int>("minIntervalSecs", p.minIntervalSecs, j, 5);
4501 getOptional<bool>("reduceImmediacy", p.reduceImmediacy, j, false);
4502 }
4503
4504
4505 //-----------------------------------------------------------
4506 JSON_SERIALIZED_CLASS(Advertising)
4517 {
4518 IMPLEMENT_JSON_SERIALIZATION()
4519 IMPLEMENT_JSON_DOCUMENTATION(Advertising)
4520
4521 public:
4524
4527
4530
4531 Advertising()
4532 {
4533 clear();
4534 }
4535
4536 void clear()
4537 {
4538 enabled = false;
4539 intervalMs = 20000;
4540 alwaysAdvertise = false;
4541 }
4542 };
4543
4544 static void to_json(nlohmann::json& j, const Advertising& p)
4545 {
4546 j = nlohmann::json{
4547 TOJSON_IMPL(enabled),
4548 TOJSON_IMPL(intervalMs),
4549 TOJSON_IMPL(alwaysAdvertise)
4550 };
4551 }
4552 static void from_json(const nlohmann::json& j, Advertising& p)
4553 {
4554 p.clear();
4555 getOptional("enabled", p.enabled, j, false);
4556 getOptional<int>("intervalMs", p.intervalMs, j, 20000);
4557 getOptional<bool>("alwaysAdvertise", p.alwaysAdvertise, j, false);
4558 }
4559
4560 //-----------------------------------------------------------
4561 JSON_SERIALIZED_CLASS(GroupPriorityTranslation)
4572 {
4573 IMPLEMENT_JSON_SERIALIZATION()
4574 IMPLEMENT_JSON_DOCUMENTATION(GroupPriorityTranslation)
4575
4576 public:
4579
4582
4585
4587 {
4588 clear();
4589 }
4590
4591 void clear()
4592 {
4593 rx.clear();
4594 tx.clear();
4595 priority = 0;
4596 }
4597 };
4598
4599 static void to_json(nlohmann::json& j, const GroupPriorityTranslation& p)
4600 {
4601 j = nlohmann::json{
4602 TOJSON_IMPL(rx),
4603 TOJSON_IMPL(tx),
4604 TOJSON_IMPL(priority)
4605 };
4606 }
4607 static void from_json(const nlohmann::json& j, GroupPriorityTranslation& p)
4608 {
4609 p.clear();
4610 j.at("rx").get_to(p.rx);
4611 j.at("tx").get_to(p.tx);
4612 FROMJSON_IMPL(priority, int, 0);
4613 }
4614
4615 //-----------------------------------------------------------
4616 JSON_SERIALIZED_CLASS(GroupTimeline)
4629 {
4630 IMPLEMENT_JSON_SERIALIZATION()
4631 IMPLEMENT_JSON_DOCUMENTATION(GroupTimeline)
4632
4633 public:
4636
4639 bool recordAudio;
4640
4642 {
4643 clear();
4644 }
4645
4646 void clear()
4647 {
4648 enabled = true;
4649 maxAudioTimeMs = 30000;
4650 recordAudio = true;
4651 }
4652 };
4653
4654 static void to_json(nlohmann::json& j, const GroupTimeline& p)
4655 {
4656 j = nlohmann::json{
4657 TOJSON_IMPL(enabled),
4658 TOJSON_IMPL(maxAudioTimeMs),
4659 TOJSON_IMPL(recordAudio)
4660 };
4661 }
4662 static void from_json(const nlohmann::json& j, GroupTimeline& p)
4663 {
4664 p.clear();
4665 getOptional("enabled", p.enabled, j, true);
4666 getOptional<int>("maxAudioTimeMs", p.maxAudioTimeMs, j, 30000);
4667 getOptional("recordAudio", p.recordAudio, j, true);
4668 }
4669
4677 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_INTERNAL = "com.rallytac.engage.internal";
4679 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_CORE = "com.rallytac.magellan.core";
4681 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_CISTECH = "com.rallytac.engage.magellan.cistech";
4683 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_TRELLISWARE = "com.rallytac.engage.magellan.trellisware";
4685 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_SILVUS = "com.rallytac.engage.magellan.silvus";
4687 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_PERSISTENT = "com.rallytac.engage.magellan.persistent";
4689 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_DOMO = "com.rallytac.engage.magellan.domo";
4691 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_KENWOOD = "com.rallytac.engage.magellan.kenwood";
4693 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_TAIT = "com.rallytac.engage.magellan.tait";
4695 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_VOCALITY = "com.rallytac.engage.magellan.vocality";
4716
4741
4757 //-----------------------------------------------------------
4758 JSON_SERIALIZED_CLASS(GroupAppTransport)
4769 {
4770 IMPLEMENT_JSON_SERIALIZATION()
4771 IMPLEMENT_JSON_DOCUMENTATION(GroupAppTransport)
4772
4773 public:
4776
4778 std::string id;
4779
4781 {
4782 clear();
4783 }
4784
4785 void clear()
4786 {
4787 enabled = false;
4788 id.clear();
4789 }
4790 };
4791
4792 static void to_json(nlohmann::json& j, const GroupAppTransport& p)
4793 {
4794 j = nlohmann::json{
4795 TOJSON_IMPL(enabled),
4796 TOJSON_IMPL(id)
4797 };
4798 }
4799 static void from_json(const nlohmann::json& j, GroupAppTransport& p)
4800 {
4801 p.clear();
4802 getOptional<bool>("enabled", p.enabled, j, false);
4803 getOptional<std::string>("id", p.id, j);
4804 }
4805
4806 //-----------------------------------------------------------
4807 JSON_SERIALIZED_CLASS(RtpProfile)
4818 {
4819 IMPLEMENT_JSON_SERIALIZATION()
4820 IMPLEMENT_JSON_DOCUMENTATION(RtpProfile)
4821
4822 public:
4828 typedef enum
4829 {
4831 jmStandard = 0,
4832
4834 jmLowLatency = 1,
4835
4837 jmReleaseOnTxEnd = 2
4838 } JitterMode_t;
4839
4842
4845
4848
4851
4854
4857
4860
4863
4866
4869
4872
4875
4878
4881
4884
4887
4891
4892 RtpProfile()
4893 {
4894 clear();
4895 }
4896
4897 void clear()
4898 {
4899 mode = jmStandard;
4900 jitterMaxMs = 10000;
4901 jitterMinMs = 100;
4902 jitterMaxFactor = 8;
4903 jitterTrimPercentage = 10;
4904 jitterUnderrunReductionThresholdMs = 1500;
4905 jitterUnderrunReductionAger = 100;
4906 latePacketSequenceRange = 5;
4907 latePacketTimestampRangeMs = 2000;
4908 inboundProcessorInactivityMs = 500;
4909 jitterForceTrimAtMs = 0;
4910 rtcpPresenceTimeoutMs = 45000;
4911 jitterMaxExceededClipPerc = 10;
4912 jitterMaxExceededClipHangMs = 1500;
4913 zombieLifetimeMs = 15000;
4914 jitterMaxTrimMs = 250;
4915 signalledInboundProcessorInactivityMs = (inboundProcessorInactivityMs * 4);
4916 }
4917 };
4918
4919 static void to_json(nlohmann::json& j, const RtpProfile& p)
4920 {
4921 j = nlohmann::json{
4922 TOJSON_IMPL(mode),
4923 TOJSON_IMPL(jitterMaxMs),
4924 TOJSON_IMPL(inboundProcessorInactivityMs),
4925 TOJSON_IMPL(jitterMinMs),
4926 TOJSON_IMPL(jitterMaxFactor),
4927 TOJSON_IMPL(jitterTrimPercentage),
4928 TOJSON_IMPL(jitterUnderrunReductionThresholdMs),
4929 TOJSON_IMPL(jitterUnderrunReductionAger),
4930 TOJSON_IMPL(latePacketSequenceRange),
4931 TOJSON_IMPL(latePacketTimestampRangeMs),
4932 TOJSON_IMPL(inboundProcessorInactivityMs),
4933 TOJSON_IMPL(jitterForceTrimAtMs),
4934 TOJSON_IMPL(jitterMaxExceededClipPerc),
4935 TOJSON_IMPL(jitterMaxExceededClipHangMs),
4936 TOJSON_IMPL(zombieLifetimeMs),
4937 TOJSON_IMPL(jitterMaxTrimMs),
4938 TOJSON_IMPL(signalledInboundProcessorInactivityMs)
4939 };
4940 }
4941 static void from_json(const nlohmann::json& j, RtpProfile& p)
4942 {
4943 p.clear();
4944 FROMJSON_IMPL(mode, RtpProfile::JitterMode_t, RtpProfile::JitterMode_t::jmStandard);
4945 FROMJSON_IMPL(jitterMaxMs, int, 10000);
4946 FROMJSON_IMPL(jitterMinMs, int, 20);
4947 FROMJSON_IMPL(jitterMaxFactor, int, 8);
4948 FROMJSON_IMPL(jitterTrimPercentage, int, 10);
4949 FROMJSON_IMPL(jitterUnderrunReductionThresholdMs, int, 1500);
4950 FROMJSON_IMPL(jitterUnderrunReductionAger, int, 100);
4951 FROMJSON_IMPL(latePacketSequenceRange, int, 5);
4952 FROMJSON_IMPL(latePacketTimestampRangeMs, int, 2000);
4953 FROMJSON_IMPL(inboundProcessorInactivityMs, int, 500);
4954 FROMJSON_IMPL(jitterForceTrimAtMs, int, 0);
4955 FROMJSON_IMPL(rtcpPresenceTimeoutMs, int, 45000);
4956 FROMJSON_IMPL(jitterMaxExceededClipPerc, int, 10);
4957 FROMJSON_IMPL(jitterMaxExceededClipHangMs, int, 1500);
4958 FROMJSON_IMPL(zombieLifetimeMs, int, 15000);
4959 FROMJSON_IMPL(jitterMaxTrimMs, int, 250);
4960 FROMJSON_IMPL(signalledInboundProcessorInactivityMs, int, (p.inboundProcessorInactivityMs * 4));
4961 }
4962
4963 //-----------------------------------------------------------
4964 JSON_SERIALIZED_CLASS(Tls)
4975 {
4976 IMPLEMENT_JSON_SERIALIZATION()
4977 IMPLEMENT_JSON_DOCUMENTATION(Tls)
4978
4979 public:
4980
4983
4986
4988 std::vector<std::string> caCertificates;
4989
4992
4995
4997 std::vector<std::string> crlSerials;
4998
4999 Tls()
5000 {
5001 clear();
5002 }
5003
5004 void clear()
5005 {
5006 verifyPeers = true;
5007 allowSelfSignedCertificates = false;
5008 caCertificates.clear();
5009 subjectRestrictions.clear();
5010 issuerRestrictions.clear();
5011 crlSerials.clear();
5012 }
5013 };
5014
5015 static void to_json(nlohmann::json& j, const Tls& p)
5016 {
5017 j = nlohmann::json{
5018 TOJSON_IMPL(verifyPeers),
5019 TOJSON_IMPL(allowSelfSignedCertificates),
5020 TOJSON_IMPL(caCertificates),
5021 TOJSON_IMPL(subjectRestrictions),
5022 TOJSON_IMPL(issuerRestrictions),
5023 TOJSON_IMPL(crlSerials)
5024 };
5025 }
5026 static void from_json(const nlohmann::json& j, Tls& p)
5027 {
5028 p.clear();
5029 getOptional<bool>("verifyPeers", p.verifyPeers, j, true);
5030 getOptional<bool>("allowSelfSignedCertificates", p.allowSelfSignedCertificates, j, false);
5031 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
5032 getOptional<StringRestrictionList>("subjectRestrictions", p.subjectRestrictions, j);
5033 getOptional<StringRestrictionList>("issuerRestrictions", p.issuerRestrictions, j);
5034 getOptional<std::vector<std::string>>("crlSerials", p.crlSerials, j);
5035 }
5036
5037 //-----------------------------------------------------------
5038 JSON_SERIALIZED_CLASS(RangerPackets)
5051 {
5052 IMPLEMENT_JSON_SERIALIZATION()
5053 IMPLEMENT_JSON_DOCUMENTATION(RangerPackets)
5054
5055 public:
5058
5061
5063 {
5064 clear();
5065 }
5066
5067 void clear()
5068 {
5069 hangTimerSecs = -1;
5070 count = 5;
5071 }
5072
5073 virtual void initForDocumenting()
5074 {
5075 }
5076 };
5077
5078 static void to_json(nlohmann::json& j, const RangerPackets& p)
5079 {
5080 j = nlohmann::json{
5081 TOJSON_IMPL(hangTimerSecs),
5082 TOJSON_IMPL(count)
5083 };
5084 }
5085 static void from_json(const nlohmann::json& j, RangerPackets& p)
5086 {
5087 p.clear();
5088 getOptional<int>("hangTimerSecs", p.hangTimerSecs, j, 11);
5089 getOptional<int>("count", p.count, j, 5);
5090 }
5091
5092 //-----------------------------------------------------------
5093 JSON_SERIALIZED_CLASS(Source)
5106 {
5107 IMPLEMENT_JSON_SERIALIZATION()
5108 IMPLEMENT_JSON_DOCUMENTATION(Source)
5109
5110 public:
5112 std::string nodeId;
5113
5114 /* NOTE: Not serialized ! */
5115 uint8_t _internal_binary_nodeId[ENGAGE_MAX_NODE_ID_SIZE];
5116
5118 std::string alias;
5119
5120 /* NOTE: Not serialized ! */
5121 uint8_t _internal_binary_alias[ENGAGE_MAX_ALIAS_SIZE];
5122
5123 Source()
5124 {
5125 clear();
5126 }
5127
5128 void clear()
5129 {
5130 nodeId.clear();
5131 memset(_internal_binary_nodeId, 0, sizeof(_internal_binary_nodeId));
5132
5133 alias.clear();
5134 memset(_internal_binary_alias, 0, sizeof(_internal_binary_alias));
5135 }
5136
5137 virtual void initForDocumenting()
5138 {
5139 }
5140 };
5141
5142 static void to_json(nlohmann::json& j, const Source& p)
5143 {
5144 j = nlohmann::json{
5145 TOJSON_IMPL(nodeId),
5146 TOJSON_IMPL(alias)
5147 };
5148 }
5149 static void from_json(const nlohmann::json& j, Source& p)
5150 {
5151 p.clear();
5152 FROMJSON_IMPL_SIMPLE(nodeId);
5153 FROMJSON_IMPL_SIMPLE(alias);
5154 }
5155
5156 //-----------------------------------------------------------
5157 JSON_SERIALIZED_CLASS(GroupBridgeTargetOutputDetail)
5170 {
5171 IMPLEMENT_JSON_SERIALIZATION()
5172 IMPLEMENT_JSON_DOCUMENTATION(GroupBridgeTargetOutputDetail)
5173
5174 public:
5176 typedef enum
5177 {
5181 bomRaw = 0,
5182
5185 bomMultistream = 1,
5186
5189 bomMixedStream = 2,
5190
5192 bomNone = 3
5193 } BridgingOpMode_t;
5194
5197
5200
5202 {
5203 clear();
5204 }
5205
5206 void clear()
5207 {
5208 mode = BridgingOpMode_t::bomRaw;
5209 mixedStreamTxParams.clear();
5210 }
5211
5212 virtual void initForDocumenting()
5213 {
5214 clear();
5215 }
5216 };
5217
5218 static void to_json(nlohmann::json& j, const GroupBridgeTargetOutputDetail& p)
5219 {
5220 j = nlohmann::json{
5221 TOJSON_IMPL(mode),
5222 TOJSON_IMPL(mixedStreamTxParams)
5223 };
5224 }
5225 static void from_json(const nlohmann::json& j, GroupBridgeTargetOutputDetail& p)
5226 {
5227 p.clear();
5228 FROMJSON_IMPL_SIMPLE(mode);
5229 FROMJSON_IMPL_SIMPLE(mixedStreamTxParams);
5230 }
5231
5232 //-----------------------------------------------------------
5233 JSON_SERIALIZED_CLASS(GroupDefaultAudioPriority)
5246 {
5247 IMPLEMENT_JSON_SERIALIZATION()
5248 IMPLEMENT_JSON_DOCUMENTATION(GroupDefaultAudioPriority)
5249
5250 public:
5252 uint8_t tx;
5253
5255 uint8_t rx;
5256
5258 {
5259 clear();
5260 }
5261
5262 void clear()
5263 {
5264 tx = 0;
5265 rx = 0;
5266 }
5267
5268 virtual void initForDocumenting()
5269 {
5270 clear();
5271 }
5272 };
5273
5274 static void to_json(nlohmann::json& j, const GroupDefaultAudioPriority& p)
5275 {
5276 j = nlohmann::json{
5277 TOJSON_IMPL(tx),
5278 TOJSON_IMPL(rx)
5279 };
5280 }
5281 static void from_json(const nlohmann::json& j, GroupDefaultAudioPriority& p)
5282 {
5283 p.clear();
5284 FROMJSON_IMPL_SIMPLE(tx);
5285 FROMJSON_IMPL_SIMPLE(rx);
5286 }
5287
5288 //-----------------------------------------------------------
5289 JSON_SERIALIZED_CLASS(Group)
5301 {
5302 IMPLEMENT_JSON_SERIALIZATION()
5303 IMPLEMENT_JSON_DOCUMENTATION(Group)
5304
5305 public:
5307 typedef enum
5308 {
5310 gtUnknown = 0,
5311
5313 gtAudio = 1,
5314
5316 gtPresence = 2,
5317
5319 gtRaw = 3
5320 } Type_t;
5321
5323 typedef enum
5324 {
5326 iagpAnonymousAlias = 0,
5327
5329 iagpSsrcInHex = 1
5330 } InboundAliasGenerationPolicy_t;
5331
5334
5337
5340
5347 std::string id;
5348
5350 std::string name;
5351
5353 std::string spokenName;
5354
5356 std::string interfaceName;
5357
5360
5363
5366
5369
5372
5374 std::string cryptoPassword;
5375
5378
5380 std::vector<Rallypoint> rallypoints;
5381
5384
5387
5396
5398 std::string alias;
5399
5402
5404 std::string source;
5405
5412
5415
5418
5421
5423 std::vector<std::string> presenceGroupAffinities;
5424
5427
5430
5432 std::vector<RtpPayloadTypeTranslation> inboundRtpPayloadTypeTranslations;
5433
5436
5439
5441 std::string anonymousAlias;
5442
5445
5448
5451
5454
5457
5460
5463
5465 std::vector<uint16_t> specializerAffinities;
5466
5469
5471 std::vector<Source> ignoreSources;
5472
5474 std::string languageCode;
5475
5477 std::string synVoice;
5478
5481
5484
5487
5490
5493
5496
5497 Group()
5498 {
5499 clear();
5500 }
5501
5502 void clear()
5503 {
5504 type = gtUnknown;
5505 bridgeTargetOutputDetail.clear();
5506 defaultAudioPriority.clear();
5507 id.clear();
5508 name.clear();
5509 spokenName.clear();
5510 interfaceName.clear();
5511 rx.clear();
5512 tx.clear();
5513 txOptions.clear();
5514 txAudio.clear();
5515 presence.clear();
5516 cryptoPassword.clear();
5517
5518 alias.clear();
5519
5520 rallypoints.clear();
5521 rallypointCluster.clear();
5522
5523 audio.clear();
5524 timeline.clear();
5525
5526 blockAdvertising = false;
5527
5528 source.clear();
5529
5530 maxRxSecs = 0;
5531
5532 enableMulticastFailover = false;
5533 multicastFailoverSecs = 10;
5534
5535 rtcpPresenceRx.clear();
5536
5537 presenceGroupAffinities.clear();
5538 disablePacketEvents = false;
5539
5540 rfc4733RtpPayloadId = 0;
5541 inboundRtpPayloadTypeTranslations.clear();
5542 priorityTranslation.clear();
5543
5544 stickyTidHangSecs = 10;
5545 anonymousAlias.clear();
5546 lbCrypto = false;
5547
5548 appTransport.clear();
5549 allowLoopback = false;
5550
5551 rtpProfile.clear();
5552 rangerPackets.clear();
5553
5554 _wasDeserialized_rtpProfile = false;
5555
5556 txImpairment.clear();
5557 rxImpairment.clear();
5558
5559 specializerAffinities.clear();
5560
5561 securityLevel = 0;
5562
5563 ignoreSources.clear();
5564
5565 languageCode.clear();
5566 synVoice.clear();
5567
5568 rxCapture.clear();
5569 txCapture.clear();
5570
5571 blobRtpPayloadType = ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE;
5572 inboundAliasGenerationPolicy = iagpAnonymousAlias;
5573 gateIn.clear();
5574
5575 ignoreAudioTraffic = false;
5576 }
5577 };
5578
5579 static void to_json(nlohmann::json& j, const Group& p)
5580 {
5581 j = nlohmann::json{
5582 TOJSON_IMPL(type),
5583 TOJSON_IMPL(bridgeTargetOutputDetail),
5584 TOJSON_IMPL(defaultAudioPriority),
5585 TOJSON_IMPL(id),
5586 TOJSON_IMPL(name),
5587 TOJSON_IMPL(spokenName),
5588 TOJSON_IMPL(interfaceName),
5589 TOJSON_IMPL(rx),
5590 TOJSON_IMPL(tx),
5591 TOJSON_IMPL(txOptions),
5592 TOJSON_IMPL(txAudio),
5593 TOJSON_IMPL(presence),
5594 TOJSON_IMPL(cryptoPassword),
5595 TOJSON_IMPL(alias),
5596
5597 // See below
5598 //TOJSON_IMPL(rallypoints),
5599 //TOJSON_IMPL(rallypointCluster),
5600
5601 TOJSON_IMPL(alias),
5602 TOJSON_IMPL(audio),
5603 TOJSON_IMPL(timeline),
5604 TOJSON_IMPL(blockAdvertising),
5605 TOJSON_IMPL(source),
5606 TOJSON_IMPL(maxRxSecs),
5607 TOJSON_IMPL(enableMulticastFailover),
5608 TOJSON_IMPL(multicastFailoverSecs),
5609 TOJSON_IMPL(rtcpPresenceRx),
5610 TOJSON_IMPL(presenceGroupAffinities),
5611 TOJSON_IMPL(disablePacketEvents),
5612 TOJSON_IMPL(rfc4733RtpPayloadId),
5613 TOJSON_IMPL(inboundRtpPayloadTypeTranslations),
5614 TOJSON_IMPL(priorityTranslation),
5615 TOJSON_IMPL(stickyTidHangSecs),
5616 TOJSON_IMPL(anonymousAlias),
5617 TOJSON_IMPL(lbCrypto),
5618 TOJSON_IMPL(appTransport),
5619 TOJSON_IMPL(allowLoopback),
5620 TOJSON_IMPL(rangerPackets),
5621
5622 TOJSON_IMPL(txImpairment),
5623 TOJSON_IMPL(rxImpairment),
5624
5625 TOJSON_IMPL(specializerAffinities),
5626
5627 TOJSON_IMPL(securityLevel),
5628
5629 TOJSON_IMPL(ignoreSources),
5630
5631 TOJSON_IMPL(languageCode),
5632 TOJSON_IMPL(synVoice),
5633
5634 TOJSON_IMPL(rxCapture),
5635 TOJSON_IMPL(txCapture),
5636
5637 TOJSON_IMPL(blobRtpPayloadType),
5638
5639 TOJSON_IMPL(inboundAliasGenerationPolicy),
5640
5641 TOJSON_IMPL(gateIn),
5642
5643 TOJSON_IMPL(ignoreAudioTraffic)
5644 };
5645
5646 TOJSON_BASE_IMPL();
5647
5648 // TODO: need a better way to indicate whether rtpProfile is present
5649 if(p._wasDeserialized_rtpProfile || p.isDocumenting())
5650 {
5651 j["rtpProfile"] = p.rtpProfile;
5652 }
5653
5654 if(p.isDocumenting())
5655 {
5656 j["rallypointCluster"] = p.rallypointCluster;
5657 j["rallypoints"] = p.rallypoints;
5658 }
5659 else
5660 {
5661 // rallypointCluster takes precedence if it has elements
5662 if(!p.rallypointCluster.rallypoints.empty())
5663 {
5664 j["rallypointCluster"] = p.rallypointCluster;
5665 }
5666 else if(!p.rallypoints.empty())
5667 {
5668 j["rallypoints"] = p.rallypoints;
5669 }
5670 }
5671 }
5672 static void from_json(const nlohmann::json& j, Group& p)
5673 {
5674 p.clear();
5675 j.at("type").get_to(p.type);
5676 getOptional<GroupBridgeTargetOutputDetail>("bridgeTargetOutputDetail", p.bridgeTargetOutputDetail, j);
5677 j.at("id").get_to(p.id);
5678 getOptional<std::string>("name", p.name, j);
5679 getOptional<std::string>("spokenName", p.spokenName, j);
5680 getOptional<std::string>("interfaceName", p.interfaceName, j);
5681 getOptional<NetworkAddress>("rx", p.rx, j);
5682 getOptional<NetworkAddress>("tx", p.tx, j);
5683 getOptional<NetworkTxOptions>("txOptions", p.txOptions, j);
5684 getOptional<std::string>("cryptoPassword", p.cryptoPassword, j);
5685 getOptional<std::string>("alias", p.alias, j);
5686 getOptional<TxAudio>("txAudio", p.txAudio, j);
5687 getOptional<Presence>("presence", p.presence, j);
5688 getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
5689 getOptional<RallypointCluster>("rallypointCluster", p.rallypointCluster, j);
5690 getOptional<Audio>("audio", p.audio, j);
5691 getOptional<GroupTimeline>("timeline", p.timeline, j);
5692 getOptional<bool>("blockAdvertising", p.blockAdvertising, j, false);
5693 getOptional<std::string>("source", p.source, j);
5694 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
5695 getOptional<bool>("enableMulticastFailover", p.enableMulticastFailover, j, false);
5696 getOptional<int>("multicastFailoverSecs", p.multicastFailoverSecs, j, 10);
5697 getOptional<NetworkAddress>("rtcpPresenceRx", p.rtcpPresenceRx, j);
5698 getOptional<std::vector<std::string>>("presenceGroupAffinities", p.presenceGroupAffinities, j);
5699 getOptional<bool>("disablePacketEvents", p.disablePacketEvents, j, false);
5700 getOptional<int>("rfc4733RtpPayloadId", p.rfc4733RtpPayloadId, j, 0);
5701 getOptional<std::vector<RtpPayloadTypeTranslation>>("inboundRtpPayloadTypeTranslations", p.inboundRtpPayloadTypeTranslations, j);
5702 getOptional<GroupPriorityTranslation>("priorityTranslation", p.priorityTranslation, j);
5703 getOptional<GroupDefaultAudioPriority>("defaultAudioPriority", p.defaultAudioPriority, j);
5704 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
5705 getOptional<std::string>("anonymousAlias", p.anonymousAlias, j);
5706 getOptional<bool>("lbCrypto", p.lbCrypto, j, false);
5707 getOptional<GroupAppTransport>("appTransport", p.appTransport, j);
5708 getOptional<bool>("allowLoopback", p.allowLoopback, j, false);
5709 getOptionalWithIndicator<RtpProfile>("rtpProfile", p.rtpProfile, j, &p._wasDeserialized_rtpProfile);
5710 getOptional<RangerPackets>("rangerPackets", p.rangerPackets, j);
5711 getOptional<TransportImpairment>("txImpairment", p.txImpairment, j);
5712 getOptional<TransportImpairment>("rxImpairment", p.rxImpairment, j);
5713 getOptional<std::vector<uint16_t>>("specializerAffinities", p.specializerAffinities, j);
5714 getOptional<uint32_t>("securityLevel", p.securityLevel, j, 0);
5715 getOptional<std::vector<Source>>("ignoreSources", p.ignoreSources, j);
5716 getOptional<std::string>("languageCode", p.languageCode, j);
5717 getOptional<std::string>("synVoice", p.synVoice, j);
5718
5719 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
5720 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
5721
5722 getOptional<uint16_t>("blobRtpPayloadType", p.blobRtpPayloadType, j, ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE);
5723
5724 getOptional<Group::InboundAliasGenerationPolicy_t>("inboundAliasGenerationPolicy", p.inboundAliasGenerationPolicy, j, Group::InboundAliasGenerationPolicy_t::iagpAnonymousAlias);
5725
5726 getOptional<AudioGate>("gateIn", p.gateIn, j);
5727
5728 getOptional<bool>("ignoreAudioTraffic", p.ignoreAudioTraffic, j, false);
5729
5730 FROMJSON_BASE_IMPL();
5731 }
5732
5733
5734 //-----------------------------------------------------------
5735 JSON_SERIALIZED_CLASS(Mission)
5737 {
5738 IMPLEMENT_JSON_SERIALIZATION()
5739 IMPLEMENT_JSON_DOCUMENTATION(Mission)
5740
5741 public:
5742 std::string id;
5743 std::string name;
5744 std::vector<Group> groups;
5745 std::chrono::system_clock::time_point begins;
5746 std::chrono::system_clock::time_point ends;
5747 std::string certStoreId;
5748 int multicastFailoverPolicy;
5749 Rallypoint rallypoint;
5750
5751 void clear()
5752 {
5753 id.clear();
5754 name.clear();
5755 groups.clear();
5756 certStoreId.clear();
5757 multicastFailoverPolicy = 0;
5758 rallypoint.clear();
5759 }
5760 };
5761
5762 static void to_json(nlohmann::json& j, const Mission& p)
5763 {
5764 j = nlohmann::json{
5765 TOJSON_IMPL(id),
5766 TOJSON_IMPL(name),
5767 TOJSON_IMPL(groups),
5768 TOJSON_IMPL(certStoreId),
5769 TOJSON_IMPL(multicastFailoverPolicy),
5770 TOJSON_IMPL(rallypoint)
5771 };
5772 }
5773
5774 static void from_json(const nlohmann::json& j, Mission& p)
5775 {
5776 p.clear();
5777 j.at("id").get_to(p.id);
5778 j.at("name").get_to(p.name);
5779
5780 // Groups are optional
5781 try
5782 {
5783 j.at("groups").get_to(p.groups);
5784 }
5785 catch(...)
5786 {
5787 p.groups.clear();
5788 }
5789
5790 FROMJSON_IMPL(certStoreId, std::string, EMPTY_STRING);
5791 FROMJSON_IMPL(multicastFailoverPolicy, int, 0);
5792 getOptional<Rallypoint>("rallypoint", p.rallypoint, j);
5793 }
5794
5795 //-----------------------------------------------------------
5796 JSON_SERIALIZED_CLASS(LicenseDescriptor)
5807 {
5808 IMPLEMENT_JSON_SERIALIZATION()
5809 IMPLEMENT_JSON_DOCUMENTATION(LicenseDescriptor)
5810
5811 public:
5817 static const int STATUS_OK = 0;
5818 static const int ERR_NULL_ENTITLEMENT_KEY = -1;
5819 static const int ERR_NULL_LICENSE_KEY = -2;
5820 static const int ERR_INVALID_LICENSE_KEY_LEN = -3;
5821 static const int ERR_LICENSE_KEY_VERIFICATION_FAILURE = -4;
5822 static const int ERR_ACTIVATION_CODE_VERIFICATION_FAILURE = -5;
5823 static const int ERR_INVALID_EXPIRATION_DATE = -6;
5824 static const int ERR_GENERAL_FAILURE = -7;
5825 static const int ERR_NOT_INITIALIZED = -8;
5826 static const int ERR_REQUIRES_ACTIVATION = -9;
5827 static const int ERR_LICENSE_NOT_SUITED_FOR_ACTIVATION = -10;
5835 static const uint8_t LIC_CARGO_FLAG_LIMIT_TO_FEATURES = 0x01;
5846 std::string entitlement;
5847
5854 std::string key;
5855
5857 std::string activationCode;
5858
5860 std::string deviceId;
5861
5863 int type;
5864
5866 time_t expires;
5867
5869 std::string expiresFormatted;
5870
5875 uint32_t flags;
5876
5878 std::string cargo;
5879
5881 uint8_t cargoFlags;
5882
5888
5890 std::string manufacturerId;
5891
5893 std::string activationHmac;
5894
5896 {
5897 clear();
5898 }
5899
5900 void clear()
5901 {
5902 entitlement.clear();
5903 key.clear();
5904 activationCode.clear();
5905 type = 0;
5906 expires = 0;
5907 expiresFormatted.clear();
5908 flags = 0;
5909 cargo.clear();
5910 cargoFlags = 0;
5911 deviceId.clear();
5912 status = ERR_NOT_INITIALIZED;
5913 manufacturerId.clear();
5914 activationHmac.clear();
5915 }
5916 };
5917
5918 static void to_json(nlohmann::json& j, const LicenseDescriptor& p)
5919 {
5920 j = nlohmann::json{
5921 //TOJSON_IMPL(entitlement),
5922 {"entitlement", "*entitlement*"},
5923 TOJSON_IMPL(key),
5924 TOJSON_IMPL(activationCode),
5925 TOJSON_IMPL(type),
5926 TOJSON_IMPL(expires),
5927 TOJSON_IMPL(expiresFormatted),
5928 TOJSON_IMPL(flags),
5929 TOJSON_IMPL(deviceId),
5930 TOJSON_IMPL(status),
5931 //TOJSON_IMPL(manufacturerId),
5932 {"manufacturerId", "*manufacturerId*"},
5933 TOJSON_IMPL(cargo),
5934 TOJSON_IMPL(cargoFlags),
5935 TOJSON_IMPL(activationHmac)
5936 };
5937 }
5938
5939 static void from_json(const nlohmann::json& j, LicenseDescriptor& p)
5940 {
5941 p.clear();
5942 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
5943 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
5944 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
5945 FROMJSON_IMPL(type, int, 0);
5946 FROMJSON_IMPL(expires, time_t, 0);
5947 FROMJSON_IMPL(expiresFormatted, std::string, EMPTY_STRING);
5948 FROMJSON_IMPL(flags, uint32_t, 0);
5949 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
5950 FROMJSON_IMPL(status, int, LicenseDescriptor::ERR_NOT_INITIALIZED);
5951 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
5952 FROMJSON_IMPL(cargo, std::string, EMPTY_STRING);
5953 FROMJSON_IMPL(cargoFlags, uint8_t, 0);
5954 FROMJSON_IMPL(activationHmac, std::string, EMPTY_STRING);
5955 }
5956
5957
5958 //-----------------------------------------------------------
5959 JSON_SERIALIZED_CLASS(EngineNetworkingRpUdpStreaming)
5972 {
5973 IMPLEMENT_JSON_SERIALIZATION()
5974 IMPLEMENT_JSON_DOCUMENTATION(EngineNetworkingRpUdpStreaming)
5975
5976 public:
5979
5981 int port;
5982
5985
5988
5990 int ttl;
5991
5993 {
5994 clear();
5995 }
5996
5997 void clear()
5998 {
5999 enabled = false;
6000 port = 0;
6001 keepaliveIntervalSecs = 15;
6002 priority = TxPriority_t::priVoice;
6003 ttl = 64;
6004 }
6005
6006 virtual void initForDocumenting()
6007 {
6008 }
6009 };
6010
6011 static void to_json(nlohmann::json& j, const EngineNetworkingRpUdpStreaming& p)
6012 {
6013 j = nlohmann::json{
6014 TOJSON_IMPL(enabled),
6015 TOJSON_IMPL(port),
6016 TOJSON_IMPL(keepaliveIntervalSecs),
6017 TOJSON_IMPL(priority),
6018 TOJSON_IMPL(ttl)
6019 };
6020 }
6021 static void from_json(const nlohmann::json& j, EngineNetworkingRpUdpStreaming& p)
6022 {
6023 p.clear();
6024 getOptional<bool>("enabled", p.enabled, j, false);
6025 getOptional<int>("port", p.port, j, 0);
6026 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
6027 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
6028 getOptional<int>("ttl", p.ttl, j, 64);
6029 }
6030
6031 //-----------------------------------------------------------
6032 JSON_SERIALIZED_CLASS(EnginePolicyNetworking)
6042 {
6043 IMPLEMENT_JSON_SERIALIZATION()
6044 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNetworking)
6045
6046 public:
6048 std::string defaultNic;
6049
6052
6055
6058
6061
6064
6067
6070
6073
6075 {
6076 clear();
6077 }
6078
6079 void clear()
6080 {
6081 defaultNic.clear();
6082 multicastRejoinSecs = 8;
6083 rallypointRtTestIntervalMs = 60000;
6084 logRtpJitterBufferStats = false;
6085 preventMulticastFailover = false;
6086 addressResolutionPolicy = AddressResolutionPolicy_t::arpIpv6ThenIpv4;
6087 requireMulticast = true;
6088 rpUdpStreaming.clear();
6089 rtpProfile.clear();
6090 }
6091 };
6092
6093 static void to_json(nlohmann::json& j, const EnginePolicyNetworking& p)
6094 {
6095 j = nlohmann::json{
6096 TOJSON_IMPL(defaultNic),
6097 TOJSON_IMPL(multicastRejoinSecs),
6098
6099 TOJSON_IMPL(rallypointRtTestIntervalMs),
6100 TOJSON_IMPL(logRtpJitterBufferStats),
6101 TOJSON_IMPL(preventMulticastFailover),
6102 TOJSON_IMPL(requireMulticast),
6103 TOJSON_IMPL(rpUdpStreaming),
6104 TOJSON_IMPL(rtpProfile),
6105 TOJSON_IMPL(addressResolutionPolicy)
6106 };
6107 }
6108 static void from_json(const nlohmann::json& j, EnginePolicyNetworking& p)
6109 {
6110 p.clear();
6111 FROMJSON_IMPL(defaultNic, std::string, EMPTY_STRING);
6112 FROMJSON_IMPL(multicastRejoinSecs, int, 8);
6113 FROMJSON_IMPL(rallypointRtTestIntervalMs, int, 60000);
6114 FROMJSON_IMPL(logRtpJitterBufferStats, bool, false);
6115 FROMJSON_IMPL(preventMulticastFailover, bool, false);
6116 FROMJSON_IMPL(requireMulticast, bool, true);
6117 getOptional<EngineNetworkingRpUdpStreaming>("rpUdpStreaming", p.rpUdpStreaming, j);
6118 getOptional<RtpProfile>("rtpProfile", p.rtpProfile, j);
6119 getOptional<AddressResolutionPolicy_t>("addressResolutionPolicy", p.addressResolutionPolicy, j, AddressResolutionPolicy_t::arpIpv6ThenIpv4);
6120 }
6121
6122 //-----------------------------------------------------------
6123 JSON_SERIALIZED_CLASS(Aec)
6134 {
6135 IMPLEMENT_JSON_SERIALIZATION()
6136 IMPLEMENT_JSON_DOCUMENTATION(Aec)
6137
6138 public:
6144 typedef enum
6145 {
6147 aecmDefault = 0,
6148
6150 aecmLow = 1,
6151
6153 aecmMedium = 2,
6154
6156 aecmHigh = 3,
6157
6159 aecmVeryHigh = 4,
6160
6162 aecmHighest = 5
6163 } Mode_t;
6164
6167
6170
6173
6175 bool cng;
6176
6177 Aec()
6178 {
6179 clear();
6180 }
6181
6182 void clear()
6183 {
6184 enabled = false;
6185 mode = aecmDefault;
6186 speakerTailMs = 60;
6187 cng = true;
6188 }
6189 };
6190
6191 static void to_json(nlohmann::json& j, const Aec& p)
6192 {
6193 j = nlohmann::json{
6194 TOJSON_IMPL(enabled),
6195 TOJSON_IMPL(mode),
6196 TOJSON_IMPL(speakerTailMs),
6197 TOJSON_IMPL(cng)
6198 };
6199 }
6200 static void from_json(const nlohmann::json& j, Aec& p)
6201 {
6202 p.clear();
6203 FROMJSON_IMPL(enabled, bool, false);
6204 FROMJSON_IMPL(mode, Aec::Mode_t, Aec::Mode_t::aecmDefault);
6205 FROMJSON_IMPL(speakerTailMs, int, 60);
6206 FROMJSON_IMPL(cng, bool, true);
6207 }
6208
6209 //-----------------------------------------------------------
6210 JSON_SERIALIZED_CLASS(Vad)
6221 {
6222 IMPLEMENT_JSON_SERIALIZATION()
6223 IMPLEMENT_JSON_DOCUMENTATION(Vad)
6224
6225 public:
6231 typedef enum
6232 {
6234 vamDefault = 0,
6235
6237 vamLowBitRate = 1,
6238
6240 vamAggressive = 2,
6241
6243 vamVeryAggressive = 3
6244 } Mode_t;
6245
6248
6251
6252 Vad()
6253 {
6254 clear();
6255 }
6256
6257 void clear()
6258 {
6259 enabled = false;
6260 mode = vamDefault;
6261 }
6262 };
6263
6264 static void to_json(nlohmann::json& j, const Vad& p)
6265 {
6266 j = nlohmann::json{
6267 TOJSON_IMPL(enabled),
6268 TOJSON_IMPL(mode)
6269 };
6270 }
6271 static void from_json(const nlohmann::json& j, Vad& p)
6272 {
6273 p.clear();
6274 FROMJSON_IMPL(enabled, bool, false);
6275 FROMJSON_IMPL(mode, Vad::Mode_t, Vad::Mode_t::vamDefault);
6276 }
6277
6278 //-----------------------------------------------------------
6279 JSON_SERIALIZED_CLASS(Bridge)
6290 {
6291 IMPLEMENT_JSON_SERIALIZATION()
6292 IMPLEMENT_JSON_DOCUMENTATION(Bridge)
6293
6294 public:
6296 std::string id;
6297
6299 std::string name;
6300
6302 std::vector<std::string> groups;
6303
6308
6311
6312
6313 Bridge()
6314 {
6315 clear();
6316 }
6317
6318 void clear()
6319 {
6320 id.clear();
6321 name.clear();
6322 groups.clear();
6323 enabled = true;
6324 active = true;
6325 }
6326 };
6327
6328 static void to_json(nlohmann::json& j, const Bridge& p)
6329 {
6330 j = nlohmann::json{
6331 TOJSON_IMPL(id),
6332 TOJSON_IMPL(name),
6333 TOJSON_IMPL(groups),
6334 TOJSON_IMPL(enabled),
6335 TOJSON_IMPL(active)
6336 };
6337 }
6338 static void from_json(const nlohmann::json& j, Bridge& p)
6339 {
6340 p.clear();
6341 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
6342 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
6343 getOptional<std::vector<std::string>>("groups", p.groups, j);
6344 FROMJSON_IMPL(enabled, bool, true);
6345 FROMJSON_IMPL(active, bool, true);
6346 }
6347
6348 //-----------------------------------------------------------
6349 JSON_SERIALIZED_CLASS(AndroidAudio)
6360 {
6361 IMPLEMENT_JSON_SERIALIZATION()
6362 IMPLEMENT_JSON_DOCUMENTATION(AndroidAudio)
6363
6364 public:
6365 constexpr static int INVALID_SESSION_ID = -9999;
6366
6368 int api;
6369
6372
6375
6391
6399
6409
6412
6415
6416
6417 AndroidAudio()
6418 {
6419 clear();
6420 }
6421
6422 void clear()
6423 {
6424 api = 0;
6425 sharingMode = 0;
6426 performanceMode = 12;
6427 usage = 2;
6428 contentType = 1;
6429 inputPreset = 7;
6430 sessionId = AndroidAudio::INVALID_SESSION_ID;
6431 engineMode = 0;
6432 }
6433 };
6434
6435 static void to_json(nlohmann::json& j, const AndroidAudio& p)
6436 {
6437 j = nlohmann::json{
6438 TOJSON_IMPL(api),
6439 TOJSON_IMPL(sharingMode),
6440 TOJSON_IMPL(performanceMode),
6441 TOJSON_IMPL(usage),
6442 TOJSON_IMPL(contentType),
6443 TOJSON_IMPL(inputPreset),
6444 TOJSON_IMPL(sessionId),
6445 TOJSON_IMPL(engineMode)
6446 };
6447 }
6448 static void from_json(const nlohmann::json& j, AndroidAudio& p)
6449 {
6450 p.clear();
6451 FROMJSON_IMPL(api, int, 0);
6452 FROMJSON_IMPL(sharingMode, int, 0);
6453 FROMJSON_IMPL(performanceMode, int, 12);
6454 FROMJSON_IMPL(usage, int, 2);
6455 FROMJSON_IMPL(contentType, int, 1);
6456 FROMJSON_IMPL(inputPreset, int, 7);
6457 FROMJSON_IMPL(sessionId, int, AndroidAudio::INVALID_SESSION_ID);
6458 FROMJSON_IMPL(engineMode, int, 0);
6459 }
6460
6461 //-----------------------------------------------------------
6462 JSON_SERIALIZED_CLASS(EnginePolicyAudio)
6473 {
6474 IMPLEMENT_JSON_SERIALIZATION()
6475 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyAudio)
6476
6477 public:
6480
6483
6486
6489
6492
6495
6498
6501
6504
6507
6510
6513
6516
6519
6522
6523
6525 {
6526 clear();
6527 }
6528
6529 void clear()
6530 {
6531 enabled = true;
6532 hardwareEnabled = true;
6533 internalRate = 16000;
6534 internalChannels = 2;
6535 muteTxOnTx = false;
6536 aec.clear();
6537 vad.clear();
6538 android.clear();
6539 inputAgc.clear();
6540 outputAgc.clear();
6541 denoiseInput = false;
6542 denoiseOutput = false;
6543 saveInputPcm = false;
6544 saveOutputPcm = false;
6545 registry.clear();
6546 }
6547 };
6548
6549 static void to_json(nlohmann::json& j, const EnginePolicyAudio& p)
6550 {
6551 j = nlohmann::json{
6552 TOJSON_IMPL(enabled),
6553 TOJSON_IMPL(hardwareEnabled),
6554 TOJSON_IMPL(internalRate),
6555 TOJSON_IMPL(internalChannels),
6556 TOJSON_IMPL(muteTxOnTx),
6557 TOJSON_IMPL(aec),
6558 TOJSON_IMPL(vad),
6559 TOJSON_IMPL(android),
6560 TOJSON_IMPL(inputAgc),
6561 TOJSON_IMPL(outputAgc),
6562 TOJSON_IMPL(denoiseInput),
6563 TOJSON_IMPL(denoiseOutput),
6564 TOJSON_IMPL(saveInputPcm),
6565 TOJSON_IMPL(saveOutputPcm),
6566 TOJSON_IMPL(registry)
6567 };
6568 }
6569 static void from_json(const nlohmann::json& j, EnginePolicyAudio& p)
6570 {
6571 p.clear();
6572 getOptional<bool>("enabled", p.enabled, j, true);
6573 getOptional<bool>("hardwareEnabled", p.hardwareEnabled, j, true);
6574 FROMJSON_IMPL(internalRate, int, 16000);
6575 FROMJSON_IMPL(internalChannels, int, 2);
6576
6577 FROMJSON_IMPL(muteTxOnTx, bool, false);
6578 getOptional<Aec>("aec", p.aec, j);
6579 getOptional<Vad>("vad", p.vad, j);
6580 getOptional<AndroidAudio>("android", p.android, j);
6581 getOptional<Agc>("inputAgc", p.inputAgc, j);
6582 getOptional<Agc>("outputAgc", p.outputAgc, j);
6583 FROMJSON_IMPL(denoiseInput, bool, false);
6584 FROMJSON_IMPL(denoiseOutput, bool, false);
6585 FROMJSON_IMPL(saveInputPcm, bool, false);
6586 FROMJSON_IMPL(saveOutputPcm, bool, false);
6587 getOptional<AudioRegistry>("registry", p.registry, j);
6588 }
6589
6590 //-----------------------------------------------------------
6591 JSON_SERIALIZED_CLASS(SecurityCertificate)
6602 {
6603 IMPLEMENT_JSON_SERIALIZATION()
6604 IMPLEMENT_JSON_DOCUMENTATION(SecurityCertificate)
6605
6606 public:
6607
6613 std::string certificate;
6614
6616 std::string key;
6617
6619 {
6620 clear();
6621 }
6622
6623 void clear()
6624 {
6625 certificate.clear();
6626 key.clear();
6627 }
6628 };
6629
6630 static void to_json(nlohmann::json& j, const SecurityCertificate& p)
6631 {
6632 j = nlohmann::json{
6633 TOJSON_IMPL(certificate),
6634 TOJSON_IMPL(key)
6635 };
6636 }
6637 static void from_json(const nlohmann::json& j, SecurityCertificate& p)
6638 {
6639 p.clear();
6640 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
6641 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
6642 }
6643
6644 // This is where spell checking stops
6645 //-----------------------------------------------------------
6646 JSON_SERIALIZED_CLASS(EnginePolicySecurity)
6647
6648
6658 {
6659 IMPLEMENT_JSON_SERIALIZATION()
6660 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicySecurity)
6661
6662 public:
6663
6675
6683 std::vector<std::string> caCertificates;
6684
6686 {
6687 clear();
6688 }
6689
6690 void clear()
6691 {
6692 certificate.clear();
6693 caCertificates.clear();
6694 }
6695 };
6696
6697 static void to_json(nlohmann::json& j, const EnginePolicySecurity& p)
6698 {
6699 j = nlohmann::json{
6700 TOJSON_IMPL(certificate),
6701 TOJSON_IMPL(caCertificates)
6702 };
6703 }
6704 static void from_json(const nlohmann::json& j, EnginePolicySecurity& p)
6705 {
6706 p.clear();
6707 getOptional("certificate", p.certificate, j);
6708 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
6709 }
6710
6711 //-----------------------------------------------------------
6712 JSON_SERIALIZED_CLASS(EnginePolicyLogging)
6723 {
6724 IMPLEMENT_JSON_SERIALIZATION()
6725 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyLogging)
6726
6727 public:
6728
6745
6748
6750 {
6751 clear();
6752 }
6753
6754 void clear()
6755 {
6756 maxLevel = 4; // ILogger::Level::debug
6757 enableSyslog = false;
6758 }
6759 };
6760
6761 static void to_json(nlohmann::json& j, const EnginePolicyLogging& p)
6762 {
6763 j = nlohmann::json{
6764 TOJSON_IMPL(maxLevel),
6765 TOJSON_IMPL(enableSyslog)
6766 };
6767 }
6768 static void from_json(const nlohmann::json& j, EnginePolicyLogging& p)
6769 {
6770 p.clear();
6771 getOptional("maxLevel", p.maxLevel, j, 4); // ILogger::Level::debug
6772 getOptional("enableSyslog", p.enableSyslog, j);
6773 }
6774
6775
6776 //-----------------------------------------------------------
6777 JSON_SERIALIZED_CLASS(EnginePolicyDatabase)
6779 {
6780 IMPLEMENT_JSON_SERIALIZATION()
6781 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyDatabase)
6782
6783 public:
6784 typedef enum
6785 {
6786 dbtFixedMemory = 0,
6787 dbtPagedMemory = 1,
6788 dbtFixedFile = 2
6789 } DatabaseType_t;
6790
6791 DatabaseType_t type;
6792 std::string fixedFileName;
6793 bool forceMaintenance;
6794 bool reclaimSpace;
6795
6797 {
6798 clear();
6799 }
6800
6801 void clear()
6802 {
6803 type = DatabaseType_t::dbtFixedMemory;
6804 fixedFileName.clear();
6805 forceMaintenance = false;
6806 reclaimSpace = false;
6807 }
6808 };
6809
6810 static void to_json(nlohmann::json& j, const EnginePolicyDatabase& p)
6811 {
6812 j = nlohmann::json{
6813 TOJSON_IMPL(type),
6814 TOJSON_IMPL(fixedFileName),
6815 TOJSON_IMPL(forceMaintenance),
6816 TOJSON_IMPL(reclaimSpace)
6817 };
6818 }
6819 static void from_json(const nlohmann::json& j, EnginePolicyDatabase& p)
6820 {
6821 p.clear();
6822 FROMJSON_IMPL(type, EnginePolicyDatabase::DatabaseType_t, EnginePolicyDatabase::DatabaseType_t::dbtFixedMemory);
6823 FROMJSON_IMPL(fixedFileName, std::string, EMPTY_STRING);
6824 FROMJSON_IMPL(forceMaintenance, bool, false);
6825 FROMJSON_IMPL(reclaimSpace, bool, false);
6826 }
6827
6828
6829 //-----------------------------------------------------------
6830 JSON_SERIALIZED_CLASS(SecureSignature)
6839 {
6840 IMPLEMENT_JSON_SERIALIZATION()
6841 IMPLEMENT_JSON_DOCUMENTATION(SecureSignature)
6842
6843 public:
6844
6846 std::string certificate;
6847
6848 // /** @brief Contains the PEM-formatted text of the certificate's public key */
6849 //std::string publicKey;
6850
6852 std::string signature;
6853
6855 {
6856 clear();
6857 }
6858
6859 void clear()
6860 {
6861 certificate.clear();
6862 //publicKey.clear();
6863 signature.clear();
6864 }
6865 };
6866
6867 static void to_json(nlohmann::json& j, const SecureSignature& p)
6868 {
6869 j = nlohmann::json{
6870 TOJSON_IMPL(certificate),
6871 //TOJSON_IMPL(publicKey),
6872 TOJSON_IMPL(signature)
6873 };
6874 }
6875 static void from_json(const nlohmann::json& j, SecureSignature& p)
6876 {
6877 p.clear();
6878 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
6879 //FROMJSON_IMPL(publicKey, std::string, EMPTY_STRING);
6880 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
6881 }
6882
6883 //-----------------------------------------------------------
6884 JSON_SERIALIZED_CLASS(NamedAudioDevice)
6886 {
6887 IMPLEMENT_JSON_SERIALIZATION()
6888 IMPLEMENT_JSON_DOCUMENTATION(NamedAudioDevice)
6889
6890 public:
6891 std::string name;
6892 std::string manufacturer;
6893 std::string model;
6894 std::string id;
6895 std::string serialNumber;
6896 std::string type;
6897 std::string extra;
6898 bool isDefault;
6899
6901 {
6902 clear();
6903 }
6904
6905 void clear()
6906 {
6907 name.clear();
6908 manufacturer.clear();
6909 model.clear();
6910 id.clear();
6911 serialNumber.clear();
6912 type.clear();
6913 extra.clear();
6914 isDefault = false;
6915 }
6916 };
6917
6918 static void to_json(nlohmann::json& j, const NamedAudioDevice& p)
6919 {
6920 j = nlohmann::json{
6921 TOJSON_IMPL(name),
6922 TOJSON_IMPL(manufacturer),
6923 TOJSON_IMPL(model),
6924 TOJSON_IMPL(id),
6925 TOJSON_IMPL(serialNumber),
6926 TOJSON_IMPL(type),
6927 TOJSON_IMPL(extra),
6928 TOJSON_IMPL(isDefault),
6929 };
6930 }
6931 static void from_json(const nlohmann::json& j, NamedAudioDevice& p)
6932 {
6933 p.clear();
6934 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
6935 getOptional<std::string>("manufacturer", p.manufacturer, j, EMPTY_STRING);
6936 getOptional<std::string>("model", p.model, j, EMPTY_STRING);
6937 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
6938 getOptional<std::string>("serialNumber", p.serialNumber, j, EMPTY_STRING);
6939 getOptional<std::string>("type", p.type, j, EMPTY_STRING);
6940 getOptional<std::string>("extra", p.extra, j, EMPTY_STRING);
6941 getOptional<bool>("isDefault", p.isDefault, j, false);
6942 }
6943
6944
6945 //-----------------------------------------------------------
6946 JSON_SERIALIZED_CLASS(EnginePolicyNamedAudioDevices)
6948 {
6949 IMPLEMENT_JSON_SERIALIZATION()
6950 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNamedAudioDevices)
6951
6952 public:
6953 std::vector<NamedAudioDevice> inputs;
6954 std::vector<NamedAudioDevice> outputs;
6955
6957 {
6958 clear();
6959 }
6960
6961 void clear()
6962 {
6963 inputs.clear();
6964 outputs.clear();
6965 }
6966 };
6967
6968 static void to_json(nlohmann::json& j, const EnginePolicyNamedAudioDevices& p)
6969 {
6970 j = nlohmann::json{
6971 TOJSON_IMPL(inputs),
6972 TOJSON_IMPL(outputs)
6973 };
6974 }
6975 static void from_json(const nlohmann::json& j, EnginePolicyNamedAudioDevices& p)
6976 {
6977 p.clear();
6978 getOptional<std::vector<NamedAudioDevice>>("inputs", p.inputs, j);
6979 getOptional<std::vector<NamedAudioDevice>>("outputs", p.outputs, j);
6980 }
6981
6982 //-----------------------------------------------------------
6983 JSON_SERIALIZED_CLASS(Licensing)
6996 {
6997 IMPLEMENT_JSON_SERIALIZATION()
6998 IMPLEMENT_JSON_DOCUMENTATION(Licensing)
6999
7000 public:
7001
7003 std::string entitlement;
7004
7006 std::string key;
7007
7009 std::string activationCode;
7010
7012 std::string deviceId;
7013
7015 std::string manufacturerId;
7016
7017 Licensing()
7018 {
7019 clear();
7020 }
7021
7022 void clear()
7023 {
7024 entitlement.clear();
7025 key.clear();
7026 activationCode.clear();
7027 deviceId.clear();
7028 manufacturerId.clear();
7029 }
7030 };
7031
7032 static void to_json(nlohmann::json& j, const Licensing& p)
7033 {
7034 j = nlohmann::json{
7035 TOJSON_IMPL(entitlement),
7036 TOJSON_IMPL(key),
7037 TOJSON_IMPL(activationCode),
7038 TOJSON_IMPL(deviceId),
7039 TOJSON_IMPL(manufacturerId)
7040 };
7041 }
7042 static void from_json(const nlohmann::json& j, Licensing& p)
7043 {
7044 p.clear();
7045 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
7046 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
7047 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
7048 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
7049 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
7050 }
7051
7052 //-----------------------------------------------------------
7053 JSON_SERIALIZED_CLASS(DiscoveryMagellan)
7064 {
7065 IMPLEMENT_JSON_SERIALIZATION()
7066 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryMagellan)
7067
7068 public:
7069
7072
7074 std::string interfaceName;
7075
7078
7081
7083 {
7084 clear();
7085 }
7086
7087 void clear()
7088 {
7089 enabled = false;
7090 interfaceName.clear();
7091 security.clear();
7092 tls.clear();
7093 }
7094 };
7095
7096 static void to_json(nlohmann::json& j, const DiscoveryMagellan& p)
7097 {
7098 j = nlohmann::json{
7099 TOJSON_IMPL(enabled),
7100 TOJSON_IMPL(interfaceName),
7101 TOJSON_IMPL(security),
7102 TOJSON_IMPL(tls)
7103 };
7104 }
7105 static void from_json(const nlohmann::json& j, DiscoveryMagellan& p)
7106 {
7107 p.clear();
7108 getOptional("enabled", p.enabled, j, false);
7109 getOptional<Tls>("tls", p.tls, j);
7110 getOptional<SecurityCertificate>("security", p.security, j);
7111 FROMJSON_IMPL(interfaceName, std::string, EMPTY_STRING);
7112 }
7113
7114 //-----------------------------------------------------------
7115 JSON_SERIALIZED_CLASS(DiscoverySsdp)
7126 {
7127 IMPLEMENT_JSON_SERIALIZATION()
7128 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySsdp)
7129
7130 public:
7131
7134
7136 std::string interfaceName;
7137
7140
7142 std::vector<std::string> searchTerms;
7143
7146
7149
7151 {
7152 clear();
7153 }
7154
7155 void clear()
7156 {
7157 enabled = false;
7158 interfaceName.clear();
7159 address.clear();
7160 searchTerms.clear();
7161 ageTimeoutMs = 30000;
7162 advertising.clear();
7163 }
7164 };
7165
7166 static void to_json(nlohmann::json& j, const DiscoverySsdp& p)
7167 {
7168 j = nlohmann::json{
7169 TOJSON_IMPL(enabled),
7170 TOJSON_IMPL(interfaceName),
7171 TOJSON_IMPL(address),
7172 TOJSON_IMPL(searchTerms),
7173 TOJSON_IMPL(ageTimeoutMs),
7174 TOJSON_IMPL(advertising)
7175 };
7176 }
7177 static void from_json(const nlohmann::json& j, DiscoverySsdp& p)
7178 {
7179 p.clear();
7180 getOptional("enabled", p.enabled, j, false);
7181 getOptional<std::string>("interfaceName", p.interfaceName, j);
7182
7183 getOptional<NetworkAddress>("address", p.address, j);
7184 if(p.address.address.empty())
7185 {
7186 p.address.address = "255.255.255.255";
7187 }
7188 if(p.address.port <= 0)
7189 {
7190 p.address.port = 1900;
7191 }
7192
7193 getOptional<std::vector<std::string>>("searchTerms", p.searchTerms, j);
7194 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7195 getOptional<Advertising>("advertising", p.advertising, j);
7196 }
7197
7198 //-----------------------------------------------------------
7199 JSON_SERIALIZED_CLASS(DiscoverySap)
7210 {
7211 IMPLEMENT_JSON_SERIALIZATION()
7212 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySap)
7213
7214 public:
7217
7219 std::string interfaceName;
7220
7223
7226
7229
7230 DiscoverySap()
7231 {
7232 clear();
7233 }
7234
7235 void clear()
7236 {
7237 enabled = false;
7238 interfaceName.clear();
7239 address.clear();
7240 ageTimeoutMs = 30000;
7241 advertising.clear();
7242 }
7243 };
7244
7245 static void to_json(nlohmann::json& j, const DiscoverySap& p)
7246 {
7247 j = nlohmann::json{
7248 TOJSON_IMPL(enabled),
7249 TOJSON_IMPL(interfaceName),
7250 TOJSON_IMPL(address),
7251 TOJSON_IMPL(ageTimeoutMs),
7252 TOJSON_IMPL(advertising)
7253 };
7254 }
7255 static void from_json(const nlohmann::json& j, DiscoverySap& p)
7256 {
7257 p.clear();
7258 getOptional("enabled", p.enabled, j, false);
7259 getOptional<std::string>("interfaceName", p.interfaceName, j);
7260 getOptional<NetworkAddress>("address", p.address, j);
7261 if(p.address.address.empty())
7262 {
7263 p.address.address = "224.2.127.254";
7264 }
7265 if(p.address.port <= 0)
7266 {
7267 p.address.port = 9875;
7268 }
7269
7270 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7271 getOptional<Advertising>("advertising", p.advertising, j);
7272 }
7273
7274 //-----------------------------------------------------------
7275 JSON_SERIALIZED_CLASS(DiscoveryCistech)
7288 {
7289 IMPLEMENT_JSON_SERIALIZATION()
7290 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryCistech)
7291
7292 public:
7293 bool enabled;
7294 std::string interfaceName;
7295 NetworkAddress address;
7296 int ageTimeoutMs;
7297
7299 {
7300 clear();
7301 }
7302
7303 void clear()
7304 {
7305 enabled = false;
7306 interfaceName.clear();
7307 address.clear();
7308 ageTimeoutMs = 30000;
7309 }
7310 };
7311
7312 static void to_json(nlohmann::json& j, const DiscoveryCistech& p)
7313 {
7314 j = nlohmann::json{
7315 TOJSON_IMPL(enabled),
7316 TOJSON_IMPL(interfaceName),
7317 TOJSON_IMPL(address),
7318 TOJSON_IMPL(ageTimeoutMs)
7319 };
7320 }
7321 static void from_json(const nlohmann::json& j, DiscoveryCistech& p)
7322 {
7323 p.clear();
7324 getOptional("enabled", p.enabled, j, false);
7325 getOptional<std::string>("interfaceName", p.interfaceName, j);
7326 getOptional<NetworkAddress>("address", p.address, j);
7327 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7328 }
7329
7330
7331 //-----------------------------------------------------------
7332 JSON_SERIALIZED_CLASS(DiscoveryTrellisware)
7343 {
7344 IMPLEMENT_JSON_SERIALIZATION()
7345 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryTrellisware)
7346
7347 public:
7348
7351
7354
7356 {
7357 clear();
7358 }
7359
7360 void clear()
7361 {
7362 enabled = false;
7363 security.clear();
7364 }
7365 };
7366
7367 static void to_json(nlohmann::json& j, const DiscoveryTrellisware& p)
7368 {
7369 j = nlohmann::json{
7370 TOJSON_IMPL(enabled),
7371 TOJSON_IMPL(security)
7372 };
7373 }
7374 static void from_json(const nlohmann::json& j, DiscoveryTrellisware& p)
7375 {
7376 p.clear();
7377 getOptional("enabled", p.enabled, j, false);
7378 getOptional<SecurityCertificate>("security", p.security, j);
7379 }
7380
7381 //-----------------------------------------------------------
7382 JSON_SERIALIZED_CLASS(DiscoveryConfiguration)
7393 {
7394 IMPLEMENT_JSON_SERIALIZATION()
7395 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryConfiguration)
7396
7397 public:
7400
7403
7406
7409
7412
7414 {
7415 clear();
7416 }
7417
7418 void clear()
7419 {
7420 magellan.clear();
7421 ssdp.clear();
7422 sap.clear();
7423 cistech.clear();
7424 }
7425 };
7426
7427 static void to_json(nlohmann::json& j, const DiscoveryConfiguration& p)
7428 {
7429 j = nlohmann::json{
7430 TOJSON_IMPL(magellan),
7431 TOJSON_IMPL(ssdp),
7432 TOJSON_IMPL(sap),
7433 TOJSON_IMPL(cistech),
7434 TOJSON_IMPL(trellisware)
7435 };
7436 }
7437 static void from_json(const nlohmann::json& j, DiscoveryConfiguration& p)
7438 {
7439 p.clear();
7440 getOptional<DiscoveryMagellan>("magellan", p.magellan, j);
7441 getOptional<DiscoverySsdp>("ssdp", p.ssdp, j);
7442 getOptional<DiscoverySap>("sap", p.sap, j);
7443 getOptional<DiscoveryCistech>("cistech", p.cistech, j);
7444 getOptional<DiscoveryTrellisware>("trellisware", p.trellisware, j);
7445 }
7446
7447
7448 //-----------------------------------------------------------
7449 JSON_SERIALIZED_CLASS(ApiCallPacingLaneSettings)
7458 {
7459 IMPLEMENT_JSON_SERIALIZATION()
7460 IMPLEMENT_JSON_DOCUMENTATION(ApiCallPacingLaneSettings)
7461
7462 public:
7465
7468
7470 {
7471 clear();
7472 }
7473
7474 void clear()
7475 {
7476 intervalMs = 0;
7477 maxQueueDepth = 512;
7478 }
7479
7480 virtual void initForDocumenting()
7481 {
7482 clear();
7483 }
7484 };
7485
7486 static void to_json(nlohmann::json& j, const ApiCallPacingLaneSettings& p)
7487 {
7488 j = nlohmann::json{
7489 TOJSON_IMPL(intervalMs),
7490 TOJSON_IMPL(maxQueueDepth)
7491 };
7492 }
7493 static void from_json(const nlohmann::json& j, ApiCallPacingLaneSettings& p)
7494 {
7495 p.clear();
7496 getOptional<int>("intervalMs", p.intervalMs, j, 0);
7497 getOptional<uint32_t>("maxQueueDepth", p.maxQueueDepth, j, 512);
7498 }
7499
7500 //-----------------------------------------------------------
7501 JSON_SERIALIZED_CLASS(ApiCallPacingSettings)
7513 {
7514 IMPLEMENT_JSON_SERIALIZATION()
7515 IMPLEMENT_JSON_DOCUMENTATION(ApiCallPacingSettings)
7516
7517 public:
7520
7523
7526
7528 {
7529 clear();
7530 }
7531
7532 void clear()
7533 {
7534 topology.clear();
7535 transmission.clear();
7536 configuration.clear();
7537 }
7538
7539 virtual void initForDocumenting()
7540 {
7541 clear();
7542 }
7543 };
7544
7545 static void to_json(nlohmann::json& j, const ApiCallPacingSettings& p)
7546 {
7547 j = nlohmann::json{
7548 TOJSON_IMPL(topology),
7549 TOJSON_IMPL(transmission),
7550 TOJSON_IMPL(configuration)
7551 };
7552 }
7553 static void from_json(const nlohmann::json& j, ApiCallPacingSettings& p)
7554 {
7555 p.clear();
7556 getOptional<ApiCallPacingLaneSettings>("topology", p.topology, j);
7557 getOptional<ApiCallPacingLaneSettings>("transmission", p.transmission, j);
7558 getOptional<ApiCallPacingLaneSettings>("configuration", p.configuration, j);
7559 }
7560
7561 //-----------------------------------------------------------
7562 JSON_SERIALIZED_CLASS(EnginePolicyInternals)
7575 {
7576 IMPLEMENT_JSON_SERIALIZATION()
7577 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyInternals)
7578
7579 public:
7582
7585
7588
7589 int maxRxSecs;
7590
7591 int logTaskQueueStatsIntervalMs;
7592
7593 bool enableLazySpeakerClosure;
7594
7597
7600
7603
7606
7609
7612
7615
7618
7621
7624
7626 {
7627 clear();
7628 }
7629
7630 void clear()
7631 {
7632 watchdog.clear();
7633 housekeeperIntervalMs = 1000;
7634 logTaskQueueStatsIntervalMs = 0;
7635 maxTxSecs = 30;
7636 maxRxSecs = 0;
7637 enableLazySpeakerClosure = false;
7638 rpClusterStrategy = RallypointCluster::ConnectionStrategy_t::csRoundRobin;
7639 rpClusterRolloverSecs = 10;
7640 rtpExpirationCheckIntervalMs = 250;
7641 rpConnectionTimeoutSecs = 0;
7642 rpTransactionTimeoutMs = 0;
7643 stickyTidHangSecs = 10;
7644 uriStreamingIntervalMs = 60;
7645 delayedMicrophoneClosureSecs = 15;
7646 tuning.clear();
7647 apiCallPacing.clear();
7648 }
7649 };
7650
7651 static void to_json(nlohmann::json& j, const EnginePolicyInternals& p)
7652 {
7653 j = nlohmann::json{
7654 TOJSON_IMPL(watchdog),
7655 TOJSON_IMPL(housekeeperIntervalMs),
7656 TOJSON_IMPL(logTaskQueueStatsIntervalMs),
7657 TOJSON_IMPL(maxTxSecs),
7658 TOJSON_IMPL(maxRxSecs),
7659 TOJSON_IMPL(enableLazySpeakerClosure),
7660 TOJSON_IMPL(rpClusterStrategy),
7661 TOJSON_IMPL(rpClusterRolloverSecs),
7662 TOJSON_IMPL(rtpExpirationCheckIntervalMs),
7663 TOJSON_IMPL(rpConnectionTimeoutSecs),
7664 TOJSON_IMPL(rpTransactionTimeoutMs),
7665 TOJSON_IMPL(stickyTidHangSecs),
7666 TOJSON_IMPL(uriStreamingIntervalMs),
7667 TOJSON_IMPL(delayedMicrophoneClosureSecs),
7668 TOJSON_IMPL(tuning),
7669 TOJSON_IMPL(apiCallPacing)
7670 };
7671 }
7672 static void from_json(const nlohmann::json& j, EnginePolicyInternals& p)
7673 {
7674 p.clear();
7675 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
7676 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
7677 getOptional<int>("logTaskQueueStatsIntervalMs", p.logTaskQueueStatsIntervalMs, j, 0);
7678 getOptional<int>("maxTxSecs", p.maxTxSecs, j, 30);
7679 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
7680 getOptional<bool>("enableLazySpeakerClosure", p.enableLazySpeakerClosure, j, false);
7681 getOptional<RallypointCluster::ConnectionStrategy_t>("rpClusterStrategy", p.rpClusterStrategy, j, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
7682 getOptional<int>("rpClusterRolloverSecs", p.rpClusterRolloverSecs, j, 10);
7683 getOptional<int>("rtpExpirationCheckIntervalMs", p.rtpExpirationCheckIntervalMs, j, 250);
7684 getOptional<int>("rpConnectionTimeoutSecs", p.rpConnectionTimeoutSecs, j, 0);
7685 getOptional<int>("rpTransactionTimeoutMs", p.rpTransactionTimeoutMs, j, 0);
7686 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
7687 getOptional<int>("uriStreamingIntervalMs", p.uriStreamingIntervalMs, j, 60);
7688 getOptional<int>("delayedMicrophoneClosureSecs", p.delayedMicrophoneClosureSecs, j, 15);
7689 getOptional<TuningSettings>("tuning", p.tuning, j);
7690 getOptional<ApiCallPacingSettings>("apiCallPacing", p.apiCallPacing, j);
7691 }
7692
7693 //-----------------------------------------------------------
7694 JSON_SERIALIZED_CLASS(EnginePolicyTimelines)
7707 {
7708 IMPLEMENT_JSON_SERIALIZATION()
7709 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyTimelines)
7710
7711 public:
7712
7719
7721 std::string storageRoot;
7722
7725
7728
7731
7734
7737
7740
7743
7752
7755
7758
7761
7763 {
7764 clear();
7765 }
7766
7767 void clear()
7768 {
7769 enabled = true;
7770 storageRoot.clear();
7771 maxStorageMb = 1024; // 1 Gigabyte
7772 maxMemMb = maxStorageMb;
7773 maxAudioEventMemMb = maxMemMb;
7774 maxDiskMb = maxStorageMb;
7775 maxEventAgeSecs = (86400 * 30); // 30 days
7776 groomingIntervalSecs = (60 * 30); // 30 minutes
7777 maxEvents = 1000;
7778 autosaveIntervalSecs = 5;
7779 security.clear();
7780 disableSigningAndVerification = false;
7781 ephemeral = false;
7782 }
7783 };
7784
7785 static void to_json(nlohmann::json& j, const EnginePolicyTimelines& p)
7786 {
7787 j = nlohmann::json{
7788 TOJSON_IMPL(enabled),
7789 TOJSON_IMPL(storageRoot),
7790 TOJSON_IMPL(maxMemMb),
7791 TOJSON_IMPL(maxAudioEventMemMb),
7792 TOJSON_IMPL(maxDiskMb),
7793 TOJSON_IMPL(maxEventAgeSecs),
7794 TOJSON_IMPL(maxEvents),
7795 TOJSON_IMPL(groomingIntervalSecs),
7796 TOJSON_IMPL(autosaveIntervalSecs),
7797 TOJSON_IMPL(security),
7798 TOJSON_IMPL(disableSigningAndVerification),
7799 TOJSON_IMPL(ephemeral)
7800 };
7801 }
7802 static void from_json(const nlohmann::json& j, EnginePolicyTimelines& p)
7803 {
7804 p.clear();
7805 getOptional<bool>("enabled", p.enabled, j, true);
7806 getOptional<std::string>("storageRoot", p.storageRoot, j, EMPTY_STRING);
7807
7808 getOptional<int>("maxStorageMb", p.maxStorageMb, j, 1024);
7809 getOptional<int>("maxMemMb", p.maxMemMb, j, p.maxStorageMb);
7810 getOptional<int>("maxAudioEventMemMb", p.maxAudioEventMemMb, j, p.maxMemMb);
7811 getOptional<int>("maxDiskMb", p.maxDiskMb, j, p.maxStorageMb);
7812 getOptional<long>("maxEventAgeSecs", p.maxEventAgeSecs, j, (86400 * 30));
7813 getOptional<long>("groomingIntervalSecs", p.groomingIntervalSecs, j, (60 * 30));
7814 getOptional<long>("autosaveIntervalSecs", p.autosaveIntervalSecs, j, 5);
7815 getOptional<int>("maxEvents", p.maxEvents, j, 1000);
7816 getOptional<SecurityCertificate>("security", p.security, j);
7817 getOptional<bool>("disableSigningAndVerification", p.disableSigningAndVerification, j, false);
7818 getOptional<bool>("ephemeral", p.ephemeral, j, false);
7819 }
7820
7821
7822 //-----------------------------------------------------------
7823 JSON_SERIALIZED_CLASS(RtpMapEntry)
7834 {
7835 IMPLEMENT_JSON_SERIALIZATION()
7836 IMPLEMENT_JSON_DOCUMENTATION(RtpMapEntry)
7837
7838 public:
7840 std::string name;
7841
7844
7847
7848 RtpMapEntry()
7849 {
7850 clear();
7851 }
7852
7853 void clear()
7854 {
7855 name.clear();
7856 engageType = -1;
7857 rtpPayloadType = -1;
7858 }
7859 };
7860
7861 static void to_json(nlohmann::json& j, const RtpMapEntry& p)
7862 {
7863 j = nlohmann::json{
7864 TOJSON_IMPL(name),
7865 TOJSON_IMPL(engageType),
7866 TOJSON_IMPL(rtpPayloadType)
7867 };
7868 }
7869 static void from_json(const nlohmann::json& j, RtpMapEntry& p)
7870 {
7871 p.clear();
7872 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7873 getOptional<int>("engageType", p.engageType, j, -1);
7874 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
7875 }
7876
7877 //-----------------------------------------------------------
7878 JSON_SERIALIZED_CLASS(ExternalModule)
7889 {
7890 IMPLEMENT_JSON_SERIALIZATION()
7891 IMPLEMENT_JSON_DOCUMENTATION(ExternalModule)
7892
7893 public:
7895 std::string name;
7896
7898 std::string file;
7899
7901 nlohmann::json configuration;
7902
7904 {
7905 clear();
7906 }
7907
7908 void clear()
7909 {
7910 name.clear();
7911 file.clear();
7912 configuration.clear();
7913 }
7914 };
7915
7916 static void to_json(nlohmann::json& j, const ExternalModule& p)
7917 {
7918 j = nlohmann::json{
7919 TOJSON_IMPL(name),
7920 TOJSON_IMPL(file)
7921 };
7922
7923 if(!p.configuration.empty())
7924 {
7925 j["configuration"] = p.configuration;
7926 }
7927 }
7928 static void from_json(const nlohmann::json& j, ExternalModule& p)
7929 {
7930 p.clear();
7931 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7932 getOptional<std::string>("file", p.file, j, EMPTY_STRING);
7933
7934 try
7935 {
7936 p.configuration = j.at("configuration");
7937 }
7938 catch(...)
7939 {
7940 p.configuration.clear();
7941 }
7942 }
7943
7944
7945 //-----------------------------------------------------------
7946 JSON_SERIALIZED_CLASS(ExternalCodecDescriptor)
7957 {
7958 IMPLEMENT_JSON_SERIALIZATION()
7959 IMPLEMENT_JSON_DOCUMENTATION(ExternalCodecDescriptor)
7960
7961 public:
7964
7967
7970
7973
7975 {
7976 clear();
7977 }
7978
7979 void clear()
7980 {
7981 rtpPayloadType = -1;
7982 samplingRate = -1;
7983 channels = -1;
7984 rtpTsMultiplier = 0;
7985 }
7986 };
7987
7988 static void to_json(nlohmann::json& j, const ExternalCodecDescriptor& p)
7989 {
7990 j = nlohmann::json{
7991 TOJSON_IMPL(rtpPayloadType),
7992 TOJSON_IMPL(samplingRate),
7993 TOJSON_IMPL(channels),
7994 TOJSON_IMPL(rtpTsMultiplier)
7995 };
7996 }
7997 static void from_json(const nlohmann::json& j, ExternalCodecDescriptor& p)
7998 {
7999 p.clear();
8000
8001 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
8002 getOptional<int>("samplingRate", p.samplingRate, j, -1);
8003 getOptional<int>("channels", p.channels, j, -1);
8004 getOptional<int>("rtpTsMultiplier", p.rtpTsMultiplier, j, -1);
8005 }
8006
8007 //-----------------------------------------------------------
8008 JSON_SERIALIZED_CLASS(EngineStatusReportConfiguration)
8019 {
8020 IMPLEMENT_JSON_SERIALIZATION()
8021 IMPLEMENT_JSON_DOCUMENTATION(EngineStatusReportConfiguration)
8022
8023 public:
8025 std::string fileName;
8026
8029
8032
8034 std::string runCmd;
8035
8038
8041
8043 {
8044 clear();
8045 }
8046
8047 void clear()
8048 {
8049 fileName.clear();
8050 intervalSecs = 60;
8051 enabled = false;
8052 includeMemoryDetail = false;
8053 includeTaskQueueDetail = false;
8054 runCmd.clear();
8055 }
8056 };
8057
8058 static void to_json(nlohmann::json& j, const EngineStatusReportConfiguration& p)
8059 {
8060 j = nlohmann::json{
8061 TOJSON_IMPL(fileName),
8062 TOJSON_IMPL(intervalSecs),
8063 TOJSON_IMPL(enabled),
8064 TOJSON_IMPL(includeMemoryDetail),
8065 TOJSON_IMPL(includeTaskQueueDetail),
8066 TOJSON_IMPL(runCmd)
8067 };
8068 }
8069 static void from_json(const nlohmann::json& j, EngineStatusReportConfiguration& p)
8070 {
8071 p.clear();
8072 getOptional<std::string>("fileName", p.fileName, j);
8073 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8074 getOptional<bool>("enabled", p.enabled, j, false);
8075 getOptional<std::string>("runCmd", p.runCmd, j);
8076 getOptional<bool>("includeMemoryDetail", p.includeMemoryDetail, j, false);
8077 getOptional<bool>("includeTaskQueueDetail", p.includeTaskQueueDetail, j, false);
8078 }
8079
8080 //-----------------------------------------------------------
8081 JSON_SERIALIZED_CLASS(EnginePolicy)
8094 {
8095 IMPLEMENT_JSON_SERIALIZATION()
8096 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicy)
8097
8098 public:
8099
8101 std::string dataDirectory;
8102
8105
8108
8111
8114
8117
8120
8123
8126
8129
8132
8135
8137 std::vector<ExternalModule> externalCodecs;
8138
8140 std::vector<RtpMapEntry> rtpMap;
8141
8144
8145 EnginePolicy()
8146 {
8147 clear();
8148 }
8149
8150 void clear()
8151 {
8152 dataDirectory.clear();
8153 licensing.clear();
8154 security.clear();
8155 networking.clear();
8156 audio.clear();
8157 discovery.clear();
8158 logging.clear();
8159 internals.clear();
8160 timelines.clear();
8161 database.clear();
8162 featureset.clear();
8163 namedAudioDevices.clear();
8164 externalCodecs.clear();
8165 rtpMap.clear();
8166 statusReport.clear();
8167 }
8168 };
8169
8170 static void to_json(nlohmann::json& j, const EnginePolicy& p)
8171 {
8172 j = nlohmann::json{
8173 TOJSON_IMPL(dataDirectory),
8174 TOJSON_IMPL(licensing),
8175 TOJSON_IMPL(security),
8176 TOJSON_IMPL(networking),
8177 TOJSON_IMPL(audio),
8178 TOJSON_IMPL(discovery),
8179 TOJSON_IMPL(logging),
8180 TOJSON_IMPL(internals),
8181 TOJSON_IMPL(timelines),
8182 TOJSON_IMPL(database),
8183 TOJSON_IMPL(featureset),
8184 TOJSON_IMPL(namedAudioDevices),
8185 TOJSON_IMPL(externalCodecs),
8186 TOJSON_IMPL(rtpMap),
8187 TOJSON_IMPL(statusReport)
8188 };
8189 }
8190 static void from_json(const nlohmann::json& j, EnginePolicy& p)
8191 {
8192 p.clear();
8193 FROMJSON_IMPL_SIMPLE(dataDirectory);
8194 FROMJSON_IMPL_SIMPLE(licensing);
8195 FROMJSON_IMPL_SIMPLE(security);
8196 FROMJSON_IMPL_SIMPLE(networking);
8197 FROMJSON_IMPL_SIMPLE(audio);
8198 FROMJSON_IMPL_SIMPLE(discovery);
8199 FROMJSON_IMPL_SIMPLE(logging);
8200 FROMJSON_IMPL_SIMPLE(internals);
8201 FROMJSON_IMPL_SIMPLE(timelines);
8202 FROMJSON_IMPL_SIMPLE(database);
8203 FROMJSON_IMPL_SIMPLE(featureset);
8204 FROMJSON_IMPL_SIMPLE(namedAudioDevices);
8205 FROMJSON_IMPL_SIMPLE(externalCodecs);
8206 FROMJSON_IMPL_SIMPLE(rtpMap);
8207 FROMJSON_IMPL_SIMPLE(statusReport);
8208 }
8209
8210
8211 //-----------------------------------------------------------
8212 JSON_SERIALIZED_CLASS(TalkgroupAsset)
8223 {
8224 IMPLEMENT_JSON_SERIALIZATION()
8225 IMPLEMENT_JSON_DOCUMENTATION(TalkgroupAsset)
8226
8227 public:
8228
8230 std::string nodeId;
8231
8234
8236 {
8237 clear();
8238 }
8239
8240 void clear()
8241 {
8242 nodeId.clear();
8243 group.clear();
8244 }
8245 };
8246
8247 static void to_json(nlohmann::json& j, const TalkgroupAsset& p)
8248 {
8249 j = nlohmann::json{
8250 TOJSON_IMPL(nodeId),
8251 TOJSON_IMPL(group)
8252 };
8253 }
8254 static void from_json(const nlohmann::json& j, TalkgroupAsset& p)
8255 {
8256 p.clear();
8257 getOptional<std::string>("nodeId", p.nodeId, j);
8258 getOptional<Group>("group", p.group, j);
8259 }
8260
8261 //-----------------------------------------------------------
8262 JSON_SERIALIZED_CLASS(EngageDiscoveredGroup)
8271 {
8272 IMPLEMENT_JSON_SERIALIZATION()
8273 IMPLEMENT_JSON_DOCUMENTATION(EngageDiscoveredGroup)
8274
8275 public:
8277 std::string id;
8278
8280 int type;
8281
8284
8287
8289 {
8290 clear();
8291 }
8292
8293 void clear()
8294 {
8295 id.clear();
8296 type = 0;
8297 rx.clear();
8298 tx.clear();
8299 }
8300 };
8301
8302 static void to_json(nlohmann::json& j, const EngageDiscoveredGroup& p)
8303 {
8304 j = nlohmann::json{
8305 TOJSON_IMPL(id),
8306 TOJSON_IMPL(type),
8307 TOJSON_IMPL(rx),
8308 TOJSON_IMPL(tx)
8309 };
8310 }
8311 static void from_json(const nlohmann::json& j, EngageDiscoveredGroup& p)
8312 {
8313 p.clear();
8314 getOptional<std::string>("id", p.id, j);
8315 getOptional<int>("type", p.type, j, 0);
8316 getOptional<NetworkAddress>("rx", p.rx, j);
8317 getOptional<NetworkAddress>("tx", p.tx, j);
8318 }
8319
8320 //-----------------------------------------------------------
8321 JSON_SERIALIZED_CLASS(RallypointPeer)
8332 {
8333 IMPLEMENT_JSON_SERIALIZATION()
8334 IMPLEMENT_JSON_DOCUMENTATION(RallypointPeer)
8335
8336 public:
8337 typedef enum
8338 {
8340 olpUseRpConfiguration = 0,
8341
8343 olpIsMeshLeaf = 1,
8344
8346 olpNotMeshLeaf = 2
8347 } OutboundLeafPolicy_t;
8348
8349 typedef enum
8350 {
8352 olpUseRpWebSocketTlsConfiguration = 0,
8353
8355 olpUseTlsForWebSocket = 1,
8356
8358 olpDoNotUseTlsForWebSocket = 2
8359 } OutboundWebSocketTlsPolicy_t;
8360
8362 std::string id;
8363
8366
8369
8372
8375
8378
8379 OutboundLeafPolicy_t outboundLeafPolicy;
8380
8383
8385 std::string path;
8386
8389
8392
8394 {
8395 clear();
8396 }
8397
8398 void clear()
8399 {
8400 id.clear();
8401 enabled = true;
8402 host.clear();
8403 certificate.clear();
8404 connectionTimeoutSecs = 0;
8405 forceIsMeshLeaf = false;
8406 outboundLeafPolicy = OutboundLeafPolicy_t::olpUseRpConfiguration;
8407 protocol = Rallypoint::RpProtocol_t::rppTlsTcp;
8408 path.clear();
8409 additionalProtocols.clear();
8410 outboundWebSocketTlsPolicy = OutboundWebSocketTlsPolicy_t::olpUseRpWebSocketTlsConfiguration;
8411 }
8412 };
8413
8414 static void to_json(nlohmann::json& j, const RallypointPeer& p)
8415 {
8416 j = nlohmann::json{
8417 TOJSON_IMPL(id),
8418 TOJSON_IMPL(enabled),
8419 TOJSON_IMPL(host),
8420 TOJSON_IMPL(certificate),
8421 TOJSON_IMPL(connectionTimeoutSecs),
8422 TOJSON_IMPL(forceIsMeshLeaf),
8423 TOJSON_IMPL(outboundLeafPolicy),
8424 TOJSON_IMPL(protocol),
8425 TOJSON_IMPL(path),
8426 TOJSON_IMPL(additionalProtocols),
8427 TOJSON_IMPL(outboundWebSocketTlsPolicy)
8428 };
8429 }
8430 static void from_json(const nlohmann::json& j, RallypointPeer& p)
8431 {
8432 p.clear();
8433 j.at("id").get_to(p.id);
8434 getOptional<bool>("enabled", p.enabled, j, true);
8435 getOptional<NetworkAddress>("host", p.host, j);
8436 getOptional<SecurityCertificate>("certificate", p.certificate, j);
8437 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
8438 getOptional<bool>("forceIsMeshLeaf", p.forceIsMeshLeaf, j, false);
8439 getOptional<RallypointPeer::OutboundLeafPolicy_t>("outboundLeafPolicy", p.outboundLeafPolicy, j, RallypointPeer::OutboundLeafPolicy_t::olpUseRpConfiguration);
8440 getOptional<Rallypoint::RpProtocol_t>("protocol", p.protocol, j, Rallypoint::RpProtocol_t::rppTlsTcp);
8441 getOptional<std::string>("path", p.path, j);
8442 getOptional<std::string>("additionalProtocols", p.additionalProtocols, j);
8443 getOptional<RallypointPeer::OutboundWebSocketTlsPolicy_t>("outboundWebSocketTlsPolicy", p.outboundWebSocketTlsPolicy, j, RallypointPeer::OutboundWebSocketTlsPolicy_t::olpUseRpWebSocketTlsConfiguration);
8444 }
8445
8446 //-----------------------------------------------------------
8447 JSON_SERIALIZED_CLASS(RallypointServerLimits)
8458 {
8459 IMPLEMENT_JSON_SERIALIZATION()
8460 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLimits)
8461
8462 public:
8464 uint32_t maxClients;
8465
8467 uint32_t maxPeers;
8468
8471
8474
8477
8480
8483
8486
8489
8492
8495
8498
8501
8504
8507
8509 {
8510 clear();
8511 }
8512
8513 void clear()
8514 {
8515 maxClients = 0;
8516 maxPeers = 0;
8517 maxMulticastReflectors = 0;
8518 maxRegisteredStreams = 0;
8519 maxStreamPaths = 0;
8520 maxRxPacketsPerSec = 0;
8521 maxTxPacketsPerSec = 0;
8522 maxRxBytesPerSec = 0;
8523 maxTxBytesPerSec = 0;
8524 maxQOpsPerSec = 0;
8525 maxInboundBacklog = 64;
8526 lowPriorityQueueThreshold = 64;
8527 normalPriorityQueueThreshold = 256;
8528 denyNewConnectionCpuThreshold = 75;
8529 warnAtCpuThreshold = 65;
8530 }
8531 };
8532
8533 static void to_json(nlohmann::json& j, const RallypointServerLimits& p)
8534 {
8535 j = nlohmann::json{
8536 TOJSON_IMPL(maxClients),
8537 TOJSON_IMPL(maxPeers),
8538 TOJSON_IMPL(maxMulticastReflectors),
8539 TOJSON_IMPL(maxRegisteredStreams),
8540 TOJSON_IMPL(maxStreamPaths),
8541 TOJSON_IMPL(maxRxPacketsPerSec),
8542 TOJSON_IMPL(maxTxPacketsPerSec),
8543 TOJSON_IMPL(maxRxBytesPerSec),
8544 TOJSON_IMPL(maxTxBytesPerSec),
8545 TOJSON_IMPL(maxQOpsPerSec),
8546 TOJSON_IMPL(maxInboundBacklog),
8547 TOJSON_IMPL(lowPriorityQueueThreshold),
8548 TOJSON_IMPL(normalPriorityQueueThreshold),
8549 TOJSON_IMPL(denyNewConnectionCpuThreshold),
8550 TOJSON_IMPL(warnAtCpuThreshold)
8551 };
8552 }
8553 static void from_json(const nlohmann::json& j, RallypointServerLimits& p)
8554 {
8555 p.clear();
8556 getOptional<uint32_t>("maxClients", p.maxClients, j, 0);
8557 getOptional<uint32_t>("maxPeers", p.maxPeers, j, 0);
8558 getOptional<uint32_t>("maxMulticastReflectors", p.maxMulticastReflectors, j, 0);
8559 getOptional<uint32_t>("maxRegisteredStreams", p.maxRegisteredStreams, j, 0);
8560 getOptional<uint32_t>("maxStreamPaths", p.maxStreamPaths, j, 0);
8561 getOptional<uint32_t>("maxRxPacketsPerSec", p.maxRxPacketsPerSec, j, 0);
8562 getOptional<uint32_t>("maxTxPacketsPerSec", p.maxTxPacketsPerSec, j, 0);
8563 getOptional<uint32_t>("maxRxBytesPerSec", p.maxRxBytesPerSec, j, 0);
8564 getOptional<uint32_t>("maxTxBytesPerSec", p.maxTxBytesPerSec, j, 0);
8565 getOptional<uint32_t>("maxQOpsPerSec", p.maxQOpsPerSec, j, 0);
8566 getOptional<uint32_t>("maxInboundBacklog", p.maxInboundBacklog, j, 64);
8567 getOptional<uint32_t>("lowPriorityQueueThreshold", p.lowPriorityQueueThreshold, j, 64);
8568 getOptional<uint32_t>("normalPriorityQueueThreshold", p.normalPriorityQueueThreshold, j, 256);
8569 getOptional<uint32_t>("denyNewConnectionCpuThreshold", p.denyNewConnectionCpuThreshold, j, 75);
8570 getOptional<uint32_t>("warnAtCpuThreshold", p.warnAtCpuThreshold, j, 65);
8571 }
8572
8573 //-----------------------------------------------------------
8574 JSON_SERIALIZED_CLASS(RallypointServerStatusReportConfiguration)
8585 {
8586 IMPLEMENT_JSON_SERIALIZATION()
8587 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerStatusReportConfiguration)
8588
8589 public:
8591 std::string fileName;
8592
8595
8598
8601
8604
8607
8609 std::string runCmd;
8610
8612 {
8613 clear();
8614 }
8615
8616 void clear()
8617 {
8618 fileName.clear();
8619 intervalSecs = 60;
8620 enabled = false;
8621 includeLinks = false;
8622 includePeerLinkDetails = false;
8623 includeClientLinkDetails = false;
8624 runCmd.clear();
8625 }
8626 };
8627
8628 static void to_json(nlohmann::json& j, const RallypointServerStatusReportConfiguration& p)
8629 {
8630 j = nlohmann::json{
8631 TOJSON_IMPL(fileName),
8632 TOJSON_IMPL(intervalSecs),
8633 TOJSON_IMPL(enabled),
8634 TOJSON_IMPL(includeLinks),
8635 TOJSON_IMPL(includePeerLinkDetails),
8636 TOJSON_IMPL(includeClientLinkDetails),
8637 TOJSON_IMPL(runCmd)
8638 };
8639 }
8640 static void from_json(const nlohmann::json& j, RallypointServerStatusReportConfiguration& p)
8641 {
8642 p.clear();
8643 getOptional<std::string>("fileName", p.fileName, j);
8644 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8645 getOptional<bool>("enabled", p.enabled, j, false);
8646 getOptional<bool>("includeLinks", p.includeLinks, j, false);
8647 getOptional<bool>("includePeerLinkDetails", p.includePeerLinkDetails, j, false);
8648 getOptional<bool>("includeClientLinkDetails", p.includeClientLinkDetails, j, false);
8649 getOptional<std::string>("runCmd", p.runCmd, j);
8650 }
8651
8652 //-----------------------------------------------------------
8653 JSON_SERIALIZED_CLASS(RallypointServerLinkGraph)
8655 {
8656 IMPLEMENT_JSON_SERIALIZATION()
8657 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLinkGraph)
8658
8659 public:
8661 std::string fileName;
8662
8665
8668
8671
8676
8678 std::string coreRpStyling;
8679
8681 std::string leafRpStyling;
8682
8684 std::string clientStyling;
8685
8687 std::string runCmd;
8688
8690 {
8691 clear();
8692 }
8693
8694 void clear()
8695 {
8696 fileName.clear();
8697 minRefreshSecs = 5;
8698 enabled = false;
8699 includeDigraphEnclosure = true;
8700 includeClients = false;
8701 coreRpStyling = "[shape=hexagon color=firebrick style=filled]";
8702 leafRpStyling = "[shape=box color=gray style=filled]";
8703 clientStyling.clear();
8704 runCmd.clear();
8705 }
8706 };
8707
8708 static void to_json(nlohmann::json& j, const RallypointServerLinkGraph& p)
8709 {
8710 j = nlohmann::json{
8711 TOJSON_IMPL(fileName),
8712 TOJSON_IMPL(minRefreshSecs),
8713 TOJSON_IMPL(enabled),
8714 TOJSON_IMPL(includeDigraphEnclosure),
8715 TOJSON_IMPL(includeClients),
8716 TOJSON_IMPL(coreRpStyling),
8717 TOJSON_IMPL(leafRpStyling),
8718 TOJSON_IMPL(clientStyling),
8719 TOJSON_IMPL(runCmd)
8720 };
8721 }
8722 static void from_json(const nlohmann::json& j, RallypointServerLinkGraph& p)
8723 {
8724 p.clear();
8725 getOptional<std::string>("fileName", p.fileName, j);
8726 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
8727 getOptional<bool>("enabled", p.enabled, j, false);
8728 getOptional<bool>("includeDigraphEnclosure", p.includeDigraphEnclosure, j, true);
8729 getOptional<bool>("includeClients", p.includeClients, j, false);
8730 getOptional<std::string>("coreRpStyling", p.coreRpStyling, j, "[shape=hexagon color=firebrick style=filled]");
8731 getOptional<std::string>("leafRpStyling", p.leafRpStyling, j, "[shape=box color=gray style=filled]");
8732 getOptional<std::string>("clientStyling", p.clientStyling, j);
8733 getOptional<std::string>("runCmd", p.runCmd, j);
8734 }
8735
8736
8737 //-----------------------------------------------------------
8738 JSON_SERIALIZED_CLASS(RallypointServerStreamStatsExport)
8747 {
8748 IMPLEMENT_JSON_SERIALIZATION()
8749 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerStreamStatsExport)
8750
8751 public:
8753 typedef enum
8754 {
8756 fmtCsv = 0,
8757
8759 fmtJson = 1
8760 } ExportFormat_t;
8761
8763 std::string fileName;
8764
8767
8770
8773
8775 std::string runCmd;
8776
8779
8780
8782 {
8783 clear();
8784 }
8785
8786 void clear()
8787 {
8788 fileName.clear();
8789 intervalSecs = 60;
8790 enabled = false;
8791 resetCountersAfterExport = false;
8792 runCmd.clear();
8793 format = fmtJson;
8794 }
8795 };
8796
8797 static void to_json(nlohmann::json& j, const RallypointServerStreamStatsExport& p)
8798 {
8799 j = nlohmann::json{
8800 TOJSON_IMPL(fileName),
8801 TOJSON_IMPL(intervalSecs),
8802 TOJSON_IMPL(enabled),
8803 TOJSON_IMPL(resetCountersAfterExport),
8804 TOJSON_IMPL(runCmd),
8805 TOJSON_IMPL(format)
8806 };
8807 }
8808 static void from_json(const nlohmann::json& j, RallypointServerStreamStatsExport& p)
8809 {
8810 p.clear();
8811 getOptional<std::string>("fileName", p.fileName, j);
8812 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8813 getOptional<bool>("enabled", p.enabled, j, false);
8814 getOptional<bool>("resetCountersAfterExport", p.resetCountersAfterExport, j, false);
8815 getOptional<std::string>("runCmd", p.runCmd, j);
8816 getOptional<RallypointServerStreamStatsExport::ExportFormat_t>("format", p.format, j, RallypointServerStreamStatsExport::ExportFormat_t::fmtCsv);
8817 }
8818
8819 //-----------------------------------------------------------
8820 JSON_SERIALIZED_CLASS(RallypointServerRouteMap)
8822 {
8823 IMPLEMENT_JSON_SERIALIZATION()
8824 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerRouteMap)
8825
8826 public:
8828 std::string fileName;
8829
8832
8835
8837 std::string runCmd;
8838
8840 {
8841 clear();
8842 }
8843
8844 void clear()
8845 {
8846 fileName.clear();
8847 minRefreshSecs = 5;
8848 enabled = false;
8849 }
8850 };
8851
8852 static void to_json(nlohmann::json& j, const RallypointServerRouteMap& p)
8853 {
8854 j = nlohmann::json{
8855 TOJSON_IMPL(fileName),
8856 TOJSON_IMPL(minRefreshSecs),
8857 TOJSON_IMPL(enabled),
8858 TOJSON_IMPL(runCmd)
8859 };
8860 }
8861 static void from_json(const nlohmann::json& j, RallypointServerRouteMap& p)
8862 {
8863 p.clear();
8864 getOptional<std::string>("fileName", p.fileName, j);
8865 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
8866 getOptional<bool>("enabled", p.enabled, j, false);
8867 getOptional<std::string>("runCmd", p.runCmd, j);
8868 }
8869
8870
8871 //-----------------------------------------------------------
8872 JSON_SERIALIZED_CLASS(ExternalHealthCheckResponder)
8883 {
8884 IMPLEMENT_JSON_SERIALIZATION()
8885 IMPLEMENT_JSON_DOCUMENTATION(ExternalHealthCheckResponder)
8886
8887 public:
8888
8891
8894
8896 {
8897 clear();
8898 }
8899
8900 void clear()
8901 {
8902 listenPort = 0;
8903 immediateClose = true;
8904 }
8905 };
8906
8907 static void to_json(nlohmann::json& j, const ExternalHealthCheckResponder& p)
8908 {
8909 j = nlohmann::json{
8910 TOJSON_IMPL(listenPort),
8911 TOJSON_IMPL(immediateClose)
8912 };
8913 }
8914 static void from_json(const nlohmann::json& j, ExternalHealthCheckResponder& p)
8915 {
8916 p.clear();
8917 getOptional<int>("listenPort", p.listenPort, j, 0);
8918 getOptional<bool>("immediateClose", p.immediateClose, j, true);
8919 }
8920
8921
8922 //-----------------------------------------------------------
8923 JSON_SERIALIZED_CLASS(PeeringConfiguration)
8932 {
8933 IMPLEMENT_JSON_SERIALIZATION()
8934 IMPLEMENT_JSON_DOCUMENTATION(PeeringConfiguration)
8935
8936 public:
8937
8939 std::string id;
8940
8943
8945 std::string comments;
8946
8948 std::vector<RallypointPeer> peers;
8949
8951 {
8952 clear();
8953 }
8954
8955 void clear()
8956 {
8957 id.clear();
8958 version = 0;
8959 comments.clear();
8960 }
8961 };
8962
8963 static void to_json(nlohmann::json& j, const PeeringConfiguration& p)
8964 {
8965 j = nlohmann::json{
8966 TOJSON_IMPL(id),
8967 TOJSON_IMPL(version),
8968 TOJSON_IMPL(comments),
8969 TOJSON_IMPL(peers)
8970 };
8971 }
8972 static void from_json(const nlohmann::json& j, PeeringConfiguration& p)
8973 {
8974 p.clear();
8975 getOptional<std::string>("id", p.id, j);
8976 getOptional<int>("version", p.version, j, 0);
8977 getOptional<std::string>("comments", p.comments, j);
8978 getOptional<std::vector<RallypointPeer>>("peers", p.peers, j);
8979 }
8980
8981 //-----------------------------------------------------------
8982 JSON_SERIALIZED_CLASS(IgmpSnooping)
8991 {
8992 IMPLEMENT_JSON_SERIALIZATION()
8993 IMPLEMENT_JSON_DOCUMENTATION(IgmpSnooping)
8994
8995 public:
8996
8999
9002
9005
9006
9007 IgmpSnooping()
9008 {
9009 clear();
9010 }
9011
9012 void clear()
9013 {
9014 enabled = false;
9015 queryIntervalMs = 125000;
9016 subscriptionTimeoutMs = 0;
9017 }
9018 };
9019
9020 static void to_json(nlohmann::json& j, const IgmpSnooping& p)
9021 {
9022 j = nlohmann::json{
9023 TOJSON_IMPL(enabled),
9024 TOJSON_IMPL(queryIntervalMs),
9025 TOJSON_IMPL(subscriptionTimeoutMs)
9026 };
9027 }
9028 static void from_json(const nlohmann::json& j, IgmpSnooping& p)
9029 {
9030 p.clear();
9031 getOptional<bool>("enabled", p.enabled, j);
9032 getOptional<int>("queryIntervalMs", p.queryIntervalMs, j, 125000);
9033 getOptional<int>("subscriptionTimeoutMs", p.subscriptionTimeoutMs, j, 0);
9034 }
9035
9036
9037 //-----------------------------------------------------------
9038 JSON_SERIALIZED_CLASS(RallypointReflector)
9046 {
9047 IMPLEMENT_JSON_SERIALIZATION()
9048 IMPLEMENT_JSON_DOCUMENTATION(RallypointReflector)
9049
9050 public:
9052 typedef enum
9053 {
9055 drNone = 0,
9056
9058 drRxOnly = 1,
9059
9061 drTxOnly = 2
9062 } DirectionRestriction_t;
9063
9067 std::string id;
9068
9071
9074
9077
9079 std::vector<NetworkAddress> additionalTx;
9080
9083
9085 {
9086 clear();
9087 }
9088
9089 void clear()
9090 {
9091 id.clear();
9092 rx.clear();
9093 tx.clear();
9094 multicastInterfaceName.clear();
9095 additionalTx.clear();
9096 directionRestriction = drNone;
9097 }
9098 };
9099
9100 static void to_json(nlohmann::json& j, const RallypointReflector& p)
9101 {
9102 j = nlohmann::json{
9103 TOJSON_IMPL(id),
9104 TOJSON_IMPL(rx),
9105 TOJSON_IMPL(tx),
9106 TOJSON_IMPL(multicastInterfaceName),
9107 TOJSON_IMPL(additionalTx),
9108 TOJSON_IMPL(directionRestriction)
9109 };
9110 }
9111 static void from_json(const nlohmann::json& j, RallypointReflector& p)
9112 {
9113 p.clear();
9114 j.at("id").get_to(p.id);
9115 j.at("rx").get_to(p.rx);
9116 j.at("tx").get_to(p.tx);
9117 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
9118 getOptional<std::vector<NetworkAddress>>("additionalTx", p.additionalTx, j);
9119 getOptional<RallypointReflector::DirectionRestriction_t>("directionRestriction", p.directionRestriction, j, RallypointReflector::DirectionRestriction_t::drNone);
9120 }
9121
9122
9123 //-----------------------------------------------------------
9124 JSON_SERIALIZED_CLASS(RallypointUdpStreamingIpvX)
9132 {
9133 IMPLEMENT_JSON_SERIALIZATION()
9134 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreamingIpvX)
9135
9136 public:
9139
9142
9144 {
9145 clear();
9146 }
9147
9148 void clear()
9149 {
9150 enabled = true;
9151 external.clear();
9152 }
9153 };
9154
9155 static void to_json(nlohmann::json& j, const RallypointUdpStreamingIpvX& p)
9156 {
9157 j = nlohmann::json{
9158 TOJSON_IMPL(enabled),
9159 TOJSON_IMPL(external)
9160 };
9161 }
9162 static void from_json(const nlohmann::json& j, RallypointUdpStreamingIpvX& p)
9163 {
9164 p.clear();
9165 getOptional<bool>("enabled", p.enabled, j, true);
9166 getOptional<NetworkAddress>("external", p.external, j);
9167 }
9168
9169 //-----------------------------------------------------------
9170 JSON_SERIALIZED_CLASS(RallypointUdpStreaming)
9178 {
9179 IMPLEMENT_JSON_SERIALIZATION()
9180 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreaming)
9181
9182 public:
9184 typedef enum
9185 {
9187 ctUnknown = 0,
9188
9190 ctSharedKeyAes256FullIv = 1,
9191
9193 ctSharedKeyAes256IdxIv = 2,
9194
9196 ctSharedKeyChaCha20FullIv = 3,
9197
9199 ctSharedKeyChaCha20IdxIv = 4
9200 } CryptoType_t;
9201
9204
9207
9210
9213
9216
9219
9222
9224 int ttl;
9225
9226
9228 {
9229 clear();
9230 }
9231
9232 void clear()
9233 {
9234 enabled = true;
9235 cryptoType = CryptoType_t::ctSharedKeyAes256FullIv;
9236 listenPort = 7444;
9237 ipv4.clear();
9238 ipv6.clear();
9239 keepaliveIntervalSecs = 15;
9240 priority = TxPriority_t::priVoice;
9241 ttl = 64;
9242 }
9243 };
9244
9245 static void to_json(nlohmann::json& j, const RallypointUdpStreaming& p)
9246 {
9247 j = nlohmann::json{
9248 TOJSON_IMPL(enabled),
9249 TOJSON_IMPL(cryptoType),
9250 TOJSON_IMPL(listenPort),
9251 TOJSON_IMPL(keepaliveIntervalSecs),
9252 TOJSON_IMPL(ipv4),
9253 TOJSON_IMPL(ipv6),
9254 TOJSON_IMPL(priority),
9255 TOJSON_IMPL(ttl)
9256 };
9257 }
9258 static void from_json(const nlohmann::json& j, RallypointUdpStreaming& p)
9259 {
9260 p.clear();
9261 getOptional<bool>("enabled", p.enabled, j, true);
9262 getOptional<RallypointUdpStreaming::CryptoType_t>("cryptoType", p.cryptoType, j, RallypointUdpStreaming::CryptoType_t::ctSharedKeyAes256FullIv);
9263 getOptional<int>("listenPort", p.listenPort, j, 7444);
9264 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
9265 getOptional<RallypointUdpStreamingIpvX>("ipv4", p.ipv4, j);
9266 getOptional<RallypointUdpStreamingIpvX>("ipv6", p.ipv6, j);
9267 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
9268 getOptional<int>("ttl", p.ttl, j, 64);
9269 }
9270
9271 //-----------------------------------------------------------
9272 JSON_SERIALIZED_CLASS(RallypointRpRtTimingBehavior)
9280 {
9281 IMPLEMENT_JSON_SERIALIZATION()
9282 IMPLEMENT_JSON_DOCUMENTATION(RallypointRpRtTimingBehavior)
9283
9284 public:
9286 typedef enum
9287 {
9290
9293
9296
9299
9301 btDrop = 99
9302 } BehaviorType_t;
9303
9306
9308 uint32_t atOrAboveMs;
9309
9311 std::string runCmd;
9312
9314 {
9315 clear();
9316 }
9317
9318 void clear()
9319 {
9320 behavior = btNone;
9321 atOrAboveMs = 0;
9322 runCmd.clear();
9323 }
9324 };
9325
9326 static void to_json(nlohmann::json& j, const RallypointRpRtTimingBehavior& p)
9327 {
9328 j = nlohmann::json{
9329 TOJSON_IMPL(behavior),
9330 TOJSON_IMPL(atOrAboveMs),
9331 TOJSON_IMPL(runCmd)
9332 };
9333 }
9334 static void from_json(const nlohmann::json& j, RallypointRpRtTimingBehavior& p)
9335 {
9336 p.clear();
9337 getOptional<RallypointRpRtTimingBehavior::BehaviorType_t>("behavior", p.behavior, j, RallypointRpRtTimingBehavior::BehaviorType_t::btNone);
9338 getOptional<uint32_t>("atOrAboveMs", p.atOrAboveMs, j, 0);
9339 getOptional<std::string>("runCmd", p.runCmd, j);
9340 }
9341
9342
9343 //-----------------------------------------------------------
9344 JSON_SERIALIZED_CLASS(RallypointWebsocketSettings)
9352 {
9353 IMPLEMENT_JSON_SERIALIZATION()
9354 IMPLEMENT_JSON_DOCUMENTATION(RallypointWebsocketSettings)
9355
9356 public:
9359
9362
9365
9368
9371
9373 {
9374 clear();
9375 }
9376
9377 void clear()
9378 {
9379 enabled = false;
9380 listenPort = 8443;
9381 certificate.clear();
9382 requireClientCertificate = false;
9383 requireTls = true;
9384 }
9385 };
9386
9387 static void to_json(nlohmann::json& j, const RallypointWebsocketSettings& p)
9388 {
9389 j = nlohmann::json{
9390 TOJSON_IMPL(enabled),
9391 TOJSON_IMPL(listenPort),
9392 TOJSON_IMPL(certificate),
9393 TOJSON_IMPL(requireClientCertificate),
9394 TOJSON_IMPL(requireTls)
9395 };
9396 }
9397 static void from_json(const nlohmann::json& j, RallypointWebsocketSettings& p)
9398 {
9399 p.clear();
9400 getOptional<bool>("enabled", p.enabled, j, false);
9401 getOptional<int>("listenPort", p.listenPort, j, 8443);
9402 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9403 getOptional<bool>("requireClientCertificate", p.requireClientCertificate, j, false);
9404 getOptional<bool>("requireTls", p.requireTls, j, true);
9405 }
9406
9407
9408
9409 //-----------------------------------------------------------
9410 JSON_SERIALIZED_CLASS(RallypointAdvertisingSettings)
9418 {
9419 IMPLEMENT_JSON_SERIALIZATION()
9420 IMPLEMENT_JSON_DOCUMENTATION(RallypointAdvertisingSettings)
9421
9422 public:
9425
9427 std::string hostName;
9428
9430 std::string serviceName;
9431
9433 std::string interfaceName;
9434
9436 int port;
9437
9439 int ttl;
9440
9442 {
9443 clear();
9444 }
9445
9446 void clear()
9447 {
9448 enabled = false;
9449 hostName.clear();
9450 serviceName = "_rallypoint._tcp.local.";
9451 interfaceName.clear();
9452 port = 0;
9453 ttl = 60;
9454 }
9455 };
9456
9457 static void to_json(nlohmann::json& j, const RallypointAdvertisingSettings& p)
9458 {
9459 j = nlohmann::json{
9460 TOJSON_IMPL(enabled),
9461 TOJSON_IMPL(hostName),
9462 TOJSON_IMPL(serviceName),
9463 TOJSON_IMPL(interfaceName),
9464 TOJSON_IMPL(port),
9465 TOJSON_IMPL(ttl)
9466 };
9467 }
9468 static void from_json(const nlohmann::json& j, RallypointAdvertisingSettings& p)
9469 {
9470 p.clear();
9471 getOptional<bool>("enabled", p.enabled, j, false);
9472 getOptional<std::string>("hostName", p.hostName, j);
9473 getOptional<std::string>("serviceName", p.serviceName, j, "_rallypoint._tcp.local.");
9474 getOptional<std::string>("interfaceName", p.interfaceName, j);
9475
9476 getOptional<int>("port", p.port, j, 0);
9477 getOptional<int>("ttl", p.ttl, j, 60);
9478 }
9479
9480
9481
9482
9483 //-----------------------------------------------------------
9484 JSON_SERIALIZED_CLASS(NamedIdentity)
9492 {
9493 IMPLEMENT_JSON_SERIALIZATION()
9494 IMPLEMENT_JSON_DOCUMENTATION(NamedIdentity)
9495
9496 public:
9498 std::string name;
9499
9502
9504 {
9505 clear();
9506 }
9507
9508 void clear()
9509 {
9510 name.clear();
9511 certificate.clear();
9512 }
9513 };
9514
9515 static void to_json(nlohmann::json& j, const NamedIdentity& p)
9516 {
9517 j = nlohmann::json{
9518 TOJSON_IMPL(name),
9519 TOJSON_IMPL(certificate)
9520 };
9521 }
9522 static void from_json(const nlohmann::json& j, NamedIdentity& p)
9523 {
9524 p.clear();
9525 getOptional<std::string>("name", p.name, j);
9526 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9527 }
9528
9529 //-----------------------------------------------------------
9530 JSON_SERIALIZED_CLASS(RallypointExtendedGroupRestriction)
9538 {
9539 IMPLEMENT_JSON_SERIALIZATION()
9540 IMPLEMENT_JSON_DOCUMENTATION(RallypointExtendedGroupRestriction)
9541
9542 public:
9544 std::string id;
9545
9547 std::vector<StringRestrictionList> restrictions;
9548
9550 {
9551 clear();
9552 }
9553
9554 void clear()
9555 {
9556 id.clear();
9557 restrictions.clear();
9558 }
9559 };
9560
9561 static void to_json(nlohmann::json& j, const RallypointExtendedGroupRestriction& p)
9562 {
9563 j = nlohmann::json{
9564 TOJSON_IMPL(id),
9565 TOJSON_IMPL(restrictions)
9566 };
9567 }
9568 static void from_json(const nlohmann::json& j, RallypointExtendedGroupRestriction& p)
9569 {
9570 p.clear();
9571 getOptional<std::string>("id", p.id, j);
9572 getOptional<std::vector<StringRestrictionList>>("restrictions", p.restrictions, j);
9573 }
9574
9575 //-----------------------------------------------------------
9576 JSON_SERIALIZED_CLASS(RtiCloudSettings)
9583 {
9584 IMPLEMENT_JSON_SERIALIZATION()
9585 IMPLEMENT_JSON_DOCUMENTATION(RtiCloudSettings)
9586
9587 public:
9590
9592 std::string enrollmentCode;
9593
9596
9598 {
9599 clear();
9600 }
9601
9602 void clear()
9603 {
9604 enabled = false;
9605 enrollmentCode.clear();
9606 serviceBaseUrlPrefix = "prod.com";
9607 }
9608 };
9609
9610 static void to_json(nlohmann::json& j, const RtiCloudSettings& p)
9611 {
9612 j = nlohmann::json{
9613 TOJSON_IMPL(enabled),
9614 TOJSON_IMPL(enrollmentCode),
9615 TOJSON_IMPL(serviceBaseUrlPrefix)
9616 };
9617 }
9618 static void from_json(const nlohmann::json& j, RtiCloudSettings& p)
9619 {
9620 p.clear();
9621 getOptional<bool>("enabled", p.enabled, j, false);
9622 getOptional<std::string>("enrollmentCode", p.enrollmentCode, j);
9623 getOptional<std::string>("serviceBaseUrlPrefix", p.serviceBaseUrlPrefix, j, "prod.com");
9624 }
9625
9626 //-----------------------------------------------------------
9627 JSON_SERIALIZED_CLASS(NsmNodeScripts)
9634 {
9635 IMPLEMENT_JSON_SERIALIZATION()
9636 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeScripts)
9637
9638 public:
9639 std::string onIdle;
9640 std::string beforeGoingActive;
9641 std::string onGoingActive;
9642 std::string beforeActive;
9643 std::string onActive;
9644 std::string inDashboard;
9645 std::string onStatusReport;
9646
9648 {
9649 clear();
9650 }
9651
9652 void clear()
9653 {
9654 onIdle.clear();
9655 beforeGoingActive.clear();
9656 onGoingActive.clear();
9657 beforeActive.clear();
9658 onActive.clear();
9659 inDashboard.clear();
9660 onStatusReport.clear();
9661 }
9662 };
9663
9664 static void to_json(nlohmann::json& j, const NsmNodeScripts& p)
9665 {
9666 j = nlohmann::json{
9667 TOJSON_IMPL(onIdle),
9668 TOJSON_IMPL(beforeGoingActive),
9669 TOJSON_IMPL(onGoingActive),
9670 TOJSON_IMPL(beforeActive),
9671 TOJSON_IMPL(onActive),
9672 TOJSON_IMPL(inDashboard),
9673 TOJSON_IMPL(onStatusReport)
9674 };
9675 }
9676 static void from_json(const nlohmann::json& j, NsmNodeScripts& p)
9677 {
9678 p.clear();
9679 getOptional<std::string>("onIdle", p.onIdle, j);
9680 getOptional<std::string>("beforeGoingActive", p.beforeGoingActive, j);
9681 getOptional<std::string>("onGoingActive", p.onGoingActive, j);
9682 getOptional<std::string>("beforeActive", p.beforeActive, j);
9683 getOptional<std::string>("onActive", p.onActive, j);
9684 getOptional<std::string>("inDashboard", p.inDashboard, j);
9685 getOptional<std::string>("onStatusReport", p.onStatusReport, j);
9686 }
9687
9688 //-----------------------------------------------------------
9689 JSON_SERIALIZED_CLASS(NsmNodeLogging)
9696 {
9697 IMPLEMENT_JSON_SERIALIZATION()
9698 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeLogging)
9699
9700 public:
9705 bool logCommandOutput;
9706 bool logResourceStates;
9707
9709 {
9710 clear();
9711 }
9712
9713 void clear()
9714 {
9715 level = 3;
9716 dashboard = false;
9717 logCommandOutput = false;
9718 logResourceStates = false;
9719 }
9720 };
9721
9722 static void to_json(nlohmann::json& j, const NsmNodeLogging& p)
9723 {
9724 j = nlohmann::json{
9725 TOJSON_IMPL(level),
9726 TOJSON_IMPL(dashboard),
9727 TOJSON_IMPL(logCommandOutput),
9728 TOJSON_IMPL(logResourceStates)
9729 };
9730 }
9731 static void from_json(const nlohmann::json& j, NsmNodeLogging& p)
9732 {
9733 p.clear();
9734 getOptional<int>("level", p.level, j, 3);
9735 getOptional<bool>("dashboard", p.dashboard, j, false);
9736 getOptional<bool>("logCommandOutput", p.logCommandOutput, j, false);
9737 getOptional<bool>("logResourceStates", p.logResourceStates, j, false);
9738 }
9739
9740 //-----------------------------------------------------------
9741 JSON_SERIALIZED_CLASS(NsmNodePeriodic)
9748 {
9749 IMPLEMENT_JSON_SERIALIZATION()
9750 IMPLEMENT_JSON_DOCUMENTATION(NsmNodePeriodic)
9751
9752 public:
9753 std::string id;
9754 int intervalSecs;
9755 std::string command;
9756
9758 {
9759 clear();
9760 }
9761
9762 void clear()
9763 {
9764 id.clear();
9765 intervalSecs = 1;
9766 command.clear();
9767 }
9768 };
9769
9770 static void to_json(nlohmann::json& j, const NsmNodePeriodic& p)
9771 {
9772 j = nlohmann::json{
9773 TOJSON_IMPL(id),
9774 TOJSON_IMPL(intervalSecs),
9775 TOJSON_IMPL(command)
9776 };
9777 }
9778 static void from_json(const nlohmann::json& j, NsmNodePeriodic& p)
9779 {
9780 p.clear();
9781 getOptional<std::string>("id", p.id, j);
9782 getOptional<int>("intervalSecs", p.intervalSecs, j, 1);
9783 getOptional<std::string>("command", p.command, j);
9784 }
9785
9786 //-----------------------------------------------------------
9787 JSON_SERIALIZED_CLASS(NsmNodeCotLocationPollSettings)
9797 {
9798 IMPLEMENT_JSON_SERIALIZATION()
9799 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeCotLocationPollSettings)
9800
9801 public:
9805 std::string runCmd;
9810
9812 {
9813 clear();
9814 }
9815
9816 void clear()
9817 {
9818 enabled = false;
9819 runCmd.clear();
9820 intervalSecs = 10;
9821 failClosed = true;
9822 }
9823 };
9824
9825 static void to_json(nlohmann::json& j, const NsmNodeCotLocationPollSettings& p)
9826 {
9827 j = nlohmann::json{
9828 TOJSON_IMPL(enabled),
9829 TOJSON_IMPL(runCmd),
9830 TOJSON_IMPL(intervalSecs),
9831 TOJSON_IMPL(failClosed)
9832 };
9833 }
9834 static void from_json(const nlohmann::json& j, NsmNodeCotLocationPollSettings& p)
9835 {
9836 p.clear();
9837 getOptional<bool>("enabled", p.enabled, j, false);
9838 getOptional<std::string>("runCmd", p.runCmd, j);
9839 getOptional<int>("intervalSecs", p.intervalSecs, j, 10);
9840 getOptional<bool>("failClosed", p.failClosed, j, true);
9841 }
9842
9843 //-----------------------------------------------------------
9844 JSON_SERIALIZED_CLASS(NsmNodeCotSettings)
9851 {
9852 IMPLEMENT_JSON_SERIALIZATION()
9853 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeCotSettings)
9854
9855 public:
9856 bool useCot;
9857 std::string uid;
9858 std::string type;
9859 std::string how;
9860 std::string lat;
9861 std::string lon;
9862 std::string ce;
9863 std::string hae;
9864 std::string le;
9866 std::string callsign;
9868 std::string detailJson;
9875
9877 {
9878 clear();
9879 }
9880
9881 void clear()
9882 {
9883 useCot = false;
9884 uid.clear();
9885 type.clear();
9886 how.clear();
9887 lat.clear();
9888 lon.clear();
9889 ce.clear();
9890 hae.clear();
9891 le.clear();
9892 callsign.clear();
9893 detailJson.clear();
9894 announceWhenIdle = false;
9895 idleIntervalSecs = 30;
9896 locationPoll.clear();
9897 }
9898 };
9899
9900 static void to_json(nlohmann::json& j, const NsmNodeCotSettings& p)
9901 {
9902 j = nlohmann::json{
9903 TOJSON_IMPL(useCot),
9904 TOJSON_IMPL(uid),
9905 TOJSON_IMPL(type),
9906 TOJSON_IMPL(how),
9907 TOJSON_IMPL(lat),
9908 TOJSON_IMPL(lon),
9909 TOJSON_IMPL(ce),
9910 TOJSON_IMPL(hae),
9911 TOJSON_IMPL(le),
9912 TOJSON_IMPL(callsign),
9913 TOJSON_IMPL(detailJson),
9914 TOJSON_IMPL(announceWhenIdle),
9915 TOJSON_IMPL(idleIntervalSecs),
9916 TOJSON_IMPL(locationPoll)
9917 };
9918 }
9919 static void from_json(const nlohmann::json& j, NsmNodeCotSettings& p)
9920 {
9921 p.clear();
9922 getOptional<bool>("useCot", p.useCot, j, false);
9923 getOptional<std::string>("uid", p.uid, j);
9924 getOptional<std::string>("type", p.type, j);
9925 getOptional<std::string>("how", p.how, j);
9926 getOptional<std::string>("lat", p.lat, j);
9927 getOptional<std::string>("lon", p.lon, j);
9928 getOptional<std::string>("ce", p.ce, j);
9929 getOptional<std::string>("hae", p.hae, j);
9930 getOptional<std::string>("le", p.le, j);
9931 getOptional<std::string>("callsign", p.callsign, j);
9932 getOptional<std::string>("detailJson", p.detailJson, j);
9933 getOptional<bool>("announceWhenIdle", p.announceWhenIdle, j, false);
9934 getOptional<int>("idleIntervalSecs", p.idleIntervalSecs, j, 30);
9935 getOptional<NsmNodeCotLocationPollSettings>("locationPoll", p.locationPoll, j);
9936 }
9937
9938 //-----------------------------------------------------------
9939 JSON_SERIALIZED_CLASS(StatusReportPostConfiguration)
9950 {
9951 IMPLEMENT_JSON_SERIALIZATION()
9952 IMPLEMENT_JSON_DOCUMENTATION(StatusReportPostConfiguration)
9953
9954 public:
9956 std::string url;
9957
9960
9962 {
9963 clear();
9964 }
9965
9966 void clear()
9967 {
9968 url.clear();
9969 timeoutSecs = 3;
9970 }
9971 };
9972
9973 static void to_json(nlohmann::json& j, const StatusReportPostConfiguration& p)
9974 {
9975 j = nlohmann::json{
9976 TOJSON_IMPL(url),
9977 TOJSON_IMPL(timeoutSecs)
9978 };
9979 }
9980 static void from_json(const nlohmann::json& j, StatusReportPostConfiguration& p)
9981 {
9982 p.clear();
9983 getOptional<std::string>("url", p.url, j);
9984 getOptional<int>("timeoutSecs", p.timeoutSecs, j, 3);
9985 }
9986
9987 //-----------------------------------------------------------
9988 JSON_SERIALIZED_CLASS(NsmNodeStatusReportImmediateConfiguration)
10000 {
10001 IMPLEMENT_JSON_SERIALIZATION()
10002 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeStatusReportImmediateConfiguration)
10003
10004 public:
10013
10015 {
10016 clear();
10017 }
10018
10019 void clear()
10020 {
10021 enabled = false;
10022 minIntervalSecs = 3;
10023 onStateChange = true;
10024 onOwnerChange = true;
10025 }
10026 };
10027
10028 static void to_json(nlohmann::json& j, const NsmNodeStatusReportImmediateConfiguration& p)
10029 {
10030 j = nlohmann::json{
10031 TOJSON_IMPL(enabled),
10032 TOJSON_IMPL(minIntervalSecs),
10033 TOJSON_IMPL(onStateChange),
10034 TOJSON_IMPL(onOwnerChange)
10035 };
10036 }
10037 static void from_json(const nlohmann::json& j, NsmNodeStatusReportImmediateConfiguration& p)
10038 {
10039 p.clear();
10040 getOptional<bool>("enabled", p.enabled, j, false);
10041 getOptional<int>("minIntervalSecs", p.minIntervalSecs, j, 3);
10042 getOptional<bool>("onStateChange", p.onStateChange, j, true);
10043 getOptional<bool>("onOwnerChange", p.onOwnerChange, j, true);
10044 }
10045
10046 //-----------------------------------------------------------
10047 JSON_SERIALIZED_CLASS(NsmNodeStatusReportConfiguration)
10058 {
10059 IMPLEMENT_JSON_SERIALIZATION()
10060 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeStatusReportConfiguration)
10061
10062 public:
10064 std::string fileName;
10065
10068
10071
10073 std::string runCmd;
10074
10077
10080
10083
10085 {
10086 clear();
10087 }
10088
10089 void clear()
10090 {
10091 fileName.clear();
10092 intervalSecs = 60;
10093 enabled = false;
10094 includeResourceDetail = false;
10095 runCmd.clear();
10096 post.clear();
10097 immediate.clear();
10098 }
10099 };
10100
10101 static void to_json(nlohmann::json& j, const NsmNodeStatusReportConfiguration& p)
10102 {
10103 j = nlohmann::json{
10104 TOJSON_IMPL(fileName),
10105 TOJSON_IMPL(intervalSecs),
10106 TOJSON_IMPL(enabled),
10107 TOJSON_IMPL(includeResourceDetail),
10108 TOJSON_IMPL(runCmd),
10109 TOJSON_IMPL(post),
10110 TOJSON_IMPL(immediate)
10111 };
10112 }
10113 static void from_json(const nlohmann::json& j, NsmNodeStatusReportConfiguration& p)
10114 {
10115 p.clear();
10116 getOptional<std::string>("fileName", p.fileName, j);
10117 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
10118 getOptional<bool>("enabled", p.enabled, j, false);
10119 getOptional<std::string>("runCmd", p.runCmd, j);
10120 getOptional<bool>("includeResourceDetail", p.includeResourceDetail, j, false);
10121 getOptional<StatusReportPostConfiguration>("post", p.post, j);
10122 getOptional<NsmNodeStatusReportImmediateConfiguration>("immediate", p.immediate, j);
10123 }
10124
10125 //-----------------------------------------------------------
10126 JSON_SERIALIZED_CLASS(NsmNodeElectionGateSettings)
10137 {
10138 IMPLEMENT_JSON_SERIALIZATION()
10139 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeElectionGateSettings)
10140
10141 public:
10145 std::string runCmd;
10150
10152 {
10153 clear();
10154 }
10155
10156 void clear()
10157 {
10158 enabled = false;
10159 runCmd.clear();
10160 intervalSecs = 2;
10161 failClosed = true;
10162 }
10163 };
10164
10165 static void to_json(nlohmann::json& j, const NsmNodeElectionGateSettings& p)
10166 {
10167 j = nlohmann::json{
10168 TOJSON_IMPL(enabled),
10169 TOJSON_IMPL(runCmd),
10170 TOJSON_IMPL(intervalSecs),
10171 TOJSON_IMPL(failClosed)
10172 };
10173 }
10174 static void from_json(const nlohmann::json& j, NsmNodeElectionGateSettings& p)
10175 {
10176 p.clear();
10177 getOptional<bool>("enabled", p.enabled, j, false);
10178 getOptional<std::string>("runCmd", p.runCmd, j);
10179 getOptional<int>("intervalSecs", p.intervalSecs, j, 2);
10180 getOptional<bool>("failClosed", p.failClosed, j, true);
10181 }
10182
10183 //-----------------------------------------------------------
10184 JSON_SERIALIZED_CLASS(NsmNodeActiveHealthCheckSettings)
10197 {
10198 IMPLEMENT_JSON_SERIALIZATION()
10199 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeActiveHealthCheckSettings)
10200
10201 public:
10205 std::string runCmd;
10214
10216 {
10217 clear();
10218 }
10219
10220 void clear()
10221 {
10222 enabled = false;
10223 runCmd.clear();
10224 intervalSecs = 5;
10225 unhealthyGraceMs = 5000;
10226 releaseCooldownSecs = 30;
10227 failClosed = true;
10228 }
10229 };
10230
10231 static void to_json(nlohmann::json& j, const NsmNodeActiveHealthCheckSettings& p)
10232 {
10233 j = nlohmann::json{
10234 TOJSON_IMPL(enabled),
10235 TOJSON_IMPL(runCmd),
10236 TOJSON_IMPL(intervalSecs),
10237 TOJSON_IMPL(unhealthyGraceMs),
10238 TOJSON_IMPL(releaseCooldownSecs),
10239 TOJSON_IMPL(failClosed)
10240 };
10241 }
10242 static void from_json(const nlohmann::json& j, NsmNodeActiveHealthCheckSettings& p)
10243 {
10244 p.clear();
10245 getOptional<bool>("enabled", p.enabled, j, false);
10246 getOptional<std::string>("runCmd", p.runCmd, j);
10247 getOptional<int>("intervalSecs", p.intervalSecs, j, 5);
10248 getOptional<int>("unhealthyGraceMs", p.unhealthyGraceMs, j, 5000);
10249 getOptional<int>("releaseCooldownSecs", p.releaseCooldownSecs, j, 30);
10250 getOptional<bool>("failClosed", p.failClosed, j, true);
10251 }
10252
10253 //-----------------------------------------------------------
10254 JSON_SERIALIZED_CLASS(NsmNode)
10264 {
10265 IMPLEMENT_JSON_SERIALIZATION()
10266 IMPLEMENT_JSON_DOCUMENTATION(NsmNode)
10267
10268 public:
10269
10272
10275
10277 std::string id;
10278
10280 std::string name;
10281
10283 std::string domainName;
10284
10287
10290
10293
10296
10299
10302
10305
10308
10311
10313 std::vector<NsmNodePeriodic> periodics;
10314
10317
10320
10323
10326
10329
10332
10335
10338
10341
10342 NsmNode()
10343 {
10344 clear();
10345 }
10346
10347 void clear()
10348 {
10349 fipsCrypto.clear();
10350 watchdog.clear();
10351 id.clear();
10352 name.clear();
10353 domainName.clear();
10354 multicastInterfaceName.clear();
10355 stateMachine.clear();
10356 defaultPriority = 0;
10357 fixedToken = -1;
10358 dashboardToken = false;
10359 scripts.clear();
10360 logging.clear();
10361 cot.clear();
10362 periodics.clear();
10363 electionGate.clear();
10364 activeHealthCheck.clear();
10365 statusReport.clear();
10366 configurationCheckSignalName = "rts.7b392d1.${id}";
10367 licensing.clear();
10368 featureset.clear();
10369 rxCapture.clear();
10370 txCapture.clear();
10371 tuning.clear();
10372 ipFamily = IpFamilyType_t::ifIp4;
10373 }
10374 };
10375
10376 static void to_json(nlohmann::json& j, const NsmNode& p)
10377 {
10378 j = nlohmann::json{
10379 TOJSON_IMPL(fipsCrypto),
10380 TOJSON_IMPL(watchdog),
10381 TOJSON_IMPL(id),
10382 TOJSON_IMPL(name),
10383 TOJSON_IMPL(domainName),
10384 TOJSON_IMPL(multicastInterfaceName),
10385 TOJSON_IMPL(stateMachine),
10386 TOJSON_IMPL(defaultPriority),
10387 TOJSON_IMPL(fixedToken),
10388 TOJSON_IMPL(dashboardToken),
10389 TOJSON_IMPL(scripts),
10390 TOJSON_IMPL(logging),
10391 TOJSON_IMPL(cot),
10392 TOJSON_IMPL(periodics),
10393 TOJSON_IMPL(electionGate),
10394 TOJSON_IMPL(activeHealthCheck),
10395 TOJSON_IMPL(statusReport),
10396 TOJSON_IMPL(configurationCheckSignalName),
10397 TOJSON_IMPL(featureset),
10398 TOJSON_IMPL(licensing),
10399 TOJSON_IMPL(ipFamily),
10400 TOJSON_IMPL(rxCapture),
10401 TOJSON_IMPL(txCapture),
10402 TOJSON_IMPL(tuning)
10403 };
10404 }
10405 static void from_json(const nlohmann::json& j, NsmNode& p)
10406 {
10407 p.clear();
10408 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
10409 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
10410 getOptional<std::string>("id", p.id, j);
10411 getOptional<std::string>("name", p.name, j);
10412 getOptional<std::string>("domainName", p.domainName, j);
10413 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
10414 getOptional<NsmConfiguration>("stateMachine", p.stateMachine, j);
10415 getOptional<int>("defaultPriority", p.defaultPriority, j, 0);
10416 getOptional<int>("fixedToken", p.fixedToken, j, -1);
10417 getOptional<bool>("dashboardToken", p.dashboardToken, j, false);
10418 getOptional<NsmNodeScripts>("scripts", p.scripts, j);
10419 getOptional<NsmNodeLogging>("logging", p.logging, j);
10420 getOptional<NsmNodeCotSettings>("cot", p.cot, j);
10421 getOptional<std::vector<NsmNodePeriodic>>("periodics", p.periodics, j);
10422 getOptional<NsmNodeElectionGateSettings>("electionGate", p.electionGate, j);
10423 getOptional<NsmNodeActiveHealthCheckSettings>("activeHealthCheck", p.activeHealthCheck, j);
10424 getOptional<NsmNodeStatusReportConfiguration>("statusReport", p.statusReport, j);
10425 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.7b392d1.${id}");
10426 getOptional<Licensing>("licensing", p.licensing, j);
10427 getOptional<Featureset>("featureset", p.featureset, j);
10428 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
10429 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
10430 getOptional<TuningSettings>("tuning", p.tuning, j);
10431 getOptional<IpFamilyType_t>("ipFamily", p.ipFamily, j, IpFamilyType_t::ifIp4);
10432 }
10433
10435 static inline void nsmNodeFromEmbeddedServerJson(const nlohmann::json &j, const char *key, NsmNode &node)
10436 {
10437 node.clear();
10438 if (!j.contains(key))
10439 {
10440 return;
10441 }
10442
10443 const nlohmann::json &nj = j.at(key);
10444 if (!nj.is_object())
10445 {
10446 return;
10447 }
10448
10449 if (nj.contains("stateMachine") || nj.contains("cot") || nj.contains("scripts")
10450 || nj.contains("periodics") || nj.contains("electionGate") || nj.contains("activeHealthCheck")
10451 || nj.contains("statusReport") || nj.contains("multicastInterfaceName"))
10452 {
10453 nj.get_to(node);
10454 return;
10455 }
10456
10457 nj.get_to(node.stateMachine);
10458 }
10459 //-----------------------------------------------------------
10460 JSON_SERIALIZED_CLASS(RallypointServer)
10470 {
10471 IMPLEMENT_JSON_SERIALIZATION()
10472 IMPLEMENT_JSON_DOCUMENTATION(RallypointServer)
10473
10474 public:
10475 typedef enum
10476 {
10477 sptDefault = 0,
10478 sptCertificate = 1,
10479 sptCertPublicKey = 2,
10480 sptCertSubject = 3,
10481 sptCertIssuer = 4,
10482 sptCertFingerprint = 5,
10483 sptCertSerial = 6,
10484 sptSubjectC = 7,
10485 sptSubjectST = 8,
10486 sptSubjectL = 9,
10487 sptSubjectO = 10,
10488 sptSubjectOU = 11,
10489 sptSubjectCN = 12,
10490 sptIssuerC = 13,
10491 sptIssuerST = 14,
10492 sptIssuerL = 15,
10493 sptIssuerO = 16,
10494 sptIssuerOU = 17,
10495 sptIssuerCN = 18
10496 } StreamIdPrivacyType_t;
10497
10499 StreamIdPrivacyType_t streamIdPrivacyType;
10500
10503
10506
10508 std::string id;
10509
10511 std::string name;
10512
10515
10518
10520 std::string interfaceName;
10521
10524
10527
10530
10533
10536
10539
10542
10545
10548
10551
10554
10557
10560
10563
10566
10569
10571 PeeringConfiguration peeringConfiguration; // NOTE: This is NOT serialized
10572
10575
10578
10581
10584
10586 std::vector<RallypointReflector> staticReflectors;
10587
10590
10593
10596
10599
10602
10605
10607 std::vector<RallypointExtendedGroupRestriction> extendedGroupRestrictions;
10608
10611
10614
10617
10620
10622 uint32_t sysFlags;
10623
10626
10629
10632
10635
10638
10641
10644
10647
10649 std::vector<RallypointRpRtTimingBehavior> peerRtBehaviors;
10650
10653
10656
10659
10662
10665
10668
10670 std::string domainName;
10671
10673 std::vector<std::string> allowedDomains;
10674
10676 std::vector<std::string> blockedDomains;
10677
10679 std::vector<std::string> extraDomains;
10680
10683
10685 std::vector<NamedIdentity> additionalIdentities;
10686
10688 {
10689 clear();
10690 }
10691
10692 void clear()
10693 {
10694 fipsCrypto.clear();
10695 watchdog.clear();
10696 id.clear();
10697 name.clear();
10698 listenPort = 7443;
10699 interfaceName.clear();
10700 certificate.clear();
10701 allowMulticastForwarding = false;
10702 peeringConfiguration.clear();
10703 peeringConfigurationFileName.clear();
10704 peeringConfigurationFileCommand.clear();
10705 peeringConfigurationFileCheckSecs = 60;
10706 ioPools = -1;
10707 statusReport.clear();
10708 limits.clear();
10709 linkGraph.clear();
10710 externalHealthCheckResponder.clear();
10711 allowPeerForwarding = false;
10712 multicastInterfaceName.clear();
10713 tls.clear();
10714 discovery.clear();
10715 forwardDiscoveredGroups = false;
10716 forwardMulticastAddressing = false;
10717 isMeshLeaf = false;
10718 disableMessageSigning = false;
10719 multicastRestrictions.clear();
10720 igmpSnooping.clear();
10721 staticReflectors.clear();
10722 tcpTxOptions.clear();
10723 multicastTxOptions.clear();
10724 certStoreFileName.clear();
10725 certStorePasswordHex.clear();
10726 groupRestrictions.clear();
10727 configurationCheckSignalName = "rts.7b392d1.${id}";
10728 licensing.clear();
10729 featureset.clear();
10730 udpStreaming.clear();
10731 sysFlags = 0;
10732 normalTaskQueueBias = 0;
10733 enableLeafReflectionReverseSubscription = false;
10734 disableLoopDetection = false;
10735 maxSecurityLevel = 0;
10736 routeMap.clear();
10737 streamStatsExport.clear();
10738 maxOutboundPeerConnectionIntervalDeltaSecs = 15;
10739 peerRtTestIntervalMs = 60000;
10740 peerRtBehaviors.clear();
10741 websocket.clear();
10742 nsm.clear();
10743 advertising.clear();
10744 rtiCloud.clear();
10745 extendedGroupRestrictions.clear();
10746 groupRestrictionAccessPolicyType = GroupRestrictionAccessPolicyType_t::graptPermissive;
10747 ipFamily = IpFamilyType_t::ifIp4;
10748 rxCapture.clear();
10749 txCapture.clear();
10750 domainName.clear();
10751 allowedDomains.clear();
10752 blockedDomains.clear();
10753 extraDomains.clear();
10754 tuning.clear();
10755 additionalIdentities.clear();
10756 streamIdPrivacyType = StreamIdPrivacyType_t::sptDefault;
10757 }
10758 };
10759
10760 static void to_json(nlohmann::json& j, const RallypointServer& p)
10761 {
10762 j = nlohmann::json{
10763 TOJSON_IMPL(fipsCrypto),
10764 TOJSON_IMPL(watchdog),
10765 TOJSON_IMPL(id),
10766 TOJSON_IMPL(name),
10767 TOJSON_IMPL(listenPort),
10768 TOJSON_IMPL(interfaceName),
10769 TOJSON_IMPL(certificate),
10770 TOJSON_IMPL(allowMulticastForwarding),
10771 // TOJSON_IMPL(peeringConfiguration), // NOTE: Not serialized!
10772 TOJSON_IMPL(peeringConfigurationFileName),
10773 TOJSON_IMPL(peeringConfigurationFileCommand),
10774 TOJSON_IMPL(peeringConfigurationFileCheckSecs),
10775 TOJSON_IMPL(ioPools),
10776 TOJSON_IMPL(statusReport),
10777 TOJSON_IMPL(limits),
10778 TOJSON_IMPL(linkGraph),
10779 TOJSON_IMPL(externalHealthCheckResponder),
10780 TOJSON_IMPL(allowPeerForwarding),
10781 TOJSON_IMPL(multicastInterfaceName),
10782 TOJSON_IMPL(tls),
10783 TOJSON_IMPL(discovery),
10784 TOJSON_IMPL(forwardDiscoveredGroups),
10785 TOJSON_IMPL(forwardMulticastAddressing),
10786 TOJSON_IMPL(isMeshLeaf),
10787 TOJSON_IMPL(disableMessageSigning),
10788 TOJSON_IMPL(multicastRestrictions),
10789 TOJSON_IMPL(igmpSnooping),
10790 TOJSON_IMPL(staticReflectors),
10791 TOJSON_IMPL(tcpTxOptions),
10792 TOJSON_IMPL(multicastTxOptions),
10793 TOJSON_IMPL(certStoreFileName),
10794 TOJSON_IMPL(certStorePasswordHex),
10795 TOJSON_IMPL(groupRestrictions),
10796 TOJSON_IMPL(configurationCheckSignalName),
10797 TOJSON_IMPL(featureset),
10798 TOJSON_IMPL(licensing),
10799 TOJSON_IMPL(udpStreaming),
10800 TOJSON_IMPL(sysFlags),
10801 TOJSON_IMPL(normalTaskQueueBias),
10802 TOJSON_IMPL(enableLeafReflectionReverseSubscription),
10803 TOJSON_IMPL(disableLoopDetection),
10804 TOJSON_IMPL(maxSecurityLevel),
10805 TOJSON_IMPL(routeMap),
10806 TOJSON_IMPL(streamStatsExport),
10807 TOJSON_IMPL(maxOutboundPeerConnectionIntervalDeltaSecs),
10808 TOJSON_IMPL(peerRtTestIntervalMs),
10809 TOJSON_IMPL(peerRtBehaviors),
10810 TOJSON_IMPL(websocket),
10811 TOJSON_IMPL(nsm),
10812 TOJSON_IMPL(advertising),
10813 TOJSON_IMPL(rtiCloud),
10814 TOJSON_IMPL(extendedGroupRestrictions),
10815 TOJSON_IMPL(groupRestrictionAccessPolicyType),
10816 TOJSON_IMPL(ipFamily),
10817 TOJSON_IMPL(rxCapture),
10818 TOJSON_IMPL(txCapture),
10819 TOJSON_IMPL(domainName),
10820 TOJSON_IMPL(allowedDomains),
10821 TOJSON_IMPL(blockedDomains),
10822 TOJSON_IMPL(extraDomains),
10823 TOJSON_IMPL(tuning),
10824 TOJSON_IMPL(additionalIdentities),
10825 TOJSON_IMPL(streamIdPrivacyType)
10826 };
10827 }
10828 static void from_json(const nlohmann::json& j, RallypointServer& p)
10829 {
10830 p.clear();
10831 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
10832 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
10833 getOptional<std::string>("id", p.id, j);
10834 getOptional<std::string>("name", p.name, j);
10835 getOptional<SecurityCertificate>("certificate", p.certificate, j);
10836 getOptional<std::string>("interfaceName", p.interfaceName, j);
10837 getOptional<int>("listenPort", p.listenPort, j, 7443);
10838 getOptional<bool>("allowMulticastForwarding", p.allowMulticastForwarding, j, false);
10839 //getOptional<PeeringConfiguration>("peeringConfiguration", p.peeringConfiguration, j); // NOTE: Not serialized!
10840 getOptional<std::string>("peeringConfigurationFileName", p.peeringConfigurationFileName, j);
10841 getOptional<std::string>("peeringConfigurationFileCommand", p.peeringConfigurationFileCommand, j);
10842 getOptional<int>("peeringConfigurationFileCheckSecs", p.peeringConfigurationFileCheckSecs, j, 60);
10843 getOptional<int>("ioPools", p.ioPools, j, -1);
10844 getOptional<RallypointServerStatusReportConfiguration>("statusReport", p.statusReport, j);
10845 getOptional<RallypointServerLimits>("limits", p.limits, j);
10846 getOptional<RallypointServerLinkGraph>("linkGraph", p.linkGraph, j);
10847 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
10848 getOptional<bool>("allowPeerForwarding", p.allowPeerForwarding, j, false);
10849 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
10850 getOptional<Tls>("tls", p.tls, j);
10851 getOptional<DiscoveryConfiguration>("discovery", p.discovery, j);
10852 getOptional<bool>("forwardDiscoveredGroups", p.forwardDiscoveredGroups, j, false);
10853 getOptional<bool>("forwardMulticastAddressing", p.forwardMulticastAddressing, j, false);
10854 getOptional<bool>("isMeshLeaf", p.isMeshLeaf, j, false);
10855 getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
10856 getOptional<NetworkAddressRestrictionList>("multicastRestrictions", p.multicastRestrictions, j);
10857 getOptional<IgmpSnooping>("igmpSnooping", p.igmpSnooping, j);
10858 getOptional<std::vector<RallypointReflector>>("staticReflectors", p.staticReflectors, j);
10859 getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
10860 getOptional<NetworkTxOptions>("multicastTxOptions", p.multicastTxOptions, j);
10861 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
10862 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
10863 getOptional<StringRestrictionList>("groupRestrictions", p.groupRestrictions, j);
10864 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.7b392d1.${id}");
10865 getOptional<Licensing>("licensing", p.licensing, j);
10866 getOptional<Featureset>("featureset", p.featureset, j);
10867 getOptional<RallypointUdpStreaming>("udpStreaming", p.udpStreaming, j);
10868 getOptional<uint32_t>("sysFlags", p.sysFlags, j, 0);
10869 getOptional<uint32_t>("normalTaskQueueBias", p.normalTaskQueueBias, j, 0);
10870 getOptional<bool>("enableLeafReflectionReverseSubscription", p.enableLeafReflectionReverseSubscription, j, false);
10871 getOptional<bool>("disableLoopDetection", p.disableLoopDetection, j, false);
10872 getOptional<uint32_t>("maxSecurityLevel", p.maxSecurityLevel, j, 0);
10873 getOptional<RallypointServerRouteMap>("routeMap", p.routeMap, j);
10874 getOptional<RallypointServerStreamStatsExport>("streamStatsExport", p.streamStatsExport, j);
10875 getOptional<uint32_t>("maxOutboundPeerConnectionIntervalDeltaSecs", p.maxOutboundPeerConnectionIntervalDeltaSecs, j, 15);
10876 getOptional<int>("peerRtTestIntervalMs", p.peerRtTestIntervalMs, j, 60000);
10877 getOptional<std::vector<RallypointRpRtTimingBehavior>>("peerRtBehaviors", p.peerRtBehaviors, j);
10878 getOptional<RallypointWebsocketSettings>("websocket", p.websocket, j);
10879 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
10880 getOptional<RallypointAdvertisingSettings>("advertising", p.advertising, j);
10881 getOptional<RtiCloudSettings>("rtiCloud", p.rtiCloud, j);
10882 getOptional<std::vector<RallypointExtendedGroupRestriction>>("extendedGroupRestrictions", p.extendedGroupRestrictions, j);
10883 getOptional<GroupRestrictionAccessPolicyType_t>("groupRestrictionAccessPolicyType", p.groupRestrictionAccessPolicyType, j, GroupRestrictionAccessPolicyType_t::graptPermissive);
10884 getOptional<IpFamilyType_t>("ipFamily", p.ipFamily, j, IpFamilyType_t::ifIp4);
10885 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
10886 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
10887 getOptional<std::string>("domainName", p.domainName, j);
10888 getOptional<std::vector<std::string>>("allowedDomains", p.allowedDomains, j);
10889 getOptional<std::vector<std::string>>("blockedDomains", p.blockedDomains, j);
10890 getOptional<std::vector<std::string>>("extraDomains", p.extraDomains, j);
10891 getOptional<TuningSettings>("tuning", p.tuning, j);
10892 getOptional<std::vector<NamedIdentity>>("additionalIdentities", p.additionalIdentities, j);
10893 getOptional<RallypointServer::StreamIdPrivacyType_t>("streamIdPrivacyType", p.streamIdPrivacyType, j, RallypointServer::StreamIdPrivacyType_t::sptDefault);
10894 }
10895
10896
10897 //-----------------------------------------------------------
10898 JSON_SERIALIZED_CLASS(PlatformDiscoveredService)
10909 {
10910 IMPLEMENT_JSON_SERIALIZATION()
10911 IMPLEMENT_JSON_DOCUMENTATION(PlatformDiscoveredService)
10912
10913 public:
10914
10916 std::string id;
10917
10919 std::string type;
10920
10922 std::string name;
10923
10926
10928 std::string uri;
10929
10932
10934 {
10935 clear();
10936 }
10937
10938 void clear()
10939 {
10940 id.clear();
10941 type.clear();
10942 name.clear();
10943 address.clear();
10944 uri.clear();
10945 configurationVersion = 0;
10946 }
10947 };
10948
10949 static void to_json(nlohmann::json& j, const PlatformDiscoveredService& p)
10950 {
10951 j = nlohmann::json{
10952 TOJSON_IMPL(id),
10953 TOJSON_IMPL(type),
10954 TOJSON_IMPL(name),
10955 TOJSON_IMPL(address),
10956 TOJSON_IMPL(uri),
10957 TOJSON_IMPL(configurationVersion)
10958 };
10959 }
10960 static void from_json(const nlohmann::json& j, PlatformDiscoveredService& p)
10961 {
10962 p.clear();
10963 getOptional<std::string>("id", p.id, j);
10964 getOptional<std::string>("type", p.type, j);
10965 getOptional<std::string>("name", p.name, j);
10966 getOptional<NetworkAddress>("address", p.address, j);
10967 getOptional<std::string>("uri", p.uri, j);
10968 getOptional<uint32_t>("configurationVersion", p.configurationVersion, j, 0);
10969 }
10970
10971
10972 //-----------------------------------------------------------
10974 {
10975 public:
10976 typedef enum
10977 {
10978 etUndefined = 0,
10979 etAudio = 1,
10980 etLocation = 2,
10981 etUser = 3
10982 } EventType_t;
10983
10984 typedef enum
10985 {
10986 dNone = 0,
10987 dInbound = 1,
10988 dOutbound = 2,
10989 dBoth = 3,
10990 dUndefined = 4,
10991 } Direction_t;
10992 };
10993
10994
10995 //-----------------------------------------------------------
10996 JSON_SERIALIZED_CLASS(TimelineQueryParameters)
11007 {
11008 IMPLEMENT_JSON_SERIALIZATION()
11009 IMPLEMENT_JSON_DOCUMENTATION(TimelineQueryParameters)
11010
11011 public:
11012
11015
11018
11021
11024
11027
11030
11033
11035 std::string onlyAlias;
11036
11038 std::string onlyNodeId;
11039
11042
11044 std::string sql;
11045
11047 {
11048 clear();
11049 }
11050
11051 void clear()
11052 {
11053 maxCount = 50;
11054 mostRecentFirst = true;
11055 startedOnOrAfter = 0;
11056 endedOnOrBefore = 0;
11057 onlyDirection = 0;
11058 onlyType = 0;
11059 onlyCommitted = true;
11060 onlyAlias.clear();
11061 onlyNodeId.clear();
11062 sql.clear();
11063 onlyTxId = 0;
11064 }
11065 };
11066
11067 static void to_json(nlohmann::json& j, const TimelineQueryParameters& p)
11068 {
11069 j = nlohmann::json{
11070 TOJSON_IMPL(maxCount),
11071 TOJSON_IMPL(mostRecentFirst),
11072 TOJSON_IMPL(startedOnOrAfter),
11073 TOJSON_IMPL(endedOnOrBefore),
11074 TOJSON_IMPL(onlyDirection),
11075 TOJSON_IMPL(onlyType),
11076 TOJSON_IMPL(onlyCommitted),
11077 TOJSON_IMPL(onlyAlias),
11078 TOJSON_IMPL(onlyNodeId),
11079 TOJSON_IMPL(onlyTxId),
11080 TOJSON_IMPL(sql)
11081 };
11082 }
11083 static void from_json(const nlohmann::json& j, TimelineQueryParameters& p)
11084 {
11085 p.clear();
11086 getOptional<long>("maxCount", p.maxCount, j, 50);
11087 getOptional<bool>("mostRecentFirst", p.mostRecentFirst, j, false);
11088 getOptional<uint64_t>("startedOnOrAfter", p.startedOnOrAfter, j, 0);
11089 getOptional<uint64_t>("endedOnOrBefore", p.endedOnOrBefore, j, 0);
11090 getOptional<int>("onlyDirection", p.onlyDirection, j, 0);
11091 getOptional<int>("onlyType", p.onlyType, j, 0);
11092 getOptional<bool>("onlyCommitted", p.onlyCommitted, j, true);
11093 getOptional<std::string>("onlyAlias", p.onlyAlias, j, EMPTY_STRING);
11094 getOptional<std::string>("onlyNodeId", p.onlyNodeId, j, EMPTY_STRING);
11095 getOptional<int>("onlyTxId", p.onlyTxId, j, 0);
11096 getOptional<std::string>("sql", p.sql, j, EMPTY_STRING);
11097 }
11098
11099 //-----------------------------------------------------------
11100 JSON_SERIALIZED_CLASS(CertStoreCertificate)
11108 {
11109 IMPLEMENT_JSON_SERIALIZATION()
11110 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificate)
11111
11112 public:
11114 std::string id;
11115
11117 std::string certificatePem;
11118
11120 std::string privateKeyPem;
11121
11124
11126 std::string tags;
11127
11129 {
11130 clear();
11131 }
11132
11133 void clear()
11134 {
11135 id.clear();
11136 certificatePem.clear();
11137 privateKeyPem.clear();
11138 internalData = nullptr;
11139 tags.clear();
11140 }
11141 };
11142
11143 static void to_json(nlohmann::json& j, const CertStoreCertificate& p)
11144 {
11145 j = nlohmann::json{
11146 TOJSON_IMPL(id),
11147 TOJSON_IMPL(certificatePem),
11148 TOJSON_IMPL(privateKeyPem),
11149 TOJSON_IMPL(tags)
11150 };
11151 }
11152 static void from_json(const nlohmann::json& j, CertStoreCertificate& p)
11153 {
11154 p.clear();
11155 j.at("id").get_to(p.id);
11156 j.at("certificatePem").get_to(p.certificatePem);
11157 getOptional<std::string>("privateKeyPem", p.privateKeyPem, j, EMPTY_STRING);
11158 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
11159 }
11160
11161 //-----------------------------------------------------------
11162 JSON_SERIALIZED_CLASS(CertStore)
11170 {
11171 IMPLEMENT_JSON_SERIALIZATION()
11172 IMPLEMENT_JSON_DOCUMENTATION(CertStore)
11173
11174 public:
11176 std::string id;
11177
11179 std::vector<CertStoreCertificate> certificates;
11180
11182 std::vector<KvPair> kvp;
11183
11184 CertStore()
11185 {
11186 clear();
11187 }
11188
11189 void clear()
11190 {
11191 id.clear();
11192 certificates.clear();
11193 kvp.clear();
11194 }
11195 };
11196
11197 static void to_json(nlohmann::json& j, const CertStore& p)
11198 {
11199 j = nlohmann::json{
11200 TOJSON_IMPL(id),
11201 TOJSON_IMPL(certificates),
11202 TOJSON_IMPL(kvp)
11203 };
11204 }
11205 static void from_json(const nlohmann::json& j, CertStore& p)
11206 {
11207 p.clear();
11208 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11209 getOptional<std::vector<CertStoreCertificate>>("certificates", p.certificates, j);
11210 getOptional<std::vector<KvPair>>("kvp", p.kvp, j);
11211 }
11212
11213 //-----------------------------------------------------------
11214 JSON_SERIALIZED_CLASS(CertStoreCertificateElement)
11222 {
11223 IMPLEMENT_JSON_SERIALIZATION()
11224 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificateElement)
11225
11226 public:
11228 std::string id;
11229
11232
11234 std::string certificatePem;
11235
11237 std::string tags;
11238
11240 {
11241 clear();
11242 }
11243
11244 void clear()
11245 {
11246 id.clear();
11247 hasPrivateKey = false;
11248 tags.clear();
11249 }
11250 };
11251
11252 static void to_json(nlohmann::json& j, const CertStoreCertificateElement& p)
11253 {
11254 j = nlohmann::json{
11255 TOJSON_IMPL(id),
11256 TOJSON_IMPL(hasPrivateKey),
11257 TOJSON_IMPL(tags)
11258 };
11259
11260 if(!p.certificatePem.empty())
11261 {
11262 j["certificatePem"] = p.certificatePem;
11263 }
11264 }
11265 static void from_json(const nlohmann::json& j, CertStoreCertificateElement& p)
11266 {
11267 p.clear();
11268 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11269 getOptional<bool>("hasPrivateKey", p.hasPrivateKey, j, false);
11270 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
11271 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
11272 }
11273
11274 //-----------------------------------------------------------
11275 JSON_SERIALIZED_CLASS(CertStoreDescriptor)
11283 {
11284 IMPLEMENT_JSON_SERIALIZATION()
11285 IMPLEMENT_JSON_DOCUMENTATION(CertStoreDescriptor)
11286
11287 public:
11289 std::string id;
11290
11292 std::string fileName;
11293
11296
11299
11301 std::vector<CertStoreCertificateElement> certificates;
11302
11304 std::vector<KvPair> kvp;
11305
11307 {
11308 clear();
11309 }
11310
11311 void clear()
11312 {
11313 id.clear();
11314 fileName.clear();
11315 version = 0;
11316 flags = 0;
11317 certificates.clear();
11318 kvp.clear();
11319 }
11320 };
11321
11322 static void to_json(nlohmann::json& j, const CertStoreDescriptor& p)
11323 {
11324 j = nlohmann::json{
11325 TOJSON_IMPL(id),
11326 TOJSON_IMPL(fileName),
11327 TOJSON_IMPL(version),
11328 TOJSON_IMPL(flags),
11329 TOJSON_IMPL(certificates),
11330 TOJSON_IMPL(kvp)
11331 };
11332 }
11333 static void from_json(const nlohmann::json& j, CertStoreDescriptor& p)
11334 {
11335 p.clear();
11336 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11337 getOptional<std::string>("fileName", p.fileName, j, EMPTY_STRING);
11338 getOptional<int>("version", p.version, j, 0);
11339 getOptional<int>("flags", p.flags, j, 0);
11340 getOptional<std::vector<CertStoreCertificateElement>>("certificates", p.certificates, j);
11341 getOptional<std::vector<KvPair>>("kvp", p.kvp, j);
11342 }
11343
11344 //-----------------------------------------------------------
11345 JSON_SERIALIZED_CLASS(CertificateSubjectElement)
11353 {
11354 IMPLEMENT_JSON_SERIALIZATION()
11355 IMPLEMENT_JSON_DOCUMENTATION(CertificateSubjectElement)
11356
11357 public:
11359 std::string name;
11360
11362 std::string value;
11363
11365 {
11366 clear();
11367 }
11368
11369 void clear()
11370 {
11371 name.clear();
11372 value.clear();
11373 }
11374 };
11375
11376 static void to_json(nlohmann::json& j, const CertificateSubjectElement& p)
11377 {
11378 j = nlohmann::json{
11379 TOJSON_IMPL(name),
11380 TOJSON_IMPL(value)
11381 };
11382 }
11383 static void from_json(const nlohmann::json& j, CertificateSubjectElement& p)
11384 {
11385 p.clear();
11386 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
11387 getOptional<std::string>("value", p.value, j, EMPTY_STRING);
11388 }
11389
11390
11391 //-----------------------------------------------------------
11392 JSON_SERIALIZED_CLASS(CertificateDescriptor)
11400 {
11401 IMPLEMENT_JSON_SERIALIZATION()
11402 IMPLEMENT_JSON_DOCUMENTATION(CertificateDescriptor)
11403
11404 public:
11406 std::string subject;
11407
11409 std::string issuer;
11410
11413
11416
11418 std::string notBefore;
11419
11421 std::string notAfter;
11422
11424 std::string serial;
11425
11427 std::string fingerprint;
11428
11430 std::vector<CertificateSubjectElement> subjectElements;
11431
11433 std::vector<CertificateSubjectElement> issuerElements;
11434
11436 std::string certificatePem;
11437
11439 std::string publicKeyPem;
11440
11442 {
11443 clear();
11444 }
11445
11446 void clear()
11447 {
11448 subject.clear();
11449 issuer.clear();
11450 selfSigned = false;
11451 version = 0;
11452 notBefore.clear();
11453 notAfter.clear();
11454 serial.clear();
11455 fingerprint.clear();
11456 subjectElements.clear();
11457 issuerElements.clear();
11458 certificatePem.clear();
11459 publicKeyPem.clear();
11460 }
11461 };
11462
11463 static void to_json(nlohmann::json& j, const CertificateDescriptor& p)
11464 {
11465 j = nlohmann::json{
11466 TOJSON_IMPL(subject),
11467 TOJSON_IMPL(issuer),
11468 TOJSON_IMPL(selfSigned),
11469 TOJSON_IMPL(version),
11470 TOJSON_IMPL(notBefore),
11471 TOJSON_IMPL(notAfter),
11472 TOJSON_IMPL(serial),
11473 TOJSON_IMPL(fingerprint),
11474 TOJSON_IMPL(subjectElements),
11475 TOJSON_IMPL(issuerElements),
11476 TOJSON_IMPL(certificatePem),
11477 TOJSON_IMPL(publicKeyPem)
11478 };
11479 }
11480 static void from_json(const nlohmann::json& j, CertificateDescriptor& p)
11481 {
11482 p.clear();
11483 getOptional<std::string>("subject", p.subject, j, EMPTY_STRING);
11484 getOptional<std::string>("issuer", p.issuer, j, EMPTY_STRING);
11485 getOptional<bool>("selfSigned", p.selfSigned, j, false);
11486 getOptional<int>("version", p.version, j, 0);
11487 getOptional<std::string>("notBefore", p.notBefore, j, EMPTY_STRING);
11488 getOptional<std::string>("notAfter", p.notAfter, j, EMPTY_STRING);
11489 getOptional<std::string>("serial", p.serial, j, EMPTY_STRING);
11490 getOptional<std::string>("fingerprint", p.fingerprint, j, EMPTY_STRING);
11491 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
11492 getOptional<std::string>("publicKeyPem", p.publicKeyPem, j, EMPTY_STRING);
11493 getOptional<std::vector<CertificateSubjectElement>>("subjectElements", p.subjectElements, j);
11494 getOptional<std::vector<CertificateSubjectElement>>("issuerElements", p.issuerElements, j);
11495 }
11496
11497
11498 //-----------------------------------------------------------
11499 JSON_SERIALIZED_CLASS(RiffDescriptor)
11510 {
11511 IMPLEMENT_JSON_SERIALIZATION()
11512 IMPLEMENT_JSON_DOCUMENTATION(RiffDescriptor)
11513
11514 public:
11516 std::string file;
11517
11520
11523
11526
11528 std::string meta;
11529
11531 std::string certPem;
11532
11535
11537 std::string signature;
11538
11540 {
11541 clear();
11542 }
11543
11544 void clear()
11545 {
11546 file.clear();
11547 verified = false;
11548 channels = 0;
11549 sampleCount = 0;
11550 meta.clear();
11551 certPem.clear();
11552 certDescriptor.clear();
11553 signature.clear();
11554 }
11555 };
11556
11557 static void to_json(nlohmann::json& j, const RiffDescriptor& p)
11558 {
11559 j = nlohmann::json{
11560 TOJSON_IMPL(file),
11561 TOJSON_IMPL(verified),
11562 TOJSON_IMPL(channels),
11563 TOJSON_IMPL(sampleCount),
11564 TOJSON_IMPL(meta),
11565 TOJSON_IMPL(certPem),
11566 TOJSON_IMPL(certDescriptor),
11567 TOJSON_IMPL(signature)
11568 };
11569 }
11570
11571 static void from_json(const nlohmann::json& j, RiffDescriptor& p)
11572 {
11573 p.clear();
11574 FROMJSON_IMPL(file, std::string, EMPTY_STRING);
11575 FROMJSON_IMPL(verified, bool, false);
11576 FROMJSON_IMPL(channels, int, 0);
11577 FROMJSON_IMPL(sampleCount, int, 0);
11578 FROMJSON_IMPL(meta, std::string, EMPTY_STRING);
11579 FROMJSON_IMPL(certPem, std::string, EMPTY_STRING);
11580 getOptional<CertificateDescriptor>("certDescriptor", p.certDescriptor, j);
11581 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
11582 }
11583
11584
11585 //-----------------------------------------------------------
11586 JSON_SERIALIZED_CLASS(BridgeCreationDetail)
11594 {
11595 IMPLEMENT_JSON_SERIALIZATION()
11596 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(BridgeCreationDetail)
11597 IMPLEMENT_JSON_DOCUMENTATION(BridgeCreationDetail)
11598
11599 public:
11601 typedef enum
11602 {
11604 csUndefined = 0,
11605
11607 csOk = 1,
11608
11610 csNoJson = -1,
11611
11613 csAlreadyExists = -3,
11614
11616 csInvalidConfiguration = -4,
11617
11619 csInvalidJson = -5,
11620
11622 csInsufficientGroups = -6,
11623
11625 csTooManyGroups = -7,
11626
11628 csDuplicateGroup = -8,
11629
11631 csLocalLoopDetected = -9,
11632 } CreationStatus_t;
11633
11635 std::string id;
11636
11639
11641 {
11642 clear();
11643 }
11644
11645 void clear()
11646 {
11647 id.clear();
11648 status = csUndefined;
11649 }
11650 };
11651
11652 static void to_json(nlohmann::json& j, const BridgeCreationDetail& p)
11653 {
11654 j = nlohmann::json{
11655 TOJSON_IMPL(id),
11656 TOJSON_IMPL(status)
11657 };
11658 }
11659 static void from_json(const nlohmann::json& j, BridgeCreationDetail& p)
11660 {
11661 p.clear();
11662 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11663 getOptional<BridgeCreationDetail::CreationStatus_t>("status", p.status, j, BridgeCreationDetail::CreationStatus_t::csUndefined);
11664 }
11665 //-----------------------------------------------------------
11666 JSON_SERIALIZED_CLASS(GroupConnectionDetail)
11674 {
11675 IMPLEMENT_JSON_SERIALIZATION()
11676 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupConnectionDetail)
11677 IMPLEMENT_JSON_DOCUMENTATION(GroupConnectionDetail)
11678
11679 public:
11681 typedef enum
11682 {
11684 ctUndefined = 0,
11685
11687 ctDirectDatagram = 1,
11688
11690 ctRallypoint = 2
11691 } ConnectionType_t;
11692
11694 std::string id;
11695
11698
11700 std::string peer;
11701
11704
11706 std::string reason;
11707
11709 {
11710 clear();
11711 }
11712
11713 void clear()
11714 {
11715 id.clear();
11716 connectionType = ctUndefined;
11717 peer.clear();
11718 asFailover = false;
11719 reason.clear();
11720 }
11721 };
11722
11723 static void to_json(nlohmann::json& j, const GroupConnectionDetail& p)
11724 {
11725 j = nlohmann::json{
11726 TOJSON_IMPL(id),
11727 TOJSON_IMPL(connectionType),
11728 TOJSON_IMPL(peer),
11729 TOJSON_IMPL(asFailover),
11730 TOJSON_IMPL(reason)
11731 };
11732
11733 if(p.asFailover)
11734 {
11735 j["asFailover"] = p.asFailover;
11736 }
11737 }
11738 static void from_json(const nlohmann::json& j, GroupConnectionDetail& p)
11739 {
11740 p.clear();
11741 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11742 getOptional<GroupConnectionDetail::ConnectionType_t>("connectionType", p.connectionType, j, GroupConnectionDetail::ConnectionType_t::ctUndefined);
11743 getOptional<std::string>("peer", p.peer, j, EMPTY_STRING);
11744 getOptional<bool>("asFailover", p.asFailover, j, false);
11745 getOptional<std::string>("reason", p.reason, j, EMPTY_STRING);
11746 }
11747
11748 //-----------------------------------------------------------
11749 JSON_SERIALIZED_CLASS(GroupTxDetail)
11757 {
11758 IMPLEMENT_JSON_SERIALIZATION()
11759 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupTxDetail)
11760 IMPLEMENT_JSON_DOCUMENTATION(GroupTxDetail)
11761
11762 public:
11764 typedef enum
11765 {
11767 txsUndefined = 0,
11768
11770 txsTxStarted = 1,
11771
11773 txsTxEnded = 2,
11774
11776 txsNotAnAudioGroup = -1,
11777
11779 txsNotJoined = -2,
11780
11782 txsNotConnected = -3,
11783
11785 txsAlreadyTransmitting = -4,
11786
11788 txsInvalidParams = -5,
11789
11791 txsPriorityTooLow = -6,
11792
11794 txsRxActiveOnNonFdx = -7,
11795
11797 txsCannotSubscribeToInput = -8,
11798
11800 txsInvalidId = -9,
11801
11803 txsTxEndedWithFailure = -10,
11804
11806 txsBridgedButNotMultistream = -11,
11807
11809 txsAutoEndedDueToNonMultistreamBridge = -12,
11810
11812 txsReBeginWithoutPriorBegin = -13
11813 } TxStatus_t;
11814
11816 std::string id;
11817
11820
11823
11826
11829
11831 uint32_t txId;
11832
11834 {
11835 clear();
11836 }
11837
11838 void clear()
11839 {
11840 id.clear();
11841 status = txsUndefined;
11842 localPriority = 0;
11843 remotePriority = 0;
11844 nonFdxMsHangRemaining = 0;
11845 txId = 0;
11846 }
11847 };
11848
11849 static void to_json(nlohmann::json& j, const GroupTxDetail& p)
11850 {
11851 j = nlohmann::json{
11852 TOJSON_IMPL(id),
11853 TOJSON_IMPL(status),
11854 TOJSON_IMPL(localPriority),
11855 TOJSON_IMPL(txId)
11856 };
11857
11858 // Include remote priority if status is related to that
11859 if(p.status == GroupTxDetail::TxStatus_t::txsPriorityTooLow)
11860 {
11861 j["remotePriority"] = p.remotePriority;
11862 }
11863 else if(p.status == GroupTxDetail::TxStatus_t::txsRxActiveOnNonFdx)
11864 {
11865 j["nonFdxMsHangRemaining"] = p.nonFdxMsHangRemaining;
11866 }
11867 }
11868 static void from_json(const nlohmann::json& j, GroupTxDetail& p)
11869 {
11870 p.clear();
11871 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11872 getOptional<GroupTxDetail::TxStatus_t>("status", p.status, j, GroupTxDetail::TxStatus_t::txsUndefined);
11873 getOptional<int>("localPriority", p.localPriority, j, 0);
11874 getOptional<int>("remotePriority", p.remotePriority, j, 0);
11875 getOptional<long>("nonFdxMsHangRemaining", p.nonFdxMsHangRemaining, j, 0);
11876 getOptional<uint32_t>("txId", p.txId, j, 0);
11877 }
11878
11879 //-----------------------------------------------------------
11880 JSON_SERIALIZED_CLASS(GroupCreationDetail)
11888 {
11889 IMPLEMENT_JSON_SERIALIZATION()
11890 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupCreationDetail)
11891 IMPLEMENT_JSON_DOCUMENTATION(GroupCreationDetail)
11892
11893 public:
11895 typedef enum
11896 {
11898 csUndefined = 0,
11899
11901 csOk = 1,
11902
11904 csNoJson = -1,
11905
11907 csConflictingRpListAndCluster = -2,
11908
11910 csAlreadyExists = -3,
11911
11913 csInvalidConfiguration = -4,
11914
11916 csInvalidJson = -5,
11917
11919 csCryptoFailure = -6,
11920
11922 csAudioInputFailure = -7,
11923
11925 csAudioOutputFailure = -8,
11926
11928 csUnsupportedAudioEncoder = -9,
11929
11931 csNoLicense = -10,
11932
11934 csInvalidTransport = -11,
11935
11937 csAudioInputDeviceNotFound = -12,
11938
11940 csAudioOutputDeviceNotFound = -13
11941 } CreationStatus_t;
11942
11944 std::string id;
11945
11948
11950 {
11951 clear();
11952 }
11953
11954 void clear()
11955 {
11956 id.clear();
11957 status = csUndefined;
11958 }
11959 };
11960
11961 static void to_json(nlohmann::json& j, const GroupCreationDetail& p)
11962 {
11963 j = nlohmann::json{
11964 TOJSON_IMPL(id),
11965 TOJSON_IMPL(status)
11966 };
11967 }
11968 static void from_json(const nlohmann::json& j, GroupCreationDetail& p)
11969 {
11970 p.clear();
11971 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11972 getOptional<GroupCreationDetail::CreationStatus_t>("status", p.status, j, GroupCreationDetail::CreationStatus_t::csUndefined);
11973 }
11974
11975
11976 //-----------------------------------------------------------
11977 JSON_SERIALIZED_CLASS(GroupReconfigurationDetail)
11985 {
11986 IMPLEMENT_JSON_SERIALIZATION()
11987 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupReconfigurationDetail)
11988 IMPLEMENT_JSON_DOCUMENTATION(GroupReconfigurationDetail)
11989
11990 public:
11992 typedef enum
11993 {
11995 rsUndefined = 0,
11996
11998 rsOk = 1,
11999
12001 rsNoJson = -1,
12002
12004 rsInvalidConfiguration = -2,
12005
12007 rsInvalidJson = -3,
12008
12010 rsAudioInputFailure = -4,
12011
12013 rsAudioOutputFailure = -5,
12014
12016 rsDoesNotExist = -6,
12017
12019 rsAudioInputInUse = -7,
12020
12022 rsAudioDisabledForGroup = -8,
12023
12025 rsGroupIsNotAudio = -9
12026 } ReconfigurationStatus_t;
12027
12029 std::string id;
12030
12033
12035 {
12036 clear();
12037 }
12038
12039 void clear()
12040 {
12041 id.clear();
12042 status = rsUndefined;
12043 }
12044 };
12045
12046 static void to_json(nlohmann::json& j, const GroupReconfigurationDetail& p)
12047 {
12048 j = nlohmann::json{
12049 TOJSON_IMPL(id),
12050 TOJSON_IMPL(status)
12051 };
12052 }
12053 static void from_json(const nlohmann::json& j, GroupReconfigurationDetail& p)
12054 {
12055 p.clear();
12056 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
12057 getOptional<GroupReconfigurationDetail::ReconfigurationStatus_t>("status", p.status, j, GroupReconfigurationDetail::ReconfigurationStatus_t::rsUndefined);
12058 }
12059
12060
12061 //-----------------------------------------------------------
12062 JSON_SERIALIZED_CLASS(GroupHealthReport)
12070 {
12071 IMPLEMENT_JSON_SERIALIZATION()
12072 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupHealthReport)
12073 IMPLEMENT_JSON_DOCUMENTATION(GroupHealthReport)
12074
12075 public:
12076 std::string id;
12077 uint64_t lastErrorTs;
12078 uint64_t decryptionErrors;
12079 uint64_t encryptionErrors;
12080 uint64_t unsupportDecoderErrors;
12081 uint64_t decoderFailures;
12082 uint64_t decoderStartFailures;
12083 uint64_t inboundRtpPacketAllocationFailures;
12084 uint64_t inboundRtpPacketLoadFailures;
12085 uint64_t latePacketsDiscarded;
12086 uint64_t jitterBufferInsertionFailures;
12087 uint64_t presenceDeserializationFailures;
12088 uint64_t notRtpErrors;
12089 uint64_t generalErrors;
12090 uint64_t inboundRtpProcessorAllocationFailures;
12091
12093 {
12094 clear();
12095 }
12096
12097 void clear()
12098 {
12099 id.clear();
12100 lastErrorTs = 0;
12101 decryptionErrors = 0;
12102 encryptionErrors = 0;
12103 unsupportDecoderErrors = 0;
12104 decoderFailures = 0;
12105 decoderStartFailures = 0;
12106 inboundRtpPacketAllocationFailures = 0;
12107 inboundRtpPacketLoadFailures = 0;
12108 latePacketsDiscarded = 0;
12109 jitterBufferInsertionFailures = 0;
12110 presenceDeserializationFailures = 0;
12111 notRtpErrors = 0;
12112 generalErrors = 0;
12113 inboundRtpProcessorAllocationFailures = 0;
12114 }
12115 };
12116
12117 static void to_json(nlohmann::json& j, const GroupHealthReport& p)
12118 {
12119 j = nlohmann::json{
12120 TOJSON_IMPL(id),
12121 TOJSON_IMPL(lastErrorTs),
12122 TOJSON_IMPL(decryptionErrors),
12123 TOJSON_IMPL(encryptionErrors),
12124 TOJSON_IMPL(unsupportDecoderErrors),
12125 TOJSON_IMPL(decoderFailures),
12126 TOJSON_IMPL(decoderStartFailures),
12127 TOJSON_IMPL(inboundRtpPacketAllocationFailures),
12128 TOJSON_IMPL(inboundRtpPacketLoadFailures),
12129 TOJSON_IMPL(latePacketsDiscarded),
12130 TOJSON_IMPL(jitterBufferInsertionFailures),
12131 TOJSON_IMPL(presenceDeserializationFailures),
12132 TOJSON_IMPL(notRtpErrors),
12133 TOJSON_IMPL(generalErrors),
12134 TOJSON_IMPL(inboundRtpProcessorAllocationFailures)
12135 };
12136 }
12137 static void from_json(const nlohmann::json& j, GroupHealthReport& p)
12138 {
12139 p.clear();
12140 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
12141 getOptional<uint64_t>("lastErrorTs", p.lastErrorTs, j, 0);
12142 getOptional<uint64_t>("decryptionErrors", p.decryptionErrors, j, 0);
12143 getOptional<uint64_t>("encryptionErrors", p.encryptionErrors, j, 0);
12144 getOptional<uint64_t>("unsupportDecoderErrors", p.unsupportDecoderErrors, j, 0);
12145 getOptional<uint64_t>("decoderFailures", p.decoderFailures, j, 0);
12146 getOptional<uint64_t>("decoderStartFailures", p.decoderStartFailures, j, 0);
12147 getOptional<uint64_t>("inboundRtpPacketAllocationFailures", p.inboundRtpPacketAllocationFailures, j, 0);
12148 getOptional<uint64_t>("inboundRtpPacketLoadFailures", p.inboundRtpPacketLoadFailures, j, 0);
12149 getOptional<uint64_t>("latePacketsDiscarded", p.latePacketsDiscarded, j, 0);
12150 getOptional<uint64_t>("jitterBufferInsertionFailures", p.jitterBufferInsertionFailures, j, 0);
12151 getOptional<uint64_t>("presenceDeserializationFailures", p.presenceDeserializationFailures, j, 0);
12152 getOptional<uint64_t>("notRtpErrors", p.notRtpErrors, j, 0);
12153 getOptional<uint64_t>("generalErrors", p.generalErrors, j, 0);
12154 getOptional<uint64_t>("inboundRtpProcessorAllocationFailures", p.inboundRtpProcessorAllocationFailures, j, 0);
12155 }
12156
12157 //-----------------------------------------------------------
12158 JSON_SERIALIZED_CLASS(InboundProcessorStats)
12166 {
12167 IMPLEMENT_JSON_SERIALIZATION()
12168 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(InboundProcessorStats)
12169 IMPLEMENT_JSON_DOCUMENTATION(InboundProcessorStats)
12170
12171 public:
12172 uint32_t ssrc;
12173 double jitter;
12174 uint64_t minRtpSamplesInQueue;
12175 uint64_t maxRtpSamplesInQueue;
12176 uint64_t totalSamplesTrimmed;
12177 uint64_t underruns;
12178 uint64_t overruns;
12179 uint64_t samplesInQueue;
12180 uint64_t totalPacketsReceived;
12181 uint64_t totalPacketsLost;
12182 uint64_t totalPacketsDiscarded;
12183
12185 {
12186 clear();
12187 }
12188
12189 void clear()
12190 {
12191 ssrc = 0;
12192 jitter = 0.0;
12193 minRtpSamplesInQueue = 0;
12194 maxRtpSamplesInQueue = 0;
12195 totalSamplesTrimmed = 0;
12196 underruns = 0;
12197 overruns = 0;
12198 samplesInQueue = 0;
12199 totalPacketsReceived = 0;
12200 totalPacketsLost = 0;
12201 totalPacketsDiscarded = 0;
12202 }
12203 };
12204
12205 static void to_json(nlohmann::json& j, const InboundProcessorStats& p)
12206 {
12207 j = nlohmann::json{
12208 TOJSON_IMPL(ssrc),
12209 TOJSON_IMPL(jitter),
12210 TOJSON_IMPL(minRtpSamplesInQueue),
12211 TOJSON_IMPL(maxRtpSamplesInQueue),
12212 TOJSON_IMPL(totalSamplesTrimmed),
12213 TOJSON_IMPL(underruns),
12214 TOJSON_IMPL(overruns),
12215 TOJSON_IMPL(samplesInQueue),
12216 TOJSON_IMPL(totalPacketsReceived),
12217 TOJSON_IMPL(totalPacketsLost),
12218 TOJSON_IMPL(totalPacketsDiscarded)
12219 };
12220 }
12221 static void from_json(const nlohmann::json& j, InboundProcessorStats& p)
12222 {
12223 p.clear();
12224 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
12225 getOptional<double>("jitter", p.jitter, j, 0.0);
12226 getOptional<uint64_t>("minRtpSamplesInQueue", p.minRtpSamplesInQueue, j, 0);
12227 getOptional<uint64_t>("maxRtpSamplesInQueue", p.maxRtpSamplesInQueue, j, 0);
12228 getOptional<uint64_t>("totalSamplesTrimmed", p.totalSamplesTrimmed, j, 0);
12229 getOptional<uint64_t>("underruns", p.underruns, j, 0);
12230 getOptional<uint64_t>("overruns", p.overruns, j, 0);
12231 getOptional<uint64_t>("samplesInQueue", p.samplesInQueue, j, 0);
12232 getOptional<uint64_t>("totalPacketsReceived", p.totalPacketsReceived, j, 0);
12233 getOptional<uint64_t>("totalPacketsLost", p.totalPacketsLost, j, 0);
12234 getOptional<uint64_t>("totalPacketsDiscarded", p.totalPacketsDiscarded, j, 0);
12235 }
12236
12237 //-----------------------------------------------------------
12238 JSON_SERIALIZED_CLASS(TrafficCounter)
12246 {
12247 IMPLEMENT_JSON_SERIALIZATION()
12248 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(TrafficCounter)
12249 IMPLEMENT_JSON_DOCUMENTATION(TrafficCounter)
12250
12251 public:
12252 uint64_t packets;
12253 uint64_t bytes;
12254 uint64_t errors;
12255
12257 {
12258 clear();
12259 }
12260
12261 void clear()
12262 {
12263 packets = 0;
12264 bytes = 0;
12265 errors = 0;
12266 }
12267 };
12268
12269 static void to_json(nlohmann::json& j, const TrafficCounter& p)
12270 {
12271 j = nlohmann::json{
12272 TOJSON_IMPL(packets),
12273 TOJSON_IMPL(bytes),
12274 TOJSON_IMPL(errors)
12275 };
12276 }
12277 static void from_json(const nlohmann::json& j, TrafficCounter& p)
12278 {
12279 p.clear();
12280 getOptional<uint64_t>("packets", p.packets, j, 0);
12281 getOptional<uint64_t>("bytes", p.bytes, j, 0);
12282 getOptional<uint64_t>("errors", p.errors, j, 0);
12283 }
12284
12285 //-----------------------------------------------------------
12286 JSON_SERIALIZED_CLASS(GroupStats)
12294 {
12295 IMPLEMENT_JSON_SERIALIZATION()
12296 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupStats)
12297 IMPLEMENT_JSON_DOCUMENTATION(GroupStats)
12298
12299 public:
12300 std::string id;
12301 //std::vector<InboundProcessorStats> rtpInbounds;
12302 TrafficCounter rxTraffic;
12303 TrafficCounter txTraffic;
12304
12305 GroupStats()
12306 {
12307 clear();
12308 }
12309
12310 void clear()
12311 {
12312 id.clear();
12313 //rtpInbounds.clear();
12314 rxTraffic.clear();
12315 txTraffic.clear();
12316 }
12317 };
12318
12319 static void to_json(nlohmann::json& j, const GroupStats& p)
12320 {
12321 j = nlohmann::json{
12322 TOJSON_IMPL(id),
12323 //TOJSON_IMPL(rtpInbounds),
12324 TOJSON_IMPL(rxTraffic),
12325 TOJSON_IMPL(txTraffic)
12326 };
12327 }
12328 static void from_json(const nlohmann::json& j, GroupStats& p)
12329 {
12330 p.clear();
12331 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
12332 //getOptional<std::vector<InboundProcessorStats>>("rtpInbounds", p.rtpInbounds, j);
12333 getOptional<TrafficCounter>("rxTraffic", p.rxTraffic, j);
12334 getOptional<TrafficCounter>("txTraffic", p.txTraffic, j);
12335 }
12336
12337 //-----------------------------------------------------------
12338 JSON_SERIALIZED_CLASS(RallypointConnectionDetail)
12346 {
12347 IMPLEMENT_JSON_SERIALIZATION()
12348 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(RallypointConnectionDetail)
12349 IMPLEMENT_JSON_DOCUMENTATION(RallypointConnectionDetail)
12350
12351 public:
12353 std::string internalId;
12354
12356 std::string host;
12357
12359 int port;
12360
12363
12366
12368 {
12369 clear();
12370 }
12371
12372 void clear()
12373 {
12374 internalId.clear();
12375 host.clear();
12376 port = 0;
12377 msToNextConnectionAttempt = 0;
12378 serverProcessingMs = -1.0f;
12379 }
12380 };
12381
12382 static void to_json(nlohmann::json& j, const RallypointConnectionDetail& p)
12383 {
12384 j = nlohmann::json{
12385 TOJSON_IMPL(internalId),
12386 TOJSON_IMPL(host),
12387 TOJSON_IMPL(port)
12388 };
12389
12390 if(p.msToNextConnectionAttempt > 0)
12391 {
12392 j["msToNextConnectionAttempt"] = p.msToNextConnectionAttempt;
12393 }
12394
12395 if(p.serverProcessingMs >= 0.0)
12396 {
12397 j["serverProcessingMs"] = p.serverProcessingMs;
12398 }
12399 }
12400 static void from_json(const nlohmann::json& j, RallypointConnectionDetail& p)
12401 {
12402 p.clear();
12403 getOptional<std::string>("internalId", p.internalId, j, EMPTY_STRING);
12404 getOptional<std::string>("host", p.host, j, EMPTY_STRING);
12405 getOptional<int>("port", p.port, j, 0);
12406 getOptional<uint64_t>("msToNextConnectionAttempt", p.msToNextConnectionAttempt, j, 0);
12407 getOptional<float>("serverProcessingMs", p.serverProcessingMs, j, -1.0);
12408 }
12409
12410 //-----------------------------------------------------------
12411 JSON_SERIALIZED_CLASS(TranslationSession)
12422 {
12423 IMPLEMENT_JSON_SERIALIZATION()
12424 IMPLEMENT_JSON_DOCUMENTATION(TranslationSession)
12425
12426 public:
12428 std::string id;
12429
12431 std::string name;
12432
12434 std::vector<std::string> groups;
12435
12438
12440 {
12441 clear();
12442 }
12443
12444 void clear()
12445 {
12446 id.clear();
12447 name.clear();
12448 groups.clear();
12449 enabled = true;
12450 }
12451 };
12452
12453 static void to_json(nlohmann::json& j, const TranslationSession& p)
12454 {
12455 j = nlohmann::json{
12456 TOJSON_IMPL(id),
12457 TOJSON_IMPL(name),
12458 TOJSON_IMPL(groups),
12459 TOJSON_IMPL(enabled)
12460 };
12461 }
12462 static void from_json(const nlohmann::json& j, TranslationSession& p)
12463 {
12464 p.clear();
12465 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
12466 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
12467 getOptional<std::vector<std::string>>("groups", p.groups, j);
12468 FROMJSON_IMPL(enabled, bool, true);
12469 }
12470
12471 //-----------------------------------------------------------
12472 JSON_SERIALIZED_CLASS(TranslationConfiguration)
12483 {
12484 IMPLEMENT_JSON_SERIALIZATION()
12485 IMPLEMENT_JSON_DOCUMENTATION(TranslationConfiguration)
12486
12487 public:
12489 std::vector<TranslationSession> sessions;
12490
12492 std::vector<Group> groups;
12493
12495 {
12496 clear();
12497 }
12498
12499 void clear()
12500 {
12501 sessions.clear();
12502 groups.clear();
12503 }
12504 };
12505
12506 static void to_json(nlohmann::json& j, const TranslationConfiguration& p)
12507 {
12508 j = nlohmann::json{
12509 TOJSON_IMPL(sessions),
12510 TOJSON_IMPL(groups)
12511 };
12512 }
12513 static void from_json(const nlohmann::json& j, TranslationConfiguration& p)
12514 {
12515 p.clear();
12516 getOptional<std::vector<TranslationSession>>("sessions", p.sessions, j);
12517 getOptional<std::vector<Group>>("groups", p.groups, j);
12518 }
12519
12520 //-----------------------------------------------------------
12521 JSON_SERIALIZED_CLASS(LingoServerStatusReportConfiguration)
12532 {
12533 IMPLEMENT_JSON_SERIALIZATION()
12534 IMPLEMENT_JSON_DOCUMENTATION(LingoServerStatusReportConfiguration)
12535
12536 public:
12538 std::string fileName;
12539
12542
12545
12547 std::string runCmd;
12548
12551
12554
12557
12559 {
12560 clear();
12561 }
12562
12563 void clear()
12564 {
12565 fileName.clear();
12566 intervalSecs = 60;
12567 enabled = false;
12568 includeGroupDetail = false;
12569 includeSessionDetail = false;
12570 includeSessionGroupDetail = false;
12571 runCmd.clear();
12572 }
12573 };
12574
12575 static void to_json(nlohmann::json& j, const LingoServerStatusReportConfiguration& p)
12576 {
12577 j = nlohmann::json{
12578 TOJSON_IMPL(fileName),
12579 TOJSON_IMPL(intervalSecs),
12580 TOJSON_IMPL(enabled),
12581 TOJSON_IMPL(includeGroupDetail),
12582 TOJSON_IMPL(includeSessionDetail),
12583 TOJSON_IMPL(includeSessionGroupDetail),
12584 TOJSON_IMPL(runCmd)
12585 };
12586 }
12587 static void from_json(const nlohmann::json& j, LingoServerStatusReportConfiguration& p)
12588 {
12589 p.clear();
12590 getOptional<std::string>("fileName", p.fileName, j);
12591 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
12592 getOptional<bool>("enabled", p.enabled, j, false);
12593 getOptional<std::string>("runCmd", p.runCmd, j);
12594 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
12595 getOptional<bool>("includeSessionDetail", p.includeSessionDetail, j, false);
12596 getOptional<bool>("includeSessionGroupDetail", p.includeSessionGroupDetail, j, false);
12597 }
12598
12599 //-----------------------------------------------------------
12600 JSON_SERIALIZED_CLASS(LingoServerInternals)
12613 {
12614 IMPLEMENT_JSON_SERIALIZATION()
12615 IMPLEMENT_JSON_DOCUMENTATION(LingoServerInternals)
12616
12617 public:
12620
12623
12626
12628 {
12629 clear();
12630 }
12631
12632 void clear()
12633 {
12634 watchdog.clear();
12635 tuning.clear();
12636 housekeeperIntervalMs = 1000;
12637 }
12638 };
12639
12640 static void to_json(nlohmann::json& j, const LingoServerInternals& p)
12641 {
12642 j = nlohmann::json{
12643 TOJSON_IMPL(watchdog),
12644 TOJSON_IMPL(housekeeperIntervalMs),
12645 TOJSON_IMPL(tuning)
12646 };
12647 }
12648 static void from_json(const nlohmann::json& j, LingoServerInternals& p)
12649 {
12650 p.clear();
12651 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
12652 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
12653 getOptional<TuningSettings>("tuning", p.tuning, j);
12654 }
12655
12656 //-----------------------------------------------------------
12657 JSON_SERIALIZED_CLASS(LingoServerConfiguration)
12667 {
12668 IMPLEMENT_JSON_SERIALIZATION()
12669 IMPLEMENT_JSON_DOCUMENTATION(LingoServerConfiguration)
12670
12671 public:
12673 std::string id;
12674
12677
12680
12683
12686
12689
12692
12695
12698
12701
12704
12707
12710
12713
12716
12718 {
12719 clear();
12720 }
12721
12722 void clear()
12723 {
12724 id.clear();
12725 serviceConfigurationFileCheckSecs = 60;
12726 lingoConfigurationFileName.clear();
12727 lingoConfigurationFileCommand.clear();
12728 lingoConfigurationFileCheckSecs = 60;
12729 statusReport.clear();
12730 externalHealthCheckResponder.clear();
12731 internals.clear();
12732 certStoreFileName.clear();
12733 certStorePasswordHex.clear();
12734 enginePolicy.clear();
12735 configurationCheckSignalName = "rts.22f4ec3.${id}";
12736 fipsCrypto.clear();
12737 proxy.clear();
12738 nsm.clear();
12739 }
12740 };
12741
12742 static void to_json(nlohmann::json& j, const LingoServerConfiguration& p)
12743 {
12744 j = nlohmann::json{
12745 TOJSON_IMPL(id),
12746 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
12747 TOJSON_IMPL(lingoConfigurationFileName),
12748 TOJSON_IMPL(lingoConfigurationFileCommand),
12749 TOJSON_IMPL(lingoConfigurationFileCheckSecs),
12750 TOJSON_IMPL(statusReport),
12751 TOJSON_IMPL(externalHealthCheckResponder),
12752 TOJSON_IMPL(internals),
12753 TOJSON_IMPL(certStoreFileName),
12754 TOJSON_IMPL(certStorePasswordHex),
12755 TOJSON_IMPL(enginePolicy),
12756 TOJSON_IMPL(configurationCheckSignalName),
12757 TOJSON_IMPL(fipsCrypto),
12758 TOJSON_IMPL(proxy),
12759 TOJSON_IMPL(nsm)
12760 };
12761 }
12762 static void from_json(const nlohmann::json& j, LingoServerConfiguration& p)
12763 {
12764 p.clear();
12765 getOptional<std::string>("id", p.id, j);
12766 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
12767 getOptional<std::string>("lingoConfigurationFileName", p.lingoConfigurationFileName, j);
12768 getOptional<std::string>("lingoConfigurationFileCommand", p.lingoConfigurationFileCommand, j);
12769 getOptional<int>("lingoConfigurationFileCheckSecs", p.lingoConfigurationFileCheckSecs, j, 60);
12770 getOptional<LingoServerStatusReportConfiguration>("statusReport", p.statusReport, j);
12771 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
12772 getOptional<LingoServerInternals>("internals", p.internals, j);
12773 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
12774 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
12775 j.at("enginePolicy").get_to(p.enginePolicy);
12776 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.22f4ec3.${id}");
12777 getOptional<FipsCryptoSettings>("fipsCrypo", p.fipsCrypto, j);
12778 getOptional<NetworkAddress>("proxy", p.proxy, j);
12779 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
12780 }
12781
12782
12783 //-----------------------------------------------------------
12784 JSON_SERIALIZED_CLASS(VoiceToVoiceSession)
12795 {
12796 IMPLEMENT_JSON_SERIALIZATION()
12797 IMPLEMENT_JSON_DOCUMENTATION(VoiceToVoiceSession)
12798
12799 public:
12801 std::string id;
12802
12804 std::string name;
12805
12807 std::vector<std::string> groups;
12808
12811
12813 {
12814 clear();
12815 }
12816
12817 void clear()
12818 {
12819 id.clear();
12820 name.clear();
12821 groups.clear();
12822 enabled = true;
12823 }
12824 };
12825
12826 static void to_json(nlohmann::json& j, const VoiceToVoiceSession& p)
12827 {
12828 j = nlohmann::json{
12829 TOJSON_IMPL(id),
12830 TOJSON_IMPL(name),
12831 TOJSON_IMPL(groups),
12832 TOJSON_IMPL(enabled)
12833 };
12834 }
12835 static void from_json(const nlohmann::json& j, VoiceToVoiceSession& p)
12836 {
12837 p.clear();
12838 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
12839 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
12840 getOptional<std::vector<std::string>>("groups", p.groups, j);
12841 FROMJSON_IMPL(enabled, bool, true);
12842 }
12843
12844 //-----------------------------------------------------------
12845 JSON_SERIALIZED_CLASS(LingoConfiguration)
12856 {
12857 IMPLEMENT_JSON_SERIALIZATION()
12858 IMPLEMENT_JSON_DOCUMENTATION(LingoConfiguration)
12859
12860 public:
12862 std::vector<VoiceToVoiceSession> voiceToVoiceSessions;
12863
12865 std::vector<Group> groups;
12866
12868 {
12869 clear();
12870 }
12871
12872 void clear()
12873 {
12874 voiceToVoiceSessions.clear();
12875 groups.clear();
12876 }
12877 };
12878
12879 static void to_json(nlohmann::json& j, const LingoConfiguration& p)
12880 {
12881 j = nlohmann::json{
12882 TOJSON_IMPL(voiceToVoiceSessions),
12883 TOJSON_IMPL(groups)
12884 };
12885 }
12886 static void from_json(const nlohmann::json& j, LingoConfiguration& p)
12887 {
12888 p.clear();
12889 getOptional<std::vector<VoiceToVoiceSession>>("voiceToVoiceSessions", p.voiceToVoiceSessions, j);
12890 getOptional<std::vector<Group>>("groups", p.groups, j);
12891 }
12892
12893 //-----------------------------------------------------------
12894 JSON_SERIALIZED_CLASS(BridgingConfiguration)
12905 {
12906 IMPLEMENT_JSON_SERIALIZATION()
12907 IMPLEMENT_JSON_DOCUMENTATION(BridgingConfiguration)
12908
12909 public:
12911 std::vector<Bridge> bridges;
12912
12914 std::vector<Group> groups;
12915
12917 {
12918 clear();
12919 }
12920
12921 void clear()
12922 {
12923 bridges.clear();
12924 groups.clear();
12925 }
12926 };
12927
12928 static void to_json(nlohmann::json& j, const BridgingConfiguration& p)
12929 {
12930 j = nlohmann::json{
12931 TOJSON_IMPL(bridges),
12932 TOJSON_IMPL(groups)
12933 };
12934 }
12935 static void from_json(const nlohmann::json& j, BridgingConfiguration& p)
12936 {
12937 p.clear();
12938 getOptional<std::vector<Bridge>>("bridges", p.bridges, j);
12939 getOptional<std::vector<Group>>("groups", p.groups, j);
12940 }
12941
12942 //-----------------------------------------------------------
12943 JSON_SERIALIZED_CLASS(BridgingServerStatusReportConfiguration)
12954 {
12955 IMPLEMENT_JSON_SERIALIZATION()
12956 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerStatusReportConfiguration)
12957
12958 public:
12960 std::string fileName;
12961
12964
12967
12969 std::string runCmd;
12970
12973
12976
12979
12981 {
12982 clear();
12983 }
12984
12985 void clear()
12986 {
12987 fileName.clear();
12988 intervalSecs = 60;
12989 enabled = false;
12990 includeGroupDetail = false;
12991 includeBridgeDetail = false;
12992 includeBridgeGroupDetail = false;
12993 runCmd.clear();
12994 }
12995 };
12996
12997 static void to_json(nlohmann::json& j, const BridgingServerStatusReportConfiguration& p)
12998 {
12999 j = nlohmann::json{
13000 TOJSON_IMPL(fileName),
13001 TOJSON_IMPL(intervalSecs),
13002 TOJSON_IMPL(enabled),
13003 TOJSON_IMPL(includeGroupDetail),
13004 TOJSON_IMPL(includeBridgeDetail),
13005 TOJSON_IMPL(includeBridgeGroupDetail),
13006 TOJSON_IMPL(runCmd)
13007 };
13008 }
13009 static void from_json(const nlohmann::json& j, BridgingServerStatusReportConfiguration& p)
13010 {
13011 p.clear();
13012 getOptional<std::string>("fileName", p.fileName, j);
13013 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
13014 getOptional<bool>("enabled", p.enabled, j, false);
13015 getOptional<std::string>("runCmd", p.runCmd, j);
13016 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
13017 getOptional<bool>("includeBridgeDetail", p.includeBridgeDetail, j, false);
13018 getOptional<bool>("includeBridgeGroupDetail", p.includeBridgeGroupDetail, j, false);
13019 }
13020
13021 //-----------------------------------------------------------
13022 JSON_SERIALIZED_CLASS(BridgingServerInternals)
13035 {
13036 IMPLEMENT_JSON_SERIALIZATION()
13037 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerInternals)
13038
13039 public:
13042
13045
13048
13051
13054
13056 {
13057 clear();
13058 }
13059
13060 void clear()
13061 {
13062 watchdog.clear();
13063 tuning.clear();
13064 housekeeperIntervalMs = 1000;
13065 nsmUnhealthyBridgeGraceMs = 5000;
13066 nsmResourceReleaseCooldownMs = 30000;
13067 }
13068 };
13069
13070 static void to_json(nlohmann::json& j, const BridgingServerInternals& p)
13071 {
13072 j = nlohmann::json{
13073 TOJSON_IMPL(watchdog),
13074 TOJSON_IMPL(housekeeperIntervalMs),
13075 TOJSON_IMPL(nsmUnhealthyBridgeGraceMs),
13076 TOJSON_IMPL(nsmResourceReleaseCooldownMs),
13077 TOJSON_IMPL(tuning)
13078 };
13079 }
13080 static void from_json(const nlohmann::json& j, BridgingServerInternals& p)
13081 {
13082 p.clear();
13083 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
13084 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
13085 getOptional<int>("nsmUnhealthyBridgeGraceMs", p.nsmUnhealthyBridgeGraceMs, j, 5000);
13086 getOptional<int>("nsmResourceReleaseCooldownMs", p.nsmResourceReleaseCooldownMs, j, 30000);
13087 getOptional<TuningSettings>("tuning", p.tuning, j);
13088 }
13089
13090 //-----------------------------------------------------------
13091 JSON_SERIALIZED_CLASS(BridgingServerConfiguration)
13101 {
13102 IMPLEMENT_JSON_SERIALIZATION()
13103 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerConfiguration)
13104
13105 public:
13112 typedef enum
13113 {
13115 omRaw = 0,
13116
13119 omMultistream = 1,
13120
13123 omMixedStream = 2,
13124
13126 omADictatedByGroup = 3,
13127 } OpMode_t;
13128
13130 std::string id;
13131
13134
13137
13140
13143
13146
13149
13152
13155
13158
13161
13164
13167
13170
13173
13176
13178 {
13179 clear();
13180 }
13181
13182 void clear()
13183 {
13184 id.clear();
13185 mode = omRaw;
13186 serviceConfigurationFileCheckSecs = 60;
13187 bridgingConfigurationFileName.clear();
13188 bridgingConfigurationFileCommand.clear();
13189 bridgingConfigurationFileCheckSecs = 60;
13190 statusReport.clear();
13191 externalHealthCheckResponder.clear();
13192 internals.clear();
13193 certStoreFileName.clear();
13194 certStorePasswordHex.clear();
13195 enginePolicy.clear();
13196 configurationCheckSignalName = "rts.6cc0651.${id}";
13197 fipsCrypto.clear();
13198 nsmNode.clear();
13199 rtiCloud.clear();
13200 }
13201 };
13202
13203 static void to_json(nlohmann::json& j, const BridgingServerConfiguration& p)
13204 {
13205 j = nlohmann::json{
13206 TOJSON_IMPL(id),
13207 TOJSON_IMPL(mode),
13208 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
13209 TOJSON_IMPL(bridgingConfigurationFileName),
13210 TOJSON_IMPL(bridgingConfigurationFileCommand),
13211 TOJSON_IMPL(bridgingConfigurationFileCheckSecs),
13212 TOJSON_IMPL(statusReport),
13213 TOJSON_IMPL(externalHealthCheckResponder),
13214 TOJSON_IMPL(internals),
13215 TOJSON_IMPL(certStoreFileName),
13216 TOJSON_IMPL(certStorePasswordHex),
13217 TOJSON_IMPL(enginePolicy),
13218 TOJSON_IMPL(configurationCheckSignalName),
13219 TOJSON_IMPL(fipsCrypto),
13220 TOJSON_IMPL(nsmNode),
13221 TOJSON_IMPL(rtiCloud)
13222 };
13223 }
13224 static void from_json(const nlohmann::json& j, BridgingServerConfiguration& p)
13225 {
13226 p.clear();
13227 getOptional<std::string>("id", p.id, j);
13228 getOptional<BridgingServerConfiguration::OpMode_t>("mode", p.mode, j, BridgingServerConfiguration::OpMode_t::omRaw);
13229 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
13230 getOptional<std::string>("bridgingConfigurationFileName", p.bridgingConfigurationFileName, j);
13231 getOptional<std::string>("bridgingConfigurationFileCommand", p.bridgingConfigurationFileCommand, j);
13232 getOptional<int>("bridgingConfigurationFileCheckSecs", p.bridgingConfigurationFileCheckSecs, j, 60);
13233 getOptional<BridgingServerStatusReportConfiguration>("statusReport", p.statusReport, j);
13234 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
13235 getOptional<BridgingServerInternals>("internals", p.internals, j);
13236 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
13237 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
13238 j.at("enginePolicy").get_to(p.enginePolicy);
13239 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.6cc0651.${id}");
13240 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
13241 getOptional<NsmNode>("nsmNode", p.nsmNode, j);
13242 getOptional<RtiCloudSettings>("rtiCloud", p.rtiCloud, j);
13243 }
13244
13245
13246 //-----------------------------------------------------------
13247 JSON_SERIALIZED_CLASS(EarGroupsConfiguration)
13258 {
13259 IMPLEMENT_JSON_SERIALIZATION()
13260 IMPLEMENT_JSON_DOCUMENTATION(EarGroupsConfiguration)
13261
13262 public:
13264 std::vector<Group> groups;
13265
13267 {
13268 clear();
13269 }
13270
13271 void clear()
13272 {
13273 groups.clear();
13274 }
13275 };
13276
13277 static void to_json(nlohmann::json& j, const EarGroupsConfiguration& p)
13278 {
13279 j = nlohmann::json{
13280 TOJSON_IMPL(groups)
13281 };
13282 }
13283 static void from_json(const nlohmann::json& j, EarGroupsConfiguration& p)
13284 {
13285 p.clear();
13286 getOptional<std::vector<Group>>("groups", p.groups, j);
13287 }
13288
13289 //-----------------------------------------------------------
13290 JSON_SERIALIZED_CLASS(EarServerStatusReportConfiguration)
13301 {
13302 IMPLEMENT_JSON_SERIALIZATION()
13303 IMPLEMENT_JSON_DOCUMENTATION(EarServerStatusReportConfiguration)
13304
13305 public:
13307 std::string fileName;
13308
13311
13314
13316 std::string runCmd;
13317
13320
13322 {
13323 clear();
13324 }
13325
13326 void clear()
13327 {
13328 fileName.clear();
13329 intervalSecs = 60;
13330 enabled = false;
13331 includeGroupDetail = false;
13332 runCmd.clear();
13333 }
13334 };
13335
13336 static void to_json(nlohmann::json& j, const EarServerStatusReportConfiguration& p)
13337 {
13338 j = nlohmann::json{
13339 TOJSON_IMPL(fileName),
13340 TOJSON_IMPL(intervalSecs),
13341 TOJSON_IMPL(enabled),
13342 TOJSON_IMPL(includeGroupDetail),
13343 TOJSON_IMPL(runCmd)
13344 };
13345 }
13346 static void from_json(const nlohmann::json& j, EarServerStatusReportConfiguration& p)
13347 {
13348 p.clear();
13349 getOptional<std::string>("fileName", p.fileName, j);
13350 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
13351 getOptional<bool>("enabled", p.enabled, j, false);
13352 getOptional<std::string>("runCmd", p.runCmd, j);
13353 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
13354 }
13355
13356 //-----------------------------------------------------------
13357 JSON_SERIALIZED_CLASS(EarServerInternals)
13370 {
13371 IMPLEMENT_JSON_SERIALIZATION()
13372 IMPLEMENT_JSON_DOCUMENTATION(EarServerInternals)
13373
13374 public:
13377
13380
13383
13385 {
13386 clear();
13387 }
13388
13389 void clear()
13390 {
13391 watchdog.clear();
13392 tuning.clear();
13393 housekeeperIntervalMs = 1000;
13394 }
13395 };
13396
13397 static void to_json(nlohmann::json& j, const EarServerInternals& p)
13398 {
13399 j = nlohmann::json{
13400 TOJSON_IMPL(watchdog),
13401 TOJSON_IMPL(housekeeperIntervalMs),
13402 TOJSON_IMPL(tuning)
13403 };
13404 }
13405 static void from_json(const nlohmann::json& j, EarServerInternals& p)
13406 {
13407 p.clear();
13408 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
13409 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
13410 getOptional<TuningSettings>("tuning", p.tuning, j);
13411 }
13412
13413 //-----------------------------------------------------------
13414 JSON_SERIALIZED_CLASS(EarServerConfiguration)
13424 {
13425 IMPLEMENT_JSON_SERIALIZATION()
13426 IMPLEMENT_JSON_DOCUMENTATION(EarServerConfiguration)
13427
13428 public:
13429
13431 std::string id;
13432
13435
13438
13441
13444
13447
13450
13453
13456
13459
13462
13465
13468
13471
13473 {
13474 clear();
13475 }
13476
13477 void clear()
13478 {
13479 id.clear();
13480 serviceConfigurationFileCheckSecs = 60;
13481 groupsConfigurationFileName.clear();
13482 groupsConfigurationFileCommand.clear();
13483 groupsConfigurationFileCheckSecs = 60;
13484 statusReport.clear();
13485 externalHealthCheckResponder.clear();
13486 internals.clear();
13487 certStoreFileName.clear();
13488 certStorePasswordHex.clear();
13489 enginePolicy.clear();
13490 configurationCheckSignalName = "rts.9a164fa.${id}";
13491 fipsCrypto.clear();
13492 nsm.clear();
13493 }
13494 };
13495
13496 static void to_json(nlohmann::json& j, const EarServerConfiguration& p)
13497 {
13498 j = nlohmann::json{
13499 TOJSON_IMPL(id),
13500 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
13501 TOJSON_IMPL(groupsConfigurationFileName),
13502 TOJSON_IMPL(groupsConfigurationFileCommand),
13503 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
13504 TOJSON_IMPL(statusReport),
13505 TOJSON_IMPL(externalHealthCheckResponder),
13506 TOJSON_IMPL(internals),
13507 TOJSON_IMPL(certStoreFileName),
13508 TOJSON_IMPL(certStorePasswordHex),
13509 TOJSON_IMPL(enginePolicy),
13510 TOJSON_IMPL(configurationCheckSignalName),
13511 TOJSON_IMPL(fipsCrypto),
13512 TOJSON_IMPL(nsm)
13513 };
13514 }
13515 static void from_json(const nlohmann::json& j, EarServerConfiguration& p)
13516 {
13517 p.clear();
13518 getOptional<std::string>("id", p.id, j);
13519 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
13520 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
13521 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
13522 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
13523 getOptional<EarServerStatusReportConfiguration>("statusReport", p.statusReport, j);
13524 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
13525 getOptional<EarServerInternals>("internals", p.internals, j);
13526 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
13527 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
13528 j.at("enginePolicy").get_to(p.enginePolicy);
13529 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
13530 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
13531 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
13532 }
13533
13534//-----------------------------------------------------------
13535 JSON_SERIALIZED_CLASS(EngageSemGroupsConfiguration)
13546 {
13547 IMPLEMENT_JSON_SERIALIZATION()
13548 IMPLEMENT_JSON_DOCUMENTATION(EngageSemGroupsConfiguration)
13549
13550 public:
13552 std::vector<Group> groups;
13553
13555 {
13556 clear();
13557 }
13558
13559 void clear()
13560 {
13561 groups.clear();
13562 }
13563 };
13564
13565 static void to_json(nlohmann::json& j, const EngageSemGroupsConfiguration& p)
13566 {
13567 j = nlohmann::json{
13568 TOJSON_IMPL(groups)
13569 };
13570 }
13571 static void from_json(const nlohmann::json& j, EngageSemGroupsConfiguration& p)
13572 {
13573 p.clear();
13574 getOptional<std::vector<Group>>("groups", p.groups, j);
13575 }
13576
13577 //-----------------------------------------------------------
13578 JSON_SERIALIZED_CLASS(EngageSemServerStatusReportConfiguration)
13589 {
13590 IMPLEMENT_JSON_SERIALIZATION()
13591 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerStatusReportConfiguration)
13592
13593 public:
13595 std::string fileName;
13596
13599
13602
13604 std::string runCmd;
13605
13608
13610 {
13611 clear();
13612 }
13613
13614 void clear()
13615 {
13616 fileName.clear();
13617 intervalSecs = 60;
13618 enabled = false;
13619 includeGroupDetail = false;
13620 runCmd.clear();
13621 }
13622 };
13623
13624 static void to_json(nlohmann::json& j, const EngageSemServerStatusReportConfiguration& p)
13625 {
13626 j = nlohmann::json{
13627 TOJSON_IMPL(fileName),
13628 TOJSON_IMPL(intervalSecs),
13629 TOJSON_IMPL(enabled),
13630 TOJSON_IMPL(includeGroupDetail),
13631 TOJSON_IMPL(runCmd)
13632 };
13633 }
13634 static void from_json(const nlohmann::json& j, EngageSemServerStatusReportConfiguration& p)
13635 {
13636 p.clear();
13637 getOptional<std::string>("fileName", p.fileName, j);
13638 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
13639 getOptional<bool>("enabled", p.enabled, j, false);
13640 getOptional<std::string>("runCmd", p.runCmd, j);
13641 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
13642 }
13643
13644 //-----------------------------------------------------------
13645 JSON_SERIALIZED_CLASS(EngageSemServerInternals)
13658 {
13659 IMPLEMENT_JSON_SERIALIZATION()
13660 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerInternals)
13661
13662 public:
13665
13668
13671
13673 {
13674 clear();
13675 }
13676
13677 void clear()
13678 {
13679 watchdog.clear();
13680 tuning.clear();
13681 housekeeperIntervalMs = 1000;
13682 }
13683 };
13684
13685 static void to_json(nlohmann::json& j, const EngageSemServerInternals& p)
13686 {
13687 j = nlohmann::json{
13688 TOJSON_IMPL(watchdog),
13689 TOJSON_IMPL(housekeeperIntervalMs),
13690 TOJSON_IMPL(tuning)
13691 };
13692 }
13693 static void from_json(const nlohmann::json& j, EngageSemServerInternals& p)
13694 {
13695 p.clear();
13696 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
13697 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
13698 getOptional<TuningSettings>("tuning", p.tuning, j);
13699 }
13700
13701 //-----------------------------------------------------------
13702 JSON_SERIALIZED_CLASS(EngageSemServerConfiguration)
13712 {
13713 IMPLEMENT_JSON_SERIALIZATION()
13714 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerConfiguration)
13715
13716 public:
13717
13719 std::string id;
13720
13723
13726
13729
13732
13735
13738
13741
13744
13747
13750
13753
13756
13759
13760 int maxQueueLen;
13761 int minQueuingMs;
13762 int maxQueuingMs;
13763 int minPriority;
13764 int maxPriority;
13765
13767 {
13768 clear();
13769 }
13770
13771 void clear()
13772 {
13773 id.clear();
13774 serviceConfigurationFileCheckSecs = 60;
13775 groupsConfigurationFileName.clear();
13776 groupsConfigurationFileCommand.clear();
13777 groupsConfigurationFileCheckSecs = 60;
13778 statusReport.clear();
13779 externalHealthCheckResponder.clear();
13780 internals.clear();
13781 certStoreFileName.clear();
13782 certStorePasswordHex.clear();
13783 enginePolicy.clear();
13784 configurationCheckSignalName = "rts.9a164fa.${id}";
13785 fipsCrypto.clear();
13786 nsm.clear();
13787
13788 maxQueueLen = 64;
13789 minQueuingMs = 0;
13790 maxQueuingMs = 15000;
13791 minPriority = 0;
13792 maxPriority = 255;
13793 }
13794 };
13795
13796 static void to_json(nlohmann::json& j, const EngageSemServerConfiguration& p)
13797 {
13798 j = nlohmann::json{
13799 TOJSON_IMPL(id),
13800 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
13801 TOJSON_IMPL(groupsConfigurationFileName),
13802 TOJSON_IMPL(groupsConfigurationFileCommand),
13803 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
13804 TOJSON_IMPL(statusReport),
13805 TOJSON_IMPL(externalHealthCheckResponder),
13806 TOJSON_IMPL(internals),
13807 TOJSON_IMPL(certStoreFileName),
13808 TOJSON_IMPL(certStorePasswordHex),
13809 TOJSON_IMPL(enginePolicy),
13810 TOJSON_IMPL(configurationCheckSignalName),
13811 TOJSON_IMPL(fipsCrypto),
13812 TOJSON_IMPL(nsm),
13813 TOJSON_IMPL(maxQueueLen),
13814 TOJSON_IMPL(minQueuingMs),
13815 TOJSON_IMPL(maxQueuingMs),
13816 TOJSON_IMPL(minPriority),
13817 TOJSON_IMPL(maxPriority)
13818 };
13819 }
13820 static void from_json(const nlohmann::json& j, EngageSemServerConfiguration& p)
13821 {
13822 p.clear();
13823 getOptional<std::string>("id", p.id, j);
13824 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
13825 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
13826 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
13827 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
13828 getOptional<EngageSemServerStatusReportConfiguration>("statusReport", p.statusReport, j);
13829 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
13830 getOptional<EngageSemServerInternals>("internals", p.internals, j);
13831 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
13832 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
13833 j.at("enginePolicy").get_to(p.enginePolicy);
13834 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
13835 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
13836 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
13837 getOptional<int>("maxQueueLen", p.maxQueueLen, j, 64);
13838 getOptional<int>("minQueuingMs", p.minQueuingMs, j, 0);
13839 getOptional<int>("maxQueuingMs", p.maxQueuingMs, j, 15000);
13840 getOptional<int>("minPriority", p.minPriority, j, 0);
13841 getOptional<int>("maxPriority", p.maxPriority, j, 255);
13842 }
13843
13844 //-----------------------------------------------------------
13845 JSON_SERIALIZED_CLASS(EngateGroup)
13855 class EngateGroup : public Group
13856 {
13857 IMPLEMENT_JSON_SERIALIZATION()
13858 IMPLEMENT_JSON_DOCUMENTATION(EngateGroup)
13859
13860 public:
13861 bool useVad;
13862 uint32_t inputHangMs;
13863 uint32_t inputActivationPowerThreshold;
13864 uint32_t inputDeactivationPowerThreshold;
13865
13866 EngateGroup()
13867 {
13868 clear();
13869 }
13870
13871 void clear()
13872 {
13873 Group::clear();
13874 useVad = false;
13875 inputHangMs = 750;
13876 inputActivationPowerThreshold = 700;
13877 inputDeactivationPowerThreshold = 125;
13878 }
13879 };
13880
13881 static void to_json(nlohmann::json& j, const EngateGroup& p)
13882 {
13883 nlohmann::json g;
13884 to_json(g, static_cast<const Group&>(p));
13885
13886 j = nlohmann::json{
13887 TOJSON_IMPL(useVad),
13888 TOJSON_IMPL(inputHangMs),
13889 TOJSON_IMPL(inputActivationPowerThreshold),
13890 TOJSON_IMPL(inputDeactivationPowerThreshold)
13891 };
13892 }
13893 static void from_json(const nlohmann::json& j, EngateGroup& p)
13894 {
13895 p.clear();
13896 from_json(j, static_cast<Group&>(p));
13897 getOptional<uint32_t>("inputHangMs", p.inputHangMs, j, 750);
13898 getOptional<uint32_t>("inputActivationPowerThreshold", p.inputActivationPowerThreshold, j, 700);
13899 getOptional<uint32_t>("inputDeactivationPowerThreshold", p.inputDeactivationPowerThreshold, j, 125);
13900 }
13901
13902 //-----------------------------------------------------------
13903 JSON_SERIALIZED_CLASS(EngateGroupsConfiguration)
13914 {
13915 IMPLEMENT_JSON_SERIALIZATION()
13916 IMPLEMENT_JSON_DOCUMENTATION(EngateGroupsConfiguration)
13917
13918 public:
13920 std::vector<EngateGroup> groups;
13921
13923 {
13924 clear();
13925 }
13926
13927 void clear()
13928 {
13929 groups.clear();
13930 }
13931 };
13932
13933 static void to_json(nlohmann::json& j, const EngateGroupsConfiguration& p)
13934 {
13935 j = nlohmann::json{
13936 TOJSON_IMPL(groups)
13937 };
13938 }
13939 static void from_json(const nlohmann::json& j, EngateGroupsConfiguration& p)
13940 {
13941 p.clear();
13942 getOptional<std::vector<EngateGroup>>("groups", p.groups, j);
13943 }
13944
13945 //-----------------------------------------------------------
13946 JSON_SERIALIZED_CLASS(EngateServerStatusReportConfiguration)
13957 {
13958 IMPLEMENT_JSON_SERIALIZATION()
13959 IMPLEMENT_JSON_DOCUMENTATION(EngateServerStatusReportConfiguration)
13960
13961 public:
13963 std::string fileName;
13964
13967
13970
13972 std::string runCmd;
13973
13976
13978 {
13979 clear();
13980 }
13981
13982 void clear()
13983 {
13984 fileName.clear();
13985 intervalSecs = 60;
13986 enabled = false;
13987 includeGroupDetail = false;
13988 runCmd.clear();
13989 }
13990 };
13991
13992 static void to_json(nlohmann::json& j, const EngateServerStatusReportConfiguration& p)
13993 {
13994 j = nlohmann::json{
13995 TOJSON_IMPL(fileName),
13996 TOJSON_IMPL(intervalSecs),
13997 TOJSON_IMPL(enabled),
13998 TOJSON_IMPL(includeGroupDetail),
13999 TOJSON_IMPL(runCmd)
14000 };
14001 }
14002 static void from_json(const nlohmann::json& j, EngateServerStatusReportConfiguration& p)
14003 {
14004 p.clear();
14005 getOptional<std::string>("fileName", p.fileName, j);
14006 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
14007 getOptional<bool>("enabled", p.enabled, j, false);
14008 getOptional<std::string>("runCmd", p.runCmd, j);
14009 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
14010 }
14011
14012 //-----------------------------------------------------------
14013 JSON_SERIALIZED_CLASS(EngateServerInternals)
14026 {
14027 IMPLEMENT_JSON_SERIALIZATION()
14028 IMPLEMENT_JSON_DOCUMENTATION(EngateServerInternals)
14029
14030 public:
14033
14036
14039
14041 {
14042 clear();
14043 }
14044
14045 void clear()
14046 {
14047 watchdog.clear();
14048 tuning.clear();
14049 housekeeperIntervalMs = 1000;
14050 }
14051 };
14052
14053 static void to_json(nlohmann::json& j, const EngateServerInternals& p)
14054 {
14055 j = nlohmann::json{
14056 TOJSON_IMPL(watchdog),
14057 TOJSON_IMPL(housekeeperIntervalMs),
14058 TOJSON_IMPL(tuning)
14059 };
14060 }
14061 static void from_json(const nlohmann::json& j, EngateServerInternals& p)
14062 {
14063 p.clear();
14064 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
14065 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
14066 getOptional<TuningSettings>("tuning", p.tuning, j);
14067 }
14068
14069 //-----------------------------------------------------------
14070 JSON_SERIALIZED_CLASS(EngateServerConfiguration)
14080 {
14081 IMPLEMENT_JSON_SERIALIZATION()
14082 IMPLEMENT_JSON_DOCUMENTATION(EngateServerConfiguration)
14083
14084 public:
14085
14087 std::string id;
14088
14091
14094
14097
14100
14103
14106
14109
14112
14115
14118
14121
14124
14127
14129 {
14130 clear();
14131 }
14132
14133 void clear()
14134 {
14135 id.clear();
14136 serviceConfigurationFileCheckSecs = 60;
14137 groupsConfigurationFileName.clear();
14138 groupsConfigurationFileCommand.clear();
14139 groupsConfigurationFileCheckSecs = 60;
14140 statusReport.clear();
14141 externalHealthCheckResponder.clear();
14142 internals.clear();
14143 certStoreFileName.clear();
14144 certStorePasswordHex.clear();
14145 enginePolicy.clear();
14146 configurationCheckSignalName = "rts.9a164fa.${id}";
14147 fipsCrypto.clear();
14148 nsm.clear();
14149 }
14150 };
14151
14152 static void to_json(nlohmann::json& j, const EngateServerConfiguration& p)
14153 {
14154 j = nlohmann::json{
14155 TOJSON_IMPL(id),
14156 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
14157 TOJSON_IMPL(groupsConfigurationFileName),
14158 TOJSON_IMPL(groupsConfigurationFileCommand),
14159 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
14160 TOJSON_IMPL(statusReport),
14161 TOJSON_IMPL(externalHealthCheckResponder),
14162 TOJSON_IMPL(internals),
14163 TOJSON_IMPL(certStoreFileName),
14164 TOJSON_IMPL(certStorePasswordHex),
14165 TOJSON_IMPL(enginePolicy),
14166 TOJSON_IMPL(configurationCheckSignalName),
14167 TOJSON_IMPL(fipsCrypto),
14168 TOJSON_IMPL(nsm)
14169 };
14170 }
14171 static void from_json(const nlohmann::json& j, EngateServerConfiguration& p)
14172 {
14173 p.clear();
14174 getOptional<std::string>("id", p.id, j);
14175 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
14176 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
14177 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
14178 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
14179 getOptional<EngateServerStatusReportConfiguration>("statusReport", p.statusReport, j);
14180 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
14181 getOptional<EngateServerInternals>("internals", p.internals, j);
14182 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
14183 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
14184 j.at("enginePolicy").get_to(p.enginePolicy);
14185 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
14186 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
14187 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
14188 }
14189
14190 //-----------------------------------------------------------
14191 static inline void dumpExampleConfigurations(const char *path)
14192 {
14193 WatchdogSettings::document();
14194 FileRecordingRequest::document();
14195 Feature::document();
14196 Featureset::document();
14197 Agc::document();
14198 RtpPayloadTypeTranslation::document();
14199 NetworkInterfaceDevice::document();
14200 ListOfNetworkInterfaceDevice::document();
14201 RtpHeader::document();
14202 BlobInfo::document();
14203 TxAudioUri::document();
14204 AdvancedTxParams::document();
14205 Identity::document();
14206 Location::document();
14207 Power::document();
14208 Connectivity::document();
14209 PresenceDescriptorGroupItem::document();
14210 PresenceDescriptor::document();
14211 NetworkTxOptions::document();
14212 TcpNetworkTxOptions::document();
14213 NetworkAddress::document();
14214 NetworkAddressRxTx::document();
14215 NetworkAddressRestrictionList::document();
14216 StringRestrictionList::document();
14217 Rallypoint::document();
14218 RallypointCluster::document();
14219 NetworkDeviceDescriptor::document();
14220 TxAudio::document();
14221 AudioDeviceDescriptor::document();
14222 ListOfAudioDeviceDescriptor::document();
14223 Audio::document();
14224 TalkerInformation::document();
14225 GroupTalkers::document();
14226 Presence::document();
14227 Advertising::document();
14228 GroupPriorityTranslation::document();
14229 GroupTimeline::document();
14230 GroupAppTransport::document();
14231 RtpProfile::document();
14232 Group::document();
14233 Mission::document();
14234 LicenseDescriptor::document();
14235 EngineNetworkingRpUdpStreaming::document();
14236 EnginePolicyNetworking::document();
14237 Aec::document();
14238 Vad::document();
14239 Bridge::document();
14240 AndroidAudio::document();
14241 EnginePolicyAudio::document();
14242 SecurityCertificate::document();
14243 EnginePolicySecurity::document();
14244 EnginePolicyLogging::document();
14245 EnginePolicyDatabase::document();
14246 NamedAudioDevice::document();
14247 EnginePolicyNamedAudioDevices::document();
14248 Licensing::document();
14249 DiscoveryMagellan::document();
14250 DiscoverySsdp::document();
14251 DiscoverySap::document();
14252 DiscoveryCistech::document();
14253 DiscoveryTrellisware::document();
14254 DiscoveryConfiguration::document();
14255 ApiCallPacingLaneSettings::document();
14256 ApiCallPacingSettings::document();
14257 EnginePolicyInternals::document();
14258 EnginePolicyTimelines::document();
14259 RtpMapEntry::document();
14260 ExternalModule::document();
14261 ExternalCodecDescriptor::document();
14262 EnginePolicy::document();
14263 TalkgroupAsset::document();
14264 EngageDiscoveredGroup::document();
14265 RallypointPeer::document();
14266 RallypointServerLimits::document();
14267 RallypointServerStatusReportConfiguration::document();
14268 RallypointServerLinkGraph::document();
14269 ExternalHealthCheckResponder::document();
14270 Tls::document();
14271 PeeringConfiguration::document();
14272 IgmpSnooping::document();
14273 RallypointReflector::document();
14274 RallypointUdpStreaming::document();
14275 RallypointServer::document();
14276 PlatformDiscoveredService::document();
14277 TimelineQueryParameters::document();
14278 CertStoreCertificate::document();
14279 CertStore::document();
14280 CertStoreCertificateElement::document();
14281 CertStoreDescriptor::document();
14282 CertificateDescriptor::document();
14283 BridgeCreationDetail::document();
14284 GroupConnectionDetail::document();
14285 GroupTxDetail::document();
14286 GroupCreationDetail::document();
14287 GroupReconfigurationDetail::document();
14288 GroupHealthReport::document();
14289 InboundProcessorStats::document();
14290 TrafficCounter::document();
14291 GroupStats::document();
14292 RallypointConnectionDetail::document();
14293 BridgingConfiguration::document();
14294 BridgingServerStatusReportConfiguration::document();
14295 BridgingServerInternals::document();
14296 RtiCloudSettings::document();
14297 BridgingServerConfiguration::document();
14298 EarGroupsConfiguration::document();
14299 EarServerStatusReportConfiguration::document();
14300 EarServerInternals::document();
14301 EarServerConfiguration::document();
14302 RangerPackets::document();
14303 TransportImpairment::document();
14304
14305 EngageSemGroupsConfiguration::document();
14306 EngageSemServerStatusReportConfiguration::document();
14307 EngageSemServerInternals::document();
14308 EngageSemServerConfiguration::document();
14309 }
14310}
14311
14312#ifndef WIN32
14313 #pragma GCC diagnostic pop
14314#endif
14315
14316#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.
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.
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)
NsmNode nsmNode
[Optional] Settings for embedded NSM node behavior.
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.
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] Time to wait before declaring an owned bridge unhealthy.
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.
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
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.
std::string domainName
Logical domain label for status and monitoring.
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.
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
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.
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 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
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
Optional HTTP POST upload for status report JSON.
std::string url
int timeoutSecs
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 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...