Engage Engine API  1.264.9127
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 hetNatoStanag5634 = 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
5007
5008 Tls()
5009 {
5010 clear();
5011 }
5012
5013 void clear()
5014 {
5015 verifyPeers = true;
5016 allowSelfSignedCertificates = false;
5017 caCertificates.clear();
5018 subjectRestrictions.clear();
5019 issuerRestrictions.clear();
5020 crlSerials.clear();
5021 useOsTrustStore = true;
5022 }
5023 };
5024
5025 static void to_json(nlohmann::json& j, const Tls& p)
5026 {
5027 j = nlohmann::json{
5028 TOJSON_IMPL(verifyPeers),
5029 TOJSON_IMPL(allowSelfSignedCertificates),
5030 TOJSON_IMPL(caCertificates),
5031 TOJSON_IMPL(subjectRestrictions),
5032 TOJSON_IMPL(issuerRestrictions),
5033 TOJSON_IMPL(crlSerials),
5034 TOJSON_IMPL(useOsTrustStore)
5035 };
5036 }
5037 static void from_json(const nlohmann::json& j, Tls& p)
5038 {
5039 p.clear();
5040 getOptional<bool>("verifyPeers", p.verifyPeers, j, true);
5041 getOptional<bool>("allowSelfSignedCertificates", p.allowSelfSignedCertificates, j, false);
5042 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
5043 getOptional<StringRestrictionList>("subjectRestrictions", p.subjectRestrictions, j);
5044 getOptional<StringRestrictionList>("issuerRestrictions", p.issuerRestrictions, j);
5045 getOptional<std::vector<std::string>>("crlSerials", p.crlSerials, j);
5046 getOptional<bool>("useOsTrustStore", p.useOsTrustStore, j, true);
5047 }
5048
5049 //-----------------------------------------------------------
5050 JSON_SERIALIZED_CLASS(RangerPackets)
5063 {
5064 IMPLEMENT_JSON_SERIALIZATION()
5065 IMPLEMENT_JSON_DOCUMENTATION(RangerPackets)
5066
5067 public:
5070
5073
5075 {
5076 clear();
5077 }
5078
5079 void clear()
5080 {
5081 hangTimerSecs = -1;
5082 count = 5;
5083 }
5084
5085 virtual void initForDocumenting()
5086 {
5087 }
5088 };
5089
5090 static void to_json(nlohmann::json& j, const RangerPackets& p)
5091 {
5092 j = nlohmann::json{
5093 TOJSON_IMPL(hangTimerSecs),
5094 TOJSON_IMPL(count)
5095 };
5096 }
5097 static void from_json(const nlohmann::json& j, RangerPackets& p)
5098 {
5099 p.clear();
5100 getOptional<int>("hangTimerSecs", p.hangTimerSecs, j, 11);
5101 getOptional<int>("count", p.count, j, 5);
5102 }
5103
5104 //-----------------------------------------------------------
5105 JSON_SERIALIZED_CLASS(Source)
5118 {
5119 IMPLEMENT_JSON_SERIALIZATION()
5120 IMPLEMENT_JSON_DOCUMENTATION(Source)
5121
5122 public:
5124 std::string nodeId;
5125
5126 /* NOTE: Not serialized ! */
5127 uint8_t _internal_binary_nodeId[ENGAGE_MAX_NODE_ID_SIZE];
5128
5130 std::string alias;
5131
5132 /* NOTE: Not serialized ! */
5133 uint8_t _internal_binary_alias[ENGAGE_MAX_ALIAS_SIZE];
5134
5135 Source()
5136 {
5137 clear();
5138 }
5139
5140 void clear()
5141 {
5142 nodeId.clear();
5143 memset(_internal_binary_nodeId, 0, sizeof(_internal_binary_nodeId));
5144
5145 alias.clear();
5146 memset(_internal_binary_alias, 0, sizeof(_internal_binary_alias));
5147 }
5148
5149 virtual void initForDocumenting()
5150 {
5151 }
5152 };
5153
5154 static void to_json(nlohmann::json& j, const Source& p)
5155 {
5156 j = nlohmann::json{
5157 TOJSON_IMPL(nodeId),
5158 TOJSON_IMPL(alias)
5159 };
5160 }
5161 static void from_json(const nlohmann::json& j, Source& p)
5162 {
5163 p.clear();
5164 FROMJSON_IMPL_SIMPLE(nodeId);
5165 FROMJSON_IMPL_SIMPLE(alias);
5166 }
5167
5168 //-----------------------------------------------------------
5169 JSON_SERIALIZED_CLASS(GroupBridgeTargetOutputDetail)
5182 {
5183 IMPLEMENT_JSON_SERIALIZATION()
5184 IMPLEMENT_JSON_DOCUMENTATION(GroupBridgeTargetOutputDetail)
5185
5186 public:
5188 typedef enum
5189 {
5193 bomRaw = 0,
5194
5197 bomMultistream = 1,
5198
5201 bomMixedStream = 2,
5202
5204 bomNone = 3
5205 } BridgingOpMode_t;
5206
5209
5212
5214 {
5215 clear();
5216 }
5217
5218 void clear()
5219 {
5220 mode = BridgingOpMode_t::bomRaw;
5221 mixedStreamTxParams.clear();
5222 }
5223
5224 virtual void initForDocumenting()
5225 {
5226 clear();
5227 }
5228 };
5229
5230 static void to_json(nlohmann::json& j, const GroupBridgeTargetOutputDetail& p)
5231 {
5232 j = nlohmann::json{
5233 TOJSON_IMPL(mode),
5234 TOJSON_IMPL(mixedStreamTxParams)
5235 };
5236 }
5237 static void from_json(const nlohmann::json& j, GroupBridgeTargetOutputDetail& p)
5238 {
5239 p.clear();
5240 FROMJSON_IMPL_SIMPLE(mode);
5241 FROMJSON_IMPL_SIMPLE(mixedStreamTxParams);
5242 }
5243
5244 //-----------------------------------------------------------
5245 JSON_SERIALIZED_CLASS(GroupDefaultAudioPriority)
5258 {
5259 IMPLEMENT_JSON_SERIALIZATION()
5260 IMPLEMENT_JSON_DOCUMENTATION(GroupDefaultAudioPriority)
5261
5262 public:
5264 uint8_t tx;
5265
5267 uint8_t rx;
5268
5270 {
5271 clear();
5272 }
5273
5274 void clear()
5275 {
5276 tx = 0;
5277 rx = 0;
5278 }
5279
5280 virtual void initForDocumenting()
5281 {
5282 clear();
5283 }
5284 };
5285
5286 static void to_json(nlohmann::json& j, const GroupDefaultAudioPriority& p)
5287 {
5288 j = nlohmann::json{
5289 TOJSON_IMPL(tx),
5290 TOJSON_IMPL(rx)
5291 };
5292 }
5293 static void from_json(const nlohmann::json& j, GroupDefaultAudioPriority& p)
5294 {
5295 p.clear();
5296 FROMJSON_IMPL_SIMPLE(tx);
5297 FROMJSON_IMPL_SIMPLE(rx);
5298 }
5299
5300 //-----------------------------------------------------------
5301 JSON_SERIALIZED_CLASS(Group)
5313 {
5314 IMPLEMENT_JSON_SERIALIZATION()
5315 IMPLEMENT_JSON_DOCUMENTATION(Group)
5316
5317 public:
5319 typedef enum
5320 {
5322 gtUnknown = 0,
5323
5325 gtAudio = 1,
5326
5328 gtPresence = 2,
5329
5331 gtRaw = 3
5332 } Type_t;
5333
5335 typedef enum
5336 {
5338 iagpAnonymousAlias = 0,
5339
5341 iagpSsrcInHex = 1
5342 } InboundAliasGenerationPolicy_t;
5343
5346
5349
5352
5359 std::string id;
5360
5362 std::string name;
5363
5365 std::string spokenName;
5366
5368 std::string interfaceName;
5369
5372
5375
5378
5381
5384
5386 std::string cryptoPassword;
5387
5390
5392 std::vector<Rallypoint> rallypoints;
5393
5396
5399
5408
5410 std::string alias;
5411
5414
5416 std::string source;
5417
5424
5427
5430
5433
5435 std::vector<std::string> presenceGroupAffinities;
5436
5439
5442
5444 std::vector<RtpPayloadTypeTranslation> inboundRtpPayloadTypeTranslations;
5445
5448
5451
5453 std::string anonymousAlias;
5454
5457
5460
5463
5466
5469
5472
5475
5477 std::vector<uint16_t> specializerAffinities;
5478
5481
5483 std::vector<Source> ignoreSources;
5484
5486 std::string languageCode;
5487
5489 std::string synVoice;
5490
5493
5496
5499
5502
5505
5508
5509 Group()
5510 {
5511 clear();
5512 }
5513
5514 void clear()
5515 {
5516 type = gtUnknown;
5517 bridgeTargetOutputDetail.clear();
5518 defaultAudioPriority.clear();
5519 id.clear();
5520 name.clear();
5521 spokenName.clear();
5522 interfaceName.clear();
5523 rx.clear();
5524 tx.clear();
5525 txOptions.clear();
5526 txAudio.clear();
5527 presence.clear();
5528 cryptoPassword.clear();
5529
5530 alias.clear();
5531
5532 rallypoints.clear();
5533 rallypointCluster.clear();
5534
5535 audio.clear();
5536 timeline.clear();
5537
5538 blockAdvertising = false;
5539
5540 source.clear();
5541
5542 maxRxSecs = 0;
5543
5544 enableMulticastFailover = false;
5545 multicastFailoverSecs = 10;
5546
5547 rtcpPresenceRx.clear();
5548
5549 presenceGroupAffinities.clear();
5550 disablePacketEvents = false;
5551
5552 rfc4733RtpPayloadId = 0;
5553 inboundRtpPayloadTypeTranslations.clear();
5554 priorityTranslation.clear();
5555
5556 stickyTidHangSecs = 10;
5557 anonymousAlias.clear();
5558 lbCrypto = false;
5559
5560 appTransport.clear();
5561 allowLoopback = false;
5562
5563 rtpProfile.clear();
5564 rangerPackets.clear();
5565
5566 _wasDeserialized_rtpProfile = false;
5567
5568 txImpairment.clear();
5569 rxImpairment.clear();
5570
5571 specializerAffinities.clear();
5572
5573 securityLevel = 0;
5574
5575 ignoreSources.clear();
5576
5577 languageCode.clear();
5578 synVoice.clear();
5579
5580 rxCapture.clear();
5581 txCapture.clear();
5582
5583 blobRtpPayloadType = ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE;
5584 inboundAliasGenerationPolicy = iagpAnonymousAlias;
5585 gateIn.clear();
5586
5587 ignoreAudioTraffic = false;
5588 }
5589 };
5590
5591 static void to_json(nlohmann::json& j, const Group& p)
5592 {
5593 j = nlohmann::json{
5594 TOJSON_IMPL(type),
5595 TOJSON_IMPL(bridgeTargetOutputDetail),
5596 TOJSON_IMPL(defaultAudioPriority),
5597 TOJSON_IMPL(id),
5598 TOJSON_IMPL(name),
5599 TOJSON_IMPL(spokenName),
5600 TOJSON_IMPL(interfaceName),
5601 TOJSON_IMPL(rx),
5602 TOJSON_IMPL(tx),
5603 TOJSON_IMPL(txOptions),
5604 TOJSON_IMPL(txAudio),
5605 TOJSON_IMPL(presence),
5606 TOJSON_IMPL(cryptoPassword),
5607 TOJSON_IMPL(alias),
5608
5609 // See below
5610 //TOJSON_IMPL(rallypoints),
5611 //TOJSON_IMPL(rallypointCluster),
5612
5613 TOJSON_IMPL(alias),
5614 TOJSON_IMPL(audio),
5615 TOJSON_IMPL(timeline),
5616 TOJSON_IMPL(blockAdvertising),
5617 TOJSON_IMPL(source),
5618 TOJSON_IMPL(maxRxSecs),
5619 TOJSON_IMPL(enableMulticastFailover),
5620 TOJSON_IMPL(multicastFailoverSecs),
5621 TOJSON_IMPL(rtcpPresenceRx),
5622 TOJSON_IMPL(presenceGroupAffinities),
5623 TOJSON_IMPL(disablePacketEvents),
5624 TOJSON_IMPL(rfc4733RtpPayloadId),
5625 TOJSON_IMPL(inboundRtpPayloadTypeTranslations),
5626 TOJSON_IMPL(priorityTranslation),
5627 TOJSON_IMPL(stickyTidHangSecs),
5628 TOJSON_IMPL(anonymousAlias),
5629 TOJSON_IMPL(lbCrypto),
5630 TOJSON_IMPL(appTransport),
5631 TOJSON_IMPL(allowLoopback),
5632 TOJSON_IMPL(rangerPackets),
5633
5634 TOJSON_IMPL(txImpairment),
5635 TOJSON_IMPL(rxImpairment),
5636
5637 TOJSON_IMPL(specializerAffinities),
5638
5639 TOJSON_IMPL(securityLevel),
5640
5641 TOJSON_IMPL(ignoreSources),
5642
5643 TOJSON_IMPL(languageCode),
5644 TOJSON_IMPL(synVoice),
5645
5646 TOJSON_IMPL(rxCapture),
5647 TOJSON_IMPL(txCapture),
5648
5649 TOJSON_IMPL(blobRtpPayloadType),
5650
5651 TOJSON_IMPL(inboundAliasGenerationPolicy),
5652
5653 TOJSON_IMPL(gateIn),
5654
5655 TOJSON_IMPL(ignoreAudioTraffic)
5656 };
5657
5658 TOJSON_BASE_IMPL();
5659
5660 // TODO: need a better way to indicate whether rtpProfile is present
5661 if(p._wasDeserialized_rtpProfile || p.isDocumenting())
5662 {
5663 j["rtpProfile"] = p.rtpProfile;
5664 }
5665
5666 if(p.isDocumenting())
5667 {
5668 j["rallypointCluster"] = p.rallypointCluster;
5669 j["rallypoints"] = p.rallypoints;
5670 }
5671 else
5672 {
5673 // rallypointCluster takes precedence if it has elements
5674 if(!p.rallypointCluster.rallypoints.empty())
5675 {
5676 j["rallypointCluster"] = p.rallypointCluster;
5677 }
5678 else if(!p.rallypoints.empty())
5679 {
5680 j["rallypoints"] = p.rallypoints;
5681 }
5682 }
5683 }
5684 static void from_json(const nlohmann::json& j, Group& p)
5685 {
5686 p.clear();
5687 j.at("type").get_to(p.type);
5688 getOptional<GroupBridgeTargetOutputDetail>("bridgeTargetOutputDetail", p.bridgeTargetOutputDetail, j);
5689 j.at("id").get_to(p.id);
5690 getOptional<std::string>("name", p.name, j);
5691 getOptional<std::string>("spokenName", p.spokenName, j);
5692 getOptional<std::string>("interfaceName", p.interfaceName, j);
5693 getOptional<NetworkAddress>("rx", p.rx, j);
5694 getOptional<NetworkAddress>("tx", p.tx, j);
5695 getOptional<NetworkTxOptions>("txOptions", p.txOptions, j);
5696 getOptional<std::string>("cryptoPassword", p.cryptoPassword, j);
5697 getOptional<std::string>("alias", p.alias, j);
5698 getOptional<TxAudio>("txAudio", p.txAudio, j);
5699 getOptional<Presence>("presence", p.presence, j);
5700 getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
5701 getOptional<RallypointCluster>("rallypointCluster", p.rallypointCluster, j);
5702 getOptional<Audio>("audio", p.audio, j);
5703 getOptional<GroupTimeline>("timeline", p.timeline, j);
5704 getOptional<bool>("blockAdvertising", p.blockAdvertising, j, false);
5705 getOptional<std::string>("source", p.source, j);
5706 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
5707 getOptional<bool>("enableMulticastFailover", p.enableMulticastFailover, j, false);
5708 getOptional<int>("multicastFailoverSecs", p.multicastFailoverSecs, j, 10);
5709 getOptional<NetworkAddress>("rtcpPresenceRx", p.rtcpPresenceRx, j);
5710 getOptional<std::vector<std::string>>("presenceGroupAffinities", p.presenceGroupAffinities, j);
5711 getOptional<bool>("disablePacketEvents", p.disablePacketEvents, j, false);
5712 getOptional<int>("rfc4733RtpPayloadId", p.rfc4733RtpPayloadId, j, 0);
5713 getOptional<std::vector<RtpPayloadTypeTranslation>>("inboundRtpPayloadTypeTranslations", p.inboundRtpPayloadTypeTranslations, j);
5714 getOptional<GroupPriorityTranslation>("priorityTranslation", p.priorityTranslation, j);
5715 getOptional<GroupDefaultAudioPriority>("defaultAudioPriority", p.defaultAudioPriority, j);
5716 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
5717 getOptional<std::string>("anonymousAlias", p.anonymousAlias, j);
5718 getOptional<bool>("lbCrypto", p.lbCrypto, j, false);
5719 getOptional<GroupAppTransport>("appTransport", p.appTransport, j);
5720 getOptional<bool>("allowLoopback", p.allowLoopback, j, false);
5721 getOptionalWithIndicator<RtpProfile>("rtpProfile", p.rtpProfile, j, &p._wasDeserialized_rtpProfile);
5722 getOptional<RangerPackets>("rangerPackets", p.rangerPackets, j);
5723 getOptional<TransportImpairment>("txImpairment", p.txImpairment, j);
5724 getOptional<TransportImpairment>("rxImpairment", p.rxImpairment, j);
5725 getOptional<std::vector<uint16_t>>("specializerAffinities", p.specializerAffinities, j);
5726 getOptional<uint32_t>("securityLevel", p.securityLevel, j, 0);
5727 getOptional<std::vector<Source>>("ignoreSources", p.ignoreSources, j);
5728 getOptional<std::string>("languageCode", p.languageCode, j);
5729 getOptional<std::string>("synVoice", p.synVoice, j);
5730
5731 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
5732 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
5733
5734 getOptional<uint16_t>("blobRtpPayloadType", p.blobRtpPayloadType, j, ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE);
5735
5736 getOptional<Group::InboundAliasGenerationPolicy_t>("inboundAliasGenerationPolicy", p.inboundAliasGenerationPolicy, j, Group::InboundAliasGenerationPolicy_t::iagpAnonymousAlias);
5737
5738 getOptional<AudioGate>("gateIn", p.gateIn, j);
5739
5740 getOptional<bool>("ignoreAudioTraffic", p.ignoreAudioTraffic, j, false);
5741
5742 FROMJSON_BASE_IMPL();
5743 }
5744
5745
5746 //-----------------------------------------------------------
5747 JSON_SERIALIZED_CLASS(Mission)
5749 {
5750 IMPLEMENT_JSON_SERIALIZATION()
5751 IMPLEMENT_JSON_DOCUMENTATION(Mission)
5752
5753 public:
5754 std::string id;
5755 std::string name;
5756 std::vector<Group> groups;
5757 std::chrono::system_clock::time_point begins;
5758 std::chrono::system_clock::time_point ends;
5759 std::string certStoreId;
5760 int multicastFailoverPolicy;
5761 Rallypoint rallypoint;
5762
5763 void clear()
5764 {
5765 id.clear();
5766 name.clear();
5767 groups.clear();
5768 certStoreId.clear();
5769 multicastFailoverPolicy = 0;
5770 rallypoint.clear();
5771 }
5772 };
5773
5774 static void to_json(nlohmann::json& j, const Mission& p)
5775 {
5776 j = nlohmann::json{
5777 TOJSON_IMPL(id),
5778 TOJSON_IMPL(name),
5779 TOJSON_IMPL(groups),
5780 TOJSON_IMPL(certStoreId),
5781 TOJSON_IMPL(multicastFailoverPolicy),
5782 TOJSON_IMPL(rallypoint)
5783 };
5784 }
5785
5786 static void from_json(const nlohmann::json& j, Mission& p)
5787 {
5788 p.clear();
5789 j.at("id").get_to(p.id);
5790 j.at("name").get_to(p.name);
5791
5792 // Groups are optional
5793 try
5794 {
5795 j.at("groups").get_to(p.groups);
5796 }
5797 catch(...)
5798 {
5799 p.groups.clear();
5800 }
5801
5802 FROMJSON_IMPL(certStoreId, std::string, EMPTY_STRING);
5803 FROMJSON_IMPL(multicastFailoverPolicy, int, 0);
5804 getOptional<Rallypoint>("rallypoint", p.rallypoint, j);
5805 }
5806
5807 //-----------------------------------------------------------
5808 JSON_SERIALIZED_CLASS(LicenseDescriptor)
5819 {
5820 IMPLEMENT_JSON_SERIALIZATION()
5821 IMPLEMENT_JSON_DOCUMENTATION(LicenseDescriptor)
5822
5823 public:
5829 static const int STATUS_OK = 0;
5830 static const int ERR_NULL_ENTITLEMENT_KEY = -1;
5831 static const int ERR_NULL_LICENSE_KEY = -2;
5832 static const int ERR_INVALID_LICENSE_KEY_LEN = -3;
5833 static const int ERR_LICENSE_KEY_VERIFICATION_FAILURE = -4;
5834 static const int ERR_ACTIVATION_CODE_VERIFICATION_FAILURE = -5;
5835 static const int ERR_INVALID_EXPIRATION_DATE = -6;
5836 static const int ERR_GENERAL_FAILURE = -7;
5837 static const int ERR_NOT_INITIALIZED = -8;
5838 static const int ERR_REQUIRES_ACTIVATION = -9;
5839 static const int ERR_LICENSE_NOT_SUITED_FOR_ACTIVATION = -10;
5847 static const uint8_t LIC_CARGO_FLAG_LIMIT_TO_FEATURES = 0x01;
5858 std::string entitlement;
5859
5866 std::string key;
5867
5869 std::string activationCode;
5870
5872 std::string deviceId;
5873
5875 int type;
5876
5878 time_t expires;
5879
5881 std::string expiresFormatted;
5882
5887 uint32_t flags;
5888
5890 std::string cargo;
5891
5893 uint8_t cargoFlags;
5894
5900
5902 std::string manufacturerId;
5903
5905 std::string activationHmac;
5906
5908 {
5909 clear();
5910 }
5911
5912 void clear()
5913 {
5914 entitlement.clear();
5915 key.clear();
5916 activationCode.clear();
5917 type = 0;
5918 expires = 0;
5919 expiresFormatted.clear();
5920 flags = 0;
5921 cargo.clear();
5922 cargoFlags = 0;
5923 deviceId.clear();
5924 status = ERR_NOT_INITIALIZED;
5925 manufacturerId.clear();
5926 activationHmac.clear();
5927 }
5928 };
5929
5930 static void to_json(nlohmann::json& j, const LicenseDescriptor& p)
5931 {
5932 j = nlohmann::json{
5933 //TOJSON_IMPL(entitlement),
5934 {"entitlement", "*entitlement*"},
5935 TOJSON_IMPL(key),
5936 TOJSON_IMPL(activationCode),
5937 TOJSON_IMPL(type),
5938 TOJSON_IMPL(expires),
5939 TOJSON_IMPL(expiresFormatted),
5940 TOJSON_IMPL(flags),
5941 TOJSON_IMPL(deviceId),
5942 TOJSON_IMPL(status),
5943 //TOJSON_IMPL(manufacturerId),
5944 {"manufacturerId", "*manufacturerId*"},
5945 TOJSON_IMPL(cargo),
5946 TOJSON_IMPL(cargoFlags),
5947 TOJSON_IMPL(activationHmac)
5948 };
5949 }
5950
5951 static void from_json(const nlohmann::json& j, LicenseDescriptor& p)
5952 {
5953 p.clear();
5954 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
5955 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
5956 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
5957 FROMJSON_IMPL(type, int, 0);
5958 FROMJSON_IMPL(expires, time_t, 0);
5959 FROMJSON_IMPL(expiresFormatted, std::string, EMPTY_STRING);
5960 FROMJSON_IMPL(flags, uint32_t, 0);
5961 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
5962 FROMJSON_IMPL(status, int, LicenseDescriptor::ERR_NOT_INITIALIZED);
5963 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
5964 FROMJSON_IMPL(cargo, std::string, EMPTY_STRING);
5965 FROMJSON_IMPL(cargoFlags, uint8_t, 0);
5966 FROMJSON_IMPL(activationHmac, std::string, EMPTY_STRING);
5967 }
5968
5969
5970 //-----------------------------------------------------------
5971 JSON_SERIALIZED_CLASS(EngineNetworkingRpUdpStreaming)
5984 {
5985 IMPLEMENT_JSON_SERIALIZATION()
5986 IMPLEMENT_JSON_DOCUMENTATION(EngineNetworkingRpUdpStreaming)
5987
5988 public:
5991
5993 int port;
5994
5997
6000
6002 int ttl;
6003
6005 {
6006 clear();
6007 }
6008
6009 void clear()
6010 {
6011 enabled = false;
6012 port = 0;
6013 keepaliveIntervalSecs = 15;
6014 priority = TxPriority_t::priVoice;
6015 ttl = 64;
6016 }
6017
6018 virtual void initForDocumenting()
6019 {
6020 }
6021 };
6022
6023 static void to_json(nlohmann::json& j, const EngineNetworkingRpUdpStreaming& p)
6024 {
6025 j = nlohmann::json{
6026 TOJSON_IMPL(enabled),
6027 TOJSON_IMPL(port),
6028 TOJSON_IMPL(keepaliveIntervalSecs),
6029 TOJSON_IMPL(priority),
6030 TOJSON_IMPL(ttl)
6031 };
6032 }
6033 static void from_json(const nlohmann::json& j, EngineNetworkingRpUdpStreaming& p)
6034 {
6035 p.clear();
6036 getOptional<bool>("enabled", p.enabled, j, false);
6037 getOptional<int>("port", p.port, j, 0);
6038 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
6039 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
6040 getOptional<int>("ttl", p.ttl, j, 64);
6041 }
6042
6043 //-----------------------------------------------------------
6044 JSON_SERIALIZED_CLASS(EnginePolicyNetworking)
6054 {
6055 IMPLEMENT_JSON_SERIALIZATION()
6056 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNetworking)
6057
6058 public:
6060 std::string defaultNic;
6061
6064
6067
6070
6073
6076
6079
6082
6085
6087 {
6088 clear();
6089 }
6090
6091 void clear()
6092 {
6093 defaultNic.clear();
6094 multicastRejoinSecs = 8;
6095 rallypointRtTestIntervalMs = 60000;
6096 logRtpJitterBufferStats = false;
6097 preventMulticastFailover = false;
6098 addressResolutionPolicy = AddressResolutionPolicy_t::arpIpv6ThenIpv4;
6099 requireMulticast = true;
6100 rpUdpStreaming.clear();
6101 rtpProfile.clear();
6102 }
6103 };
6104
6105 static void to_json(nlohmann::json& j, const EnginePolicyNetworking& p)
6106 {
6107 j = nlohmann::json{
6108 TOJSON_IMPL(defaultNic),
6109 TOJSON_IMPL(multicastRejoinSecs),
6110
6111 TOJSON_IMPL(rallypointRtTestIntervalMs),
6112 TOJSON_IMPL(logRtpJitterBufferStats),
6113 TOJSON_IMPL(preventMulticastFailover),
6114 TOJSON_IMPL(requireMulticast),
6115 TOJSON_IMPL(rpUdpStreaming),
6116 TOJSON_IMPL(rtpProfile),
6117 TOJSON_IMPL(addressResolutionPolicy)
6118 };
6119 }
6120 static void from_json(const nlohmann::json& j, EnginePolicyNetworking& p)
6121 {
6122 p.clear();
6123 FROMJSON_IMPL(defaultNic, std::string, EMPTY_STRING);
6124 FROMJSON_IMPL(multicastRejoinSecs, int, 8);
6125 FROMJSON_IMPL(rallypointRtTestIntervalMs, int, 60000);
6126 FROMJSON_IMPL(logRtpJitterBufferStats, bool, false);
6127 FROMJSON_IMPL(preventMulticastFailover, bool, false);
6128 FROMJSON_IMPL(requireMulticast, bool, true);
6129 getOptional<EngineNetworkingRpUdpStreaming>("rpUdpStreaming", p.rpUdpStreaming, j);
6130 getOptional<RtpProfile>("rtpProfile", p.rtpProfile, j);
6131 getOptional<AddressResolutionPolicy_t>("addressResolutionPolicy", p.addressResolutionPolicy, j, AddressResolutionPolicy_t::arpIpv6ThenIpv4);
6132 }
6133
6134 //-----------------------------------------------------------
6135 JSON_SERIALIZED_CLASS(Aec)
6146 {
6147 IMPLEMENT_JSON_SERIALIZATION()
6148 IMPLEMENT_JSON_DOCUMENTATION(Aec)
6149
6150 public:
6156 typedef enum
6157 {
6159 aecmDefault = 0,
6160
6162 aecmLow = 1,
6163
6165 aecmMedium = 2,
6166
6168 aecmHigh = 3,
6169
6171 aecmVeryHigh = 4,
6172
6174 aecmHighest = 5
6175 } Mode_t;
6176
6179
6182
6185
6187 bool cng;
6188
6189 Aec()
6190 {
6191 clear();
6192 }
6193
6194 void clear()
6195 {
6196 enabled = false;
6197 mode = aecmDefault;
6198 speakerTailMs = 60;
6199 cng = true;
6200 }
6201 };
6202
6203 static void to_json(nlohmann::json& j, const Aec& p)
6204 {
6205 j = nlohmann::json{
6206 TOJSON_IMPL(enabled),
6207 TOJSON_IMPL(mode),
6208 TOJSON_IMPL(speakerTailMs),
6209 TOJSON_IMPL(cng)
6210 };
6211 }
6212 static void from_json(const nlohmann::json& j, Aec& p)
6213 {
6214 p.clear();
6215 FROMJSON_IMPL(enabled, bool, false);
6216 FROMJSON_IMPL(mode, Aec::Mode_t, Aec::Mode_t::aecmDefault);
6217 FROMJSON_IMPL(speakerTailMs, int, 60);
6218 FROMJSON_IMPL(cng, bool, true);
6219 }
6220
6221 //-----------------------------------------------------------
6222 JSON_SERIALIZED_CLASS(Vad)
6233 {
6234 IMPLEMENT_JSON_SERIALIZATION()
6235 IMPLEMENT_JSON_DOCUMENTATION(Vad)
6236
6237 public:
6243 typedef enum
6244 {
6246 vamDefault = 0,
6247
6249 vamLowBitRate = 1,
6250
6252 vamAggressive = 2,
6253
6255 vamVeryAggressive = 3
6256 } Mode_t;
6257
6260
6263
6264 Vad()
6265 {
6266 clear();
6267 }
6268
6269 void clear()
6270 {
6271 enabled = false;
6272 mode = vamDefault;
6273 }
6274 };
6275
6276 static void to_json(nlohmann::json& j, const Vad& p)
6277 {
6278 j = nlohmann::json{
6279 TOJSON_IMPL(enabled),
6280 TOJSON_IMPL(mode)
6281 };
6282 }
6283 static void from_json(const nlohmann::json& j, Vad& p)
6284 {
6285 p.clear();
6286 FROMJSON_IMPL(enabled, bool, false);
6287 FROMJSON_IMPL(mode, Vad::Mode_t, Vad::Mode_t::vamDefault);
6288 }
6289
6290 //-----------------------------------------------------------
6291 JSON_SERIALIZED_CLASS(Bridge)
6302 {
6303 IMPLEMENT_JSON_SERIALIZATION()
6304 IMPLEMENT_JSON_DOCUMENTATION(Bridge)
6305
6306 public:
6308 std::string id;
6309
6311 std::string name;
6312
6314 std::vector<std::string> groups;
6315
6320
6323
6324
6325 Bridge()
6326 {
6327 clear();
6328 }
6329
6330 void clear()
6331 {
6332 id.clear();
6333 name.clear();
6334 groups.clear();
6335 enabled = true;
6336 active = true;
6337 }
6338 };
6339
6340 static void to_json(nlohmann::json& j, const Bridge& p)
6341 {
6342 j = nlohmann::json{
6343 TOJSON_IMPL(id),
6344 TOJSON_IMPL(name),
6345 TOJSON_IMPL(groups),
6346 TOJSON_IMPL(enabled),
6347 TOJSON_IMPL(active)
6348 };
6349 }
6350 static void from_json(const nlohmann::json& j, Bridge& p)
6351 {
6352 p.clear();
6353 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
6354 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
6355 getOptional<std::vector<std::string>>("groups", p.groups, j);
6356 FROMJSON_IMPL(enabled, bool, true);
6357 FROMJSON_IMPL(active, bool, true);
6358 }
6359
6360 //-----------------------------------------------------------
6361 JSON_SERIALIZED_CLASS(AndroidAudio)
6372 {
6373 IMPLEMENT_JSON_SERIALIZATION()
6374 IMPLEMENT_JSON_DOCUMENTATION(AndroidAudio)
6375
6376 public:
6377 constexpr static int INVALID_SESSION_ID = -9999;
6378
6380 int api;
6381
6384
6387
6403
6411
6421
6424
6427
6428
6429 AndroidAudio()
6430 {
6431 clear();
6432 }
6433
6434 void clear()
6435 {
6436 api = 0;
6437 sharingMode = 0;
6438 performanceMode = 12;
6439 usage = 2;
6440 contentType = 1;
6441 inputPreset = 7;
6442 sessionId = AndroidAudio::INVALID_SESSION_ID;
6443 engineMode = 0;
6444 }
6445 };
6446
6447 static void to_json(nlohmann::json& j, const AndroidAudio& p)
6448 {
6449 j = nlohmann::json{
6450 TOJSON_IMPL(api),
6451 TOJSON_IMPL(sharingMode),
6452 TOJSON_IMPL(performanceMode),
6453 TOJSON_IMPL(usage),
6454 TOJSON_IMPL(contentType),
6455 TOJSON_IMPL(inputPreset),
6456 TOJSON_IMPL(sessionId),
6457 TOJSON_IMPL(engineMode)
6458 };
6459 }
6460 static void from_json(const nlohmann::json& j, AndroidAudio& p)
6461 {
6462 p.clear();
6463 FROMJSON_IMPL(api, int, 0);
6464 FROMJSON_IMPL(sharingMode, int, 0);
6465 FROMJSON_IMPL(performanceMode, int, 12);
6466 FROMJSON_IMPL(usage, int, 2);
6467 FROMJSON_IMPL(contentType, int, 1);
6468 FROMJSON_IMPL(inputPreset, int, 7);
6469 FROMJSON_IMPL(sessionId, int, AndroidAudio::INVALID_SESSION_ID);
6470 FROMJSON_IMPL(engineMode, int, 0);
6471 }
6472
6473 //-----------------------------------------------------------
6474 JSON_SERIALIZED_CLASS(Denoiser)
6486 {
6487 IMPLEMENT_JSON_SERIALIZATION()
6488 IMPLEMENT_JSON_DOCUMENTATION(Denoiser)
6489
6490 public:
6492 float mix;
6493
6495 std::string model;
6496
6498 float vadGate;
6499
6500 Denoiser()
6501 {
6502 clear();
6503 }
6504
6505 void clear()
6506 {
6507 mix = 1.0f;
6508 model.clear();
6509 vadGate = 0.0f;
6510 }
6511 };
6512
6513 static void to_json(nlohmann::json& j, const Denoiser& p)
6514 {
6515 j = nlohmann::json{
6516 TOJSON_IMPL(mix),
6517 TOJSON_IMPL(model),
6518 TOJSON_IMPL(vadGate)
6519 };
6520 }
6521 static void from_json(const nlohmann::json& j, Denoiser& p)
6522 {
6523 p.clear();
6524 FROMJSON_IMPL(mix, float, 1.0f);
6525 FROMJSON_IMPL(model, std::string, "");
6526 FROMJSON_IMPL(vadGate, float, 0.0f);
6527 }
6528
6529 //-----------------------------------------------------------
6530 JSON_SERIALIZED_CLASS(EnginePolicyAudio)
6541 {
6542 IMPLEMENT_JSON_SERIALIZATION()
6543 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyAudio)
6544
6545 public:
6548
6551
6554
6557
6560
6563
6566
6569
6572
6575
6578
6581
6584
6587
6590
6593
6594
6596 {
6597 clear();
6598 }
6599
6600 void clear()
6601 {
6602 enabled = true;
6603 hardwareEnabled = true;
6604 internalRate = 16000;
6605 internalChannels = 2;
6606 muteTxOnTx = false;
6607 aec.clear();
6608 vad.clear();
6609 android.clear();
6610 inputAgc.clear();
6611 outputAgc.clear();
6612 denoiseInput = false;
6613 denoiseOutput = false;
6614 denoiser.clear();
6615 saveInputPcm = false;
6616 saveOutputPcm = false;
6617 registry.clear();
6618 }
6619 };
6620
6621 static void to_json(nlohmann::json& j, const EnginePolicyAudio& p)
6622 {
6623 j = nlohmann::json{
6624 TOJSON_IMPL(enabled),
6625 TOJSON_IMPL(hardwareEnabled),
6626 TOJSON_IMPL(internalRate),
6627 TOJSON_IMPL(internalChannels),
6628 TOJSON_IMPL(muteTxOnTx),
6629 TOJSON_IMPL(aec),
6630 TOJSON_IMPL(vad),
6631 TOJSON_IMPL(android),
6632 TOJSON_IMPL(inputAgc),
6633 TOJSON_IMPL(outputAgc),
6634 TOJSON_IMPL(denoiseInput),
6635 TOJSON_IMPL(denoiseOutput),
6636 TOJSON_IMPL(denoiser),
6637 TOJSON_IMPL(saveInputPcm),
6638 TOJSON_IMPL(saveOutputPcm),
6639 TOJSON_IMPL(registry)
6640 };
6641 }
6642 static void from_json(const nlohmann::json& j, EnginePolicyAudio& p)
6643 {
6644 p.clear();
6645 getOptional<bool>("enabled", p.enabled, j, true);
6646 getOptional<bool>("hardwareEnabled", p.hardwareEnabled, j, true);
6647 FROMJSON_IMPL(internalRate, int, 16000);
6648 FROMJSON_IMPL(internalChannels, int, 2);
6649
6650 FROMJSON_IMPL(muteTxOnTx, bool, false);
6651 getOptional<Aec>("aec", p.aec, j);
6652 getOptional<Vad>("vad", p.vad, j);
6653 getOptional<AndroidAudio>("android", p.android, j);
6654 getOptional<Agc>("inputAgc", p.inputAgc, j);
6655 getOptional<Agc>("outputAgc", p.outputAgc, j);
6656 FROMJSON_IMPL(denoiseInput, bool, false);
6657 FROMJSON_IMPL(denoiseOutput, bool, false);
6658 getOptional<Denoiser>("denoiser", p.denoiser, j);
6659 FROMJSON_IMPL(saveInputPcm, bool, false);
6660 FROMJSON_IMPL(saveOutputPcm, bool, false);
6661 getOptional<AudioRegistry>("registry", p.registry, j);
6662 }
6663
6664 //-----------------------------------------------------------
6665 JSON_SERIALIZED_CLASS(SecurityCertificate)
6676 {
6677 IMPLEMENT_JSON_SERIALIZATION()
6678 IMPLEMENT_JSON_DOCUMENTATION(SecurityCertificate)
6679
6680 public:
6681
6687 std::string certificate;
6688
6690 std::string key;
6691
6693 {
6694 clear();
6695 }
6696
6697 void clear()
6698 {
6699 certificate.clear();
6700 key.clear();
6701 }
6702 };
6703
6704 static void to_json(nlohmann::json& j, const SecurityCertificate& p)
6705 {
6706 j = nlohmann::json{
6707 TOJSON_IMPL(certificate),
6708 TOJSON_IMPL(key)
6709 };
6710 }
6711 static void from_json(const nlohmann::json& j, SecurityCertificate& p)
6712 {
6713 p.clear();
6714 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
6715 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
6716 }
6717
6718 // This is where spell checking stops
6719 //-----------------------------------------------------------
6720 JSON_SERIALIZED_CLASS(EnginePolicySecurity)
6721
6722
6732 {
6733 IMPLEMENT_JSON_SERIALIZATION()
6734 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicySecurity)
6735
6736 public:
6737
6749
6757 std::vector<std::string> caCertificates;
6758
6765
6767 {
6768 clear();
6769 }
6770
6771 void clear()
6772 {
6773 certificate.clear();
6774 caCertificates.clear();
6775 useOsTrustStore = true;
6776 }
6777 };
6778
6779 static void to_json(nlohmann::json& j, const EnginePolicySecurity& p)
6780 {
6781 j = nlohmann::json{
6782 TOJSON_IMPL(certificate),
6783 TOJSON_IMPL(caCertificates),
6784 TOJSON_IMPL(useOsTrustStore)
6785 };
6786 }
6787 static void from_json(const nlohmann::json& j, EnginePolicySecurity& p)
6788 {
6789 p.clear();
6790 getOptional("certificate", p.certificate, j);
6791 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
6792 getOptional<bool>("useOsTrustStore", p.useOsTrustStore, j, true);
6793 }
6794
6795 //-----------------------------------------------------------
6796 JSON_SERIALIZED_CLASS(EnginePolicyLogging)
6807 {
6808 IMPLEMENT_JSON_SERIALIZATION()
6809 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyLogging)
6810
6811 public:
6812
6829
6832
6834 {
6835 clear();
6836 }
6837
6838 void clear()
6839 {
6840 maxLevel = 4; // ILogger::Level::debug
6841 enableSyslog = false;
6842 }
6843 };
6844
6845 static void to_json(nlohmann::json& j, const EnginePolicyLogging& p)
6846 {
6847 j = nlohmann::json{
6848 TOJSON_IMPL(maxLevel),
6849 TOJSON_IMPL(enableSyslog)
6850 };
6851 }
6852 static void from_json(const nlohmann::json& j, EnginePolicyLogging& p)
6853 {
6854 p.clear();
6855 getOptional("maxLevel", p.maxLevel, j, 4); // ILogger::Level::debug
6856 getOptional("enableSyslog", p.enableSyslog, j);
6857 }
6858
6859
6860 //-----------------------------------------------------------
6861 JSON_SERIALIZED_CLASS(EnginePolicyDatabase)
6863 {
6864 IMPLEMENT_JSON_SERIALIZATION()
6865 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyDatabase)
6866
6867 public:
6868 typedef enum
6869 {
6870 dbtFixedMemory = 0,
6871 dbtPagedMemory = 1,
6872 dbtFixedFile = 2
6873 } DatabaseType_t;
6874
6875 DatabaseType_t type;
6876 std::string fixedFileName;
6877 bool forceMaintenance;
6878 bool reclaimSpace;
6879
6881 {
6882 clear();
6883 }
6884
6885 void clear()
6886 {
6887 type = DatabaseType_t::dbtFixedMemory;
6888 fixedFileName.clear();
6889 forceMaintenance = false;
6890 reclaimSpace = false;
6891 }
6892 };
6893
6894 static void to_json(nlohmann::json& j, const EnginePolicyDatabase& p)
6895 {
6896 j = nlohmann::json{
6897 TOJSON_IMPL(type),
6898 TOJSON_IMPL(fixedFileName),
6899 TOJSON_IMPL(forceMaintenance),
6900 TOJSON_IMPL(reclaimSpace)
6901 };
6902 }
6903 static void from_json(const nlohmann::json& j, EnginePolicyDatabase& p)
6904 {
6905 p.clear();
6906 FROMJSON_IMPL(type, EnginePolicyDatabase::DatabaseType_t, EnginePolicyDatabase::DatabaseType_t::dbtFixedMemory);
6907 FROMJSON_IMPL(fixedFileName, std::string, EMPTY_STRING);
6908 FROMJSON_IMPL(forceMaintenance, bool, false);
6909 FROMJSON_IMPL(reclaimSpace, bool, false);
6910 }
6911
6912
6913 //-----------------------------------------------------------
6914 JSON_SERIALIZED_CLASS(SecureSignature)
6923 {
6924 IMPLEMENT_JSON_SERIALIZATION()
6925 IMPLEMENT_JSON_DOCUMENTATION(SecureSignature)
6926
6927 public:
6928
6930 std::string certificate;
6931
6932 // /** @brief Contains the PEM-formatted text of the certificate's public key */
6933 //std::string publicKey;
6934
6936 std::string signature;
6937
6939 {
6940 clear();
6941 }
6942
6943 void clear()
6944 {
6945 certificate.clear();
6946 //publicKey.clear();
6947 signature.clear();
6948 }
6949 };
6950
6951 static void to_json(nlohmann::json& j, const SecureSignature& p)
6952 {
6953 j = nlohmann::json{
6954 TOJSON_IMPL(certificate),
6955 //TOJSON_IMPL(publicKey),
6956 TOJSON_IMPL(signature)
6957 };
6958 }
6959 static void from_json(const nlohmann::json& j, SecureSignature& p)
6960 {
6961 p.clear();
6962 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
6963 //FROMJSON_IMPL(publicKey, std::string, EMPTY_STRING);
6964 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
6965 }
6966
6967 //-----------------------------------------------------------
6968 JSON_SERIALIZED_CLASS(NamedAudioDevice)
6970 {
6971 IMPLEMENT_JSON_SERIALIZATION()
6972 IMPLEMENT_JSON_DOCUMENTATION(NamedAudioDevice)
6973
6974 public:
6975 std::string name;
6976 std::string manufacturer;
6977 std::string model;
6978 std::string id;
6979 std::string serialNumber;
6980 std::string type;
6981 std::string extra;
6982 bool isDefault;
6983
6985 {
6986 clear();
6987 }
6988
6989 void clear()
6990 {
6991 name.clear();
6992 manufacturer.clear();
6993 model.clear();
6994 id.clear();
6995 serialNumber.clear();
6996 type.clear();
6997 extra.clear();
6998 isDefault = false;
6999 }
7000 };
7001
7002 static void to_json(nlohmann::json& j, const NamedAudioDevice& p)
7003 {
7004 j = nlohmann::json{
7005 TOJSON_IMPL(name),
7006 TOJSON_IMPL(manufacturer),
7007 TOJSON_IMPL(model),
7008 TOJSON_IMPL(id),
7009 TOJSON_IMPL(serialNumber),
7010 TOJSON_IMPL(type),
7011 TOJSON_IMPL(extra),
7012 TOJSON_IMPL(isDefault),
7013 };
7014 }
7015 static void from_json(const nlohmann::json& j, NamedAudioDevice& p)
7016 {
7017 p.clear();
7018 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7019 getOptional<std::string>("manufacturer", p.manufacturer, j, EMPTY_STRING);
7020 getOptional<std::string>("model", p.model, j, EMPTY_STRING);
7021 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
7022 getOptional<std::string>("serialNumber", p.serialNumber, j, EMPTY_STRING);
7023 getOptional<std::string>("type", p.type, j, EMPTY_STRING);
7024 getOptional<std::string>("extra", p.extra, j, EMPTY_STRING);
7025 getOptional<bool>("isDefault", p.isDefault, j, false);
7026 }
7027
7028
7029 //-----------------------------------------------------------
7030 JSON_SERIALIZED_CLASS(EnginePolicyNamedAudioDevices)
7032 {
7033 IMPLEMENT_JSON_SERIALIZATION()
7034 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNamedAudioDevices)
7035
7036 public:
7037 std::vector<NamedAudioDevice> inputs;
7038 std::vector<NamedAudioDevice> outputs;
7039
7041 {
7042 clear();
7043 }
7044
7045 void clear()
7046 {
7047 inputs.clear();
7048 outputs.clear();
7049 }
7050 };
7051
7052 static void to_json(nlohmann::json& j, const EnginePolicyNamedAudioDevices& p)
7053 {
7054 j = nlohmann::json{
7055 TOJSON_IMPL(inputs),
7056 TOJSON_IMPL(outputs)
7057 };
7058 }
7059 static void from_json(const nlohmann::json& j, EnginePolicyNamedAudioDevices& p)
7060 {
7061 p.clear();
7062 getOptional<std::vector<NamedAudioDevice>>("inputs", p.inputs, j);
7063 getOptional<std::vector<NamedAudioDevice>>("outputs", p.outputs, j);
7064 }
7065
7066 //-----------------------------------------------------------
7067 JSON_SERIALIZED_CLASS(Licensing)
7080 {
7081 IMPLEMENT_JSON_SERIALIZATION()
7082 IMPLEMENT_JSON_DOCUMENTATION(Licensing)
7083
7084 public:
7085
7087 std::string entitlement;
7088
7090 std::string key;
7091
7093 std::string activationCode;
7094
7096 std::string deviceId;
7097
7099 std::string manufacturerId;
7100
7101 Licensing()
7102 {
7103 clear();
7104 }
7105
7106 void clear()
7107 {
7108 entitlement.clear();
7109 key.clear();
7110 activationCode.clear();
7111 deviceId.clear();
7112 manufacturerId.clear();
7113 }
7114 };
7115
7116 static void to_json(nlohmann::json& j, const Licensing& p)
7117 {
7118 j = nlohmann::json{
7119 TOJSON_IMPL(entitlement),
7120 TOJSON_IMPL(key),
7121 TOJSON_IMPL(activationCode),
7122 TOJSON_IMPL(deviceId),
7123 TOJSON_IMPL(manufacturerId)
7124 };
7125 }
7126 static void from_json(const nlohmann::json& j, Licensing& p)
7127 {
7128 p.clear();
7129 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
7130 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
7131 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
7132 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
7133 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
7134 }
7135
7136 //-----------------------------------------------------------
7137 JSON_SERIALIZED_CLASS(DiscoveryMagellan)
7148 {
7149 IMPLEMENT_JSON_SERIALIZATION()
7150 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryMagellan)
7151
7152 public:
7153
7156
7158 std::string interfaceName;
7159
7162
7165
7167 {
7168 clear();
7169 }
7170
7171 void clear()
7172 {
7173 enabled = false;
7174 interfaceName.clear();
7175 security.clear();
7176 tls.clear();
7177 }
7178 };
7179
7180 static void to_json(nlohmann::json& j, const DiscoveryMagellan& p)
7181 {
7182 j = nlohmann::json{
7183 TOJSON_IMPL(enabled),
7184 TOJSON_IMPL(interfaceName),
7185 TOJSON_IMPL(security),
7186 TOJSON_IMPL(tls)
7187 };
7188 }
7189 static void from_json(const nlohmann::json& j, DiscoveryMagellan& p)
7190 {
7191 p.clear();
7192 getOptional("enabled", p.enabled, j, false);
7193 getOptional<Tls>("tls", p.tls, j);
7194 getOptional<SecurityCertificate>("security", p.security, j);
7195 FROMJSON_IMPL(interfaceName, std::string, EMPTY_STRING);
7196 }
7197
7198 //-----------------------------------------------------------
7199 JSON_SERIALIZED_CLASS(DiscoverySsdp)
7210 {
7211 IMPLEMENT_JSON_SERIALIZATION()
7212 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySsdp)
7213
7214 public:
7215
7218
7220 std::string interfaceName;
7221
7224
7226 std::vector<std::string> searchTerms;
7227
7230
7233
7235 {
7236 clear();
7237 }
7238
7239 void clear()
7240 {
7241 enabled = false;
7242 interfaceName.clear();
7243 address.clear();
7244 searchTerms.clear();
7245 ageTimeoutMs = 30000;
7246 advertising.clear();
7247 }
7248 };
7249
7250 static void to_json(nlohmann::json& j, const DiscoverySsdp& p)
7251 {
7252 j = nlohmann::json{
7253 TOJSON_IMPL(enabled),
7254 TOJSON_IMPL(interfaceName),
7255 TOJSON_IMPL(address),
7256 TOJSON_IMPL(searchTerms),
7257 TOJSON_IMPL(ageTimeoutMs),
7258 TOJSON_IMPL(advertising)
7259 };
7260 }
7261 static void from_json(const nlohmann::json& j, DiscoverySsdp& p)
7262 {
7263 p.clear();
7264 getOptional("enabled", p.enabled, j, false);
7265 getOptional<std::string>("interfaceName", p.interfaceName, j);
7266
7267 getOptional<NetworkAddress>("address", p.address, j);
7268 if(p.address.address.empty())
7269 {
7270 p.address.address = "255.255.255.255";
7271 }
7272 if(p.address.port <= 0)
7273 {
7274 p.address.port = 1900;
7275 }
7276
7277 getOptional<std::vector<std::string>>("searchTerms", p.searchTerms, j);
7278 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7279 getOptional<Advertising>("advertising", p.advertising, j);
7280 }
7281
7282 //-----------------------------------------------------------
7283 JSON_SERIALIZED_CLASS(DiscoverySap)
7294 {
7295 IMPLEMENT_JSON_SERIALIZATION()
7296 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySap)
7297
7298 public:
7301
7303 std::string interfaceName;
7304
7307
7310
7313
7314 DiscoverySap()
7315 {
7316 clear();
7317 }
7318
7319 void clear()
7320 {
7321 enabled = false;
7322 interfaceName.clear();
7323 address.clear();
7324 ageTimeoutMs = 30000;
7325 advertising.clear();
7326 }
7327 };
7328
7329 static void to_json(nlohmann::json& j, const DiscoverySap& p)
7330 {
7331 j = nlohmann::json{
7332 TOJSON_IMPL(enabled),
7333 TOJSON_IMPL(interfaceName),
7334 TOJSON_IMPL(address),
7335 TOJSON_IMPL(ageTimeoutMs),
7336 TOJSON_IMPL(advertising)
7337 };
7338 }
7339 static void from_json(const nlohmann::json& j, DiscoverySap& p)
7340 {
7341 p.clear();
7342 getOptional("enabled", p.enabled, j, false);
7343 getOptional<std::string>("interfaceName", p.interfaceName, j);
7344 getOptional<NetworkAddress>("address", p.address, j);
7345 if(p.address.address.empty())
7346 {
7347 p.address.address = "224.2.127.254";
7348 }
7349 if(p.address.port <= 0)
7350 {
7351 p.address.port = 9875;
7352 }
7353
7354 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7355 getOptional<Advertising>("advertising", p.advertising, j);
7356 }
7357
7358 //-----------------------------------------------------------
7359 JSON_SERIALIZED_CLASS(DiscoveryCistech)
7372 {
7373 IMPLEMENT_JSON_SERIALIZATION()
7374 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryCistech)
7375
7376 public:
7377 bool enabled;
7378 std::string interfaceName;
7379 NetworkAddress address;
7380 int ageTimeoutMs;
7381
7383 {
7384 clear();
7385 }
7386
7387 void clear()
7388 {
7389 enabled = false;
7390 interfaceName.clear();
7391 address.clear();
7392 ageTimeoutMs = 30000;
7393 }
7394 };
7395
7396 static void to_json(nlohmann::json& j, const DiscoveryCistech& p)
7397 {
7398 j = nlohmann::json{
7399 TOJSON_IMPL(enabled),
7400 TOJSON_IMPL(interfaceName),
7401 TOJSON_IMPL(address),
7402 TOJSON_IMPL(ageTimeoutMs)
7403 };
7404 }
7405 static void from_json(const nlohmann::json& j, DiscoveryCistech& p)
7406 {
7407 p.clear();
7408 getOptional("enabled", p.enabled, j, false);
7409 getOptional<std::string>("interfaceName", p.interfaceName, j);
7410 getOptional<NetworkAddress>("address", p.address, j);
7411 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7412 }
7413
7414
7415 //-----------------------------------------------------------
7416 JSON_SERIALIZED_CLASS(DiscoveryTrellisware)
7427 {
7428 IMPLEMENT_JSON_SERIALIZATION()
7429 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryTrellisware)
7430
7431 public:
7432
7435
7438
7440 {
7441 clear();
7442 }
7443
7444 void clear()
7445 {
7446 enabled = false;
7447 security.clear();
7448 }
7449 };
7450
7451 static void to_json(nlohmann::json& j, const DiscoveryTrellisware& p)
7452 {
7453 j = nlohmann::json{
7454 TOJSON_IMPL(enabled),
7455 TOJSON_IMPL(security)
7456 };
7457 }
7458 static void from_json(const nlohmann::json& j, DiscoveryTrellisware& p)
7459 {
7460 p.clear();
7461 getOptional("enabled", p.enabled, j, false);
7462 getOptional<SecurityCertificate>("security", p.security, j);
7463 }
7464
7465 //-----------------------------------------------------------
7466 JSON_SERIALIZED_CLASS(DiscoveryConfiguration)
7477 {
7478 IMPLEMENT_JSON_SERIALIZATION()
7479 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryConfiguration)
7480
7481 public:
7484
7487
7490
7493
7496
7498 {
7499 clear();
7500 }
7501
7502 void clear()
7503 {
7504 magellan.clear();
7505 ssdp.clear();
7506 sap.clear();
7507 cistech.clear();
7508 }
7509 };
7510
7511 static void to_json(nlohmann::json& j, const DiscoveryConfiguration& p)
7512 {
7513 j = nlohmann::json{
7514 TOJSON_IMPL(magellan),
7515 TOJSON_IMPL(ssdp),
7516 TOJSON_IMPL(sap),
7517 TOJSON_IMPL(cistech),
7518 TOJSON_IMPL(trellisware)
7519 };
7520 }
7521 static void from_json(const nlohmann::json& j, DiscoveryConfiguration& p)
7522 {
7523 p.clear();
7524 getOptional<DiscoveryMagellan>("magellan", p.magellan, j);
7525 getOptional<DiscoverySsdp>("ssdp", p.ssdp, j);
7526 getOptional<DiscoverySap>("sap", p.sap, j);
7527 getOptional<DiscoveryCistech>("cistech", p.cistech, j);
7528 getOptional<DiscoveryTrellisware>("trellisware", p.trellisware, j);
7529 }
7530
7531
7532 //-----------------------------------------------------------
7533 JSON_SERIALIZED_CLASS(ApiCallPacingLaneSettings)
7542 {
7543 IMPLEMENT_JSON_SERIALIZATION()
7544 IMPLEMENT_JSON_DOCUMENTATION(ApiCallPacingLaneSettings)
7545
7546 public:
7549
7552
7554 {
7555 clear();
7556 }
7557
7558 void clear()
7559 {
7560 intervalMs = 0;
7561 maxQueueDepth = 512;
7562 }
7563
7564 virtual void initForDocumenting()
7565 {
7566 clear();
7567 }
7568 };
7569
7570 static void to_json(nlohmann::json& j, const ApiCallPacingLaneSettings& p)
7571 {
7572 j = nlohmann::json{
7573 TOJSON_IMPL(intervalMs),
7574 TOJSON_IMPL(maxQueueDepth)
7575 };
7576 }
7577 static void from_json(const nlohmann::json& j, ApiCallPacingLaneSettings& p)
7578 {
7579 p.clear();
7580 getOptional<int>("intervalMs", p.intervalMs, j, 0);
7581 getOptional<uint32_t>("maxQueueDepth", p.maxQueueDepth, j, 512);
7582 }
7583
7584 //-----------------------------------------------------------
7585 JSON_SERIALIZED_CLASS(ApiCallPacingSettings)
7597 {
7598 IMPLEMENT_JSON_SERIALIZATION()
7599 IMPLEMENT_JSON_DOCUMENTATION(ApiCallPacingSettings)
7600
7601 public:
7604
7607
7610
7612 {
7613 clear();
7614 }
7615
7616 void clear()
7617 {
7618 topology.clear();
7619 transmission.clear();
7620 configuration.clear();
7621 }
7622
7623 virtual void initForDocumenting()
7624 {
7625 clear();
7626 }
7627 };
7628
7629 static void to_json(nlohmann::json& j, const ApiCallPacingSettings& p)
7630 {
7631 j = nlohmann::json{
7632 TOJSON_IMPL(topology),
7633 TOJSON_IMPL(transmission),
7634 TOJSON_IMPL(configuration)
7635 };
7636 }
7637 static void from_json(const nlohmann::json& j, ApiCallPacingSettings& p)
7638 {
7639 p.clear();
7640 getOptional<ApiCallPacingLaneSettings>("topology", p.topology, j);
7641 getOptional<ApiCallPacingLaneSettings>("transmission", p.transmission, j);
7642 getOptional<ApiCallPacingLaneSettings>("configuration", p.configuration, j);
7643 }
7644
7645 //-----------------------------------------------------------
7646 JSON_SERIALIZED_CLASS(EnginePolicyInternals)
7659 {
7660 IMPLEMENT_JSON_SERIALIZATION()
7661 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyInternals)
7662
7663 public:
7666
7669
7672
7673 int maxRxSecs;
7674
7675 int logTaskQueueStatsIntervalMs;
7676
7677 bool enableLazySpeakerClosure;
7678
7681
7684
7687
7690
7693
7696
7699
7702
7705
7708
7710 {
7711 clear();
7712 }
7713
7714 void clear()
7715 {
7716 watchdog.clear();
7717 housekeeperIntervalMs = 1000;
7718 logTaskQueueStatsIntervalMs = 0;
7719 maxTxSecs = 30;
7720 maxRxSecs = 0;
7721 enableLazySpeakerClosure = false;
7722 rpClusterStrategy = RallypointCluster::ConnectionStrategy_t::csRoundRobin;
7723 rpClusterRolloverSecs = 10;
7724 rtpExpirationCheckIntervalMs = 250;
7725 rpConnectionTimeoutSecs = 0;
7726 rpTransactionTimeoutMs = 0;
7727 stickyTidHangSecs = 10;
7728 uriStreamingIntervalMs = 60;
7729 delayedMicrophoneClosureSecs = 15;
7730 tuning.clear();
7731 apiCallPacing.clear();
7732 }
7733 };
7734
7735 static void to_json(nlohmann::json& j, const EnginePolicyInternals& p)
7736 {
7737 j = nlohmann::json{
7738 TOJSON_IMPL(watchdog),
7739 TOJSON_IMPL(housekeeperIntervalMs),
7740 TOJSON_IMPL(logTaskQueueStatsIntervalMs),
7741 TOJSON_IMPL(maxTxSecs),
7742 TOJSON_IMPL(maxRxSecs),
7743 TOJSON_IMPL(enableLazySpeakerClosure),
7744 TOJSON_IMPL(rpClusterStrategy),
7745 TOJSON_IMPL(rpClusterRolloverSecs),
7746 TOJSON_IMPL(rtpExpirationCheckIntervalMs),
7747 TOJSON_IMPL(rpConnectionTimeoutSecs),
7748 TOJSON_IMPL(rpTransactionTimeoutMs),
7749 TOJSON_IMPL(stickyTidHangSecs),
7750 TOJSON_IMPL(uriStreamingIntervalMs),
7751 TOJSON_IMPL(delayedMicrophoneClosureSecs),
7752 TOJSON_IMPL(tuning),
7753 TOJSON_IMPL(apiCallPacing)
7754 };
7755 }
7756 static void from_json(const nlohmann::json& j, EnginePolicyInternals& p)
7757 {
7758 p.clear();
7759 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
7760 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
7761 getOptional<int>("logTaskQueueStatsIntervalMs", p.logTaskQueueStatsIntervalMs, j, 0);
7762 getOptional<int>("maxTxSecs", p.maxTxSecs, j, 30);
7763 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
7764 getOptional<bool>("enableLazySpeakerClosure", p.enableLazySpeakerClosure, j, false);
7765 getOptional<RallypointCluster::ConnectionStrategy_t>("rpClusterStrategy", p.rpClusterStrategy, j, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
7766 getOptional<int>("rpClusterRolloverSecs", p.rpClusterRolloverSecs, j, 10);
7767 getOptional<int>("rtpExpirationCheckIntervalMs", p.rtpExpirationCheckIntervalMs, j, 250);
7768 getOptional<int>("rpConnectionTimeoutSecs", p.rpConnectionTimeoutSecs, j, 0);
7769 getOptional<int>("rpTransactionTimeoutMs", p.rpTransactionTimeoutMs, j, 0);
7770 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
7771 getOptional<int>("uriStreamingIntervalMs", p.uriStreamingIntervalMs, j, 60);
7772 getOptional<int>("delayedMicrophoneClosureSecs", p.delayedMicrophoneClosureSecs, j, 15);
7773 getOptional<TuningSettings>("tuning", p.tuning, j);
7774 getOptional<ApiCallPacingSettings>("apiCallPacing", p.apiCallPacing, j);
7775 }
7776
7777 //-----------------------------------------------------------
7778 JSON_SERIALIZED_CLASS(EnginePolicyTimelines)
7791 {
7792 IMPLEMENT_JSON_SERIALIZATION()
7793 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyTimelines)
7794
7795 public:
7796
7803
7805 std::string storageRoot;
7806
7809
7812
7815
7818
7821
7824
7827
7836
7839
7842
7845
7847 {
7848 clear();
7849 }
7850
7851 void clear()
7852 {
7853 enabled = true;
7854 storageRoot.clear();
7855 maxStorageMb = 1024; // 1 Gigabyte
7856 maxMemMb = maxStorageMb;
7857 maxAudioEventMemMb = maxMemMb;
7858 maxDiskMb = maxStorageMb;
7859 maxEventAgeSecs = (86400 * 30); // 30 days
7860 groomingIntervalSecs = (60 * 30); // 30 minutes
7861 maxEvents = 1000;
7862 autosaveIntervalSecs = 5;
7863 security.clear();
7864 disableSigningAndVerification = false;
7865 ephemeral = false;
7866 }
7867 };
7868
7869 static void to_json(nlohmann::json& j, const EnginePolicyTimelines& p)
7870 {
7871 j = nlohmann::json{
7872 TOJSON_IMPL(enabled),
7873 TOJSON_IMPL(storageRoot),
7874 TOJSON_IMPL(maxMemMb),
7875 TOJSON_IMPL(maxAudioEventMemMb),
7876 TOJSON_IMPL(maxDiskMb),
7877 TOJSON_IMPL(maxEventAgeSecs),
7878 TOJSON_IMPL(maxEvents),
7879 TOJSON_IMPL(groomingIntervalSecs),
7880 TOJSON_IMPL(autosaveIntervalSecs),
7881 TOJSON_IMPL(security),
7882 TOJSON_IMPL(disableSigningAndVerification),
7883 TOJSON_IMPL(ephemeral)
7884 };
7885 }
7886 static void from_json(const nlohmann::json& j, EnginePolicyTimelines& p)
7887 {
7888 p.clear();
7889 getOptional<bool>("enabled", p.enabled, j, true);
7890 getOptional<std::string>("storageRoot", p.storageRoot, j, EMPTY_STRING);
7891
7892 getOptional<int>("maxStorageMb", p.maxStorageMb, j, 1024);
7893 getOptional<int>("maxMemMb", p.maxMemMb, j, p.maxStorageMb);
7894 getOptional<int>("maxAudioEventMemMb", p.maxAudioEventMemMb, j, p.maxMemMb);
7895 getOptional<int>("maxDiskMb", p.maxDiskMb, j, p.maxStorageMb);
7896 getOptional<long>("maxEventAgeSecs", p.maxEventAgeSecs, j, (86400 * 30));
7897 getOptional<long>("groomingIntervalSecs", p.groomingIntervalSecs, j, (60 * 30));
7898 getOptional<long>("autosaveIntervalSecs", p.autosaveIntervalSecs, j, 5);
7899 getOptional<int>("maxEvents", p.maxEvents, j, 1000);
7900 getOptional<SecurityCertificate>("security", p.security, j);
7901 getOptional<bool>("disableSigningAndVerification", p.disableSigningAndVerification, j, false);
7902 getOptional<bool>("ephemeral", p.ephemeral, j, false);
7903 }
7904
7905
7906 //-----------------------------------------------------------
7907 JSON_SERIALIZED_CLASS(RtpMapEntry)
7918 {
7919 IMPLEMENT_JSON_SERIALIZATION()
7920 IMPLEMENT_JSON_DOCUMENTATION(RtpMapEntry)
7921
7922 public:
7924 std::string name;
7925
7928
7931
7932 RtpMapEntry()
7933 {
7934 clear();
7935 }
7936
7937 void clear()
7938 {
7939 name.clear();
7940 engageType = -1;
7941 rtpPayloadType = -1;
7942 }
7943 };
7944
7945 static void to_json(nlohmann::json& j, const RtpMapEntry& p)
7946 {
7947 j = nlohmann::json{
7948 TOJSON_IMPL(name),
7949 TOJSON_IMPL(engageType),
7950 TOJSON_IMPL(rtpPayloadType)
7951 };
7952 }
7953 static void from_json(const nlohmann::json& j, RtpMapEntry& p)
7954 {
7955 p.clear();
7956 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7957 getOptional<int>("engageType", p.engageType, j, -1);
7958 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
7959 }
7960
7961 //-----------------------------------------------------------
7962 JSON_SERIALIZED_CLASS(ExternalModule)
7973 {
7974 IMPLEMENT_JSON_SERIALIZATION()
7975 IMPLEMENT_JSON_DOCUMENTATION(ExternalModule)
7976
7977 public:
7979 std::string name;
7980
7982 std::string file;
7983
7985 nlohmann::json configuration;
7986
7988 {
7989 clear();
7990 }
7991
7992 void clear()
7993 {
7994 name.clear();
7995 file.clear();
7996 configuration.clear();
7997 }
7998 };
7999
8000 static void to_json(nlohmann::json& j, const ExternalModule& p)
8001 {
8002 j = nlohmann::json{
8003 TOJSON_IMPL(name),
8004 TOJSON_IMPL(file)
8005 };
8006
8007 if(!p.configuration.empty())
8008 {
8009 j["configuration"] = p.configuration;
8010 }
8011 }
8012 static void from_json(const nlohmann::json& j, ExternalModule& p)
8013 {
8014 p.clear();
8015 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
8016 getOptional<std::string>("file", p.file, j, EMPTY_STRING);
8017
8018 try
8019 {
8020 p.configuration = j.at("configuration");
8021 }
8022 catch(...)
8023 {
8024 p.configuration.clear();
8025 }
8026 }
8027
8028
8029 //-----------------------------------------------------------
8030 JSON_SERIALIZED_CLASS(ExternalCodecDescriptor)
8041 {
8042 IMPLEMENT_JSON_SERIALIZATION()
8043 IMPLEMENT_JSON_DOCUMENTATION(ExternalCodecDescriptor)
8044
8045 public:
8048
8051
8054
8057
8059 {
8060 clear();
8061 }
8062
8063 void clear()
8064 {
8065 rtpPayloadType = -1;
8066 samplingRate = -1;
8067 channels = -1;
8068 rtpTsMultiplier = 0;
8069 }
8070 };
8071
8072 static void to_json(nlohmann::json& j, const ExternalCodecDescriptor& p)
8073 {
8074 j = nlohmann::json{
8075 TOJSON_IMPL(rtpPayloadType),
8076 TOJSON_IMPL(samplingRate),
8077 TOJSON_IMPL(channels),
8078 TOJSON_IMPL(rtpTsMultiplier)
8079 };
8080 }
8081 static void from_json(const nlohmann::json& j, ExternalCodecDescriptor& p)
8082 {
8083 p.clear();
8084
8085 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
8086 getOptional<int>("samplingRate", p.samplingRate, j, -1);
8087 getOptional<int>("channels", p.channels, j, -1);
8088 getOptional<int>("rtpTsMultiplier", p.rtpTsMultiplier, j, -1);
8089 }
8090
8091 //-----------------------------------------------------------
8092 JSON_SERIALIZED_CLASS(EngineStatusReportConfiguration)
8103 {
8104 IMPLEMENT_JSON_SERIALIZATION()
8105 IMPLEMENT_JSON_DOCUMENTATION(EngineStatusReportConfiguration)
8106
8107 public:
8109 std::string fileName;
8110
8113
8116
8118 std::string runCmd;
8119
8122
8125
8127 {
8128 clear();
8129 }
8130
8131 void clear()
8132 {
8133 fileName.clear();
8134 intervalSecs = 60;
8135 enabled = false;
8136 includeMemoryDetail = false;
8137 includeTaskQueueDetail = false;
8138 runCmd.clear();
8139 }
8140 };
8141
8142 static void to_json(nlohmann::json& j, const EngineStatusReportConfiguration& p)
8143 {
8144 j = nlohmann::json{
8145 TOJSON_IMPL(fileName),
8146 TOJSON_IMPL(intervalSecs),
8147 TOJSON_IMPL(enabled),
8148 TOJSON_IMPL(includeMemoryDetail),
8149 TOJSON_IMPL(includeTaskQueueDetail),
8150 TOJSON_IMPL(runCmd)
8151 };
8152 }
8153 static void from_json(const nlohmann::json& j, EngineStatusReportConfiguration& p)
8154 {
8155 p.clear();
8156 getOptional<std::string>("fileName", p.fileName, j);
8157 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8158 getOptional<bool>("enabled", p.enabled, j, false);
8159 getOptional<std::string>("runCmd", p.runCmd, j);
8160 getOptional<bool>("includeMemoryDetail", p.includeMemoryDetail, j, false);
8161 getOptional<bool>("includeTaskQueueDetail", p.includeTaskQueueDetail, j, false);
8162 }
8163
8164 //-----------------------------------------------------------
8165 JSON_SERIALIZED_CLASS(EnginePolicy)
8178 {
8179 IMPLEMENT_JSON_SERIALIZATION()
8180 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicy)
8181
8182 public:
8183
8185 std::string dataDirectory;
8186
8189
8192
8195
8198
8201
8204
8207
8210
8213
8216
8219
8221 std::vector<ExternalModule> externalCodecs;
8222
8224 std::vector<RtpMapEntry> rtpMap;
8225
8228
8229 EnginePolicy()
8230 {
8231 clear();
8232 }
8233
8234 void clear()
8235 {
8236 dataDirectory.clear();
8237 licensing.clear();
8238 security.clear();
8239 networking.clear();
8240 audio.clear();
8241 discovery.clear();
8242 logging.clear();
8243 internals.clear();
8244 timelines.clear();
8245 database.clear();
8246 featureset.clear();
8247 namedAudioDevices.clear();
8248 externalCodecs.clear();
8249 rtpMap.clear();
8250 statusReport.clear();
8251 }
8252 };
8253
8254 static void to_json(nlohmann::json& j, const EnginePolicy& p)
8255 {
8256 j = nlohmann::json{
8257 TOJSON_IMPL(dataDirectory),
8258 TOJSON_IMPL(licensing),
8259 TOJSON_IMPL(security),
8260 TOJSON_IMPL(networking),
8261 TOJSON_IMPL(audio),
8262 TOJSON_IMPL(discovery),
8263 TOJSON_IMPL(logging),
8264 TOJSON_IMPL(internals),
8265 TOJSON_IMPL(timelines),
8266 TOJSON_IMPL(database),
8267 TOJSON_IMPL(featureset),
8268 TOJSON_IMPL(namedAudioDevices),
8269 TOJSON_IMPL(externalCodecs),
8270 TOJSON_IMPL(rtpMap),
8271 TOJSON_IMPL(statusReport)
8272 };
8273 }
8274 static void from_json(const nlohmann::json& j, EnginePolicy& p)
8275 {
8276 p.clear();
8277 FROMJSON_IMPL_SIMPLE(dataDirectory);
8278 FROMJSON_IMPL_SIMPLE(licensing);
8279 FROMJSON_IMPL_SIMPLE(security);
8280 FROMJSON_IMPL_SIMPLE(networking);
8281 FROMJSON_IMPL_SIMPLE(audio);
8282 FROMJSON_IMPL_SIMPLE(discovery);
8283 FROMJSON_IMPL_SIMPLE(logging);
8284 FROMJSON_IMPL_SIMPLE(internals);
8285 FROMJSON_IMPL_SIMPLE(timelines);
8286 FROMJSON_IMPL_SIMPLE(database);
8287 FROMJSON_IMPL_SIMPLE(featureset);
8288 FROMJSON_IMPL_SIMPLE(namedAudioDevices);
8289 FROMJSON_IMPL_SIMPLE(externalCodecs);
8290 FROMJSON_IMPL_SIMPLE(rtpMap);
8291 FROMJSON_IMPL_SIMPLE(statusReport);
8292 }
8293
8294
8295 //-----------------------------------------------------------
8296 JSON_SERIALIZED_CLASS(TalkgroupAsset)
8307 {
8308 IMPLEMENT_JSON_SERIALIZATION()
8309 IMPLEMENT_JSON_DOCUMENTATION(TalkgroupAsset)
8310
8311 public:
8312
8314 std::string nodeId;
8315
8318
8320 {
8321 clear();
8322 }
8323
8324 void clear()
8325 {
8326 nodeId.clear();
8327 group.clear();
8328 }
8329 };
8330
8331 static void to_json(nlohmann::json& j, const TalkgroupAsset& p)
8332 {
8333 j = nlohmann::json{
8334 TOJSON_IMPL(nodeId),
8335 TOJSON_IMPL(group)
8336 };
8337 }
8338 static void from_json(const nlohmann::json& j, TalkgroupAsset& p)
8339 {
8340 p.clear();
8341 getOptional<std::string>("nodeId", p.nodeId, j);
8342 getOptional<Group>("group", p.group, j);
8343 }
8344
8345 //-----------------------------------------------------------
8346 JSON_SERIALIZED_CLASS(EngageDiscoveredGroup)
8355 {
8356 IMPLEMENT_JSON_SERIALIZATION()
8357 IMPLEMENT_JSON_DOCUMENTATION(EngageDiscoveredGroup)
8358
8359 public:
8361 std::string id;
8362
8364 int type;
8365
8368
8371
8373 {
8374 clear();
8375 }
8376
8377 void clear()
8378 {
8379 id.clear();
8380 type = 0;
8381 rx.clear();
8382 tx.clear();
8383 }
8384 };
8385
8386 static void to_json(nlohmann::json& j, const EngageDiscoveredGroup& p)
8387 {
8388 j = nlohmann::json{
8389 TOJSON_IMPL(id),
8390 TOJSON_IMPL(type),
8391 TOJSON_IMPL(rx),
8392 TOJSON_IMPL(tx)
8393 };
8394 }
8395 static void from_json(const nlohmann::json& j, EngageDiscoveredGroup& p)
8396 {
8397 p.clear();
8398 getOptional<std::string>("id", p.id, j);
8399 getOptional<int>("type", p.type, j, 0);
8400 getOptional<NetworkAddress>("rx", p.rx, j);
8401 getOptional<NetworkAddress>("tx", p.tx, j);
8402 }
8403
8404 //-----------------------------------------------------------
8405 JSON_SERIALIZED_CLASS(RallypointPeer)
8416 {
8417 IMPLEMENT_JSON_SERIALIZATION()
8418 IMPLEMENT_JSON_DOCUMENTATION(RallypointPeer)
8419
8420 public:
8421 typedef enum
8422 {
8424 olpUseRpConfiguration = 0,
8425
8427 olpIsMeshLeaf = 1,
8428
8430 olpNotMeshLeaf = 2
8431 } OutboundLeafPolicy_t;
8432
8433 typedef enum
8434 {
8436 olpUseRpWebSocketTlsConfiguration = 0,
8437
8439 olpUseTlsForWebSocket = 1,
8440
8442 olpDoNotUseTlsForWebSocket = 2
8443 } OutboundWebSocketTlsPolicy_t;
8444
8446 std::string id;
8447
8450
8453
8456
8459
8462
8463 OutboundLeafPolicy_t outboundLeafPolicy;
8464
8467
8469 std::string path;
8470
8473
8480 std::string sni;
8481
8484
8486 {
8487 clear();
8488 }
8489
8490 void clear()
8491 {
8492 id.clear();
8493 enabled = true;
8494 host.clear();
8495 certificate.clear();
8496 connectionTimeoutSecs = 0;
8497 forceIsMeshLeaf = false;
8498 outboundLeafPolicy = OutboundLeafPolicy_t::olpUseRpConfiguration;
8499 protocol = Rallypoint::RpProtocol_t::rppTlsTcp;
8500 path.clear();
8501 additionalProtocols.clear();
8502 sni.clear();
8503 outboundWebSocketTlsPolicy = OutboundWebSocketTlsPolicy_t::olpUseRpWebSocketTlsConfiguration;
8504 }
8505 };
8506
8507 static void to_json(nlohmann::json& j, const RallypointPeer& p)
8508 {
8509 j = nlohmann::json{
8510 TOJSON_IMPL(id),
8511 TOJSON_IMPL(enabled),
8512 TOJSON_IMPL(host),
8513 TOJSON_IMPL(certificate),
8514 TOJSON_IMPL(connectionTimeoutSecs),
8515 TOJSON_IMPL(forceIsMeshLeaf),
8516 TOJSON_IMPL(outboundLeafPolicy),
8517 TOJSON_IMPL(protocol),
8518 TOJSON_IMPL(path),
8519 TOJSON_IMPL(additionalProtocols),
8520 TOJSON_IMPL(sni),
8521 TOJSON_IMPL(outboundWebSocketTlsPolicy)
8522 };
8523 }
8524 static void from_json(const nlohmann::json& j, RallypointPeer& p)
8525 {
8526 p.clear();
8527 j.at("id").get_to(p.id);
8528 getOptional<bool>("enabled", p.enabled, j, true);
8529 getOptional<NetworkAddress>("host", p.host, j);
8530 getOptional<SecurityCertificate>("certificate", p.certificate, j);
8531 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
8532 getOptional<bool>("forceIsMeshLeaf", p.forceIsMeshLeaf, j, false);
8533 getOptional<RallypointPeer::OutboundLeafPolicy_t>("outboundLeafPolicy", p.outboundLeafPolicy, j, RallypointPeer::OutboundLeafPolicy_t::olpUseRpConfiguration);
8534 getOptional<Rallypoint::RpProtocol_t>("protocol", p.protocol, j, Rallypoint::RpProtocol_t::rppTlsTcp);
8535 getOptional<std::string>("path", p.path, j);
8536 getOptional<std::string>("additionalProtocols", p.additionalProtocols, j);
8537 getOptional<std::string>("sni", p.sni, j);
8538 getOptional<RallypointPeer::OutboundWebSocketTlsPolicy_t>("outboundWebSocketTlsPolicy", p.outboundWebSocketTlsPolicy, j, RallypointPeer::OutboundWebSocketTlsPolicy_t::olpUseRpWebSocketTlsConfiguration);
8539 }
8540
8541 //-----------------------------------------------------------
8542 JSON_SERIALIZED_CLASS(RallypointServerLimits)
8553 {
8554 IMPLEMENT_JSON_SERIALIZATION()
8555 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLimits)
8556
8557 public:
8559 uint32_t maxClients;
8560
8562 uint32_t maxPeers;
8563
8566
8569
8572
8575
8578
8581
8584
8587
8590
8593
8596
8599
8602
8604 {
8605 clear();
8606 }
8607
8608 void clear()
8609 {
8610 maxClients = 0;
8611 maxPeers = 0;
8612 maxMulticastReflectors = 0;
8613 maxRegisteredStreams = 0;
8614 maxStreamPaths = 0;
8615 maxRxPacketsPerSec = 0;
8616 maxTxPacketsPerSec = 0;
8617 maxRxBytesPerSec = 0;
8618 maxTxBytesPerSec = 0;
8619 maxQOpsPerSec = 0;
8620 maxInboundBacklog = 64;
8621 lowPriorityQueueThreshold = 64;
8622 normalPriorityQueueThreshold = 256;
8623 denyNewConnectionCpuThreshold = 75;
8624 warnAtCpuThreshold = 65;
8625 }
8626 };
8627
8628 static void to_json(nlohmann::json& j, const RallypointServerLimits& p)
8629 {
8630 j = nlohmann::json{
8631 TOJSON_IMPL(maxClients),
8632 TOJSON_IMPL(maxPeers),
8633 TOJSON_IMPL(maxMulticastReflectors),
8634 TOJSON_IMPL(maxRegisteredStreams),
8635 TOJSON_IMPL(maxStreamPaths),
8636 TOJSON_IMPL(maxRxPacketsPerSec),
8637 TOJSON_IMPL(maxTxPacketsPerSec),
8638 TOJSON_IMPL(maxRxBytesPerSec),
8639 TOJSON_IMPL(maxTxBytesPerSec),
8640 TOJSON_IMPL(maxQOpsPerSec),
8641 TOJSON_IMPL(maxInboundBacklog),
8642 TOJSON_IMPL(lowPriorityQueueThreshold),
8643 TOJSON_IMPL(normalPriorityQueueThreshold),
8644 TOJSON_IMPL(denyNewConnectionCpuThreshold),
8645 TOJSON_IMPL(warnAtCpuThreshold)
8646 };
8647 }
8648 static void from_json(const nlohmann::json& j, RallypointServerLimits& p)
8649 {
8650 p.clear();
8651 getOptional<uint32_t>("maxClients", p.maxClients, j, 0);
8652 getOptional<uint32_t>("maxPeers", p.maxPeers, j, 0);
8653 getOptional<uint32_t>("maxMulticastReflectors", p.maxMulticastReflectors, j, 0);
8654 getOptional<uint32_t>("maxRegisteredStreams", p.maxRegisteredStreams, j, 0);
8655 getOptional<uint32_t>("maxStreamPaths", p.maxStreamPaths, j, 0);
8656 getOptional<uint32_t>("maxRxPacketsPerSec", p.maxRxPacketsPerSec, j, 0);
8657 getOptional<uint32_t>("maxTxPacketsPerSec", p.maxTxPacketsPerSec, j, 0);
8658 getOptional<uint32_t>("maxRxBytesPerSec", p.maxRxBytesPerSec, j, 0);
8659 getOptional<uint32_t>("maxTxBytesPerSec", p.maxTxBytesPerSec, j, 0);
8660 getOptional<uint32_t>("maxQOpsPerSec", p.maxQOpsPerSec, j, 0);
8661 getOptional<uint32_t>("maxInboundBacklog", p.maxInboundBacklog, j, 64);
8662 getOptional<uint32_t>("lowPriorityQueueThreshold", p.lowPriorityQueueThreshold, j, 64);
8663 getOptional<uint32_t>("normalPriorityQueueThreshold", p.normalPriorityQueueThreshold, j, 256);
8664 getOptional<uint32_t>("denyNewConnectionCpuThreshold", p.denyNewConnectionCpuThreshold, j, 75);
8665 getOptional<uint32_t>("warnAtCpuThreshold", p.warnAtCpuThreshold, j, 65);
8666 }
8667
8668 //-----------------------------------------------------------
8669 JSON_SERIALIZED_CLASS(RallypointServerStatusReportConfiguration)
8680 {
8681 IMPLEMENT_JSON_SERIALIZATION()
8682 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerStatusReportConfiguration)
8683
8684 public:
8686 std::string fileName;
8687
8690
8693
8696
8699
8702
8704 std::string runCmd;
8705
8707 {
8708 clear();
8709 }
8710
8711 void clear()
8712 {
8713 fileName.clear();
8714 intervalSecs = 60;
8715 enabled = false;
8716 includeLinks = false;
8717 includePeerLinkDetails = false;
8718 includeClientLinkDetails = false;
8719 runCmd.clear();
8720 }
8721 };
8722
8723 static void to_json(nlohmann::json& j, const RallypointServerStatusReportConfiguration& p)
8724 {
8725 j = nlohmann::json{
8726 TOJSON_IMPL(fileName),
8727 TOJSON_IMPL(intervalSecs),
8728 TOJSON_IMPL(enabled),
8729 TOJSON_IMPL(includeLinks),
8730 TOJSON_IMPL(includePeerLinkDetails),
8731 TOJSON_IMPL(includeClientLinkDetails),
8732 TOJSON_IMPL(runCmd)
8733 };
8734 }
8735 static void from_json(const nlohmann::json& j, RallypointServerStatusReportConfiguration& p)
8736 {
8737 p.clear();
8738 getOptional<std::string>("fileName", p.fileName, j);
8739 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8740 getOptional<bool>("enabled", p.enabled, j, false);
8741 getOptional<bool>("includeLinks", p.includeLinks, j, false);
8742 getOptional<bool>("includePeerLinkDetails", p.includePeerLinkDetails, j, false);
8743 getOptional<bool>("includeClientLinkDetails", p.includeClientLinkDetails, j, false);
8744 getOptional<std::string>("runCmd", p.runCmd, j);
8745 }
8746
8747 //-----------------------------------------------------------
8748 JSON_SERIALIZED_CLASS(RallypointServerLinkGraph)
8750 {
8751 IMPLEMENT_JSON_SERIALIZATION()
8752 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLinkGraph)
8753
8754 public:
8756 std::string fileName;
8757
8760
8763
8766
8771
8773 std::string coreRpStyling;
8774
8776 std::string leafRpStyling;
8777
8779 std::string clientStyling;
8780
8782 std::string runCmd;
8783
8785 {
8786 clear();
8787 }
8788
8789 void clear()
8790 {
8791 fileName.clear();
8792 minRefreshSecs = 5;
8793 enabled = false;
8794 includeDigraphEnclosure = true;
8795 includeClients = false;
8796 coreRpStyling = "[shape=hexagon color=firebrick style=filled]";
8797 leafRpStyling = "[shape=box color=gray style=filled]";
8798 clientStyling.clear();
8799 runCmd.clear();
8800 }
8801 };
8802
8803 static void to_json(nlohmann::json& j, const RallypointServerLinkGraph& p)
8804 {
8805 j = nlohmann::json{
8806 TOJSON_IMPL(fileName),
8807 TOJSON_IMPL(minRefreshSecs),
8808 TOJSON_IMPL(enabled),
8809 TOJSON_IMPL(includeDigraphEnclosure),
8810 TOJSON_IMPL(includeClients),
8811 TOJSON_IMPL(coreRpStyling),
8812 TOJSON_IMPL(leafRpStyling),
8813 TOJSON_IMPL(clientStyling),
8814 TOJSON_IMPL(runCmd)
8815 };
8816 }
8817 static void from_json(const nlohmann::json& j, RallypointServerLinkGraph& p)
8818 {
8819 p.clear();
8820 getOptional<std::string>("fileName", p.fileName, j);
8821 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
8822 getOptional<bool>("enabled", p.enabled, j, false);
8823 getOptional<bool>("includeDigraphEnclosure", p.includeDigraphEnclosure, j, true);
8824 getOptional<bool>("includeClients", p.includeClients, j, false);
8825 getOptional<std::string>("coreRpStyling", p.coreRpStyling, j, "[shape=hexagon color=firebrick style=filled]");
8826 getOptional<std::string>("leafRpStyling", p.leafRpStyling, j, "[shape=box color=gray style=filled]");
8827 getOptional<std::string>("clientStyling", p.clientStyling, j);
8828 getOptional<std::string>("runCmd", p.runCmd, j);
8829 }
8830
8831
8832 //-----------------------------------------------------------
8833 JSON_SERIALIZED_CLASS(RallypointServerStreamStatsExport)
8842 {
8843 IMPLEMENT_JSON_SERIALIZATION()
8844 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerStreamStatsExport)
8845
8846 public:
8848 typedef enum
8849 {
8851 fmtCsv = 0,
8852
8854 fmtJson = 1
8855 } ExportFormat_t;
8856
8858 std::string fileName;
8859
8862
8865
8868
8870 std::string runCmd;
8871
8874
8875
8877 {
8878 clear();
8879 }
8880
8881 void clear()
8882 {
8883 fileName.clear();
8884 intervalSecs = 60;
8885 enabled = false;
8886 resetCountersAfterExport = false;
8887 runCmd.clear();
8888 format = fmtJson;
8889 }
8890 };
8891
8892 static void to_json(nlohmann::json& j, const RallypointServerStreamStatsExport& p)
8893 {
8894 j = nlohmann::json{
8895 TOJSON_IMPL(fileName),
8896 TOJSON_IMPL(intervalSecs),
8897 TOJSON_IMPL(enabled),
8898 TOJSON_IMPL(resetCountersAfterExport),
8899 TOJSON_IMPL(runCmd),
8900 TOJSON_IMPL(format)
8901 };
8902 }
8903 static void from_json(const nlohmann::json& j, RallypointServerStreamStatsExport& p)
8904 {
8905 p.clear();
8906 getOptional<std::string>("fileName", p.fileName, j);
8907 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8908 getOptional<bool>("enabled", p.enabled, j, false);
8909 getOptional<bool>("resetCountersAfterExport", p.resetCountersAfterExport, j, false);
8910 getOptional<std::string>("runCmd", p.runCmd, j);
8911 getOptional<RallypointServerStreamStatsExport::ExportFormat_t>("format", p.format, j, RallypointServerStreamStatsExport::ExportFormat_t::fmtCsv);
8912 }
8913
8914 //-----------------------------------------------------------
8915 JSON_SERIALIZED_CLASS(RallypointServerRouteMap)
8917 {
8918 IMPLEMENT_JSON_SERIALIZATION()
8919 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerRouteMap)
8920
8921 public:
8923 std::string fileName;
8924
8927
8930
8932 std::string runCmd;
8933
8935 {
8936 clear();
8937 }
8938
8939 void clear()
8940 {
8941 fileName.clear();
8942 minRefreshSecs = 5;
8943 enabled = false;
8944 }
8945 };
8946
8947 static void to_json(nlohmann::json& j, const RallypointServerRouteMap& p)
8948 {
8949 j = nlohmann::json{
8950 TOJSON_IMPL(fileName),
8951 TOJSON_IMPL(minRefreshSecs),
8952 TOJSON_IMPL(enabled),
8953 TOJSON_IMPL(runCmd)
8954 };
8955 }
8956 static void from_json(const nlohmann::json& j, RallypointServerRouteMap& p)
8957 {
8958 p.clear();
8959 getOptional<std::string>("fileName", p.fileName, j);
8960 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
8961 getOptional<bool>("enabled", p.enabled, j, false);
8962 getOptional<std::string>("runCmd", p.runCmd, j);
8963 }
8964
8965
8966 //-----------------------------------------------------------
8967 JSON_SERIALIZED_CLASS(ExternalHealthCheckResponder)
8978 {
8979 IMPLEMENT_JSON_SERIALIZATION()
8980 IMPLEMENT_JSON_DOCUMENTATION(ExternalHealthCheckResponder)
8981
8982 public:
8983
8986
8989
8991 {
8992 clear();
8993 }
8994
8995 void clear()
8996 {
8997 listenPort = 0;
8998 immediateClose = true;
8999 }
9000 };
9001
9002 static void to_json(nlohmann::json& j, const ExternalHealthCheckResponder& p)
9003 {
9004 j = nlohmann::json{
9005 TOJSON_IMPL(listenPort),
9006 TOJSON_IMPL(immediateClose)
9007 };
9008 }
9009 static void from_json(const nlohmann::json& j, ExternalHealthCheckResponder& p)
9010 {
9011 p.clear();
9012 getOptional<int>("listenPort", p.listenPort, j, 0);
9013 getOptional<bool>("immediateClose", p.immediateClose, j, true);
9014 }
9015
9016
9017 //-----------------------------------------------------------
9018 JSON_SERIALIZED_CLASS(PeeringConfiguration)
9027 {
9028 IMPLEMENT_JSON_SERIALIZATION()
9029 IMPLEMENT_JSON_DOCUMENTATION(PeeringConfiguration)
9030
9031 public:
9032
9034 std::string id;
9035
9038
9040 std::string comments;
9041
9043 std::vector<RallypointPeer> peers;
9044
9046 {
9047 clear();
9048 }
9049
9050 void clear()
9051 {
9052 id.clear();
9053 version = 0;
9054 comments.clear();
9055 }
9056 };
9057
9058 static void to_json(nlohmann::json& j, const PeeringConfiguration& p)
9059 {
9060 j = nlohmann::json{
9061 TOJSON_IMPL(id),
9062 TOJSON_IMPL(version),
9063 TOJSON_IMPL(comments),
9064 TOJSON_IMPL(peers)
9065 };
9066 }
9067 static void from_json(const nlohmann::json& j, PeeringConfiguration& p)
9068 {
9069 p.clear();
9070 getOptional<std::string>("id", p.id, j);
9071 getOptional<int>("version", p.version, j, 0);
9072 getOptional<std::string>("comments", p.comments, j);
9073 getOptional<std::vector<RallypointPeer>>("peers", p.peers, j);
9074 }
9075
9076 //-----------------------------------------------------------
9077 JSON_SERIALIZED_CLASS(IgmpSnooping)
9086 {
9087 IMPLEMENT_JSON_SERIALIZATION()
9088 IMPLEMENT_JSON_DOCUMENTATION(IgmpSnooping)
9089
9090 public:
9091
9094
9097
9100
9101
9102 IgmpSnooping()
9103 {
9104 clear();
9105 }
9106
9107 void clear()
9108 {
9109 enabled = false;
9110 queryIntervalMs = 125000;
9111 subscriptionTimeoutMs = 0;
9112 }
9113 };
9114
9115 static void to_json(nlohmann::json& j, const IgmpSnooping& p)
9116 {
9117 j = nlohmann::json{
9118 TOJSON_IMPL(enabled),
9119 TOJSON_IMPL(queryIntervalMs),
9120 TOJSON_IMPL(subscriptionTimeoutMs)
9121 };
9122 }
9123 static void from_json(const nlohmann::json& j, IgmpSnooping& p)
9124 {
9125 p.clear();
9126 getOptional<bool>("enabled", p.enabled, j);
9127 getOptional<int>("queryIntervalMs", p.queryIntervalMs, j, 125000);
9128 getOptional<int>("subscriptionTimeoutMs", p.subscriptionTimeoutMs, j, 0);
9129 }
9130
9131
9132 //-----------------------------------------------------------
9133 JSON_SERIALIZED_CLASS(RallypointReflector)
9141 {
9142 IMPLEMENT_JSON_SERIALIZATION()
9143 IMPLEMENT_JSON_DOCUMENTATION(RallypointReflector)
9144
9145 public:
9147 typedef enum
9148 {
9150 drNone = 0,
9151
9153 drRxOnly = 1,
9154
9156 drTxOnly = 2
9157 } DirectionRestriction_t;
9158
9162 std::string id;
9163
9166
9169
9172
9174 std::vector<NetworkAddress> additionalTx;
9175
9178
9180 {
9181 clear();
9182 }
9183
9184 void clear()
9185 {
9186 id.clear();
9187 rx.clear();
9188 tx.clear();
9189 multicastInterfaceName.clear();
9190 additionalTx.clear();
9191 directionRestriction = drNone;
9192 }
9193 };
9194
9195 static void to_json(nlohmann::json& j, const RallypointReflector& p)
9196 {
9197 j = nlohmann::json{
9198 TOJSON_IMPL(id),
9199 TOJSON_IMPL(rx),
9200 TOJSON_IMPL(tx),
9201 TOJSON_IMPL(multicastInterfaceName),
9202 TOJSON_IMPL(additionalTx),
9203 TOJSON_IMPL(directionRestriction)
9204 };
9205 }
9206 static void from_json(const nlohmann::json& j, RallypointReflector& p)
9207 {
9208 p.clear();
9209 j.at("id").get_to(p.id);
9210 j.at("rx").get_to(p.rx);
9211 j.at("tx").get_to(p.tx);
9212 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
9213 getOptional<std::vector<NetworkAddress>>("additionalTx", p.additionalTx, j);
9214 getOptional<RallypointReflector::DirectionRestriction_t>("directionRestriction", p.directionRestriction, j, RallypointReflector::DirectionRestriction_t::drNone);
9215 }
9216
9217
9218 //-----------------------------------------------------------
9219 JSON_SERIALIZED_CLASS(RallypointUdpStreamingIpvX)
9227 {
9228 IMPLEMENT_JSON_SERIALIZATION()
9229 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreamingIpvX)
9230
9231 public:
9234
9237
9239 {
9240 clear();
9241 }
9242
9243 void clear()
9244 {
9245 enabled = true;
9246 external.clear();
9247 }
9248 };
9249
9250 static void to_json(nlohmann::json& j, const RallypointUdpStreamingIpvX& p)
9251 {
9252 j = nlohmann::json{
9253 TOJSON_IMPL(enabled),
9254 TOJSON_IMPL(external)
9255 };
9256 }
9257 static void from_json(const nlohmann::json& j, RallypointUdpStreamingIpvX& p)
9258 {
9259 p.clear();
9260 getOptional<bool>("enabled", p.enabled, j, true);
9261 getOptional<NetworkAddress>("external", p.external, j);
9262 }
9263
9264 //-----------------------------------------------------------
9265 JSON_SERIALIZED_CLASS(RallypointUdpStreaming)
9273 {
9274 IMPLEMENT_JSON_SERIALIZATION()
9275 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreaming)
9276
9277 public:
9279 typedef enum
9280 {
9282 ctUnknown = 0,
9283
9285 ctSharedKeyAes256FullIv = 1,
9286
9288 ctSharedKeyAes256IdxIv = 2,
9289
9291 ctSharedKeyChaCha20FullIv = 3,
9292
9294 ctSharedKeyChaCha20IdxIv = 4
9295 } CryptoType_t;
9296
9299
9302
9305
9308
9311
9314
9317
9319 int ttl;
9320
9321
9323 {
9324 clear();
9325 }
9326
9327 void clear()
9328 {
9329 enabled = true;
9330 cryptoType = CryptoType_t::ctSharedKeyAes256FullIv;
9331 listenPort = 7444;
9332 ipv4.clear();
9333 ipv6.clear();
9334 keepaliveIntervalSecs = 15;
9335 priority = TxPriority_t::priVoice;
9336 ttl = 64;
9337 }
9338 };
9339
9340 static void to_json(nlohmann::json& j, const RallypointUdpStreaming& p)
9341 {
9342 j = nlohmann::json{
9343 TOJSON_IMPL(enabled),
9344 TOJSON_IMPL(cryptoType),
9345 TOJSON_IMPL(listenPort),
9346 TOJSON_IMPL(keepaliveIntervalSecs),
9347 TOJSON_IMPL(ipv4),
9348 TOJSON_IMPL(ipv6),
9349 TOJSON_IMPL(priority),
9350 TOJSON_IMPL(ttl)
9351 };
9352 }
9353 static void from_json(const nlohmann::json& j, RallypointUdpStreaming& p)
9354 {
9355 p.clear();
9356 getOptional<bool>("enabled", p.enabled, j, true);
9357 getOptional<RallypointUdpStreaming::CryptoType_t>("cryptoType", p.cryptoType, j, RallypointUdpStreaming::CryptoType_t::ctSharedKeyAes256FullIv);
9358 getOptional<int>("listenPort", p.listenPort, j, 7444);
9359 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
9360 getOptional<RallypointUdpStreamingIpvX>("ipv4", p.ipv4, j);
9361 getOptional<RallypointUdpStreamingIpvX>("ipv6", p.ipv6, j);
9362 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
9363 getOptional<int>("ttl", p.ttl, j, 64);
9364 }
9365
9366 //-----------------------------------------------------------
9367 JSON_SERIALIZED_CLASS(RallypointRpRtTimingBehavior)
9375 {
9376 IMPLEMENT_JSON_SERIALIZATION()
9377 IMPLEMENT_JSON_DOCUMENTATION(RallypointRpRtTimingBehavior)
9378
9379 public:
9381 typedef enum
9382 {
9385
9388
9391
9394
9396 btDrop = 99
9397 } BehaviorType_t;
9398
9401
9403 uint32_t atOrAboveMs;
9404
9406 std::string runCmd;
9407
9409 {
9410 clear();
9411 }
9412
9413 void clear()
9414 {
9415 behavior = btNone;
9416 atOrAboveMs = 0;
9417 runCmd.clear();
9418 }
9419 };
9420
9421 static void to_json(nlohmann::json& j, const RallypointRpRtTimingBehavior& p)
9422 {
9423 j = nlohmann::json{
9424 TOJSON_IMPL(behavior),
9425 TOJSON_IMPL(atOrAboveMs),
9426 TOJSON_IMPL(runCmd)
9427 };
9428 }
9429 static void from_json(const nlohmann::json& j, RallypointRpRtTimingBehavior& p)
9430 {
9431 p.clear();
9432 getOptional<RallypointRpRtTimingBehavior::BehaviorType_t>("behavior", p.behavior, j, RallypointRpRtTimingBehavior::BehaviorType_t::btNone);
9433 getOptional<uint32_t>("atOrAboveMs", p.atOrAboveMs, j, 0);
9434 getOptional<std::string>("runCmd", p.runCmd, j);
9435 }
9436
9437
9438 //-----------------------------------------------------------
9439 JSON_SERIALIZED_CLASS(RallypointWebsocketSettings)
9447 {
9448 IMPLEMENT_JSON_SERIALIZATION()
9449 IMPLEMENT_JSON_DOCUMENTATION(RallypointWebsocketSettings)
9450
9451 public:
9454
9457
9460
9463
9466
9468 {
9469 clear();
9470 }
9471
9472 void clear()
9473 {
9474 enabled = false;
9475 listenPort = 8443;
9476 certificate.clear();
9477 requireClientCertificate = false;
9478 requireTls = true;
9479 }
9480 };
9481
9482 static void to_json(nlohmann::json& j, const RallypointWebsocketSettings& p)
9483 {
9484 j = nlohmann::json{
9485 TOJSON_IMPL(enabled),
9486 TOJSON_IMPL(listenPort),
9487 TOJSON_IMPL(certificate),
9488 TOJSON_IMPL(requireClientCertificate),
9489 TOJSON_IMPL(requireTls)
9490 };
9491 }
9492 static void from_json(const nlohmann::json& j, RallypointWebsocketSettings& p)
9493 {
9494 p.clear();
9495 getOptional<bool>("enabled", p.enabled, j, false);
9496 getOptional<int>("listenPort", p.listenPort, j, 8443);
9497 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9498 getOptional<bool>("requireClientCertificate", p.requireClientCertificate, j, false);
9499 getOptional<bool>("requireTls", p.requireTls, j, true);
9500 }
9501
9502
9503 //-----------------------------------------------------------
9504 JSON_SERIALIZED_CLASS(RallypointQuicSettings)
9513 {
9514 IMPLEMENT_JSON_SERIALIZATION()
9515 IMPLEMENT_JSON_DOCUMENTATION(RallypointQuicSettings)
9516
9517 public:
9520
9523
9525 {
9526 clear();
9527 }
9528
9529 void clear()
9530 {
9531 enabled = false;
9532 listenPort = 7443;
9533 }
9534 };
9535
9536 static void to_json(nlohmann::json& j, const RallypointQuicSettings& p)
9537 {
9538 j = nlohmann::json{
9539 TOJSON_IMPL(enabled),
9540 TOJSON_IMPL(listenPort)
9541 };
9542 }
9543 static void from_json(const nlohmann::json& j, RallypointQuicSettings& p)
9544 {
9545 p.clear();
9546 getOptional<bool>("enabled", p.enabled, j, false);
9547 getOptional<int>("listenPort", p.listenPort, j, 7443);
9548 }
9549
9550
9551
9552 //-----------------------------------------------------------
9553 JSON_SERIALIZED_CLASS(RallypointAdvertisingSettings)
9561 {
9562 IMPLEMENT_JSON_SERIALIZATION()
9563 IMPLEMENT_JSON_DOCUMENTATION(RallypointAdvertisingSettings)
9564
9565 public:
9568
9570 std::string hostName;
9571
9573 std::string serviceName;
9574
9576 std::string interfaceName;
9577
9579 int port;
9580
9582 int ttl;
9583
9585 {
9586 clear();
9587 }
9588
9589 void clear()
9590 {
9591 enabled = false;
9592 hostName.clear();
9593 serviceName = "_rallypoint._tcp.local.";
9594 interfaceName.clear();
9595 port = 0;
9596 ttl = 60;
9597 }
9598 };
9599
9600 static void to_json(nlohmann::json& j, const RallypointAdvertisingSettings& p)
9601 {
9602 j = nlohmann::json{
9603 TOJSON_IMPL(enabled),
9604 TOJSON_IMPL(hostName),
9605 TOJSON_IMPL(serviceName),
9606 TOJSON_IMPL(interfaceName),
9607 TOJSON_IMPL(port),
9608 TOJSON_IMPL(ttl)
9609 };
9610 }
9611 static void from_json(const nlohmann::json& j, RallypointAdvertisingSettings& p)
9612 {
9613 p.clear();
9614 getOptional<bool>("enabled", p.enabled, j, false);
9615 getOptional<std::string>("hostName", p.hostName, j);
9616 getOptional<std::string>("serviceName", p.serviceName, j, "_rallypoint._tcp.local.");
9617 getOptional<std::string>("interfaceName", p.interfaceName, j);
9618
9619 getOptional<int>("port", p.port, j, 0);
9620 getOptional<int>("ttl", p.ttl, j, 60);
9621 }
9622
9623
9624
9625
9626 //-----------------------------------------------------------
9627 JSON_SERIALIZED_CLASS(NamedIdentity)
9635 {
9636 IMPLEMENT_JSON_SERIALIZATION()
9637 IMPLEMENT_JSON_DOCUMENTATION(NamedIdentity)
9638
9639 public:
9641 std::string name;
9642
9645
9647 {
9648 clear();
9649 }
9650
9651 void clear()
9652 {
9653 name.clear();
9654 certificate.clear();
9655 }
9656 };
9657
9658 static void to_json(nlohmann::json& j, const NamedIdentity& p)
9659 {
9660 j = nlohmann::json{
9661 TOJSON_IMPL(name),
9662 TOJSON_IMPL(certificate)
9663 };
9664 }
9665 static void from_json(const nlohmann::json& j, NamedIdentity& p)
9666 {
9667 p.clear();
9668 getOptional<std::string>("name", p.name, j);
9669 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9670 }
9671
9672 //-----------------------------------------------------------
9673 JSON_SERIALIZED_CLASS(RallypointExtendedGroupRestriction)
9681 {
9682 IMPLEMENT_JSON_SERIALIZATION()
9683 IMPLEMENT_JSON_DOCUMENTATION(RallypointExtendedGroupRestriction)
9684
9685 public:
9687 std::string id;
9688
9690 std::vector<StringRestrictionList> restrictions;
9691
9693 {
9694 clear();
9695 }
9696
9697 void clear()
9698 {
9699 id.clear();
9700 restrictions.clear();
9701 }
9702 };
9703
9704 static void to_json(nlohmann::json& j, const RallypointExtendedGroupRestriction& p)
9705 {
9706 j = nlohmann::json{
9707 TOJSON_IMPL(id),
9708 TOJSON_IMPL(restrictions)
9709 };
9710 }
9711 static void from_json(const nlohmann::json& j, RallypointExtendedGroupRestriction& p)
9712 {
9713 p.clear();
9714 getOptional<std::string>("id", p.id, j);
9715 getOptional<std::vector<StringRestrictionList>>("restrictions", p.restrictions, j);
9716 }
9717
9718 //-----------------------------------------------------------
9719 JSON_SERIALIZED_CLASS(RtiCloudSettings)
9726 {
9727 IMPLEMENT_JSON_SERIALIZATION()
9728 IMPLEMENT_JSON_DOCUMENTATION(RtiCloudSettings)
9729
9730 public:
9733
9735 std::string enrollmentCode;
9736
9739
9741 {
9742 clear();
9743 }
9744
9745 void clear()
9746 {
9747 enabled = false;
9748 enrollmentCode.clear();
9749 serviceBaseUrlPrefix = "prod.com";
9750 }
9751 };
9752
9753 static void to_json(nlohmann::json& j, const RtiCloudSettings& p)
9754 {
9755 j = nlohmann::json{
9756 TOJSON_IMPL(enabled),
9757 TOJSON_IMPL(enrollmentCode),
9758 TOJSON_IMPL(serviceBaseUrlPrefix)
9759 };
9760 }
9761 static void from_json(const nlohmann::json& j, RtiCloudSettings& p)
9762 {
9763 p.clear();
9764 getOptional<bool>("enabled", p.enabled, j, false);
9765 getOptional<std::string>("enrollmentCode", p.enrollmentCode, j);
9766 getOptional<std::string>("serviceBaseUrlPrefix", p.serviceBaseUrlPrefix, j, "prod.com");
9767 }
9768
9769 //-----------------------------------------------------------
9770 JSON_SERIALIZED_CLASS(NsmNodeScripts)
9777 {
9778 IMPLEMENT_JSON_SERIALIZATION()
9779 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeScripts)
9780
9781 public:
9782 std::string onIdle;
9783 std::string beforeGoingActive;
9784 std::string onGoingActive;
9785 std::string beforeActive;
9786 std::string onActive;
9787 std::string inDashboard;
9788 std::string onStatusReport;
9789
9791 {
9792 clear();
9793 }
9794
9795 void clear()
9796 {
9797 onIdle.clear();
9798 beforeGoingActive.clear();
9799 onGoingActive.clear();
9800 beforeActive.clear();
9801 onActive.clear();
9802 inDashboard.clear();
9803 onStatusReport.clear();
9804 }
9805 };
9806
9807 static void to_json(nlohmann::json& j, const NsmNodeScripts& p)
9808 {
9809 j = nlohmann::json{
9810 TOJSON_IMPL(onIdle),
9811 TOJSON_IMPL(beforeGoingActive),
9812 TOJSON_IMPL(onGoingActive),
9813 TOJSON_IMPL(beforeActive),
9814 TOJSON_IMPL(onActive),
9815 TOJSON_IMPL(inDashboard),
9816 TOJSON_IMPL(onStatusReport)
9817 };
9818 }
9819 static void from_json(const nlohmann::json& j, NsmNodeScripts& p)
9820 {
9821 p.clear();
9822 getOptional<std::string>("onIdle", p.onIdle, j);
9823 getOptional<std::string>("beforeGoingActive", p.beforeGoingActive, j);
9824 getOptional<std::string>("onGoingActive", p.onGoingActive, j);
9825 getOptional<std::string>("beforeActive", p.beforeActive, j);
9826 getOptional<std::string>("onActive", p.onActive, j);
9827 getOptional<std::string>("inDashboard", p.inDashboard, j);
9828 getOptional<std::string>("onStatusReport", p.onStatusReport, j);
9829 }
9830
9831 //-----------------------------------------------------------
9832 JSON_SERIALIZED_CLASS(NsmNodeLogging)
9839 {
9840 IMPLEMENT_JSON_SERIALIZATION()
9841 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeLogging)
9842
9843 public:
9848 bool logCommandOutput;
9849 bool logResourceStates;
9850
9852 {
9853 clear();
9854 }
9855
9856 void clear()
9857 {
9858 level = 3;
9859 dashboard = false;
9860 logCommandOutput = false;
9861 logResourceStates = false;
9862 }
9863 };
9864
9865 static void to_json(nlohmann::json& j, const NsmNodeLogging& p)
9866 {
9867 j = nlohmann::json{
9868 TOJSON_IMPL(level),
9869 TOJSON_IMPL(dashboard),
9870 TOJSON_IMPL(logCommandOutput),
9871 TOJSON_IMPL(logResourceStates)
9872 };
9873 }
9874 static void from_json(const nlohmann::json& j, NsmNodeLogging& p)
9875 {
9876 p.clear();
9877 getOptional<int>("level", p.level, j, 3);
9878 getOptional<bool>("dashboard", p.dashboard, j, false);
9879 getOptional<bool>("logCommandOutput", p.logCommandOutput, j, false);
9880 getOptional<bool>("logResourceStates", p.logResourceStates, j, false);
9881 }
9882
9883 //-----------------------------------------------------------
9884 JSON_SERIALIZED_CLASS(NsmNodePeriodic)
9891 {
9892 IMPLEMENT_JSON_SERIALIZATION()
9893 IMPLEMENT_JSON_DOCUMENTATION(NsmNodePeriodic)
9894
9895 public:
9896 std::string id;
9897 int intervalSecs;
9898 std::string command;
9899
9901 {
9902 clear();
9903 }
9904
9905 void clear()
9906 {
9907 id.clear();
9908 intervalSecs = 1;
9909 command.clear();
9910 }
9911 };
9912
9913 static void to_json(nlohmann::json& j, const NsmNodePeriodic& p)
9914 {
9915 j = nlohmann::json{
9916 TOJSON_IMPL(id),
9917 TOJSON_IMPL(intervalSecs),
9918 TOJSON_IMPL(command)
9919 };
9920 }
9921 static void from_json(const nlohmann::json& j, NsmNodePeriodic& p)
9922 {
9923 p.clear();
9924 getOptional<std::string>("id", p.id, j);
9925 getOptional<int>("intervalSecs", p.intervalSecs, j, 1);
9926 getOptional<std::string>("command", p.command, j);
9927 }
9928
9929 //-----------------------------------------------------------
9930 JSON_SERIALIZED_CLASS(NsmNodeCotLocationPollSettings)
9940 {
9941 IMPLEMENT_JSON_SERIALIZATION()
9942 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeCotLocationPollSettings)
9943
9944 public:
9948 std::string runCmd;
9953
9955 {
9956 clear();
9957 }
9958
9959 void clear()
9960 {
9961 enabled = false;
9962 runCmd.clear();
9963 intervalSecs = 10;
9964 failClosed = true;
9965 }
9966 };
9967
9968 static void to_json(nlohmann::json& j, const NsmNodeCotLocationPollSettings& p)
9969 {
9970 j = nlohmann::json{
9971 TOJSON_IMPL(enabled),
9972 TOJSON_IMPL(runCmd),
9973 TOJSON_IMPL(intervalSecs),
9974 TOJSON_IMPL(failClosed)
9975 };
9976 }
9977 static void from_json(const nlohmann::json& j, NsmNodeCotLocationPollSettings& p)
9978 {
9979 p.clear();
9980 getOptional<bool>("enabled", p.enabled, j, false);
9981 getOptional<std::string>("runCmd", p.runCmd, j);
9982 getOptional<int>("intervalSecs", p.intervalSecs, j, 10);
9983 getOptional<bool>("failClosed", p.failClosed, j, true);
9984 }
9985
9986 //-----------------------------------------------------------
9987 JSON_SERIALIZED_CLASS(NsmNodeCotSettings)
9994 {
9995 IMPLEMENT_JSON_SERIALIZATION()
9996 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeCotSettings)
9997
9998 public:
9999 bool useCot;
10000 std::string uid;
10001 std::string type;
10002 std::string how;
10003 std::string lat;
10004 std::string lon;
10005 std::string ce;
10006 std::string hae;
10007 std::string le;
10009 std::string callsign;
10011 std::string detailJson;
10018
10020 {
10021 clear();
10022 }
10023
10024 void clear()
10025 {
10026 useCot = false;
10027 uid.clear();
10028 type.clear();
10029 how.clear();
10030 lat.clear();
10031 lon.clear();
10032 ce.clear();
10033 hae.clear();
10034 le.clear();
10035 callsign.clear();
10036 detailJson.clear();
10037 announceWhenIdle = false;
10038 idleIntervalSecs = 30;
10039 locationPoll.clear();
10040 }
10041 };
10042
10043 static void to_json(nlohmann::json& j, const NsmNodeCotSettings& p)
10044 {
10045 j = nlohmann::json{
10046 TOJSON_IMPL(useCot),
10047 TOJSON_IMPL(uid),
10048 TOJSON_IMPL(type),
10049 TOJSON_IMPL(how),
10050 TOJSON_IMPL(lat),
10051 TOJSON_IMPL(lon),
10052 TOJSON_IMPL(ce),
10053 TOJSON_IMPL(hae),
10054 TOJSON_IMPL(le),
10055 TOJSON_IMPL(callsign),
10056 TOJSON_IMPL(detailJson),
10057 TOJSON_IMPL(announceWhenIdle),
10058 TOJSON_IMPL(idleIntervalSecs),
10059 TOJSON_IMPL(locationPoll)
10060 };
10061 }
10062 static void from_json(const nlohmann::json& j, NsmNodeCotSettings& p)
10063 {
10064 p.clear();
10065 getOptional<bool>("useCot", p.useCot, j, false);
10066 getOptional<std::string>("uid", p.uid, j);
10067 getOptional<std::string>("type", p.type, j);
10068 getOptional<std::string>("how", p.how, j);
10069 getOptional<std::string>("lat", p.lat, j);
10070 getOptional<std::string>("lon", p.lon, j);
10071 getOptional<std::string>("ce", p.ce, j);
10072 getOptional<std::string>("hae", p.hae, j);
10073 getOptional<std::string>("le", p.le, j);
10074 getOptional<std::string>("callsign", p.callsign, j);
10075 getOptional<std::string>("detailJson", p.detailJson, j);
10076 getOptional<bool>("announceWhenIdle", p.announceWhenIdle, j, false);
10077 getOptional<int>("idleIntervalSecs", p.idleIntervalSecs, j, 30);
10078 getOptional<NsmNodeCotLocationPollSettings>("locationPoll", p.locationPoll, j);
10079 }
10080
10081 //-----------------------------------------------------------
10082 JSON_SERIALIZED_CLASS(StatusUploadConfiguration)
10095 {
10096 IMPLEMENT_JSON_SERIALIZATION()
10097 IMPLEMENT_JSON_DOCUMENTATION(StatusUploadConfiguration)
10098
10099 public:
10101 std::string baseUrl;
10102
10105
10110 std::string apiKey;
10111
10118
10120 {
10121 clear();
10122 }
10123
10124 void clear()
10125 {
10126 baseUrl.clear();
10127 timeoutSecs = 3;
10128 apiKey.clear();
10129 tls.clear();
10130 }
10131 };
10132
10133 static void to_json(nlohmann::json& j, const StatusUploadConfiguration& p)
10134 {
10135 j = nlohmann::json{
10136 TOJSON_IMPL(baseUrl),
10137 TOJSON_IMPL(timeoutSecs),
10138 TOJSON_IMPL(apiKey),
10139 TOJSON_IMPL(tls)
10140 };
10141 }
10142 static void from_json(const nlohmann::json& j, StatusUploadConfiguration& p)
10143 {
10144 p.clear();
10145 getOptional<std::string>("baseUrl", p.baseUrl, j);
10146 getOptional<int>("timeoutSecs", p.timeoutSecs, j, 3);
10147 getOptional<std::string>("apiKey", p.apiKey, j);
10148 getOptional<Tls>("tls", p.tls, j);
10149 }
10150
10151 //-----------------------------------------------------------
10152 JSON_SERIALIZED_CLASS(NsmNodeStatusReportImmediateConfiguration)
10164 {
10165 IMPLEMENT_JSON_SERIALIZATION()
10166 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeStatusReportImmediateConfiguration)
10167
10168 public:
10177
10179 {
10180 clear();
10181 }
10182
10183 void clear()
10184 {
10185 enabled = false;
10186 minIntervalSecs = 3;
10187 onStateChange = true;
10188 onOwnerChange = true;
10189 }
10190 };
10191
10192 static void to_json(nlohmann::json& j, const NsmNodeStatusReportImmediateConfiguration& p)
10193 {
10194 j = nlohmann::json{
10195 TOJSON_IMPL(enabled),
10196 TOJSON_IMPL(minIntervalSecs),
10197 TOJSON_IMPL(onStateChange),
10198 TOJSON_IMPL(onOwnerChange)
10199 };
10200 }
10201 static void from_json(const nlohmann::json& j, NsmNodeStatusReportImmediateConfiguration& p)
10202 {
10203 p.clear();
10204 getOptional<bool>("enabled", p.enabled, j, false);
10205 getOptional<int>("minIntervalSecs", p.minIntervalSecs, j, 3);
10206 getOptional<bool>("onStateChange", p.onStateChange, j, true);
10207 getOptional<bool>("onOwnerChange", p.onOwnerChange, j, true);
10208 }
10209
10210 //-----------------------------------------------------------
10211 JSON_SERIALIZED_CLASS(NsmNodeStatusReportConfiguration)
10222 {
10223 IMPLEMENT_JSON_SERIALIZATION()
10224 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeStatusReportConfiguration)
10225
10226 public:
10228 std::string fileName;
10229
10232
10235
10237 std::string runCmd;
10238
10241
10244
10246 {
10247 clear();
10248 }
10249
10250 void clear()
10251 {
10252 fileName.clear();
10253 intervalSecs = 60;
10254 enabled = false;
10255 includeResourceDetail = false;
10256 runCmd.clear();
10257 immediate.clear();
10258 }
10259 };
10260
10261 static void to_json(nlohmann::json& j, const NsmNodeStatusReportConfiguration& p)
10262 {
10263 j = nlohmann::json{
10264 TOJSON_IMPL(fileName),
10265 TOJSON_IMPL(intervalSecs),
10266 TOJSON_IMPL(enabled),
10267 TOJSON_IMPL(includeResourceDetail),
10268 TOJSON_IMPL(runCmd),
10269 TOJSON_IMPL(immediate)
10270 };
10271 }
10272 static void from_json(const nlohmann::json& j, NsmNodeStatusReportConfiguration& p)
10273 {
10274 p.clear();
10275 getOptional<std::string>("fileName", p.fileName, j);
10276 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
10277 getOptional<bool>("enabled", p.enabled, j, false);
10278 getOptional<std::string>("runCmd", p.runCmd, j);
10279 getOptional<bool>("includeResourceDetail", p.includeResourceDetail, j, false);
10280 getOptional<NsmNodeStatusReportImmediateConfiguration>("immediate", p.immediate, j);
10281 }
10282
10283 //-----------------------------------------------------------
10284 JSON_SERIALIZED_CLASS(NsmNodeElectionGateSettings)
10295 {
10296 IMPLEMENT_JSON_SERIALIZATION()
10297 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeElectionGateSettings)
10298
10299 public:
10303 std::string runCmd;
10308
10310 {
10311 clear();
10312 }
10313
10314 void clear()
10315 {
10316 enabled = false;
10317 runCmd.clear();
10318 intervalSecs = 2;
10319 failClosed = true;
10320 }
10321 };
10322
10323 static void to_json(nlohmann::json& j, const NsmNodeElectionGateSettings& p)
10324 {
10325 j = nlohmann::json{
10326 TOJSON_IMPL(enabled),
10327 TOJSON_IMPL(runCmd),
10328 TOJSON_IMPL(intervalSecs),
10329 TOJSON_IMPL(failClosed)
10330 };
10331 }
10332 static void from_json(const nlohmann::json& j, NsmNodeElectionGateSettings& p)
10333 {
10334 p.clear();
10335 getOptional<bool>("enabled", p.enabled, j, false);
10336 getOptional<std::string>("runCmd", p.runCmd, j);
10337 getOptional<int>("intervalSecs", p.intervalSecs, j, 2);
10338 getOptional<bool>("failClosed", p.failClosed, j, true);
10339 }
10340
10341 //-----------------------------------------------------------
10342 JSON_SERIALIZED_CLASS(NsmNodeActiveHealthCheckSettings)
10355 {
10356 IMPLEMENT_JSON_SERIALIZATION()
10357 IMPLEMENT_JSON_DOCUMENTATION(NsmNodeActiveHealthCheckSettings)
10358
10359 public:
10363 std::string runCmd;
10372
10374 {
10375 clear();
10376 }
10377
10378 void clear()
10379 {
10380 enabled = false;
10381 runCmd.clear();
10382 intervalSecs = 5;
10383 unhealthyGraceMs = 5000;
10384 releaseCooldownSecs = 30;
10385 failClosed = true;
10386 }
10387 };
10388
10389 static void to_json(nlohmann::json& j, const NsmNodeActiveHealthCheckSettings& p)
10390 {
10391 j = nlohmann::json{
10392 TOJSON_IMPL(enabled),
10393 TOJSON_IMPL(runCmd),
10394 TOJSON_IMPL(intervalSecs),
10395 TOJSON_IMPL(unhealthyGraceMs),
10396 TOJSON_IMPL(releaseCooldownSecs),
10397 TOJSON_IMPL(failClosed)
10398 };
10399 }
10400 static void from_json(const nlohmann::json& j, NsmNodeActiveHealthCheckSettings& p)
10401 {
10402 p.clear();
10403 getOptional<bool>("enabled", p.enabled, j, false);
10404 getOptional<std::string>("runCmd", p.runCmd, j);
10405 getOptional<int>("intervalSecs", p.intervalSecs, j, 5);
10406 getOptional<int>("unhealthyGraceMs", p.unhealthyGraceMs, j, 5000);
10407 getOptional<int>("releaseCooldownSecs", p.releaseCooldownSecs, j, 30);
10408 getOptional<bool>("failClosed", p.failClosed, j, true);
10409 }
10410
10411 //-----------------------------------------------------------
10412 JSON_SERIALIZED_CLASS(NsmNode)
10422 {
10423 IMPLEMENT_JSON_SERIALIZATION()
10424 IMPLEMENT_JSON_DOCUMENTATION(NsmNode)
10425
10426 public:
10427
10430
10433
10435 std::string id;
10436
10438 std::string name;
10439
10441 std::string domainId;
10442
10445
10448
10451
10454
10457
10460
10463
10466
10469
10471 std::vector<NsmNodePeriodic> periodics;
10472
10475
10478
10481
10484
10487
10490
10493
10496
10499
10502
10503 NsmNode()
10504 {
10505 clear();
10506 }
10507
10508 void clear()
10509 {
10510 fipsCrypto.clear();
10511 watchdog.clear();
10512 id.clear();
10513 name.clear();
10514 domainId.clear();
10515 multicastInterfaceName.clear();
10516 stateMachine.clear();
10517 defaultPriority = 0;
10518 fixedToken = -1;
10519 dashboardToken = false;
10520 scripts.clear();
10521 logging.clear();
10522 cot.clear();
10523 periodics.clear();
10524 electionGate.clear();
10525 activeHealthCheck.clear();
10526 statusReport.clear();
10527 statusUpload.clear();
10528 configurationCheckSignalName = "rts.7b392d1.${id}";
10529 licensing.clear();
10530 featureset.clear();
10531 rxCapture.clear();
10532 txCapture.clear();
10533 tuning.clear();
10534 ipFamily = IpFamilyType_t::ifIp4;
10535 }
10536 };
10537
10538 static void to_json(nlohmann::json& j, const NsmNode& p)
10539 {
10540 j = nlohmann::json{
10541 TOJSON_IMPL(fipsCrypto),
10542 TOJSON_IMPL(watchdog),
10543 TOJSON_IMPL(id),
10544 TOJSON_IMPL(name),
10545 TOJSON_IMPL(domainId),
10546 TOJSON_IMPL(multicastInterfaceName),
10547 TOJSON_IMPL(stateMachine),
10548 TOJSON_IMPL(defaultPriority),
10549 TOJSON_IMPL(fixedToken),
10550 TOJSON_IMPL(dashboardToken),
10551 TOJSON_IMPL(scripts),
10552 TOJSON_IMPL(logging),
10553 TOJSON_IMPL(cot),
10554 TOJSON_IMPL(periodics),
10555 TOJSON_IMPL(electionGate),
10556 TOJSON_IMPL(activeHealthCheck),
10557 TOJSON_IMPL(statusReport),
10558 TOJSON_IMPL(statusUpload),
10559 TOJSON_IMPL(configurationCheckSignalName),
10560 TOJSON_IMPL(featureset),
10561 TOJSON_IMPL(licensing),
10562 TOJSON_IMPL(ipFamily),
10563 TOJSON_IMPL(rxCapture),
10564 TOJSON_IMPL(txCapture),
10565 TOJSON_IMPL(tuning)
10566 };
10567 }
10568 static void from_json(const nlohmann::json& j, NsmNode& p)
10569 {
10570 p.clear();
10571 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
10572 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
10573 getOptional<std::string>("id", p.id, j);
10574 getOptional<std::string>("name", p.name, j);
10575 getOptional<std::string>("domainId", p.domainId, j);
10576 // Legacy alias from older configs.
10577 if(p.domainId.empty())
10578 {
10579 getOptional<std::string>("domainName", p.domainId, j);
10580 }
10581 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
10582 getOptional<NsmConfiguration>("stateMachine", p.stateMachine, j);
10583 getOptional<int>("defaultPriority", p.defaultPriority, j, 0);
10584 getOptional<int>("fixedToken", p.fixedToken, j, -1);
10585 getOptional<bool>("dashboardToken", p.dashboardToken, j, false);
10586 getOptional<NsmNodeScripts>("scripts", p.scripts, j);
10587 getOptional<NsmNodeLogging>("logging", p.logging, j);
10588 getOptional<NsmNodeCotSettings>("cot", p.cot, j);
10589 getOptional<std::vector<NsmNodePeriodic>>("periodics", p.periodics, j);
10590 getOptional<NsmNodeElectionGateSettings>("electionGate", p.electionGate, j);
10591 getOptional<NsmNodeActiveHealthCheckSettings>("activeHealthCheck", p.activeHealthCheck, j);
10592 getOptional<NsmNodeStatusReportConfiguration>("statusReport", p.statusReport, j);
10593 getOptional<StatusUploadConfiguration>("statusUpload", p.statusUpload, j);
10594 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.7b392d1.${id}");
10595 getOptional<Licensing>("licensing", p.licensing, j);
10596 getOptional<Featureset>("featureset", p.featureset, j);
10597 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
10598 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
10599 getOptional<TuningSettings>("tuning", p.tuning, j);
10600 getOptional<IpFamilyType_t>("ipFamily", p.ipFamily, j, IpFamilyType_t::ifIp4);
10601 }
10602
10604 static inline void nsmNodeFromEmbeddedServerJson(const nlohmann::json &j, const char *key, NsmNode &node)
10605 {
10606 node.clear();
10607 if (!j.contains(key))
10608 {
10609 return;
10610 }
10611
10612 const nlohmann::json &nj = j.at(key);
10613 if (!nj.is_object())
10614 {
10615 return;
10616 }
10617
10618 if (nj.contains("stateMachine") || nj.contains("cot") || nj.contains("scripts")
10619 || nj.contains("periodics") || nj.contains("electionGate") || nj.contains("activeHealthCheck")
10620 || nj.contains("statusReport") || nj.contains("multicastInterfaceName"))
10621 {
10622 nj.get_to(node);
10623 return;
10624 }
10625
10626 nj.get_to(node.stateMachine);
10627 }
10628
10629 //-----------------------------------------------------------
10630 JSON_SERIALIZED_CLASS(NsmSettings)
10648 {
10649 IMPLEMENT_JSON_SERIALIZATION()
10650 IMPLEMENT_JSON_DOCUMENTATION(NsmSettings)
10651
10652 public:
10655
10657 std::vector<NsmNode> nodes;
10658
10659 NsmSettings()
10660 {
10661 clear();
10662 }
10663
10664 void clear()
10665 {
10666 statusReport.clear();
10667 nodes.clear();
10668 }
10669 };
10670
10671 static void to_json(nlohmann::json& j, const NsmSettings& p)
10672 {
10673 j = nlohmann::json{
10674 TOJSON_IMPL(statusReport),
10675 TOJSON_IMPL(nodes)
10676 };
10677 }
10678 static void from_json(const nlohmann::json& j, NsmSettings& p)
10679 {
10680 p.clear();
10681 getOptional<NsmNodeStatusReportConfiguration>("statusReport", p.statusReport, j);
10682 getOptional<std::vector<NsmNode>>("nodes", p.nodes, j);
10683 }
10684
10686 static inline void bridgingServerNsmFromJson(const nlohmann::json &j, NsmSettings &nsm)
10687 {
10688 nsm.clear();
10689 if(j.contains("nsm") && j.at("nsm").is_object())
10690 {
10691 j.at("nsm").get_to(nsm);
10692 return;
10693 }
10694
10695 // Legacy: top-level nsmNodes array
10696 if(j.contains("nsmNodes") && j.at("nsmNodes").is_array())
10697 {
10698 getOptional<std::vector<NsmNode>>("nsmNodes", nsm.nodes, j);
10699 return;
10700 }
10701
10702 // Legacy: singular nsmNode object
10703 if(j.contains("nsmNode") && j.at("nsmNode").is_object())
10704 {
10705 NsmNode node;
10706 nsmNodeFromEmbeddedServerJson(j, "nsmNode", node);
10707 if(!node.id.empty() || !node.stateMachine.networking.address.empty())
10708 {
10709 nsm.nodes.push_back(node);
10710 }
10711 }
10712 }
10713 //-----------------------------------------------------------
10714 JSON_SERIALIZED_CLASS(RallypointServer)
10724 {
10725 IMPLEMENT_JSON_SERIALIZATION()
10726 IMPLEMENT_JSON_DOCUMENTATION(RallypointServer)
10727
10728 public:
10729 typedef enum
10730 {
10731 sptDefault = 0,
10732 sptCertificate = 1,
10733 sptCertPublicKey = 2,
10734 sptCertSubject = 3,
10735 sptCertIssuer = 4,
10736 sptCertFingerprint = 5,
10737 sptCertSerial = 6,
10738 sptSubjectC = 7,
10739 sptSubjectST = 8,
10740 sptSubjectL = 9,
10741 sptSubjectO = 10,
10742 sptSubjectOU = 11,
10743 sptSubjectCN = 12,
10744 sptIssuerC = 13,
10745 sptIssuerST = 14,
10746 sptIssuerL = 15,
10747 sptIssuerO = 16,
10748 sptIssuerOU = 17,
10749 sptIssuerCN = 18
10750 } StreamIdPrivacyType_t;
10751
10753 StreamIdPrivacyType_t streamIdPrivacyType;
10754
10757
10760
10763
10765 std::string id;
10766
10768 std::string name;
10769
10772
10775
10777 std::string interfaceName;
10778
10781
10784
10787
10790
10793
10796
10799
10802
10805
10808
10811
10814
10817
10820
10823
10826
10829
10831 PeeringConfiguration peeringConfiguration; // NOTE: This is NOT serialized
10832
10835
10838
10841
10844
10846 std::vector<RallypointReflector> staticReflectors;
10847
10850
10853
10856
10859
10862
10865
10867 std::vector<RallypointExtendedGroupRestriction> extendedGroupRestrictions;
10868
10871
10874
10877
10880
10882 uint32_t sysFlags;
10883
10886
10889
10892
10895
10898
10901
10904
10907
10909 std::vector<RallypointRpRtTimingBehavior> peerRtBehaviors;
10910
10913
10916
10919
10922
10925
10928
10931
10933 std::string domainName;
10934
10936 std::vector<std::string> allowedDomains;
10937
10939 std::vector<std::string> blockedDomains;
10940
10942 std::vector<std::string> extraDomains;
10943
10946
10948 std::vector<NamedIdentity> additionalIdentities;
10949
10951 {
10952 clear();
10953 }
10954
10955 void clear()
10956 {
10957 fipsCrypto.clear();
10958 watchdog.clear();
10959 logging.clear();
10960 id.clear();
10961 name.clear();
10962 listenPort = 7443;
10963 interfaceName.clear();
10964 certificate.clear();
10965 allowMulticastForwarding = false;
10966 peeringConfiguration.clear();
10967 peeringConfigurationFileName.clear();
10968 peeringConfigurationFileCommand.clear();
10969 peeringConfigurationFileCheckSecs = 60;
10970 ioPools = -1;
10971 statusReport.clear();
10972 statusUpload.clear();
10973 limits.clear();
10974 linkGraph.clear();
10975 externalHealthCheckResponder.clear();
10976 allowPeerForwarding = false;
10977 multicastInterfaceName.clear();
10978 tls.clear();
10979 discovery.clear();
10980 forwardDiscoveredGroups = false;
10981 forwardMulticastAddressing = false;
10982 isMeshLeaf = false;
10983 disableMessageSigning = false;
10984 multicastRestrictions.clear();
10985 igmpSnooping.clear();
10986 staticReflectors.clear();
10987 tcpTxOptions.clear();
10988 multicastTxOptions.clear();
10989 certStoreFileName.clear();
10990 certStorePasswordHex.clear();
10991 groupRestrictions.clear();
10992 configurationCheckSignalName = "rts.7b392d1.${id}";
10993 licensing.clear();
10994 featureset.clear();
10995 udpStreaming.clear();
10996 sysFlags = 0;
10997 normalTaskQueueBias = 0;
10998 enableLeafReflectionReverseSubscription = false;
10999 disableLoopDetection = false;
11000 maxSecurityLevel = 0;
11001 routeMap.clear();
11002 streamStatsExport.clear();
11003 maxOutboundPeerConnectionIntervalDeltaSecs = 15;
11004 peerRtTestIntervalMs = 60000;
11005 peerRtBehaviors.clear();
11006 websocket.clear();
11007 quic.clear();
11008 nsm.clear();
11009 advertising.clear();
11010 rtiCloud.clear();
11011 extendedGroupRestrictions.clear();
11012 groupRestrictionAccessPolicyType = GroupRestrictionAccessPolicyType_t::graptPermissive;
11013 ipFamily = IpFamilyType_t::ifIp4;
11014 rxCapture.clear();
11015 txCapture.clear();
11016 domainName.clear();
11017 allowedDomains.clear();
11018 blockedDomains.clear();
11019 extraDomains.clear();
11020 tuning.clear();
11021 additionalIdentities.clear();
11022 streamIdPrivacyType = StreamIdPrivacyType_t::sptDefault;
11023 }
11024 };
11025
11026 static void to_json(nlohmann::json& j, const RallypointServer& p)
11027 {
11028 j = nlohmann::json{
11029 TOJSON_IMPL(fipsCrypto),
11030 TOJSON_IMPL(watchdog),
11031 TOJSON_IMPL(logging),
11032 TOJSON_IMPL(id),
11033 TOJSON_IMPL(name),
11034 TOJSON_IMPL(listenPort),
11035 TOJSON_IMPL(interfaceName),
11036 TOJSON_IMPL(certificate),
11037 TOJSON_IMPL(allowMulticastForwarding),
11038 // TOJSON_IMPL(peeringConfiguration), // NOTE: Not serialized!
11039 TOJSON_IMPL(peeringConfigurationFileName),
11040 TOJSON_IMPL(peeringConfigurationFileCommand),
11041 TOJSON_IMPL(peeringConfigurationFileCheckSecs),
11042 TOJSON_IMPL(ioPools),
11043 TOJSON_IMPL(statusReport),
11044 TOJSON_IMPL(statusUpload),
11045 TOJSON_IMPL(limits),
11046 TOJSON_IMPL(linkGraph),
11047 TOJSON_IMPL(externalHealthCheckResponder),
11048 TOJSON_IMPL(allowPeerForwarding),
11049 TOJSON_IMPL(multicastInterfaceName),
11050 TOJSON_IMPL(tls),
11051 TOJSON_IMPL(discovery),
11052 TOJSON_IMPL(forwardDiscoveredGroups),
11053 TOJSON_IMPL(forwardMulticastAddressing),
11054 TOJSON_IMPL(isMeshLeaf),
11055 TOJSON_IMPL(disableMessageSigning),
11056 TOJSON_IMPL(multicastRestrictions),
11057 TOJSON_IMPL(igmpSnooping),
11058 TOJSON_IMPL(staticReflectors),
11059 TOJSON_IMPL(tcpTxOptions),
11060 TOJSON_IMPL(multicastTxOptions),
11061 TOJSON_IMPL(certStoreFileName),
11062 TOJSON_IMPL(certStorePasswordHex),
11063 TOJSON_IMPL(groupRestrictions),
11064 TOJSON_IMPL(configurationCheckSignalName),
11065 TOJSON_IMPL(featureset),
11066 TOJSON_IMPL(licensing),
11067 TOJSON_IMPL(udpStreaming),
11068 TOJSON_IMPL(sysFlags),
11069 TOJSON_IMPL(normalTaskQueueBias),
11070 TOJSON_IMPL(enableLeafReflectionReverseSubscription),
11071 TOJSON_IMPL(disableLoopDetection),
11072 TOJSON_IMPL(maxSecurityLevel),
11073 TOJSON_IMPL(routeMap),
11074 TOJSON_IMPL(streamStatsExport),
11075 TOJSON_IMPL(maxOutboundPeerConnectionIntervalDeltaSecs),
11076 TOJSON_IMPL(peerRtTestIntervalMs),
11077 TOJSON_IMPL(peerRtBehaviors),
11078 TOJSON_IMPL(websocket),
11079 TOJSON_IMPL(quic),
11080 TOJSON_IMPL(nsm),
11081 TOJSON_IMPL(advertising),
11082 TOJSON_IMPL(rtiCloud),
11083 TOJSON_IMPL(extendedGroupRestrictions),
11084 TOJSON_IMPL(groupRestrictionAccessPolicyType),
11085 TOJSON_IMPL(ipFamily),
11086 TOJSON_IMPL(rxCapture),
11087 TOJSON_IMPL(txCapture),
11088 TOJSON_IMPL(domainName),
11089 TOJSON_IMPL(allowedDomains),
11090 TOJSON_IMPL(blockedDomains),
11091 TOJSON_IMPL(extraDomains),
11092 TOJSON_IMPL(tuning),
11093 TOJSON_IMPL(additionalIdentities),
11094 TOJSON_IMPL(streamIdPrivacyType)
11095 };
11096 }
11097 static void from_json(const nlohmann::json& j, RallypointServer& p)
11098 {
11099 p.clear();
11100 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
11101 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
11102 getOptional<EnginePolicyLogging>("logging", p.logging, j);
11103 getOptional<std::string>("id", p.id, j);
11104 getOptional<std::string>("name", p.name, j);
11105 getOptional<SecurityCertificate>("certificate", p.certificate, j);
11106 getOptional<std::string>("interfaceName", p.interfaceName, j);
11107 getOptional<int>("listenPort", p.listenPort, j, 7443);
11108 getOptional<bool>("allowMulticastForwarding", p.allowMulticastForwarding, j, false);
11109 //getOptional<PeeringConfiguration>("peeringConfiguration", p.peeringConfiguration, j); // NOTE: Not serialized!
11110 getOptional<std::string>("peeringConfigurationFileName", p.peeringConfigurationFileName, j);
11111 getOptional<std::string>("peeringConfigurationFileCommand", p.peeringConfigurationFileCommand, j);
11112 getOptional<int>("peeringConfigurationFileCheckSecs", p.peeringConfigurationFileCheckSecs, j, 60);
11113 getOptional<int>("ioPools", p.ioPools, j, -1);
11114 getOptional<RallypointServerStatusReportConfiguration>("statusReport", p.statusReport, j);
11115 getOptional<StatusUploadConfiguration>("statusUpload", p.statusUpload, j);
11116 getOptional<RallypointServerLimits>("limits", p.limits, j);
11117 getOptional<RallypointServerLinkGraph>("linkGraph", p.linkGraph, j);
11118 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
11119 getOptional<bool>("allowPeerForwarding", p.allowPeerForwarding, j, false);
11120 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
11121 getOptional<Tls>("tls", p.tls, j);
11122 getOptional<DiscoveryConfiguration>("discovery", p.discovery, j);
11123 getOptional<bool>("forwardDiscoveredGroups", p.forwardDiscoveredGroups, j, false);
11124 getOptional<bool>("forwardMulticastAddressing", p.forwardMulticastAddressing, j, false);
11125 getOptional<bool>("isMeshLeaf", p.isMeshLeaf, j, false);
11126 getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
11127 getOptional<NetworkAddressRestrictionList>("multicastRestrictions", p.multicastRestrictions, j);
11128 getOptional<IgmpSnooping>("igmpSnooping", p.igmpSnooping, j);
11129 getOptional<std::vector<RallypointReflector>>("staticReflectors", p.staticReflectors, j);
11130 getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
11131 getOptional<NetworkTxOptions>("multicastTxOptions", p.multicastTxOptions, j);
11132 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
11133 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
11134 getOptional<StringRestrictionList>("groupRestrictions", p.groupRestrictions, j);
11135 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.7b392d1.${id}");
11136 getOptional<Licensing>("licensing", p.licensing, j);
11137 getOptional<Featureset>("featureset", p.featureset, j);
11138 getOptional<RallypointUdpStreaming>("udpStreaming", p.udpStreaming, j);
11139 getOptional<uint32_t>("sysFlags", p.sysFlags, j, 0);
11140 getOptional<uint32_t>("normalTaskQueueBias", p.normalTaskQueueBias, j, 0);
11141 getOptional<bool>("enableLeafReflectionReverseSubscription", p.enableLeafReflectionReverseSubscription, j, false);
11142 getOptional<bool>("disableLoopDetection", p.disableLoopDetection, j, false);
11143 getOptional<uint32_t>("maxSecurityLevel", p.maxSecurityLevel, j, 0);
11144 getOptional<RallypointServerRouteMap>("routeMap", p.routeMap, j);
11145 getOptional<RallypointServerStreamStatsExport>("streamStatsExport", p.streamStatsExport, j);
11146 getOptional<uint32_t>("maxOutboundPeerConnectionIntervalDeltaSecs", p.maxOutboundPeerConnectionIntervalDeltaSecs, j, 15);
11147 getOptional<int>("peerRtTestIntervalMs", p.peerRtTestIntervalMs, j, 60000);
11148 getOptional<std::vector<RallypointRpRtTimingBehavior>>("peerRtBehaviors", p.peerRtBehaviors, j);
11149 getOptional<RallypointWebsocketSettings>("websocket", p.websocket, j);
11150 getOptional<RallypointQuicSettings>("quic", p.quic, j);
11151 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
11152 getOptional<RallypointAdvertisingSettings>("advertising", p.advertising, j);
11153 getOptional<RtiCloudSettings>("rtiCloud", p.rtiCloud, j);
11154 getOptional<std::vector<RallypointExtendedGroupRestriction>>("extendedGroupRestrictions", p.extendedGroupRestrictions, j);
11155 getOptional<GroupRestrictionAccessPolicyType_t>("groupRestrictionAccessPolicyType", p.groupRestrictionAccessPolicyType, j, GroupRestrictionAccessPolicyType_t::graptPermissive);
11156 getOptional<IpFamilyType_t>("ipFamily", p.ipFamily, j, IpFamilyType_t::ifIp4);
11157 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
11158 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
11159 getOptional<std::string>("domainName", p.domainName, j);
11160 getOptional<std::vector<std::string>>("allowedDomains", p.allowedDomains, j);
11161 getOptional<std::vector<std::string>>("blockedDomains", p.blockedDomains, j);
11162 getOptional<std::vector<std::string>>("extraDomains", p.extraDomains, j);
11163 getOptional<TuningSettings>("tuning", p.tuning, j);
11164 getOptional<std::vector<NamedIdentity>>("additionalIdentities", p.additionalIdentities, j);
11165 getOptional<RallypointServer::StreamIdPrivacyType_t>("streamIdPrivacyType", p.streamIdPrivacyType, j, RallypointServer::StreamIdPrivacyType_t::sptDefault);
11166 }
11167
11168
11169 //-----------------------------------------------------------
11170 JSON_SERIALIZED_CLASS(PlatformDiscoveredService)
11181 {
11182 IMPLEMENT_JSON_SERIALIZATION()
11183 IMPLEMENT_JSON_DOCUMENTATION(PlatformDiscoveredService)
11184
11185 public:
11186
11188 std::string id;
11189
11191 std::string type;
11192
11194 std::string name;
11195
11198
11200 std::string uri;
11201
11204
11206 {
11207 clear();
11208 }
11209
11210 void clear()
11211 {
11212 id.clear();
11213 type.clear();
11214 name.clear();
11215 address.clear();
11216 uri.clear();
11217 configurationVersion = 0;
11218 }
11219 };
11220
11221 static void to_json(nlohmann::json& j, const PlatformDiscoveredService& p)
11222 {
11223 j = nlohmann::json{
11224 TOJSON_IMPL(id),
11225 TOJSON_IMPL(type),
11226 TOJSON_IMPL(name),
11227 TOJSON_IMPL(address),
11228 TOJSON_IMPL(uri),
11229 TOJSON_IMPL(configurationVersion)
11230 };
11231 }
11232 static void from_json(const nlohmann::json& j, PlatformDiscoveredService& p)
11233 {
11234 p.clear();
11235 getOptional<std::string>("id", p.id, j);
11236 getOptional<std::string>("type", p.type, j);
11237 getOptional<std::string>("name", p.name, j);
11238 getOptional<NetworkAddress>("address", p.address, j);
11239 getOptional<std::string>("uri", p.uri, j);
11240 getOptional<uint32_t>("configurationVersion", p.configurationVersion, j, 0);
11241 }
11242
11243
11244 //-----------------------------------------------------------
11246 {
11247 public:
11248 typedef enum
11249 {
11250 etUndefined = 0,
11251 etAudio = 1,
11252 etLocation = 2,
11253 etUser = 3
11254 } EventType_t;
11255
11256 typedef enum
11257 {
11258 dNone = 0,
11259 dInbound = 1,
11260 dOutbound = 2,
11261 dBoth = 3,
11262 dUndefined = 4,
11263 } Direction_t;
11264 };
11265
11266
11267 //-----------------------------------------------------------
11268 JSON_SERIALIZED_CLASS(TimelineQueryParameters)
11279 {
11280 IMPLEMENT_JSON_SERIALIZATION()
11281 IMPLEMENT_JSON_DOCUMENTATION(TimelineQueryParameters)
11282
11283 public:
11284
11287
11290
11293
11296
11299
11302
11305
11307 std::string onlyAlias;
11308
11310 std::string onlyNodeId;
11311
11314
11316 std::string sql;
11317
11319 {
11320 clear();
11321 }
11322
11323 void clear()
11324 {
11325 maxCount = 50;
11326 mostRecentFirst = true;
11327 startedOnOrAfter = 0;
11328 endedOnOrBefore = 0;
11329 onlyDirection = 0;
11330 onlyType = 0;
11331 onlyCommitted = true;
11332 onlyAlias.clear();
11333 onlyNodeId.clear();
11334 sql.clear();
11335 onlyTxId = 0;
11336 }
11337 };
11338
11339 static void to_json(nlohmann::json& j, const TimelineQueryParameters& p)
11340 {
11341 j = nlohmann::json{
11342 TOJSON_IMPL(maxCount),
11343 TOJSON_IMPL(mostRecentFirst),
11344 TOJSON_IMPL(startedOnOrAfter),
11345 TOJSON_IMPL(endedOnOrBefore),
11346 TOJSON_IMPL(onlyDirection),
11347 TOJSON_IMPL(onlyType),
11348 TOJSON_IMPL(onlyCommitted),
11349 TOJSON_IMPL(onlyAlias),
11350 TOJSON_IMPL(onlyNodeId),
11351 TOJSON_IMPL(onlyTxId),
11352 TOJSON_IMPL(sql)
11353 };
11354 }
11355 static void from_json(const nlohmann::json& j, TimelineQueryParameters& p)
11356 {
11357 p.clear();
11358 getOptional<long>("maxCount", p.maxCount, j, 50);
11359 getOptional<bool>("mostRecentFirst", p.mostRecentFirst, j, false);
11360 getOptional<uint64_t>("startedOnOrAfter", p.startedOnOrAfter, j, 0);
11361 getOptional<uint64_t>("endedOnOrBefore", p.endedOnOrBefore, j, 0);
11362 getOptional<int>("onlyDirection", p.onlyDirection, j, 0);
11363 getOptional<int>("onlyType", p.onlyType, j, 0);
11364 getOptional<bool>("onlyCommitted", p.onlyCommitted, j, true);
11365 getOptional<std::string>("onlyAlias", p.onlyAlias, j, EMPTY_STRING);
11366 getOptional<std::string>("onlyNodeId", p.onlyNodeId, j, EMPTY_STRING);
11367 getOptional<int>("onlyTxId", p.onlyTxId, j, 0);
11368 getOptional<std::string>("sql", p.sql, j, EMPTY_STRING);
11369 }
11370
11371 //-----------------------------------------------------------
11372 JSON_SERIALIZED_CLASS(CertStoreCertificate)
11380 {
11381 IMPLEMENT_JSON_SERIALIZATION()
11382 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificate)
11383
11384 public:
11386 std::string id;
11387
11389 std::string certificatePem;
11390
11392 std::string privateKeyPem;
11393
11396
11398 std::string tags;
11399
11401 {
11402 clear();
11403 }
11404
11405 void clear()
11406 {
11407 id.clear();
11408 certificatePem.clear();
11409 privateKeyPem.clear();
11410 internalData = nullptr;
11411 tags.clear();
11412 }
11413 };
11414
11415 static void to_json(nlohmann::json& j, const CertStoreCertificate& p)
11416 {
11417 j = nlohmann::json{
11418 TOJSON_IMPL(id),
11419 TOJSON_IMPL(certificatePem),
11420 TOJSON_IMPL(privateKeyPem),
11421 TOJSON_IMPL(tags)
11422 };
11423 }
11424 static void from_json(const nlohmann::json& j, CertStoreCertificate& p)
11425 {
11426 p.clear();
11427 j.at("id").get_to(p.id);
11428 j.at("certificatePem").get_to(p.certificatePem);
11429 getOptional<std::string>("privateKeyPem", p.privateKeyPem, j, EMPTY_STRING);
11430 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
11431 }
11432
11433 //-----------------------------------------------------------
11434 JSON_SERIALIZED_CLASS(CertStore)
11442 {
11443 IMPLEMENT_JSON_SERIALIZATION()
11444 IMPLEMENT_JSON_DOCUMENTATION(CertStore)
11445
11446 public:
11448 std::string id;
11449
11451 std::vector<CertStoreCertificate> certificates;
11452
11454 std::vector<KvPair> kvp;
11455
11456 CertStore()
11457 {
11458 clear();
11459 }
11460
11461 void clear()
11462 {
11463 id.clear();
11464 certificates.clear();
11465 kvp.clear();
11466 }
11467 };
11468
11469 static void to_json(nlohmann::json& j, const CertStore& p)
11470 {
11471 j = nlohmann::json{
11472 TOJSON_IMPL(id),
11473 TOJSON_IMPL(certificates),
11474 TOJSON_IMPL(kvp)
11475 };
11476 }
11477 static void from_json(const nlohmann::json& j, CertStore& p)
11478 {
11479 p.clear();
11480 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11481 getOptional<std::vector<CertStoreCertificate>>("certificates", p.certificates, j);
11482 getOptional<std::vector<KvPair>>("kvp", p.kvp, j);
11483 }
11484
11485 //-----------------------------------------------------------
11486 JSON_SERIALIZED_CLASS(CertStoreCertificateElement)
11494 {
11495 IMPLEMENT_JSON_SERIALIZATION()
11496 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificateElement)
11497
11498 public:
11500 std::string id;
11501
11504
11506 std::string certificatePem;
11507
11509 std::string tags;
11510
11512 {
11513 clear();
11514 }
11515
11516 void clear()
11517 {
11518 id.clear();
11519 hasPrivateKey = false;
11520 tags.clear();
11521 }
11522 };
11523
11524 static void to_json(nlohmann::json& j, const CertStoreCertificateElement& p)
11525 {
11526 j = nlohmann::json{
11527 TOJSON_IMPL(id),
11528 TOJSON_IMPL(hasPrivateKey),
11529 TOJSON_IMPL(tags)
11530 };
11531
11532 if(!p.certificatePem.empty())
11533 {
11534 j["certificatePem"] = p.certificatePem;
11535 }
11536 }
11537 static void from_json(const nlohmann::json& j, CertStoreCertificateElement& p)
11538 {
11539 p.clear();
11540 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11541 getOptional<bool>("hasPrivateKey", p.hasPrivateKey, j, false);
11542 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
11543 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
11544 }
11545
11546 //-----------------------------------------------------------
11547 JSON_SERIALIZED_CLASS(CertStoreDescriptor)
11555 {
11556 IMPLEMENT_JSON_SERIALIZATION()
11557 IMPLEMENT_JSON_DOCUMENTATION(CertStoreDescriptor)
11558
11559 public:
11561 std::string id;
11562
11564 std::string fileName;
11565
11568
11571
11573 std::vector<CertStoreCertificateElement> certificates;
11574
11576 std::vector<KvPair> kvp;
11577
11579 {
11580 clear();
11581 }
11582
11583 void clear()
11584 {
11585 id.clear();
11586 fileName.clear();
11587 version = 0;
11588 flags = 0;
11589 certificates.clear();
11590 kvp.clear();
11591 }
11592 };
11593
11594 static void to_json(nlohmann::json& j, const CertStoreDescriptor& p)
11595 {
11596 j = nlohmann::json{
11597 TOJSON_IMPL(id),
11598 TOJSON_IMPL(fileName),
11599 TOJSON_IMPL(version),
11600 TOJSON_IMPL(flags),
11601 TOJSON_IMPL(certificates),
11602 TOJSON_IMPL(kvp)
11603 };
11604 }
11605 static void from_json(const nlohmann::json& j, CertStoreDescriptor& p)
11606 {
11607 p.clear();
11608 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11609 getOptional<std::string>("fileName", p.fileName, j, EMPTY_STRING);
11610 getOptional<int>("version", p.version, j, 0);
11611 getOptional<int>("flags", p.flags, j, 0);
11612 getOptional<std::vector<CertStoreCertificateElement>>("certificates", p.certificates, j);
11613 getOptional<std::vector<KvPair>>("kvp", p.kvp, j);
11614 }
11615
11616 //-----------------------------------------------------------
11617 JSON_SERIALIZED_CLASS(CertificateSubjectElement)
11625 {
11626 IMPLEMENT_JSON_SERIALIZATION()
11627 IMPLEMENT_JSON_DOCUMENTATION(CertificateSubjectElement)
11628
11629 public:
11631 std::string name;
11632
11634 std::string value;
11635
11637 {
11638 clear();
11639 }
11640
11641 void clear()
11642 {
11643 name.clear();
11644 value.clear();
11645 }
11646 };
11647
11648 static void to_json(nlohmann::json& j, const CertificateSubjectElement& p)
11649 {
11650 j = nlohmann::json{
11651 TOJSON_IMPL(name),
11652 TOJSON_IMPL(value)
11653 };
11654 }
11655 static void from_json(const nlohmann::json& j, CertificateSubjectElement& p)
11656 {
11657 p.clear();
11658 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
11659 getOptional<std::string>("value", p.value, j, EMPTY_STRING);
11660 }
11661
11662
11663 //-----------------------------------------------------------
11664 JSON_SERIALIZED_CLASS(CertificateDescriptor)
11672 {
11673 IMPLEMENT_JSON_SERIALIZATION()
11674 IMPLEMENT_JSON_DOCUMENTATION(CertificateDescriptor)
11675
11676 public:
11678 std::string subject;
11679
11681 std::string issuer;
11682
11685
11688
11690 std::string notBefore;
11691
11693 std::string notAfter;
11694
11696 std::string serial;
11697
11699 std::string fingerprint;
11700
11702 std::vector<CertificateSubjectElement> subjectElements;
11703
11705 std::vector<CertificateSubjectElement> issuerElements;
11706
11708 std::string certificatePem;
11709
11711 std::string publicKeyPem;
11712
11714 {
11715 clear();
11716 }
11717
11718 void clear()
11719 {
11720 subject.clear();
11721 issuer.clear();
11722 selfSigned = false;
11723 version = 0;
11724 notBefore.clear();
11725 notAfter.clear();
11726 serial.clear();
11727 fingerprint.clear();
11728 subjectElements.clear();
11729 issuerElements.clear();
11730 certificatePem.clear();
11731 publicKeyPem.clear();
11732 }
11733 };
11734
11735 static void to_json(nlohmann::json& j, const CertificateDescriptor& p)
11736 {
11737 j = nlohmann::json{
11738 TOJSON_IMPL(subject),
11739 TOJSON_IMPL(issuer),
11740 TOJSON_IMPL(selfSigned),
11741 TOJSON_IMPL(version),
11742 TOJSON_IMPL(notBefore),
11743 TOJSON_IMPL(notAfter),
11744 TOJSON_IMPL(serial),
11745 TOJSON_IMPL(fingerprint),
11746 TOJSON_IMPL(subjectElements),
11747 TOJSON_IMPL(issuerElements),
11748 TOJSON_IMPL(certificatePem),
11749 TOJSON_IMPL(publicKeyPem)
11750 };
11751 }
11752 static void from_json(const nlohmann::json& j, CertificateDescriptor& p)
11753 {
11754 p.clear();
11755 getOptional<std::string>("subject", p.subject, j, EMPTY_STRING);
11756 getOptional<std::string>("issuer", p.issuer, j, EMPTY_STRING);
11757 getOptional<bool>("selfSigned", p.selfSigned, j, false);
11758 getOptional<int>("version", p.version, j, 0);
11759 getOptional<std::string>("notBefore", p.notBefore, j, EMPTY_STRING);
11760 getOptional<std::string>("notAfter", p.notAfter, j, EMPTY_STRING);
11761 getOptional<std::string>("serial", p.serial, j, EMPTY_STRING);
11762 getOptional<std::string>("fingerprint", p.fingerprint, j, EMPTY_STRING);
11763 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
11764 getOptional<std::string>("publicKeyPem", p.publicKeyPem, j, EMPTY_STRING);
11765 getOptional<std::vector<CertificateSubjectElement>>("subjectElements", p.subjectElements, j);
11766 getOptional<std::vector<CertificateSubjectElement>>("issuerElements", p.issuerElements, j);
11767 }
11768
11769
11770 //-----------------------------------------------------------
11771 JSON_SERIALIZED_CLASS(RiffDescriptor)
11782 {
11783 IMPLEMENT_JSON_SERIALIZATION()
11784 IMPLEMENT_JSON_DOCUMENTATION(RiffDescriptor)
11785
11786 public:
11788 std::string file;
11789
11792
11795
11798
11800 std::string meta;
11801
11803 std::string certPem;
11804
11807
11809 std::string signature;
11810
11812 {
11813 clear();
11814 }
11815
11816 void clear()
11817 {
11818 file.clear();
11819 verified = false;
11820 channels = 0;
11821 sampleCount = 0;
11822 meta.clear();
11823 certPem.clear();
11824 certDescriptor.clear();
11825 signature.clear();
11826 }
11827 };
11828
11829 static void to_json(nlohmann::json& j, const RiffDescriptor& p)
11830 {
11831 j = nlohmann::json{
11832 TOJSON_IMPL(file),
11833 TOJSON_IMPL(verified),
11834 TOJSON_IMPL(channels),
11835 TOJSON_IMPL(sampleCount),
11836 TOJSON_IMPL(meta),
11837 TOJSON_IMPL(certPem),
11838 TOJSON_IMPL(certDescriptor),
11839 TOJSON_IMPL(signature)
11840 };
11841 }
11842
11843 static void from_json(const nlohmann::json& j, RiffDescriptor& p)
11844 {
11845 p.clear();
11846 FROMJSON_IMPL(file, std::string, EMPTY_STRING);
11847 FROMJSON_IMPL(verified, bool, false);
11848 FROMJSON_IMPL(channels, int, 0);
11849 FROMJSON_IMPL(sampleCount, int, 0);
11850 FROMJSON_IMPL(meta, std::string, EMPTY_STRING);
11851 FROMJSON_IMPL(certPem, std::string, EMPTY_STRING);
11852 getOptional<CertificateDescriptor>("certDescriptor", p.certDescriptor, j);
11853 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
11854 }
11855
11856
11857 //-----------------------------------------------------------
11858 JSON_SERIALIZED_CLASS(BridgeCreationDetail)
11866 {
11867 IMPLEMENT_JSON_SERIALIZATION()
11868 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(BridgeCreationDetail)
11869 IMPLEMENT_JSON_DOCUMENTATION(BridgeCreationDetail)
11870
11871 public:
11873 typedef enum
11874 {
11876 csUndefined = 0,
11877
11879 csOk = 1,
11880
11882 csNoJson = -1,
11883
11885 csAlreadyExists = -3,
11886
11888 csInvalidConfiguration = -4,
11889
11891 csInvalidJson = -5,
11892
11894 csInsufficientGroups = -6,
11895
11897 csTooManyGroups = -7,
11898
11900 csDuplicateGroup = -8,
11901
11903 csLocalLoopDetected = -9,
11904 } CreationStatus_t;
11905
11907 std::string id;
11908
11911
11913 {
11914 clear();
11915 }
11916
11917 void clear()
11918 {
11919 id.clear();
11920 status = csUndefined;
11921 }
11922 };
11923
11924 static void to_json(nlohmann::json& j, const BridgeCreationDetail& p)
11925 {
11926 j = nlohmann::json{
11927 TOJSON_IMPL(id),
11928 TOJSON_IMPL(status)
11929 };
11930 }
11931 static void from_json(const nlohmann::json& j, BridgeCreationDetail& p)
11932 {
11933 p.clear();
11934 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11935 getOptional<BridgeCreationDetail::CreationStatus_t>("status", p.status, j, BridgeCreationDetail::CreationStatus_t::csUndefined);
11936 }
11937 //-----------------------------------------------------------
11938 JSON_SERIALIZED_CLASS(GroupConnectionDetail)
11946 {
11947 IMPLEMENT_JSON_SERIALIZATION()
11948 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupConnectionDetail)
11949 IMPLEMENT_JSON_DOCUMENTATION(GroupConnectionDetail)
11950
11951 public:
11953 typedef enum
11954 {
11956 ctUndefined = 0,
11957
11959 ctDirectDatagram = 1,
11960
11962 ctRallypoint = 2
11963 } ConnectionType_t;
11964
11966 std::string id;
11967
11970
11972 std::string peer;
11973
11976
11978 std::string reason;
11979
11981 {
11982 clear();
11983 }
11984
11985 void clear()
11986 {
11987 id.clear();
11988 connectionType = ctUndefined;
11989 peer.clear();
11990 asFailover = false;
11991 reason.clear();
11992 }
11993 };
11994
11995 static void to_json(nlohmann::json& j, const GroupConnectionDetail& p)
11996 {
11997 j = nlohmann::json{
11998 TOJSON_IMPL(id),
11999 TOJSON_IMPL(connectionType),
12000 TOJSON_IMPL(peer),
12001 TOJSON_IMPL(asFailover),
12002 TOJSON_IMPL(reason)
12003 };
12004
12005 if(p.asFailover)
12006 {
12007 j["asFailover"] = p.asFailover;
12008 }
12009 }
12010 static void from_json(const nlohmann::json& j, GroupConnectionDetail& p)
12011 {
12012 p.clear();
12013 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
12014 getOptional<GroupConnectionDetail::ConnectionType_t>("connectionType", p.connectionType, j, GroupConnectionDetail::ConnectionType_t::ctUndefined);
12015 getOptional<std::string>("peer", p.peer, j, EMPTY_STRING);
12016 getOptional<bool>("asFailover", p.asFailover, j, false);
12017 getOptional<std::string>("reason", p.reason, j, EMPTY_STRING);
12018 }
12019
12020 //-----------------------------------------------------------
12021 JSON_SERIALIZED_CLASS(GroupTxDetail)
12029 {
12030 IMPLEMENT_JSON_SERIALIZATION()
12031 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupTxDetail)
12032 IMPLEMENT_JSON_DOCUMENTATION(GroupTxDetail)
12033
12034 public:
12036 typedef enum
12037 {
12039 txsUndefined = 0,
12040
12042 txsTxStarted = 1,
12043
12045 txsTxEnded = 2,
12046
12048 txsNotAnAudioGroup = -1,
12049
12051 txsNotJoined = -2,
12052
12054 txsNotConnected = -3,
12055
12057 txsAlreadyTransmitting = -4,
12058
12060 txsInvalidParams = -5,
12061
12063 txsPriorityTooLow = -6,
12064
12066 txsRxActiveOnNonFdx = -7,
12067
12069 txsCannotSubscribeToInput = -8,
12070
12072 txsInvalidId = -9,
12073
12075 txsTxEndedWithFailure = -10,
12076
12078 txsBridgedButNotMultistream = -11,
12079
12081 txsAutoEndedDueToNonMultistreamBridge = -12,
12082
12084 txsReBeginWithoutPriorBegin = -13
12085 } TxStatus_t;
12086
12088 std::string id;
12089
12092
12095
12098
12101
12103 uint32_t txId;
12104
12106 {
12107 clear();
12108 }
12109
12110 void clear()
12111 {
12112 id.clear();
12113 status = txsUndefined;
12114 localPriority = 0;
12115 remotePriority = 0;
12116 nonFdxMsHangRemaining = 0;
12117 txId = 0;
12118 }
12119 };
12120
12121 static void to_json(nlohmann::json& j, const GroupTxDetail& p)
12122 {
12123 j = nlohmann::json{
12124 TOJSON_IMPL(id),
12125 TOJSON_IMPL(status),
12126 TOJSON_IMPL(localPriority),
12127 TOJSON_IMPL(txId)
12128 };
12129
12130 // Include remote priority if status is related to that
12131 if(p.status == GroupTxDetail::TxStatus_t::txsPriorityTooLow)
12132 {
12133 j["remotePriority"] = p.remotePriority;
12134 }
12135 else if(p.status == GroupTxDetail::TxStatus_t::txsRxActiveOnNonFdx)
12136 {
12137 j["nonFdxMsHangRemaining"] = p.nonFdxMsHangRemaining;
12138 }
12139 }
12140 static void from_json(const nlohmann::json& j, GroupTxDetail& p)
12141 {
12142 p.clear();
12143 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
12144 getOptional<GroupTxDetail::TxStatus_t>("status", p.status, j, GroupTxDetail::TxStatus_t::txsUndefined);
12145 getOptional<int>("localPriority", p.localPriority, j, 0);
12146 getOptional<int>("remotePriority", p.remotePriority, j, 0);
12147 getOptional<long>("nonFdxMsHangRemaining", p.nonFdxMsHangRemaining, j, 0);
12148 getOptional<uint32_t>("txId", p.txId, j, 0);
12149 }
12150
12151 //-----------------------------------------------------------
12152 JSON_SERIALIZED_CLASS(GroupCreationDetail)
12160 {
12161 IMPLEMENT_JSON_SERIALIZATION()
12162 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupCreationDetail)
12163 IMPLEMENT_JSON_DOCUMENTATION(GroupCreationDetail)
12164
12165 public:
12167 typedef enum
12168 {
12170 csUndefined = 0,
12171
12173 csOk = 1,
12174
12176 csNoJson = -1,
12177
12179 csConflictingRpListAndCluster = -2,
12180
12182 csAlreadyExists = -3,
12183
12185 csInvalidConfiguration = -4,
12186
12188 csInvalidJson = -5,
12189
12191 csCryptoFailure = -6,
12192
12194 csAudioInputFailure = -7,
12195
12197 csAudioOutputFailure = -8,
12198
12200 csUnsupportedAudioEncoder = -9,
12201
12203 csNoLicense = -10,
12204
12206 csInvalidTransport = -11,
12207
12209 csAudioInputDeviceNotFound = -12,
12210
12212 csAudioOutputDeviceNotFound = -13
12213 } CreationStatus_t;
12214
12216 std::string id;
12217
12220
12222 {
12223 clear();
12224 }
12225
12226 void clear()
12227 {
12228 id.clear();
12229 status = csUndefined;
12230 }
12231 };
12232
12233 static void to_json(nlohmann::json& j, const GroupCreationDetail& p)
12234 {
12235 j = nlohmann::json{
12236 TOJSON_IMPL(id),
12237 TOJSON_IMPL(status)
12238 };
12239 }
12240 static void from_json(const nlohmann::json& j, GroupCreationDetail& p)
12241 {
12242 p.clear();
12243 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
12244 getOptional<GroupCreationDetail::CreationStatus_t>("status", p.status, j, GroupCreationDetail::CreationStatus_t::csUndefined);
12245 }
12246
12247
12248 //-----------------------------------------------------------
12249 JSON_SERIALIZED_CLASS(GroupReconfigurationDetail)
12257 {
12258 IMPLEMENT_JSON_SERIALIZATION()
12259 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupReconfigurationDetail)
12260 IMPLEMENT_JSON_DOCUMENTATION(GroupReconfigurationDetail)
12261
12262 public:
12264 typedef enum
12265 {
12267 rsUndefined = 0,
12268
12270 rsOk = 1,
12271
12273 rsNoJson = -1,
12274
12276 rsInvalidConfiguration = -2,
12277
12279 rsInvalidJson = -3,
12280
12282 rsAudioInputFailure = -4,
12283
12285 rsAudioOutputFailure = -5,
12286
12288 rsDoesNotExist = -6,
12289
12291 rsAudioInputInUse = -7,
12292
12294 rsAudioDisabledForGroup = -8,
12295
12297 rsGroupIsNotAudio = -9
12298 } ReconfigurationStatus_t;
12299
12301 std::string id;
12302
12305
12307 {
12308 clear();
12309 }
12310
12311 void clear()
12312 {
12313 id.clear();
12314 status = rsUndefined;
12315 }
12316 };
12317
12318 static void to_json(nlohmann::json& j, const GroupReconfigurationDetail& p)
12319 {
12320 j = nlohmann::json{
12321 TOJSON_IMPL(id),
12322 TOJSON_IMPL(status)
12323 };
12324 }
12325 static void from_json(const nlohmann::json& j, GroupReconfigurationDetail& p)
12326 {
12327 p.clear();
12328 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
12329 getOptional<GroupReconfigurationDetail::ReconfigurationStatus_t>("status", p.status, j, GroupReconfigurationDetail::ReconfigurationStatus_t::rsUndefined);
12330 }
12331
12332
12333 //-----------------------------------------------------------
12334 JSON_SERIALIZED_CLASS(GroupHealthReport)
12342 {
12343 IMPLEMENT_JSON_SERIALIZATION()
12344 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupHealthReport)
12345 IMPLEMENT_JSON_DOCUMENTATION(GroupHealthReport)
12346
12347 public:
12348 std::string id;
12349 uint64_t lastErrorTs;
12350 uint64_t decryptionErrors;
12351 uint64_t encryptionErrors;
12352 uint64_t unsupportDecoderErrors;
12353 uint64_t decoderFailures;
12354 uint64_t decoderStartFailures;
12355 uint64_t inboundRtpPacketAllocationFailures;
12356 uint64_t inboundRtpPacketLoadFailures;
12357 uint64_t latePacketsDiscarded;
12358 uint64_t jitterBufferInsertionFailures;
12359 uint64_t presenceDeserializationFailures;
12360 uint64_t notRtpErrors;
12361 uint64_t generalErrors;
12362 uint64_t inboundRtpProcessorAllocationFailures;
12363
12365 {
12366 clear();
12367 }
12368
12369 void clear()
12370 {
12371 id.clear();
12372 lastErrorTs = 0;
12373 decryptionErrors = 0;
12374 encryptionErrors = 0;
12375 unsupportDecoderErrors = 0;
12376 decoderFailures = 0;
12377 decoderStartFailures = 0;
12378 inboundRtpPacketAllocationFailures = 0;
12379 inboundRtpPacketLoadFailures = 0;
12380 latePacketsDiscarded = 0;
12381 jitterBufferInsertionFailures = 0;
12382 presenceDeserializationFailures = 0;
12383 notRtpErrors = 0;
12384 generalErrors = 0;
12385 inboundRtpProcessorAllocationFailures = 0;
12386 }
12387 };
12388
12389 static void to_json(nlohmann::json& j, const GroupHealthReport& p)
12390 {
12391 j = nlohmann::json{
12392 TOJSON_IMPL(id),
12393 TOJSON_IMPL(lastErrorTs),
12394 TOJSON_IMPL(decryptionErrors),
12395 TOJSON_IMPL(encryptionErrors),
12396 TOJSON_IMPL(unsupportDecoderErrors),
12397 TOJSON_IMPL(decoderFailures),
12398 TOJSON_IMPL(decoderStartFailures),
12399 TOJSON_IMPL(inboundRtpPacketAllocationFailures),
12400 TOJSON_IMPL(inboundRtpPacketLoadFailures),
12401 TOJSON_IMPL(latePacketsDiscarded),
12402 TOJSON_IMPL(jitterBufferInsertionFailures),
12403 TOJSON_IMPL(presenceDeserializationFailures),
12404 TOJSON_IMPL(notRtpErrors),
12405 TOJSON_IMPL(generalErrors),
12406 TOJSON_IMPL(inboundRtpProcessorAllocationFailures)
12407 };
12408 }
12409 static void from_json(const nlohmann::json& j, GroupHealthReport& p)
12410 {
12411 p.clear();
12412 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
12413 getOptional<uint64_t>("lastErrorTs", p.lastErrorTs, j, 0);
12414 getOptional<uint64_t>("decryptionErrors", p.decryptionErrors, j, 0);
12415 getOptional<uint64_t>("encryptionErrors", p.encryptionErrors, j, 0);
12416 getOptional<uint64_t>("unsupportDecoderErrors", p.unsupportDecoderErrors, j, 0);
12417 getOptional<uint64_t>("decoderFailures", p.decoderFailures, j, 0);
12418 getOptional<uint64_t>("decoderStartFailures", p.decoderStartFailures, j, 0);
12419 getOptional<uint64_t>("inboundRtpPacketAllocationFailures", p.inboundRtpPacketAllocationFailures, j, 0);
12420 getOptional<uint64_t>("inboundRtpPacketLoadFailures", p.inboundRtpPacketLoadFailures, j, 0);
12421 getOptional<uint64_t>("latePacketsDiscarded", p.latePacketsDiscarded, j, 0);
12422 getOptional<uint64_t>("jitterBufferInsertionFailures", p.jitterBufferInsertionFailures, j, 0);
12423 getOptional<uint64_t>("presenceDeserializationFailures", p.presenceDeserializationFailures, j, 0);
12424 getOptional<uint64_t>("notRtpErrors", p.notRtpErrors, j, 0);
12425 getOptional<uint64_t>("generalErrors", p.generalErrors, j, 0);
12426 getOptional<uint64_t>("inboundRtpProcessorAllocationFailures", p.inboundRtpProcessorAllocationFailures, j, 0);
12427 }
12428
12429 //-----------------------------------------------------------
12430 JSON_SERIALIZED_CLASS(InboundProcessorStats)
12438 {
12439 IMPLEMENT_JSON_SERIALIZATION()
12440 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(InboundProcessorStats)
12441 IMPLEMENT_JSON_DOCUMENTATION(InboundProcessorStats)
12442
12443 public:
12444 uint32_t ssrc;
12445 double jitter;
12446 uint64_t minRtpSamplesInQueue;
12447 uint64_t maxRtpSamplesInQueue;
12448 uint64_t totalSamplesTrimmed;
12449 uint64_t underruns;
12450 uint64_t overruns;
12451 uint64_t samplesInQueue;
12452 uint64_t totalPacketsReceived;
12453 uint64_t totalPacketsLost;
12454 uint64_t totalPacketsDiscarded;
12455
12457 {
12458 clear();
12459 }
12460
12461 void clear()
12462 {
12463 ssrc = 0;
12464 jitter = 0.0;
12465 minRtpSamplesInQueue = 0;
12466 maxRtpSamplesInQueue = 0;
12467 totalSamplesTrimmed = 0;
12468 underruns = 0;
12469 overruns = 0;
12470 samplesInQueue = 0;
12471 totalPacketsReceived = 0;
12472 totalPacketsLost = 0;
12473 totalPacketsDiscarded = 0;
12474 }
12475 };
12476
12477 static void to_json(nlohmann::json& j, const InboundProcessorStats& p)
12478 {
12479 j = nlohmann::json{
12480 TOJSON_IMPL(ssrc),
12481 TOJSON_IMPL(jitter),
12482 TOJSON_IMPL(minRtpSamplesInQueue),
12483 TOJSON_IMPL(maxRtpSamplesInQueue),
12484 TOJSON_IMPL(totalSamplesTrimmed),
12485 TOJSON_IMPL(underruns),
12486 TOJSON_IMPL(overruns),
12487 TOJSON_IMPL(samplesInQueue),
12488 TOJSON_IMPL(totalPacketsReceived),
12489 TOJSON_IMPL(totalPacketsLost),
12490 TOJSON_IMPL(totalPacketsDiscarded)
12491 };
12492 }
12493 static void from_json(const nlohmann::json& j, InboundProcessorStats& p)
12494 {
12495 p.clear();
12496 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
12497 getOptional<double>("jitter", p.jitter, j, 0.0);
12498 getOptional<uint64_t>("minRtpSamplesInQueue", p.minRtpSamplesInQueue, j, 0);
12499 getOptional<uint64_t>("maxRtpSamplesInQueue", p.maxRtpSamplesInQueue, j, 0);
12500 getOptional<uint64_t>("totalSamplesTrimmed", p.totalSamplesTrimmed, j, 0);
12501 getOptional<uint64_t>("underruns", p.underruns, j, 0);
12502 getOptional<uint64_t>("overruns", p.overruns, j, 0);
12503 getOptional<uint64_t>("samplesInQueue", p.samplesInQueue, j, 0);
12504 getOptional<uint64_t>("totalPacketsReceived", p.totalPacketsReceived, j, 0);
12505 getOptional<uint64_t>("totalPacketsLost", p.totalPacketsLost, j, 0);
12506 getOptional<uint64_t>("totalPacketsDiscarded", p.totalPacketsDiscarded, j, 0);
12507 }
12508
12509 //-----------------------------------------------------------
12510 JSON_SERIALIZED_CLASS(TrafficCounter)
12518 {
12519 IMPLEMENT_JSON_SERIALIZATION()
12520 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(TrafficCounter)
12521 IMPLEMENT_JSON_DOCUMENTATION(TrafficCounter)
12522
12523 public:
12524 uint64_t packets;
12525 uint64_t bytes;
12526 uint64_t errors;
12527
12529 {
12530 clear();
12531 }
12532
12533 void clear()
12534 {
12535 packets = 0;
12536 bytes = 0;
12537 errors = 0;
12538 }
12539 };
12540
12541 static void to_json(nlohmann::json& j, const TrafficCounter& p)
12542 {
12543 j = nlohmann::json{
12544 TOJSON_IMPL(packets),
12545 TOJSON_IMPL(bytes),
12546 TOJSON_IMPL(errors)
12547 };
12548 }
12549 static void from_json(const nlohmann::json& j, TrafficCounter& p)
12550 {
12551 p.clear();
12552 getOptional<uint64_t>("packets", p.packets, j, 0);
12553 getOptional<uint64_t>("bytes", p.bytes, j, 0);
12554 getOptional<uint64_t>("errors", p.errors, j, 0);
12555 }
12556
12557 //-----------------------------------------------------------
12558 JSON_SERIALIZED_CLASS(GroupStats)
12566 {
12567 IMPLEMENT_JSON_SERIALIZATION()
12568 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupStats)
12569 IMPLEMENT_JSON_DOCUMENTATION(GroupStats)
12570
12571 public:
12572 std::string id;
12573 //std::vector<InboundProcessorStats> rtpInbounds;
12574 TrafficCounter rxTraffic;
12575 TrafficCounter txTraffic;
12576
12577 GroupStats()
12578 {
12579 clear();
12580 }
12581
12582 void clear()
12583 {
12584 id.clear();
12585 //rtpInbounds.clear();
12586 rxTraffic.clear();
12587 txTraffic.clear();
12588 }
12589 };
12590
12591 static void to_json(nlohmann::json& j, const GroupStats& p)
12592 {
12593 j = nlohmann::json{
12594 TOJSON_IMPL(id),
12595 //TOJSON_IMPL(rtpInbounds),
12596 TOJSON_IMPL(rxTraffic),
12597 TOJSON_IMPL(txTraffic)
12598 };
12599 }
12600 static void from_json(const nlohmann::json& j, GroupStats& p)
12601 {
12602 p.clear();
12603 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
12604 //getOptional<std::vector<InboundProcessorStats>>("rtpInbounds", p.rtpInbounds, j);
12605 getOptional<TrafficCounter>("rxTraffic", p.rxTraffic, j);
12606 getOptional<TrafficCounter>("txTraffic", p.txTraffic, j);
12607 }
12608
12609 //-----------------------------------------------------------
12610 JSON_SERIALIZED_CLASS(RallypointConnectionDetail)
12618 {
12619 IMPLEMENT_JSON_SERIALIZATION()
12620 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(RallypointConnectionDetail)
12621 IMPLEMENT_JSON_DOCUMENTATION(RallypointConnectionDetail)
12622
12623 public:
12625 std::string internalId;
12626
12628 std::string host;
12629
12631 int port;
12632
12635
12638
12640 {
12641 clear();
12642 }
12643
12644 void clear()
12645 {
12646 internalId.clear();
12647 host.clear();
12648 port = 0;
12649 msToNextConnectionAttempt = 0;
12650 serverProcessingMs = -1.0f;
12651 }
12652 };
12653
12654 static void to_json(nlohmann::json& j, const RallypointConnectionDetail& p)
12655 {
12656 j = nlohmann::json{
12657 TOJSON_IMPL(internalId),
12658 TOJSON_IMPL(host),
12659 TOJSON_IMPL(port)
12660 };
12661
12662 if(p.msToNextConnectionAttempt > 0)
12663 {
12664 j["msToNextConnectionAttempt"] = p.msToNextConnectionAttempt;
12665 }
12666
12667 if(p.serverProcessingMs >= 0.0)
12668 {
12669 j["serverProcessingMs"] = p.serverProcessingMs;
12670 }
12671 }
12672 static void from_json(const nlohmann::json& j, RallypointConnectionDetail& p)
12673 {
12674 p.clear();
12675 getOptional<std::string>("internalId", p.internalId, j, EMPTY_STRING);
12676 getOptional<std::string>("host", p.host, j, EMPTY_STRING);
12677 getOptional<int>("port", p.port, j, 0);
12678 getOptional<uint64_t>("msToNextConnectionAttempt", p.msToNextConnectionAttempt, j, 0);
12679 getOptional<float>("serverProcessingMs", p.serverProcessingMs, j, -1.0);
12680 }
12681
12682 //-----------------------------------------------------------
12683 JSON_SERIALIZED_CLASS(TranslationSession)
12694 {
12695 IMPLEMENT_JSON_SERIALIZATION()
12696 IMPLEMENT_JSON_DOCUMENTATION(TranslationSession)
12697
12698 public:
12700 std::string id;
12701
12703 std::string name;
12704
12706 std::vector<std::string> groups;
12707
12710
12712 {
12713 clear();
12714 }
12715
12716 void clear()
12717 {
12718 id.clear();
12719 name.clear();
12720 groups.clear();
12721 enabled = true;
12722 }
12723 };
12724
12725 static void to_json(nlohmann::json& j, const TranslationSession& p)
12726 {
12727 j = nlohmann::json{
12728 TOJSON_IMPL(id),
12729 TOJSON_IMPL(name),
12730 TOJSON_IMPL(groups),
12731 TOJSON_IMPL(enabled)
12732 };
12733 }
12734 static void from_json(const nlohmann::json& j, TranslationSession& p)
12735 {
12736 p.clear();
12737 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
12738 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
12739 getOptional<std::vector<std::string>>("groups", p.groups, j);
12740 FROMJSON_IMPL(enabled, bool, true);
12741 }
12742
12743 //-----------------------------------------------------------
12744 JSON_SERIALIZED_CLASS(TranslationConfiguration)
12755 {
12756 IMPLEMENT_JSON_SERIALIZATION()
12757 IMPLEMENT_JSON_DOCUMENTATION(TranslationConfiguration)
12758
12759 public:
12761 std::vector<TranslationSession> sessions;
12762
12764 std::vector<Group> groups;
12765
12767 {
12768 clear();
12769 }
12770
12771 void clear()
12772 {
12773 sessions.clear();
12774 groups.clear();
12775 }
12776 };
12777
12778 static void to_json(nlohmann::json& j, const TranslationConfiguration& p)
12779 {
12780 j = nlohmann::json{
12781 TOJSON_IMPL(sessions),
12782 TOJSON_IMPL(groups)
12783 };
12784 }
12785 static void from_json(const nlohmann::json& j, TranslationConfiguration& p)
12786 {
12787 p.clear();
12788 getOptional<std::vector<TranslationSession>>("sessions", p.sessions, j);
12789 getOptional<std::vector<Group>>("groups", p.groups, j);
12790 }
12791
12792 //-----------------------------------------------------------
12793 JSON_SERIALIZED_CLASS(LingoServerStatusReportConfiguration)
12804 {
12805 IMPLEMENT_JSON_SERIALIZATION()
12806 IMPLEMENT_JSON_DOCUMENTATION(LingoServerStatusReportConfiguration)
12807
12808 public:
12810 std::string fileName;
12811
12814
12817
12819 std::string runCmd;
12820
12823
12826
12829
12831 {
12832 clear();
12833 }
12834
12835 void clear()
12836 {
12837 fileName.clear();
12838 intervalSecs = 60;
12839 enabled = false;
12840 includeGroupDetail = false;
12841 includeSessionDetail = false;
12842 includeSessionGroupDetail = false;
12843 runCmd.clear();
12844 }
12845 };
12846
12847 static void to_json(nlohmann::json& j, const LingoServerStatusReportConfiguration& p)
12848 {
12849 j = nlohmann::json{
12850 TOJSON_IMPL(fileName),
12851 TOJSON_IMPL(intervalSecs),
12852 TOJSON_IMPL(enabled),
12853 TOJSON_IMPL(includeGroupDetail),
12854 TOJSON_IMPL(includeSessionDetail),
12855 TOJSON_IMPL(includeSessionGroupDetail),
12856 TOJSON_IMPL(runCmd)
12857 };
12858 }
12859 static void from_json(const nlohmann::json& j, LingoServerStatusReportConfiguration& p)
12860 {
12861 p.clear();
12862 getOptional<std::string>("fileName", p.fileName, j);
12863 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
12864 getOptional<bool>("enabled", p.enabled, j, false);
12865 getOptional<std::string>("runCmd", p.runCmd, j);
12866 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
12867 getOptional<bool>("includeSessionDetail", p.includeSessionDetail, j, false);
12868 getOptional<bool>("includeSessionGroupDetail", p.includeSessionGroupDetail, j, false);
12869 }
12870
12871 //-----------------------------------------------------------
12872 JSON_SERIALIZED_CLASS(LingoServerInternals)
12885 {
12886 IMPLEMENT_JSON_SERIALIZATION()
12887 IMPLEMENT_JSON_DOCUMENTATION(LingoServerInternals)
12888
12889 public:
12892
12895
12898
12900 {
12901 clear();
12902 }
12903
12904 void clear()
12905 {
12906 watchdog.clear();
12907 tuning.clear();
12908 housekeeperIntervalMs = 1000;
12909 }
12910 };
12911
12912 static void to_json(nlohmann::json& j, const LingoServerInternals& p)
12913 {
12914 j = nlohmann::json{
12915 TOJSON_IMPL(watchdog),
12916 TOJSON_IMPL(housekeeperIntervalMs),
12917 TOJSON_IMPL(tuning)
12918 };
12919 }
12920 static void from_json(const nlohmann::json& j, LingoServerInternals& p)
12921 {
12922 p.clear();
12923 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
12924 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
12925 getOptional<TuningSettings>("tuning", p.tuning, j);
12926 }
12927
12928 //-----------------------------------------------------------
12929 JSON_SERIALIZED_CLASS(LingoServerConfiguration)
12939 {
12940 IMPLEMENT_JSON_SERIALIZATION()
12941 IMPLEMENT_JSON_DOCUMENTATION(LingoServerConfiguration)
12942
12943 public:
12945 std::string id;
12946
12949
12952
12955
12958
12961
12964
12967
12970
12973
12976
12979
12982
12985
12988
12990 {
12991 clear();
12992 }
12993
12994 void clear()
12995 {
12996 id.clear();
12997 serviceConfigurationFileCheckSecs = 60;
12998 lingoConfigurationFileName.clear();
12999 lingoConfigurationFileCommand.clear();
13000 lingoConfigurationFileCheckSecs = 60;
13001 statusReport.clear();
13002 externalHealthCheckResponder.clear();
13003 internals.clear();
13004 certStoreFileName.clear();
13005 certStorePasswordHex.clear();
13006 enginePolicy.clear();
13007 configurationCheckSignalName = "rts.22f4ec3.${id}";
13008 fipsCrypto.clear();
13009 proxy.clear();
13010 nsm.clear();
13011 }
13012 };
13013
13014 static void to_json(nlohmann::json& j, const LingoServerConfiguration& p)
13015 {
13016 j = nlohmann::json{
13017 TOJSON_IMPL(id),
13018 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
13019 TOJSON_IMPL(lingoConfigurationFileName),
13020 TOJSON_IMPL(lingoConfigurationFileCommand),
13021 TOJSON_IMPL(lingoConfigurationFileCheckSecs),
13022 TOJSON_IMPL(statusReport),
13023 TOJSON_IMPL(externalHealthCheckResponder),
13024 TOJSON_IMPL(internals),
13025 TOJSON_IMPL(certStoreFileName),
13026 TOJSON_IMPL(certStorePasswordHex),
13027 TOJSON_IMPL(enginePolicy),
13028 TOJSON_IMPL(configurationCheckSignalName),
13029 TOJSON_IMPL(fipsCrypto),
13030 TOJSON_IMPL(proxy),
13031 TOJSON_IMPL(nsm)
13032 };
13033 }
13034 static void from_json(const nlohmann::json& j, LingoServerConfiguration& p)
13035 {
13036 p.clear();
13037 getOptional<std::string>("id", p.id, j);
13038 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
13039 getOptional<std::string>("lingoConfigurationFileName", p.lingoConfigurationFileName, j);
13040 getOptional<std::string>("lingoConfigurationFileCommand", p.lingoConfigurationFileCommand, j);
13041 getOptional<int>("lingoConfigurationFileCheckSecs", p.lingoConfigurationFileCheckSecs, j, 60);
13042 getOptional<LingoServerStatusReportConfiguration>("statusReport", p.statusReport, j);
13043 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
13044 getOptional<LingoServerInternals>("internals", p.internals, j);
13045 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
13046 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
13047 j.at("enginePolicy").get_to(p.enginePolicy);
13048 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.22f4ec3.${id}");
13049 getOptional<FipsCryptoSettings>("fipsCrypo", p.fipsCrypto, j);
13050 getOptional<NetworkAddress>("proxy", p.proxy, j);
13051 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
13052 }
13053
13054
13055 //-----------------------------------------------------------
13056 JSON_SERIALIZED_CLASS(VoiceToVoiceSession)
13067 {
13068 IMPLEMENT_JSON_SERIALIZATION()
13069 IMPLEMENT_JSON_DOCUMENTATION(VoiceToVoiceSession)
13070
13071 public:
13073 std::string id;
13074
13076 std::string name;
13077
13079 std::vector<std::string> groups;
13080
13083
13085 {
13086 clear();
13087 }
13088
13089 void clear()
13090 {
13091 id.clear();
13092 name.clear();
13093 groups.clear();
13094 enabled = true;
13095 }
13096 };
13097
13098 static void to_json(nlohmann::json& j, const VoiceToVoiceSession& p)
13099 {
13100 j = nlohmann::json{
13101 TOJSON_IMPL(id),
13102 TOJSON_IMPL(name),
13103 TOJSON_IMPL(groups),
13104 TOJSON_IMPL(enabled)
13105 };
13106 }
13107 static void from_json(const nlohmann::json& j, VoiceToVoiceSession& p)
13108 {
13109 p.clear();
13110 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
13111 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
13112 getOptional<std::vector<std::string>>("groups", p.groups, j);
13113 FROMJSON_IMPL(enabled, bool, true);
13114 }
13115
13116 //-----------------------------------------------------------
13117 JSON_SERIALIZED_CLASS(LingoConfiguration)
13128 {
13129 IMPLEMENT_JSON_SERIALIZATION()
13130 IMPLEMENT_JSON_DOCUMENTATION(LingoConfiguration)
13131
13132 public:
13134 std::vector<VoiceToVoiceSession> voiceToVoiceSessions;
13135
13137 std::vector<Group> groups;
13138
13140 {
13141 clear();
13142 }
13143
13144 void clear()
13145 {
13146 voiceToVoiceSessions.clear();
13147 groups.clear();
13148 }
13149 };
13150
13151 static void to_json(nlohmann::json& j, const LingoConfiguration& p)
13152 {
13153 j = nlohmann::json{
13154 TOJSON_IMPL(voiceToVoiceSessions),
13155 TOJSON_IMPL(groups)
13156 };
13157 }
13158 static void from_json(const nlohmann::json& j, LingoConfiguration& p)
13159 {
13160 p.clear();
13161 getOptional<std::vector<VoiceToVoiceSession>>("voiceToVoiceSessions", p.voiceToVoiceSessions, j);
13162 getOptional<std::vector<Group>>("groups", p.groups, j);
13163 }
13164
13165 //-----------------------------------------------------------
13166 JSON_SERIALIZED_CLASS(BridgingConfiguration)
13177 {
13178 IMPLEMENT_JSON_SERIALIZATION()
13179 IMPLEMENT_JSON_DOCUMENTATION(BridgingConfiguration)
13180
13181 public:
13183 std::vector<Bridge> bridges;
13184
13186 std::vector<Group> groups;
13187
13189 {
13190 clear();
13191 }
13192
13193 void clear()
13194 {
13195 bridges.clear();
13196 groups.clear();
13197 }
13198 };
13199
13200 static void to_json(nlohmann::json& j, const BridgingConfiguration& p)
13201 {
13202 j = nlohmann::json{
13203 TOJSON_IMPL(bridges),
13204 TOJSON_IMPL(groups)
13205 };
13206 }
13207 static void from_json(const nlohmann::json& j, BridgingConfiguration& p)
13208 {
13209 p.clear();
13210 getOptional<std::vector<Bridge>>("bridges", p.bridges, j);
13211 getOptional<std::vector<Group>>("groups", p.groups, j);
13212 }
13213
13214 //-----------------------------------------------------------
13215 JSON_SERIALIZED_CLASS(BridgingServerStatusReportConfiguration)
13226 {
13227 IMPLEMENT_JSON_SERIALIZATION()
13228 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerStatusReportConfiguration)
13229
13230 public:
13232 std::string fileName;
13233
13236
13239
13241 std::string runCmd;
13242
13245
13248
13251
13253 {
13254 clear();
13255 }
13256
13257 void clear()
13258 {
13259 fileName.clear();
13260 intervalSecs = 60;
13261 enabled = false;
13262 includeGroupDetail = false;
13263 includeBridgeDetail = false;
13264 includeBridgeGroupDetail = false;
13265 runCmd.clear();
13266 }
13267 };
13268
13269 static void to_json(nlohmann::json& j, const BridgingServerStatusReportConfiguration& p)
13270 {
13271 j = nlohmann::json{
13272 TOJSON_IMPL(fileName),
13273 TOJSON_IMPL(intervalSecs),
13274 TOJSON_IMPL(enabled),
13275 TOJSON_IMPL(includeGroupDetail),
13276 TOJSON_IMPL(includeBridgeDetail),
13277 TOJSON_IMPL(includeBridgeGroupDetail),
13278 TOJSON_IMPL(runCmd)
13279 };
13280 }
13281 static void from_json(const nlohmann::json& j, BridgingServerStatusReportConfiguration& p)
13282 {
13283 p.clear();
13284 getOptional<std::string>("fileName", p.fileName, j);
13285 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
13286 getOptional<bool>("enabled", p.enabled, j, false);
13287 getOptional<std::string>("runCmd", p.runCmd, j);
13288 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
13289 getOptional<bool>("includeBridgeDetail", p.includeBridgeDetail, j, false);
13290 getOptional<bool>("includeBridgeGroupDetail", p.includeBridgeGroupDetail, j, false);
13291 }
13292
13293 //-----------------------------------------------------------
13294 JSON_SERIALIZED_CLASS(BridgingServerInternals)
13307 {
13308 IMPLEMENT_JSON_SERIALIZATION()
13309 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerInternals)
13310
13311 public:
13314
13317
13322
13325
13328
13330 {
13331 clear();
13332 }
13333
13334 void clear()
13335 {
13336 watchdog.clear();
13337 tuning.clear();
13338 housekeeperIntervalMs = 1000;
13339 nsmUnhealthyBridgeGraceMs = 5000;
13340 nsmResourceReleaseCooldownMs = 30000;
13341 }
13342 };
13343
13344 static void to_json(nlohmann::json& j, const BridgingServerInternals& p)
13345 {
13346 j = nlohmann::json{
13347 TOJSON_IMPL(watchdog),
13348 TOJSON_IMPL(housekeeperIntervalMs),
13349 TOJSON_IMPL(nsmUnhealthyBridgeGraceMs),
13350 TOJSON_IMPL(nsmResourceReleaseCooldownMs),
13351 TOJSON_IMPL(tuning)
13352 };
13353 }
13354 static void from_json(const nlohmann::json& j, BridgingServerInternals& p)
13355 {
13356 p.clear();
13357 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
13358 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
13359 getOptional<int>("nsmUnhealthyBridgeGraceMs", p.nsmUnhealthyBridgeGraceMs, j, 5000);
13360 getOptional<int>("nsmResourceReleaseCooldownMs", p.nsmResourceReleaseCooldownMs, j, 30000);
13361 getOptional<TuningSettings>("tuning", p.tuning, j);
13362 }
13363
13364 //-----------------------------------------------------------
13365 JSON_SERIALIZED_CLASS(BridgingServerConfiguration)
13375 {
13376 IMPLEMENT_JSON_SERIALIZATION()
13377 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerConfiguration)
13378
13379 public:
13386 typedef enum
13387 {
13389 omRaw = 0,
13390
13393 omMultistream = 1,
13394
13397 omMixedStream = 2,
13398
13400 omADictatedByGroup = 3,
13401 } OpMode_t;
13402
13404 std::string id;
13405
13408
13411
13414
13417
13420
13423
13426
13429
13432
13435
13438
13441
13444
13447
13451
13454
13456 {
13457 clear();
13458 }
13459
13460 void clear()
13461 {
13462 id.clear();
13463 mode = omRaw;
13464 serviceConfigurationFileCheckSecs = 60;
13465 bridgingConfigurationFileName.clear();
13466 bridgingConfigurationFileCommand.clear();
13467 bridgingConfigurationFileCheckSecs = 60;
13468 statusReport.clear();
13469 externalHealthCheckResponder.clear();
13470 internals.clear();
13471 certStoreFileName.clear();
13472 certStorePasswordHex.clear();
13473 enginePolicy.clear();
13474 configurationCheckSignalName = "rts.6cc0651.${id}";
13475 fipsCrypto.clear();
13476 statusUpload.clear();
13477 nsm.clear();
13478 rtiCloud.clear();
13479 }
13480 };
13481
13482 static void to_json(nlohmann::json& j, const BridgingServerConfiguration& p)
13483 {
13484 j = nlohmann::json{
13485 TOJSON_IMPL(id),
13486 TOJSON_IMPL(mode),
13487 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
13488 TOJSON_IMPL(bridgingConfigurationFileName),
13489 TOJSON_IMPL(bridgingConfigurationFileCommand),
13490 TOJSON_IMPL(bridgingConfigurationFileCheckSecs),
13491 TOJSON_IMPL(statusReport),
13492 TOJSON_IMPL(externalHealthCheckResponder),
13493 TOJSON_IMPL(internals),
13494 TOJSON_IMPL(certStoreFileName),
13495 TOJSON_IMPL(certStorePasswordHex),
13496 TOJSON_IMPL(enginePolicy),
13497 TOJSON_IMPL(configurationCheckSignalName),
13498 TOJSON_IMPL(fipsCrypto),
13499 TOJSON_IMPL(statusUpload),
13500 TOJSON_IMPL(nsm),
13501 TOJSON_IMPL(rtiCloud)
13502 };
13503 }
13504 static void from_json(const nlohmann::json& j, BridgingServerConfiguration& p)
13505 {
13506 p.clear();
13507 getOptional<std::string>("id", p.id, j);
13508 getOptional<BridgingServerConfiguration::OpMode_t>("mode", p.mode, j, BridgingServerConfiguration::OpMode_t::omRaw);
13509 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
13510 getOptional<std::string>("bridgingConfigurationFileName", p.bridgingConfigurationFileName, j);
13511 getOptional<std::string>("bridgingConfigurationFileCommand", p.bridgingConfigurationFileCommand, j);
13512 getOptional<int>("bridgingConfigurationFileCheckSecs", p.bridgingConfigurationFileCheckSecs, j, 60);
13513 getOptional<BridgingServerStatusReportConfiguration>("statusReport", p.statusReport, j);
13514 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
13515 getOptional<BridgingServerInternals>("internals", p.internals, j);
13516 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
13517 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
13518 j.at("enginePolicy").get_to(p.enginePolicy);
13519 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.6cc0651.${id}");
13520 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
13521 getOptional<StatusUploadConfiguration>("statusUpload", p.statusUpload, j);
13522 bridgingServerNsmFromJson(j, p.nsm);
13523 getOptional<RtiCloudSettings>("rtiCloud", p.rtiCloud, j);
13524 }
13525
13526
13527 //-----------------------------------------------------------
13528 JSON_SERIALIZED_CLASS(EarGroupsConfiguration)
13539 {
13540 IMPLEMENT_JSON_SERIALIZATION()
13541 IMPLEMENT_JSON_DOCUMENTATION(EarGroupsConfiguration)
13542
13543 public:
13545 std::vector<Group> groups;
13546
13548 {
13549 clear();
13550 }
13551
13552 void clear()
13553 {
13554 groups.clear();
13555 }
13556 };
13557
13558 static void to_json(nlohmann::json& j, const EarGroupsConfiguration& p)
13559 {
13560 j = nlohmann::json{
13561 TOJSON_IMPL(groups)
13562 };
13563 }
13564 static void from_json(const nlohmann::json& j, EarGroupsConfiguration& p)
13565 {
13566 p.clear();
13567 getOptional<std::vector<Group>>("groups", p.groups, j);
13568 }
13569
13570 //-----------------------------------------------------------
13571 JSON_SERIALIZED_CLASS(EarServerStatusReportConfiguration)
13582 {
13583 IMPLEMENT_JSON_SERIALIZATION()
13584 IMPLEMENT_JSON_DOCUMENTATION(EarServerStatusReportConfiguration)
13585
13586 public:
13588 std::string fileName;
13589
13592
13595
13597 std::string runCmd;
13598
13601
13603 {
13604 clear();
13605 }
13606
13607 void clear()
13608 {
13609 fileName.clear();
13610 intervalSecs = 60;
13611 enabled = false;
13612 includeGroupDetail = false;
13613 runCmd.clear();
13614 }
13615 };
13616
13617 static void to_json(nlohmann::json& j, const EarServerStatusReportConfiguration& p)
13618 {
13619 j = nlohmann::json{
13620 TOJSON_IMPL(fileName),
13621 TOJSON_IMPL(intervalSecs),
13622 TOJSON_IMPL(enabled),
13623 TOJSON_IMPL(includeGroupDetail),
13624 TOJSON_IMPL(runCmd)
13625 };
13626 }
13627 static void from_json(const nlohmann::json& j, EarServerStatusReportConfiguration& p)
13628 {
13629 p.clear();
13630 getOptional<std::string>("fileName", p.fileName, j);
13631 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
13632 getOptional<bool>("enabled", p.enabled, j, false);
13633 getOptional<std::string>("runCmd", p.runCmd, j);
13634 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
13635 }
13636
13637 //-----------------------------------------------------------
13638 JSON_SERIALIZED_CLASS(EarServerInternals)
13651 {
13652 IMPLEMENT_JSON_SERIALIZATION()
13653 IMPLEMENT_JSON_DOCUMENTATION(EarServerInternals)
13654
13655 public:
13658
13661
13664
13666 {
13667 clear();
13668 }
13669
13670 void clear()
13671 {
13672 watchdog.clear();
13673 tuning.clear();
13674 housekeeperIntervalMs = 1000;
13675 }
13676 };
13677
13678 static void to_json(nlohmann::json& j, const EarServerInternals& p)
13679 {
13680 j = nlohmann::json{
13681 TOJSON_IMPL(watchdog),
13682 TOJSON_IMPL(housekeeperIntervalMs),
13683 TOJSON_IMPL(tuning)
13684 };
13685 }
13686 static void from_json(const nlohmann::json& j, EarServerInternals& p)
13687 {
13688 p.clear();
13689 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
13690 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
13691 getOptional<TuningSettings>("tuning", p.tuning, j);
13692 }
13693
13694 //-----------------------------------------------------------
13695 JSON_SERIALIZED_CLASS(EarServerConfiguration)
13705 {
13706 IMPLEMENT_JSON_SERIALIZATION()
13707 IMPLEMENT_JSON_DOCUMENTATION(EarServerConfiguration)
13708
13709 public:
13710
13712 std::string id;
13713
13716
13719
13722
13725
13728
13731
13734
13737
13740
13743
13746
13749
13752
13754 {
13755 clear();
13756 }
13757
13758 void clear()
13759 {
13760 id.clear();
13761 serviceConfigurationFileCheckSecs = 60;
13762 groupsConfigurationFileName.clear();
13763 groupsConfigurationFileCommand.clear();
13764 groupsConfigurationFileCheckSecs = 60;
13765 statusReport.clear();
13766 externalHealthCheckResponder.clear();
13767 internals.clear();
13768 certStoreFileName.clear();
13769 certStorePasswordHex.clear();
13770 enginePolicy.clear();
13771 configurationCheckSignalName = "rts.9a164fa.${id}";
13772 fipsCrypto.clear();
13773 nsm.clear();
13774 }
13775 };
13776
13777 static void to_json(nlohmann::json& j, const EarServerConfiguration& p)
13778 {
13779 j = nlohmann::json{
13780 TOJSON_IMPL(id),
13781 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
13782 TOJSON_IMPL(groupsConfigurationFileName),
13783 TOJSON_IMPL(groupsConfigurationFileCommand),
13784 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
13785 TOJSON_IMPL(statusReport),
13786 TOJSON_IMPL(externalHealthCheckResponder),
13787 TOJSON_IMPL(internals),
13788 TOJSON_IMPL(certStoreFileName),
13789 TOJSON_IMPL(certStorePasswordHex),
13790 TOJSON_IMPL(enginePolicy),
13791 TOJSON_IMPL(configurationCheckSignalName),
13792 TOJSON_IMPL(fipsCrypto),
13793 TOJSON_IMPL(nsm)
13794 };
13795 }
13796 static void from_json(const nlohmann::json& j, EarServerConfiguration& p)
13797 {
13798 p.clear();
13799 getOptional<std::string>("id", p.id, j);
13800 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
13801 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
13802 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
13803 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
13804 getOptional<EarServerStatusReportConfiguration>("statusReport", p.statusReport, j);
13805 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
13806 getOptional<EarServerInternals>("internals", p.internals, j);
13807 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
13808 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
13809 j.at("enginePolicy").get_to(p.enginePolicy);
13810 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
13811 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
13812 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
13813 }
13814
13815//-----------------------------------------------------------
13816 JSON_SERIALIZED_CLASS(EngageSemGroupsConfiguration)
13827 {
13828 IMPLEMENT_JSON_SERIALIZATION()
13829 IMPLEMENT_JSON_DOCUMENTATION(EngageSemGroupsConfiguration)
13830
13831 public:
13833 std::vector<Group> groups;
13834
13836 {
13837 clear();
13838 }
13839
13840 void clear()
13841 {
13842 groups.clear();
13843 }
13844 };
13845
13846 static void to_json(nlohmann::json& j, const EngageSemGroupsConfiguration& p)
13847 {
13848 j = nlohmann::json{
13849 TOJSON_IMPL(groups)
13850 };
13851 }
13852 static void from_json(const nlohmann::json& j, EngageSemGroupsConfiguration& p)
13853 {
13854 p.clear();
13855 getOptional<std::vector<Group>>("groups", p.groups, j);
13856 }
13857
13858 //-----------------------------------------------------------
13859 JSON_SERIALIZED_CLASS(EngageSemServerStatusReportConfiguration)
13870 {
13871 IMPLEMENT_JSON_SERIALIZATION()
13872 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerStatusReportConfiguration)
13873
13874 public:
13876 std::string fileName;
13877
13880
13883
13885 std::string runCmd;
13886
13889
13891 {
13892 clear();
13893 }
13894
13895 void clear()
13896 {
13897 fileName.clear();
13898 intervalSecs = 60;
13899 enabled = false;
13900 includeGroupDetail = false;
13901 runCmd.clear();
13902 }
13903 };
13904
13905 static void to_json(nlohmann::json& j, const EngageSemServerStatusReportConfiguration& p)
13906 {
13907 j = nlohmann::json{
13908 TOJSON_IMPL(fileName),
13909 TOJSON_IMPL(intervalSecs),
13910 TOJSON_IMPL(enabled),
13911 TOJSON_IMPL(includeGroupDetail),
13912 TOJSON_IMPL(runCmd)
13913 };
13914 }
13915 static void from_json(const nlohmann::json& j, EngageSemServerStatusReportConfiguration& p)
13916 {
13917 p.clear();
13918 getOptional<std::string>("fileName", p.fileName, j);
13919 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
13920 getOptional<bool>("enabled", p.enabled, j, false);
13921 getOptional<std::string>("runCmd", p.runCmd, j);
13922 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
13923 }
13924
13925 //-----------------------------------------------------------
13926 JSON_SERIALIZED_CLASS(EngageSemServerInternals)
13939 {
13940 IMPLEMENT_JSON_SERIALIZATION()
13941 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerInternals)
13942
13943 public:
13946
13949
13952
13954 {
13955 clear();
13956 }
13957
13958 void clear()
13959 {
13960 watchdog.clear();
13961 tuning.clear();
13962 housekeeperIntervalMs = 1000;
13963 }
13964 };
13965
13966 static void to_json(nlohmann::json& j, const EngageSemServerInternals& p)
13967 {
13968 j = nlohmann::json{
13969 TOJSON_IMPL(watchdog),
13970 TOJSON_IMPL(housekeeperIntervalMs),
13971 TOJSON_IMPL(tuning)
13972 };
13973 }
13974 static void from_json(const nlohmann::json& j, EngageSemServerInternals& p)
13975 {
13976 p.clear();
13977 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
13978 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
13979 getOptional<TuningSettings>("tuning", p.tuning, j);
13980 }
13981
13982 //-----------------------------------------------------------
13983 JSON_SERIALIZED_CLASS(EngageSemServerConfiguration)
13993 {
13994 IMPLEMENT_JSON_SERIALIZATION()
13995 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerConfiguration)
13996
13997 public:
13998
14000 std::string id;
14001
14004
14007
14010
14013
14016
14019
14022
14025
14028
14031
14034
14037
14040
14041 int maxQueueLen;
14042 int minQueuingMs;
14043 int maxQueuingMs;
14044 int minPriority;
14045 int maxPriority;
14046
14048 {
14049 clear();
14050 }
14051
14052 void clear()
14053 {
14054 id.clear();
14055 serviceConfigurationFileCheckSecs = 60;
14056 groupsConfigurationFileName.clear();
14057 groupsConfigurationFileCommand.clear();
14058 groupsConfigurationFileCheckSecs = 60;
14059 statusReport.clear();
14060 externalHealthCheckResponder.clear();
14061 internals.clear();
14062 certStoreFileName.clear();
14063 certStorePasswordHex.clear();
14064 enginePolicy.clear();
14065 configurationCheckSignalName = "rts.9a164fa.${id}";
14066 fipsCrypto.clear();
14067 nsm.clear();
14068
14069 maxQueueLen = 64;
14070 minQueuingMs = 0;
14071 maxQueuingMs = 15000;
14072 minPriority = 0;
14073 maxPriority = 255;
14074 }
14075 };
14076
14077 static void to_json(nlohmann::json& j, const EngageSemServerConfiguration& p)
14078 {
14079 j = nlohmann::json{
14080 TOJSON_IMPL(id),
14081 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
14082 TOJSON_IMPL(groupsConfigurationFileName),
14083 TOJSON_IMPL(groupsConfigurationFileCommand),
14084 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
14085 TOJSON_IMPL(statusReport),
14086 TOJSON_IMPL(externalHealthCheckResponder),
14087 TOJSON_IMPL(internals),
14088 TOJSON_IMPL(certStoreFileName),
14089 TOJSON_IMPL(certStorePasswordHex),
14090 TOJSON_IMPL(enginePolicy),
14091 TOJSON_IMPL(configurationCheckSignalName),
14092 TOJSON_IMPL(fipsCrypto),
14093 TOJSON_IMPL(nsm),
14094 TOJSON_IMPL(maxQueueLen),
14095 TOJSON_IMPL(minQueuingMs),
14096 TOJSON_IMPL(maxQueuingMs),
14097 TOJSON_IMPL(minPriority),
14098 TOJSON_IMPL(maxPriority)
14099 };
14100 }
14101 static void from_json(const nlohmann::json& j, EngageSemServerConfiguration& p)
14102 {
14103 p.clear();
14104 getOptional<std::string>("id", p.id, j);
14105 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
14106 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
14107 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
14108 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
14109 getOptional<EngageSemServerStatusReportConfiguration>("statusReport", p.statusReport, j);
14110 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
14111 getOptional<EngageSemServerInternals>("internals", p.internals, j);
14112 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
14113 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
14114 j.at("enginePolicy").get_to(p.enginePolicy);
14115 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
14116 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
14117 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
14118 getOptional<int>("maxQueueLen", p.maxQueueLen, j, 64);
14119 getOptional<int>("minQueuingMs", p.minQueuingMs, j, 0);
14120 getOptional<int>("maxQueuingMs", p.maxQueuingMs, j, 15000);
14121 getOptional<int>("minPriority", p.minPriority, j, 0);
14122 getOptional<int>("maxPriority", p.maxPriority, j, 255);
14123 }
14124
14125 //-----------------------------------------------------------
14126 JSON_SERIALIZED_CLASS(EngateGroup)
14136 class EngateGroup : public Group
14137 {
14138 IMPLEMENT_JSON_SERIALIZATION()
14139 IMPLEMENT_JSON_DOCUMENTATION(EngateGroup)
14140
14141 public:
14142 bool useVad;
14143 uint32_t inputHangMs;
14144 uint32_t inputActivationPowerThreshold;
14145 uint32_t inputDeactivationPowerThreshold;
14146
14147 EngateGroup()
14148 {
14149 clear();
14150 }
14151
14152 void clear()
14153 {
14154 Group::clear();
14155 useVad = false;
14156 inputHangMs = 750;
14157 inputActivationPowerThreshold = 700;
14158 inputDeactivationPowerThreshold = 125;
14159 }
14160 };
14161
14162 static void to_json(nlohmann::json& j, const EngateGroup& p)
14163 {
14164 nlohmann::json g;
14165 to_json(g, static_cast<const Group&>(p));
14166
14167 j = nlohmann::json{
14168 TOJSON_IMPL(useVad),
14169 TOJSON_IMPL(inputHangMs),
14170 TOJSON_IMPL(inputActivationPowerThreshold),
14171 TOJSON_IMPL(inputDeactivationPowerThreshold)
14172 };
14173 }
14174 static void from_json(const nlohmann::json& j, EngateGroup& p)
14175 {
14176 p.clear();
14177 from_json(j, static_cast<Group&>(p));
14178 getOptional<uint32_t>("inputHangMs", p.inputHangMs, j, 750);
14179 getOptional<uint32_t>("inputActivationPowerThreshold", p.inputActivationPowerThreshold, j, 700);
14180 getOptional<uint32_t>("inputDeactivationPowerThreshold", p.inputDeactivationPowerThreshold, j, 125);
14181 }
14182
14183 //-----------------------------------------------------------
14184 JSON_SERIALIZED_CLASS(EngateGroupsConfiguration)
14195 {
14196 IMPLEMENT_JSON_SERIALIZATION()
14197 IMPLEMENT_JSON_DOCUMENTATION(EngateGroupsConfiguration)
14198
14199 public:
14201 std::vector<EngateGroup> groups;
14202
14204 {
14205 clear();
14206 }
14207
14208 void clear()
14209 {
14210 groups.clear();
14211 }
14212 };
14213
14214 static void to_json(nlohmann::json& j, const EngateGroupsConfiguration& p)
14215 {
14216 j = nlohmann::json{
14217 TOJSON_IMPL(groups)
14218 };
14219 }
14220 static void from_json(const nlohmann::json& j, EngateGroupsConfiguration& p)
14221 {
14222 p.clear();
14223 getOptional<std::vector<EngateGroup>>("groups", p.groups, j);
14224 }
14225
14226 //-----------------------------------------------------------
14227 JSON_SERIALIZED_CLASS(EngateServerStatusReportConfiguration)
14238 {
14239 IMPLEMENT_JSON_SERIALIZATION()
14240 IMPLEMENT_JSON_DOCUMENTATION(EngateServerStatusReportConfiguration)
14241
14242 public:
14244 std::string fileName;
14245
14248
14251
14253 std::string runCmd;
14254
14257
14259 {
14260 clear();
14261 }
14262
14263 void clear()
14264 {
14265 fileName.clear();
14266 intervalSecs = 60;
14267 enabled = false;
14268 includeGroupDetail = false;
14269 runCmd.clear();
14270 }
14271 };
14272
14273 static void to_json(nlohmann::json& j, const EngateServerStatusReportConfiguration& p)
14274 {
14275 j = nlohmann::json{
14276 TOJSON_IMPL(fileName),
14277 TOJSON_IMPL(intervalSecs),
14278 TOJSON_IMPL(enabled),
14279 TOJSON_IMPL(includeGroupDetail),
14280 TOJSON_IMPL(runCmd)
14281 };
14282 }
14283 static void from_json(const nlohmann::json& j, EngateServerStatusReportConfiguration& p)
14284 {
14285 p.clear();
14286 getOptional<std::string>("fileName", p.fileName, j);
14287 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
14288 getOptional<bool>("enabled", p.enabled, j, false);
14289 getOptional<std::string>("runCmd", p.runCmd, j);
14290 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
14291 }
14292
14293 //-----------------------------------------------------------
14294 JSON_SERIALIZED_CLASS(EngateServerInternals)
14307 {
14308 IMPLEMENT_JSON_SERIALIZATION()
14309 IMPLEMENT_JSON_DOCUMENTATION(EngateServerInternals)
14310
14311 public:
14314
14317
14320
14322 {
14323 clear();
14324 }
14325
14326 void clear()
14327 {
14328 watchdog.clear();
14329 tuning.clear();
14330 housekeeperIntervalMs = 1000;
14331 }
14332 };
14333
14334 static void to_json(nlohmann::json& j, const EngateServerInternals& p)
14335 {
14336 j = nlohmann::json{
14337 TOJSON_IMPL(watchdog),
14338 TOJSON_IMPL(housekeeperIntervalMs),
14339 TOJSON_IMPL(tuning)
14340 };
14341 }
14342 static void from_json(const nlohmann::json& j, EngateServerInternals& p)
14343 {
14344 p.clear();
14345 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
14346 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
14347 getOptional<TuningSettings>("tuning", p.tuning, j);
14348 }
14349
14350 //-----------------------------------------------------------
14351 JSON_SERIALIZED_CLASS(EngateServerConfiguration)
14361 {
14362 IMPLEMENT_JSON_SERIALIZATION()
14363 IMPLEMENT_JSON_DOCUMENTATION(EngateServerConfiguration)
14364
14365 public:
14366
14368 std::string id;
14369
14372
14375
14378
14381
14384
14387
14390
14393
14396
14399
14402
14405
14408
14410 {
14411 clear();
14412 }
14413
14414 void clear()
14415 {
14416 id.clear();
14417 serviceConfigurationFileCheckSecs = 60;
14418 groupsConfigurationFileName.clear();
14419 groupsConfigurationFileCommand.clear();
14420 groupsConfigurationFileCheckSecs = 60;
14421 statusReport.clear();
14422 externalHealthCheckResponder.clear();
14423 internals.clear();
14424 certStoreFileName.clear();
14425 certStorePasswordHex.clear();
14426 enginePolicy.clear();
14427 configurationCheckSignalName = "rts.9a164fa.${id}";
14428 fipsCrypto.clear();
14429 nsm.clear();
14430 }
14431 };
14432
14433 static void to_json(nlohmann::json& j, const EngateServerConfiguration& p)
14434 {
14435 j = nlohmann::json{
14436 TOJSON_IMPL(id),
14437 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
14438 TOJSON_IMPL(groupsConfigurationFileName),
14439 TOJSON_IMPL(groupsConfigurationFileCommand),
14440 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
14441 TOJSON_IMPL(statusReport),
14442 TOJSON_IMPL(externalHealthCheckResponder),
14443 TOJSON_IMPL(internals),
14444 TOJSON_IMPL(certStoreFileName),
14445 TOJSON_IMPL(certStorePasswordHex),
14446 TOJSON_IMPL(enginePolicy),
14447 TOJSON_IMPL(configurationCheckSignalName),
14448 TOJSON_IMPL(fipsCrypto),
14449 TOJSON_IMPL(nsm)
14450 };
14451 }
14452 static void from_json(const nlohmann::json& j, EngateServerConfiguration& p)
14453 {
14454 p.clear();
14455 getOptional<std::string>("id", p.id, j);
14456 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
14457 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
14458 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
14459 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
14460 getOptional<EngateServerStatusReportConfiguration>("statusReport", p.statusReport, j);
14461 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
14462 getOptional<EngateServerInternals>("internals", p.internals, j);
14463 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
14464 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
14465 j.at("enginePolicy").get_to(p.enginePolicy);
14466 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
14467 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
14468 nsmNodeFromEmbeddedServerJson(j, "nsm", p.nsm);
14469 }
14470
14471 //-----------------------------------------------------------
14472 static inline void dumpExampleConfigurations(const char *path)
14473 {
14474 WatchdogSettings::document();
14475 FileRecordingRequest::document();
14476 Feature::document();
14477 Featureset::document();
14478 Agc::document();
14479 RtpPayloadTypeTranslation::document();
14480 NetworkInterfaceDevice::document();
14481 ListOfNetworkInterfaceDevice::document();
14482 RtpHeader::document();
14483 BlobInfo::document();
14484 TxAudioUri::document();
14485 AdvancedTxParams::document();
14486 Identity::document();
14487 Location::document();
14488 Power::document();
14489 Connectivity::document();
14490 PresenceDescriptorGroupItem::document();
14491 PresenceDescriptor::document();
14492 NetworkTxOptions::document();
14493 TcpNetworkTxOptions::document();
14494 NetworkAddress::document();
14495 NetworkAddressRxTx::document();
14496 NetworkAddressRestrictionList::document();
14497 StringRestrictionList::document();
14498 Rallypoint::document();
14499 RallypointCluster::document();
14500 NetworkDeviceDescriptor::document();
14501 TxAudio::document();
14502 AudioDeviceDescriptor::document();
14503 ListOfAudioDeviceDescriptor::document();
14504 Audio::document();
14505 TalkerInformation::document();
14506 GroupTalkers::document();
14507 Presence::document();
14508 Advertising::document();
14509 GroupPriorityTranslation::document();
14510 GroupTimeline::document();
14511 GroupAppTransport::document();
14512 RtpProfile::document();
14513 Group::document();
14514 Mission::document();
14515 LicenseDescriptor::document();
14516 EngineNetworkingRpUdpStreaming::document();
14517 EnginePolicyNetworking::document();
14518 Aec::document();
14519 Vad::document();
14520 Bridge::document();
14521 AndroidAudio::document();
14522 EnginePolicyAudio::document();
14523 SecurityCertificate::document();
14524 EnginePolicySecurity::document();
14525 EnginePolicyLogging::document();
14526 EnginePolicyDatabase::document();
14527 NamedAudioDevice::document();
14528 EnginePolicyNamedAudioDevices::document();
14529 Licensing::document();
14530 DiscoveryMagellan::document();
14531 DiscoverySsdp::document();
14532 DiscoverySap::document();
14533 DiscoveryCistech::document();
14534 DiscoveryTrellisware::document();
14535 DiscoveryConfiguration::document();
14536 ApiCallPacingLaneSettings::document();
14537 ApiCallPacingSettings::document();
14538 EnginePolicyInternals::document();
14539 EnginePolicyTimelines::document();
14540 RtpMapEntry::document();
14541 ExternalModule::document();
14542 ExternalCodecDescriptor::document();
14543 EnginePolicy::document();
14544 TalkgroupAsset::document();
14545 EngageDiscoveredGroup::document();
14546 RallypointPeer::document();
14547 RallypointServerLimits::document();
14548 RallypointServerStatusReportConfiguration::document();
14549 RallypointServerLinkGraph::document();
14550 ExternalHealthCheckResponder::document();
14551 Tls::document();
14552 PeeringConfiguration::document();
14553 IgmpSnooping::document();
14554 RallypointReflector::document();
14555 RallypointUdpStreaming::document();
14556 RallypointWebsocketSettings::document();
14557 RallypointQuicSettings::document();
14558 RallypointServer::document();
14559 PlatformDiscoveredService::document();
14560 TimelineQueryParameters::document();
14561 CertStoreCertificate::document();
14562 CertStore::document();
14563 CertStoreCertificateElement::document();
14564 CertStoreDescriptor::document();
14565 CertificateDescriptor::document();
14566 BridgeCreationDetail::document();
14567 GroupConnectionDetail::document();
14568 GroupTxDetail::document();
14569 GroupCreationDetail::document();
14570 GroupReconfigurationDetail::document();
14571 GroupHealthReport::document();
14572 InboundProcessorStats::document();
14573 TrafficCounter::document();
14574 GroupStats::document();
14575 RallypointConnectionDetail::document();
14576 BridgingConfiguration::document();
14577 BridgingServerStatusReportConfiguration::document();
14578 StatusUploadConfiguration::document();
14579 BridgingServerInternals::document();
14580 RtiCloudSettings::document();
14581 BridgingServerConfiguration::document();
14582 EarGroupsConfiguration::document();
14583 EarServerStatusReportConfiguration::document();
14584 EarServerInternals::document();
14585 EarServerConfiguration::document();
14586 RangerPackets::document();
14587 TransportImpairment::document();
14588
14589 EngageSemGroupsConfiguration::document();
14590 EngageSemServerStatusReportConfiguration::document();
14591 EngageSemServerInternals::document();
14592 EngageSemServerConfiguration::document();
14593 }
14594}
14595
14596#ifndef WIN32
14597 #pragma GCC diagnostic pop
14598#endif
14599
14600#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.
bool useOsTrustStore
[Optional, Default: true] When true, certificates from the operating system trust store are included ...
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,...
EnginePolicyLogging logging
[Optional] Console / syslog logging. enableSyslog defaults to false.
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...
bool useOsTrustStore
[Optional, Default: true] When true, certificates from the operating system trust store are included ...
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...