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