Engage Engine API  1.258.9098
Real-time tactical communications engine API
Loading...
Searching...
No Matches
ConfigurationObjects.h
Go to the documentation of this file.
1//
2// Copyright (c) 2019 Rally Tactical Systems, Inc.
3// All rights reserved.
4//
5
20#ifndef ConfigurationObjects_h
21#define ConfigurationObjects_h
22
23#include "Platform.h"
24#include "EngageConstants.h"
25
26#include <iostream>
27#include <cstddef>
28#include <cstdint>
29#include <chrono>
30#include <vector>
31#include <string>
32
33#include <nlohmann/json.hpp>
34
35#ifndef WIN32
36 #pragma GCC diagnostic push
37 #pragma GCC diagnostic ignored "-Wunused-function"
38#endif
39
40#if !defined(ENGAGE_IGNORE_COMPILER_UNUSED_WARNING)
41 #if defined(__GNUC__)
42 #define ENGAGE_IGNORE_COMPILER_UNUSED_WARNING __attribute__((unused))
43 #else
44 #define ENGAGE_IGNORE_COMPILER_UNUSED_WARNING
45 #endif
46#endif // ENGAGE_IGNORE_COMPILER_UNUSED_WARNING
47
48// We'll use a different namespace depending on whether we're building the RTS core code
49// or if this is being included in an app-land project.
50#if defined(RTS_CORE_BUILD)
51namespace ConfigurationObjects
52#else
53namespace AppConfigurationObjects
54#endif
55{
56 static const char *ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT = "_attached";
57
58 //-----------------------------------------------------------
59 #pragma pack(push, 1)
60 typedef struct _DataSeriesHeader_t
61 {
76 uint8_t t;
77
81 uint32_t ts;
82
95 uint8_t it;
96
105 uint8_t im;
106
110 uint8_t vt;
111
115 uint8_t ss;
117
118 typedef struct _DataElementUint8_t
119 {
120 uint8_t ofs;
121 uint8_t val;
123
125 {
126 uint8_t ofs;
127 uint16_t val;
129
131 {
132 uint8_t ofs;
133 uint32_t val;
135
137 {
138 uint8_t ofs;
139 uint64_t val;
141 #pragma pack(pop)
142
143 typedef enum
144 {
145 invalid = 0,
146 uint8 = 1,
147 uint16 = 2,
148 uint32 = 3,
149 uint64 = 4
150 } DataSeriesValueType_t;
151
157 typedef enum
158 {
159 unknown = 0,
160 heartRate = 1,
161 skinTemp = 2,
162 coreTemp = 3,
163 hydration = 4,
164 bloodOxygenation = 5,
165 fatigueLevel = 6,
166 taskEffectiveness = 7
167 } HumanBiometricsTypes_t;
168
169 //-----------------------------------------------------------
170
171 static FILE *_internalFileOpener(const char *fn, const char *mode)
172 {
173 FILE *fp = nullptr;
174
175 #ifndef WIN32
176 fp = fopen(fn, mode);
177 #else
178 if(fopen_s(&fp, fn, mode) != 0)
179 {
180 fp = nullptr;
181 }
182 #endif
183
184 return fp;
185 }
186
187 #define JSON_SERIALIZED_CLASS(_cn) \
188 class _cn; \
189 static void to_json(nlohmann::json& j, const _cn& p); \
190 static void from_json(const nlohmann::json& j, _cn& p);
191
192 #define IMPLEMENT_JSON_DOCUMENTATION(_cn) \
193 public: \
194 static void document(const char *path = nullptr) \
195 { \
196 _cn example; \
197 example.initForDocumenting(); \
198 std::string theJson = example.serialize(3); \
199 std::cout << "------------------------------------------------" << std::endl \
200 << #_cn << std::endl \
201 << theJson << std::endl \
202 << "------------------------------------------------" << std::endl; \
203 \
204 if(path != nullptr && path[0] != 0) \
205 { \
206 std::string fn = path; \
207 fn.append("/"); \
208 fn.append(#_cn); \
209 fn.append(".json"); \
210 \
211 FILE *fp = _internalFileOpener(fn.c_str(), "wt");\
212 \
213 if(fp != nullptr) \
214 { \
215 fputs(theJson.c_str(), fp); \
216 fclose(fp); \
217 } \
218 else \
219 { \
220 std::cout << "ERROR: Cannot write to " << fn << std::endl; \
221 } \
222 } \
223 } \
224 static const char *className() \
225 { \
226 return #_cn; \
227 }
228
229 #define IMPLEMENT_JSON_SERIALIZATION() \
230 public: \
231 bool deserialize(const char *s) \
232 { \
233 try \
234 { \
235 if(s != nullptr && s[0] != 0) \
236 { \
237 from_json(nlohmann::json::parse(s), *this); \
238 } \
239 else \
240 { \
241 return false; \
242 } \
243 } \
244 catch(...) \
245 { \
246 return false; \
247 } \
248 return true; \
249 } \
250 \
251 std::string serialize(const int indent = -1) \
252 { \
253 try \
254 { \
255 nlohmann::json j; \
256 to_json(j, *this); \
257 return j.dump(indent); \
258 } \
259 catch(...) \
260 { \
261 return std::string("{}"); \
262 } \
263 }
264
265 #define IMPLEMENT_WRAPPED_JSON_SERIALIZATION(_cn) \
266 public: \
267 std::string serializeWrapped(const int indent = -1) \
268 { \
269 try \
270 { \
271 nlohmann::json j; \
272 to_json(j, *this); \
273 \
274 std::string rc; \
275 char firstChar[2]; \
276 firstChar[0] = #_cn[0]; \
277 firstChar[1] = 0; \
278 firstChar[0] = tolower(firstChar[0]); \
279 rc.assign("{\""); \
280 rc.append(firstChar); \
281 rc.append((#_cn) + 1); \
282 rc.append("\":"); \
283 rc.append(j.dump(indent)); \
284 rc.append("}"); \
285 \
286 return rc; \
287 } \
288 catch(...) \
289 { \
290 return std::string("{}"); \
291 } \
292 }
293
294 #define TOJSON_IMPL(__var) \
295 {#__var, p.__var}
296
297 #define FROMJSON_IMPL_SIMPLE(__var) \
298 getOptional(#__var, p.__var, j)
299
300 #define FROMJSON_IMPL(__var, __type, __default) \
301 getOptional<__type>(#__var, p.__var, j, __default)
302
303 #define TOJSON_BASE_IMPL() \
304 to_json(j, (ConfigurationObjectBase&)p)
305
306 #define FROMJSON_BASE_IMPL() \
307 from_json(j, (ConfigurationObjectBase&)p);
308
309
310 //-----------------------------------------------------------
311 static std::string EMPTY_STRING;
312
313 template<class T>
314 static void getOptional(const char *name, T& v, const nlohmann::json& j, T def)
315 {
316 try
317 {
318 if(j.contains(name))
319 {
320 j.at(name).get_to(v);
321 }
322 else
323 {
324 v = def;
325 }
326 }
327 catch(...)
328 {
329 v = def;
330 }
331 }
332
333 template<class T>
334 static void getOptional(const char *name, T& v, const nlohmann::json& j)
335 {
336 try
337 {
338 if(j.contains(name))
339 {
340 j.at(name).get_to(v);
341 }
342 }
343 catch(...)
344 {
345 }
346 }
347
348 template<class T>
349 static void getOptionalWithIndicator(const char *name, T& v, const nlohmann::json& j, T def, bool *wasFound)
350 {
351 try
352 {
353 if(j.contains(name))
354 {
355 j.at(name).get_to(v);
356 *wasFound = true;
357 }
358 else
359 {
360 v = def;
361 *wasFound = false;
362 }
363 }
364 catch(...)
365 {
366 v = def;
367 *wasFound = false;
368 }
369 }
370
371 template<class T>
372 static void getOptionalWithIndicator(const char *name, T& v, const nlohmann::json& j, bool *wasFound)
373 {
374 try
375 {
376 if(j.contains(name))
377 {
378 j.at(name).get_to(v);
379 *wasFound = true;
380 }
381 else
382 {
383 *wasFound = false;
384 }
385 }
386 catch(...)
387 {
388 *wasFound = false;
389 }
390 }
391
393 {
394 public:
396 {
397 _documenting = false;
398 }
399
401 {
402 }
403
404 virtual void initForDocumenting()
405 {
406 _documenting = true;
407 }
408
409 virtual std::string toString()
410 {
411 return std::string("");
412 }
413
414 inline virtual bool isDocumenting() const
415 {
416 return _documenting;
417 }
418
419 nlohmann::json _attached;
420
421 protected:
422 bool _documenting;
423 };
424
425 static void to_json(nlohmann::json& j, const ConfigurationObjectBase& p)
426 {
427 try
428 {
429 if(p._attached != nullptr)
430 {
431 j[ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT] = p._attached;
432 }
433 }
434 catch(...)
435 {
436 }
437 }
438 static void from_json(const nlohmann::json& j, ConfigurationObjectBase& p)
439 {
440 try
441 {
442 if(j.contains(ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT))
443 {
444 p._attached = j.at(ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT);
445 }
446 }
447 catch(...)
448 {
449 }
450 }
451
452 //-----------------------------------------------------------
453 JSON_SERIALIZED_CLASS(KvPair)
461 {
462 IMPLEMENT_JSON_SERIALIZATION()
463 IMPLEMENT_JSON_DOCUMENTATION(KvPair)
464
465 public:
467 std::string key;
468
470 std::string value;
471
472 KvPair()
473 {
474 clear();
475 }
476
477 void clear()
478 {
479 key.clear();
480 value.clear();
481 }
482 };
483
484 static void to_json(nlohmann::json& j, const KvPair& p)
485 {
486 j = nlohmann::json{
487 TOJSON_IMPL(key),
488 TOJSON_IMPL(value)
489 };
490 }
491 static void from_json(const nlohmann::json& j, KvPair& p)
492 {
493 p.clear();
494 getOptional<std::string>("key", p.key, j, EMPTY_STRING);
495 getOptional<std::string>("tags", p.value, j, EMPTY_STRING);
496 }
497
498 //-----------------------------------------------------------
499 JSON_SERIALIZED_CLASS(TuningSettings)
501 {
502 IMPLEMENT_JSON_SERIALIZATION()
503 IMPLEMENT_JSON_DOCUMENTATION(TuningSettings)
504
505 public:
508
511
514
515
518
521
524
525
528
531
534
537
539 {
540 clear();
541 }
542
543 void clear()
544 {
545 maxPooledRtpMb = 0;
546 maxPooledRtpObjects = 0;
547 maxActiveRtpObjects = 0;
548
549 maxPooledBlobMb = 0;
550 maxPooledBlobObjects = 0;
551 maxActiveBlobObjects = 0;
552
553 maxPooledBufferMb = 0;
554 maxPooledBufferObjects = 0;
555 maxActiveBufferObjects = 0;
556
557 maxActiveRtpProcessors = 0;
558 }
559
560 virtual void initForDocumenting()
561 {
562 clear();
563 }
564 };
565
566 static void to_json(nlohmann::json& j, const TuningSettings& p)
567 {
568 j = nlohmann::json{
569 TOJSON_IMPL(maxPooledRtpMb),
570 TOJSON_IMPL(maxPooledRtpObjects),
571 TOJSON_IMPL(maxActiveRtpObjects),
572
573 TOJSON_IMPL(maxPooledBlobMb),
574 TOJSON_IMPL(maxPooledBlobObjects),
575 TOJSON_IMPL(maxActiveBlobObjects),
576
577 TOJSON_IMPL(maxPooledBufferMb),
578 TOJSON_IMPL(maxPooledBufferObjects),
579 TOJSON_IMPL(maxActiveBufferObjects),
580
581 TOJSON_IMPL(maxActiveRtpProcessors)
582 };
583 }
584 static void from_json(const nlohmann::json& j, TuningSettings& p)
585 {
586 p.clear();
587 FROMJSON_IMPL(maxPooledRtpMb, uint32_t, 0);
588 FROMJSON_IMPL(maxPooledRtpObjects, uint32_t, 0);
589 FROMJSON_IMPL(maxActiveRtpObjects, uint32_t, 0);
590
591 FROMJSON_IMPL(maxPooledBlobMb, uint32_t, 0);
592 FROMJSON_IMPL(maxPooledBlobObjects, uint32_t, 0);
593 FROMJSON_IMPL(maxActiveBlobObjects, uint32_t, 0);
594
595 FROMJSON_IMPL(maxPooledBufferMb, uint32_t, 0);
596 FROMJSON_IMPL(maxPooledBufferObjects, uint32_t, 0);
597 FROMJSON_IMPL(maxActiveBufferObjects, uint32_t, 0);
598
599 FROMJSON_IMPL(maxActiveRtpProcessors, uint32_t, 0);
600 }
601
602
603 //-----------------------------------------------------------
604 JSON_SERIALIZED_CLASS(FipsCryptoSettings)
606 {
607 IMPLEMENT_JSON_SERIALIZATION()
608 IMPLEMENT_JSON_DOCUMENTATION(FipsCryptoSettings)
609
610 public:
613
615 std::string path;
616
618 bool debug;
619
621 std::string curves;
622
624 std::string ciphers;
625
627 {
628 clear();
629 }
630
631 void clear()
632 {
633 enabled = false;
634 path.clear();
635 debug = false;
636 curves.clear();
637 ciphers.clear();
638 }
639
640 virtual void initForDocumenting()
641 {
642 clear();
643 }
644 };
645
646 static void to_json(nlohmann::json& j, const FipsCryptoSettings& p)
647 {
648 j = nlohmann::json{
649 TOJSON_IMPL(enabled),
650 TOJSON_IMPL(path),
651 TOJSON_IMPL(debug),
652 TOJSON_IMPL(curves),
653 TOJSON_IMPL(ciphers)
654 };
655 }
656 static void from_json(const nlohmann::json& j, FipsCryptoSettings& p)
657 {
658 p.clear();
659 FROMJSON_IMPL_SIMPLE(enabled);
660 FROMJSON_IMPL_SIMPLE(path);
661 FROMJSON_IMPL_SIMPLE(debug);
662 FROMJSON_IMPL_SIMPLE(curves);
663 FROMJSON_IMPL_SIMPLE(ciphers);
664 }
665
666
667 //-----------------------------------------------------------
668 JSON_SERIALIZED_CLASS(WatchdogSettings)
670 {
671 IMPLEMENT_JSON_SERIALIZATION()
672 IMPLEMENT_JSON_DOCUMENTATION(WatchdogSettings)
673
674 public:
677
680
683
686
689
691 {
692 clear();
693 }
694
695 void clear()
696 {
697 enabled = true;
698 intervalMs = 5000;
699 hangDetectionMs = 2000;
700 abortOnHang = true;
701 slowExecutionThresholdMs = 100;
702 }
703
704 virtual void initForDocumenting()
705 {
706 clear();
707 }
708 };
709
710 static void to_json(nlohmann::json& j, const WatchdogSettings& p)
711 {
712 j = nlohmann::json{
713 TOJSON_IMPL(enabled),
714 TOJSON_IMPL(intervalMs),
715 TOJSON_IMPL(hangDetectionMs),
716 TOJSON_IMPL(abortOnHang),
717 TOJSON_IMPL(slowExecutionThresholdMs)
718 };
719 }
720 static void from_json(const nlohmann::json& j, WatchdogSettings& p)
721 {
722 p.clear();
723 getOptional<bool>("enabled", p.enabled, j, true);
724 getOptional<int>("intervalMs", p.intervalMs, j, 5000);
725 getOptional<int>("hangDetectionMs", p.hangDetectionMs, j, 2000);
726 getOptional<bool>("abortOnHang", p.abortOnHang, j, true);
727 getOptional<int>("slowExecutionThresholdMs", p.slowExecutionThresholdMs, j, 100);
728 }
729
730
731 //-----------------------------------------------------------
732 JSON_SERIALIZED_CLASS(FileRecordingRequest)
734 {
735 IMPLEMENT_JSON_SERIALIZATION()
736 IMPLEMENT_JSON_DOCUMENTATION(FileRecordingRequest)
737
738 public:
739 std::string id;
740 std::string fileName;
741 uint32_t maxMs;
742
744 {
745 clear();
746 }
747
748 void clear()
749 {
750 id.clear();
751 fileName.clear();
752 maxMs = 60000;
753 }
754
755 virtual void initForDocumenting()
756 {
757 clear();
758 id = "1-2-3-4-5-6-7-8-9";
759 fileName = "/tmp/test.wav";
760 maxMs = 10000;
761 }
762 };
763
764 static void to_json(nlohmann::json& j, const FileRecordingRequest& p)
765 {
766 j = nlohmann::json{
767 TOJSON_IMPL(id),
768 TOJSON_IMPL(fileName),
769 TOJSON_IMPL(maxMs)
770 };
771 }
772 static void from_json(const nlohmann::json& j, FileRecordingRequest& p)
773 {
774 p.clear();
775 j.at("id").get_to(p.id);
776 j.at("fileName").get_to(p.fileName);
777 getOptional<uint32_t>("maxMs", p.maxMs, j, 60000);
778 }
779
780
781 //-----------------------------------------------------------
782 JSON_SERIALIZED_CLASS(Feature)
784 {
785 IMPLEMENT_JSON_SERIALIZATION()
786 IMPLEMENT_JSON_DOCUMENTATION(Feature)
787
788 public:
789 std::string id;
790 std::string name;
791 std::string description;
792 std::string comments;
793 int count;
794 int used; // NOTE: Ignored during deserialization!
795
796 Feature()
797 {
798 clear();
799 }
800
801 void clear()
802 {
803 id.clear();
804 name.clear();
805 description.clear();
806 comments.clear();
807 count = 0;
808 used = 0;
809 }
810
811 virtual void initForDocumenting()
812 {
813 clear();
814 id = "{af9540d1-3e86-4fa6-8b80-e26daecb61ab}";
815 name = "A sample feature";
816 description = "This is an example of a feature";
817 comments = "These are comments for this feature";
818 count = 42;
819 used = 16;
820 }
821 };
822
823 static void to_json(nlohmann::json& j, const Feature& p)
824 {
825 j = nlohmann::json{
826 TOJSON_IMPL(id),
827 TOJSON_IMPL(name),
828 TOJSON_IMPL(description),
829 TOJSON_IMPL(comments),
830 TOJSON_IMPL(count),
831 TOJSON_IMPL(used)
832 };
833 }
834 static void from_json(const nlohmann::json& j, Feature& p)
835 {
836 p.clear();
837 j.at("id").get_to(p.id);
838 getOptional("name", p.name, j);
839 getOptional("description", p.description, j);
840 getOptional("comments", p.comments, j);
841 getOptional("count", p.count, j, 0);
842
843 // NOTE: Not deserialized!
844 //getOptional("used", p.used, j, 0);
845 }
846
847
848 //-----------------------------------------------------------
849 JSON_SERIALIZED_CLASS(Featureset)
851 {
852 IMPLEMENT_JSON_SERIALIZATION()
853 IMPLEMENT_JSON_DOCUMENTATION(Featureset)
854
855 public:
856 std::string signature;
857 bool lockToDeviceId;
858 std::vector<Feature> features;
859
860 Featureset()
861 {
862 clear();
863 }
864
865 void clear()
866 {
867 signature.clear();
868 lockToDeviceId = false;
869 features.clear();
870 }
871
872 virtual void initForDocumenting()
873 {
874 clear();
875 signature = "c39df3f36c6444e686e47e70fc45cf91e6ed2d8de62d4a1e89f507d567ff48aaabb1a70e54b44377b46fc4a1a2e319e5b77e4abffc444db98f8eb55d709aad5f";
876 lockToDeviceId = false;
877 }
878 };
879
880 static void to_json(nlohmann::json& j, const Featureset& p)
881 {
882 j = nlohmann::json{
883 TOJSON_IMPL(signature),
884 TOJSON_IMPL(lockToDeviceId),
885 TOJSON_IMPL(features)
886 };
887 }
888 static void from_json(const nlohmann::json& j, Featureset& p)
889 {
890 p.clear();
891 getOptional("signature", p.signature, j);
892 getOptional<bool>("lockToDeviceId", p.lockToDeviceId, j, false);
893 getOptional<std::vector<Feature>>("features", p.features, j);
894 }
895
896
897 //-----------------------------------------------------------
898 JSON_SERIALIZED_CLASS(Agc)
908 {
909 IMPLEMENT_JSON_SERIALIZATION()
910 IMPLEMENT_JSON_DOCUMENTATION(Agc)
911
912 public:
915
918
921
924
927
930
931 Agc()
932 {
933 clear();
934 }
935
936 void clear()
937 {
938 enabled = false;
939 minLevel = 0;
940 maxLevel = 255;
941 compressionGainDb = 25;
942 enableLimiter = false;
943 targetLevelDb = 3;
944 }
945 };
946
947 static void to_json(nlohmann::json& j, const Agc& p)
948 {
949 j = nlohmann::json{
950 TOJSON_IMPL(enabled),
951 TOJSON_IMPL(minLevel),
952 TOJSON_IMPL(maxLevel),
953 TOJSON_IMPL(compressionGainDb),
954 TOJSON_IMPL(enableLimiter),
955 TOJSON_IMPL(targetLevelDb)
956 };
957 }
958 static void from_json(const nlohmann::json& j, Agc& p)
959 {
960 p.clear();
961 getOptional<bool>("enabled", p.enabled, j, false);
962 getOptional<int>("minLevel", p.minLevel, j, 0);
963 getOptional<int>("maxLevel", p.maxLevel, j, 255);
964 getOptional<int>("compressionGainDb", p.compressionGainDb, j, 25);
965 getOptional<bool>("enableLimiter", p.enableLimiter, j, false);
966 getOptional<int>("targetLevelDb", p.targetLevelDb, j, 3);
967 }
968
969
970 //-----------------------------------------------------------
971 JSON_SERIALIZED_CLASS(RtpPayloadTypeTranslation)
981 {
982 IMPLEMENT_JSON_SERIALIZATION()
983 IMPLEMENT_JSON_DOCUMENTATION(RtpPayloadTypeTranslation)
984
985 public:
987 uint16_t external;
988
990 uint16_t engage;
991
993 {
994 clear();
995 }
996
997 void clear()
998 {
999 external = 0;
1000 engage = 0;
1001 }
1002
1003 bool matches(const RtpPayloadTypeTranslation& other)
1004 {
1005 return ( (external == other.external) && (engage == other.engage) );
1006 }
1007 };
1008
1009 static void to_json(nlohmann::json& j, const RtpPayloadTypeTranslation& p)
1010 {
1011 j = nlohmann::json{
1012 TOJSON_IMPL(external),
1013 TOJSON_IMPL(engage)
1014 };
1015 }
1016 static void from_json(const nlohmann::json& j, RtpPayloadTypeTranslation& p)
1017 {
1018 p.clear();
1019 getOptional<uint16_t>("external", p.external, j);
1020 getOptional<uint16_t>("engage", p.engage, j);
1021 }
1022
1023 //-----------------------------------------------------------
1024 JSON_SERIALIZED_CLASS(NetworkInterfaceDevice)
1026 {
1027 IMPLEMENT_JSON_SERIALIZATION()
1028 IMPLEMENT_JSON_DOCUMENTATION(NetworkInterfaceDevice)
1029
1030 public:
1031 std::string name;
1032 std::string friendlyName;
1033 std::string description;
1034 int family;
1035 std::string address;
1036 bool available;
1037 bool isLoopback;
1038 bool supportsMulticast;
1039 std::string hardwareAddress;
1040
1042 {
1043 clear();
1044 }
1045
1046 void clear()
1047 {
1048 name.clear();
1049 friendlyName.clear();
1050 description.clear();
1051 family = -1;
1052 address.clear();
1053 available = false;
1054 isLoopback = false;
1055 supportsMulticast = false;
1056 hardwareAddress.clear();
1057 }
1058
1059 virtual void initForDocumenting()
1060 {
1061 clear();
1062 name = "en0";
1063 friendlyName = "Wi-Fi";
1064 description = "A wi-fi adapter";
1065 family = 1;
1066 address = "127.0.0.1";
1067 available = true;
1068 isLoopback = true;
1069 supportsMulticast = false;
1070 hardwareAddress = "DE:AD:BE:EF:01:02:03";
1071 }
1072 };
1073
1074 static void to_json(nlohmann::json& j, const NetworkInterfaceDevice& p)
1075 {
1076 j = nlohmann::json{
1077 TOJSON_IMPL(name),
1078 TOJSON_IMPL(friendlyName),
1079 TOJSON_IMPL(description),
1080 TOJSON_IMPL(family),
1081 TOJSON_IMPL(address),
1082 TOJSON_IMPL(available),
1083 TOJSON_IMPL(isLoopback),
1084 TOJSON_IMPL(supportsMulticast),
1085 TOJSON_IMPL(hardwareAddress)
1086 };
1087 }
1088 static void from_json(const nlohmann::json& j, NetworkInterfaceDevice& p)
1089 {
1090 p.clear();
1091 getOptional("name", p.name, j);
1092 getOptional("friendlyName", p.friendlyName, j);
1093 getOptional("description", p.description, j);
1094 getOptional("family", p.family, j, -1);
1095 getOptional("address", p.address, j);
1096 getOptional("available", p.available, j, false);
1097 getOptional("isLoopback", p.isLoopback, j, false);
1098 getOptional("supportsMulticast", p.supportsMulticast, j, false);
1099 getOptional("hardwareAddress", p.hardwareAddress, j);
1100 }
1101
1102 //-----------------------------------------------------------
1103 JSON_SERIALIZED_CLASS(ListOfNetworkInterfaceDevice)
1105 {
1106 IMPLEMENT_JSON_SERIALIZATION()
1107 IMPLEMENT_JSON_DOCUMENTATION(ListOfNetworkInterfaceDevice)
1108
1109 public:
1110 std::vector<NetworkInterfaceDevice> list;
1111
1113 {
1114 clear();
1115 }
1116
1117 void clear()
1118 {
1119 list.clear();
1120 }
1121 };
1122
1123 static void to_json(nlohmann::json& j, const ListOfNetworkInterfaceDevice& p)
1124 {
1125 j = nlohmann::json{
1126 TOJSON_IMPL(list)
1127 };
1128 }
1129 static void from_json(const nlohmann::json& j, ListOfNetworkInterfaceDevice& p)
1130 {
1131 p.clear();
1132 getOptional<std::vector<NetworkInterfaceDevice>>("list", p.list, j);
1133 }
1134
1135
1136 //-----------------------------------------------------------
1137 JSON_SERIALIZED_CLASS(RtpHeader)
1147 {
1148 IMPLEMENT_JSON_SERIALIZATION()
1149 IMPLEMENT_JSON_DOCUMENTATION(RtpHeader)
1150
1151 public:
1152
1154 int pt;
1155
1158
1160 uint16_t seq;
1161
1163 uint32_t ssrc;
1164
1166 uint32_t ts;
1167
1168 RtpHeader()
1169 {
1170 clear();
1171 }
1172
1173 void clear()
1174 {
1175 pt = -1;
1176 marker = false;
1177 seq = 0;
1178 ssrc = 0;
1179 ts = 0;
1180 }
1181
1182 virtual void initForDocumenting()
1183 {
1184 clear();
1185 pt = 0;
1186 marker = false;
1187 seq = 123;
1188 ssrc = 12345678;
1189 ts = 87654321;
1190 }
1191 };
1192
1193 static void to_json(nlohmann::json& j, const RtpHeader& p)
1194 {
1195 if(p.pt != -1)
1196 {
1197 j = nlohmann::json{
1198 TOJSON_IMPL(pt),
1199 TOJSON_IMPL(marker),
1200 TOJSON_IMPL(seq),
1201 TOJSON_IMPL(ssrc),
1202 TOJSON_IMPL(ts)
1203 };
1204 }
1205 }
1206 static void from_json(const nlohmann::json& j, RtpHeader& p)
1207 {
1208 p.clear();
1209 getOptional<int>("pt", p.pt, j, -1);
1210 getOptional<bool>("marker", p.marker, j, false);
1211 getOptional<uint16_t>("seq", p.seq, j, 0);
1212 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
1213 getOptional<uint32_t>("ts", p.ts, j, 0);
1214 }
1215
1216 //-----------------------------------------------------------
1217 JSON_SERIALIZED_CLASS(Rfc4733Event)
1225 {
1226 IMPLEMENT_JSON_SERIALIZATION()
1227 IMPLEMENT_JSON_DOCUMENTATION(Rfc4733Event)
1228
1229 public:
1230
1232 int id;
1233
1235 bool end;
1236
1239
1242
1245
1246 Rfc4733Event()
1247 {
1248 clear();
1249 }
1250
1251 void clear()
1252 {
1253 id = -1;
1254 end = false;
1255 reserved = 0;
1256 volume = 0;
1257 duration = 0;
1258 }
1259
1260 virtual void initForDocumenting()
1261 {
1262 clear();
1263 id = 0;
1264 end = false;
1265 reserved = 0;
1266 volume = 0;
1267 duration = 0;
1268 }
1269 };
1270
1271 static void to_json(nlohmann::json& j, const Rfc4733Event& p)
1272 {
1273 j = nlohmann::json{
1274 TOJSON_IMPL(id),
1275 TOJSON_IMPL(end),
1276 TOJSON_IMPL(reserved),
1277 TOJSON_IMPL(volume),
1278 TOJSON_IMPL(duration)
1279 };
1280 }
1281 static void from_json(const nlohmann::json& j, Rfc4733Event& p)
1282 {
1283 p.clear();
1284 getOptional<int>("id", p.id, j, -1);
1285 getOptional<bool>("end", p.end, j, false);
1286 getOptional<int>("reserved", p.reserved, j, 0);
1287 getOptional<int>("volume", p.volume, j, 0);
1288 getOptional<int>("duration", p.duration, j, 0);
1289 }
1290
1291 //-----------------------------------------------------------
1292 JSON_SERIALIZED_CLASS(BlobInfo)
1302 {
1303 IMPLEMENT_JSON_SERIALIZATION()
1304 IMPLEMENT_JSON_DOCUMENTATION(BlobInfo)
1305
1306 public:
1310 typedef enum
1311 {
1313 bptUndefined = 0,
1314
1316 bptAppTextUtf8 = 1,
1317
1319 bptJsonTextUtf8 = 2,
1320
1322 bptAppBinary = 3,
1323
1325 bptEngageBinaryHumanBiometrics = 4,
1326
1328 bptAppMimeMessage = 5,
1329
1331 bptRfc4733Events = 6,
1332
1334 bptEngageInternal = 42
1335 } PayloadType_t;
1336
1338 size_t size;
1339
1341 std::string source;
1342
1344 std::string target;
1345
1348
1351
1353 std::string txnId;
1354
1357
1358 BlobInfo()
1359 {
1360 clear();
1361 }
1362
1363 void clear()
1364 {
1365 size = 0;
1366 source.clear();
1367 target.clear();
1368 rtpHeader.clear();
1369 payloadType = PayloadType_t::bptUndefined;
1370 txnId.clear();
1371 txnTimeoutSecs = 0;
1372 }
1373
1374 virtual void initForDocumenting()
1375 {
1376 clear();
1377 rtpHeader.initForDocumenting();
1378 }
1379 };
1380
1381 static void to_json(nlohmann::json& j, const BlobInfo& p)
1382 {
1383 j = nlohmann::json{
1384 TOJSON_IMPL(size),
1385 TOJSON_IMPL(source),
1386 TOJSON_IMPL(target),
1387 TOJSON_IMPL(rtpHeader),
1388 TOJSON_IMPL(payloadType),
1389 TOJSON_IMPL(txnId),
1390 TOJSON_IMPL(txnTimeoutSecs)
1391 };
1392 }
1393 static void from_json(const nlohmann::json& j, BlobInfo& p)
1394 {
1395 p.clear();
1396 getOptional<size_t>("size", p.size, j, 0);
1397 getOptional<std::string>("source", p.source, j, EMPTY_STRING);
1398 getOptional<std::string>("target", p.target, j, EMPTY_STRING);
1399 getOptional<RtpHeader>("rtpHeader", p.rtpHeader, j);
1400 getOptional<BlobInfo::PayloadType_t>("payloadType", p.payloadType, j, BlobInfo::PayloadType_t::bptUndefined);
1401 getOptional<std::string>("txnId", p.txnId, j, EMPTY_STRING);
1402 getOptional<int>("txnTimeoutSecs", p.txnTimeoutSecs, j, 0);
1403 }
1404
1405
1406 //-----------------------------------------------------------
1407 JSON_SERIALIZED_CLASS(TxAudioUri)
1420 {
1421 IMPLEMENT_JSON_SERIALIZATION()
1422 IMPLEMENT_JSON_DOCUMENTATION(TxAudioUri)
1423
1424 public:
1426 std::string uri;
1427
1430
1431 TxAudioUri()
1432 {
1433 clear();
1434 }
1435
1436 void clear()
1437 {
1438 uri.clear();
1439 repeatCount = 0;
1440 }
1441
1442 virtual void initForDocumenting()
1443 {
1444 }
1445 };
1446
1447 static void to_json(nlohmann::json& j, const TxAudioUri& p)
1448 {
1449 j = nlohmann::json{
1450 TOJSON_IMPL(uri),
1451 TOJSON_IMPL(repeatCount)
1452 };
1453 }
1454 static void from_json(const nlohmann::json& j, TxAudioUri& p)
1455 {
1456 p.clear();
1457 getOptional<std::string>("uri", p.uri, j, EMPTY_STRING);
1458 getOptional<int>("repeatCount", p.repeatCount, j, 0);
1459 }
1460
1461
1462 //-----------------------------------------------------------
1463 JSON_SERIALIZED_CLASS(AdvancedTxParams)
1476 {
1477 IMPLEMENT_JSON_SERIALIZATION()
1478 IMPLEMENT_JSON_DOCUMENTATION(AdvancedTxParams)
1479
1480 public:
1481
1483 uint16_t flags;
1484
1486 uint8_t priority;
1487
1490
1493
1495 std::string alias;
1496
1498 bool muted;
1499
1501 uint32_t txId;
1502
1505
1508
1511
1514
1516 {
1517 clear();
1518 }
1519
1520 void clear()
1521 {
1522 flags = 0;
1523 priority = 0;
1524 subchannelTag = 0;
1525 includeNodeId = false;
1526 alias.clear();
1527 muted = false;
1528 txId = 0;
1529 audioUri.clear();
1530 aliasSpecializer = 0;
1531 receiverRxMuteForAliasSpecializer = false;
1532 reBegin = false;
1533 }
1534
1535 virtual void initForDocumenting()
1536 {
1537 }
1538 };
1539
1540 static void to_json(nlohmann::json& j, const AdvancedTxParams& p)
1541 {
1542 j = nlohmann::json{
1543 TOJSON_IMPL(flags),
1544 TOJSON_IMPL(priority),
1545 TOJSON_IMPL(subchannelTag),
1546 TOJSON_IMPL(includeNodeId),
1547 TOJSON_IMPL(alias),
1548 TOJSON_IMPL(muted),
1549 TOJSON_IMPL(txId),
1550 TOJSON_IMPL(audioUri),
1551 TOJSON_IMPL(aliasSpecializer),
1552 TOJSON_IMPL(receiverRxMuteForAliasSpecializer),
1553 TOJSON_IMPL(reBegin)
1554 };
1555 }
1556 static void from_json(const nlohmann::json& j, AdvancedTxParams& p)
1557 {
1558 p.clear();
1559 getOptional<uint16_t>("flags", p.flags, j, 0);
1560 getOptional<uint8_t>("priority", p.priority, j, 0);
1561 getOptional<uint16_t>("subchannelTag", p.subchannelTag, j, 0);
1562 getOptional<bool>("includeNodeId", p.includeNodeId, j, false);
1563 getOptional<std::string>("alias", p.alias, j, EMPTY_STRING);
1564 getOptional<bool>("muted", p.muted, j, false);
1565 getOptional<uint32_t>("txId", p.txId, j, 0);
1566 getOptional<TxAudioUri>("audioUri", p.audioUri, j);
1567 getOptional<uint16_t>("aliasSpecializer", p.aliasSpecializer, j, 0);
1568 getOptional<bool>("receiverRxMuteForAliasSpecializer", p.receiverRxMuteForAliasSpecializer, j, false);
1569 getOptional<bool>("reBegin", p.reBegin, j, false);
1570 }
1571
1572 //-----------------------------------------------------------
1573 JSON_SERIALIZED_CLASS(Identity)
1586 {
1587 IMPLEMENT_JSON_SERIALIZATION()
1588 IMPLEMENT_JSON_DOCUMENTATION(Identity)
1589
1590 public:
1598 std::string nodeId;
1599
1601 std::string userId;
1602
1604 std::string displayName;
1605
1607 std::string avatar;
1608
1609 Identity()
1610 {
1611 clear();
1612 }
1613
1614 void clear()
1615 {
1616 nodeId.clear();
1617 userId.clear();
1618 displayName.clear();
1619 avatar.clear();
1620 }
1621
1622 virtual void initForDocumenting()
1623 {
1624 }
1625 };
1626
1627 static void to_json(nlohmann::json& j, const Identity& p)
1628 {
1629 j = nlohmann::json{
1630 TOJSON_IMPL(nodeId),
1631 TOJSON_IMPL(userId),
1632 TOJSON_IMPL(displayName),
1633 TOJSON_IMPL(avatar)
1634 };
1635 }
1636 static void from_json(const nlohmann::json& j, Identity& p)
1637 {
1638 p.clear();
1639 getOptional<std::string>("nodeId", p.nodeId, j);
1640 getOptional<std::string>("userId", p.userId, j);
1641 getOptional<std::string>("displayName", p.displayName, j);
1642 getOptional<std::string>("avatar", p.avatar, j);
1643 }
1644
1645
1646 //-----------------------------------------------------------
1647 JSON_SERIALIZED_CLASS(Location)
1660 {
1661 IMPLEMENT_JSON_SERIALIZATION()
1662 IMPLEMENT_JSON_DOCUMENTATION(Location)
1663
1664 public:
1665 constexpr static double INVALID_LOCATION_VALUE = -999.999;
1666
1668 uint32_t ts;
1669
1671 double latitude;
1672
1675
1677 double altitude;
1678
1681
1683 double speed;
1684
1685 Location()
1686 {
1687 clear();
1688 }
1689
1690 void clear()
1691 {
1692 ts = 0;
1693 latitude = INVALID_LOCATION_VALUE;
1694 longitude = INVALID_LOCATION_VALUE;
1695 altitude = INVALID_LOCATION_VALUE;
1696 direction = INVALID_LOCATION_VALUE;
1697 speed = INVALID_LOCATION_VALUE;
1698 }
1699
1700 virtual void initForDocumenting()
1701 {
1702 clear();
1703
1704 ts = 123456;
1705 latitude = 123.456;
1706 longitude = 456.789;
1707 altitude = 123;
1708 direction = 1;
1709 speed = 1234;
1710 }
1711 };
1712
1713 static void to_json(nlohmann::json& j, const Location& p)
1714 {
1715 if(p.latitude != Location::INVALID_LOCATION_VALUE && p.longitude != Location::INVALID_LOCATION_VALUE)
1716 {
1717 j = nlohmann::json{
1718 TOJSON_IMPL(latitude),
1719 TOJSON_IMPL(longitude),
1720 };
1721
1722 if(p.ts != 0) j["ts"] = p.ts;
1723 if(p.altitude != Location::INVALID_LOCATION_VALUE) j["altitude"] = p.altitude;
1724 if(p.speed != Location::INVALID_LOCATION_VALUE) j["speed"] = p.speed;
1725 if(p.direction != Location::INVALID_LOCATION_VALUE) j["direction"] = p.direction;
1726 }
1727 }
1728 static void from_json(const nlohmann::json& j, Location& p)
1729 {
1730 p.clear();
1731 getOptional<uint32_t>("ts", p.ts, j, 0);
1732 j.at("latitude").get_to(p.latitude);
1733 j.at("longitude").get_to(p.longitude);
1734 getOptional<double>("altitude", p.altitude, j, Location::INVALID_LOCATION_VALUE);
1735 getOptional<double>("direction", p.direction, j, Location::INVALID_LOCATION_VALUE);
1736 getOptional<double>("speed", p.speed, j, Location::INVALID_LOCATION_VALUE);
1737 }
1738
1739 //-----------------------------------------------------------
1740 JSON_SERIALIZED_CLASS(Power)
1751 {
1752 IMPLEMENT_JSON_SERIALIZATION()
1753 IMPLEMENT_JSON_DOCUMENTATION(Power)
1754
1755 public:
1756
1769
1783
1786
1787 Power()
1788 {
1789 clear();
1790 }
1791
1792 void clear()
1793 {
1794 source = 0;
1795 state = 0;
1796 level = 0;
1797 }
1798
1799 virtual void initForDocumenting()
1800 {
1801 }
1802 };
1803
1804 static void to_json(nlohmann::json& j, const Power& p)
1805 {
1806 if(p.source != 0 && p.state != 0 && p.level != 0)
1807 {
1808 j = nlohmann::json{
1809 TOJSON_IMPL(source),
1810 TOJSON_IMPL(state),
1811 TOJSON_IMPL(level)
1812 };
1813 }
1814 }
1815 static void from_json(const nlohmann::json& j, Power& p)
1816 {
1817 p.clear();
1818 getOptional<int>("source", p.source, j, 0);
1819 getOptional<int>("state", p.state, j, 0);
1820 getOptional<int>("level", p.level, j, 0);
1821 }
1822
1823
1824 //-----------------------------------------------------------
1825 JSON_SERIALIZED_CLASS(Connectivity)
1836 {
1837 IMPLEMENT_JSON_SERIALIZATION()
1838 IMPLEMENT_JSON_DOCUMENTATION(Connectivity)
1839
1840 public:
1854 int type;
1855
1858
1861
1862 Connectivity()
1863 {
1864 clear();
1865 }
1866
1867 void clear()
1868 {
1869 type = 0;
1870 strength = 0;
1871 rating = 0;
1872 }
1873
1874 virtual void initForDocumenting()
1875 {
1876 clear();
1877
1878 type = 1;
1879 strength = 2;
1880 rating = 3;
1881 }
1882 };
1883
1884 static void to_json(nlohmann::json& j, const Connectivity& p)
1885 {
1886 if(p.type != 0)
1887 {
1888 j = nlohmann::json{
1889 TOJSON_IMPL(type),
1890 TOJSON_IMPL(strength),
1891 TOJSON_IMPL(rating)
1892 };
1893 }
1894 }
1895 static void from_json(const nlohmann::json& j, Connectivity& p)
1896 {
1897 p.clear();
1898 getOptional<int>("type", p.type, j, 0);
1899 getOptional<int>("strength", p.strength, j, 0);
1900 getOptional<int>("rating", p.rating, j, 0);
1901 }
1902
1903
1904 //-----------------------------------------------------------
1905 JSON_SERIALIZED_CLASS(PresenceDescriptorGroupItem)
1916 {
1917 IMPLEMENT_JSON_SERIALIZATION()
1918 IMPLEMENT_JSON_DOCUMENTATION(PresenceDescriptorGroupItem)
1919
1920 public:
1922 std::string groupId;
1923
1925 std::string alias;
1926
1928 uint16_t status;
1929
1931 {
1932 clear();
1933 }
1934
1935 void clear()
1936 {
1937 groupId.clear();
1938 alias.clear();
1939 status = 0;
1940 }
1941
1942 virtual void initForDocumenting()
1943 {
1944 groupId = "{123-456}";
1945 alias = "MYALIAS";
1946 status = 0;
1947 }
1948 };
1949
1950 static void to_json(nlohmann::json& j, const PresenceDescriptorGroupItem& p)
1951 {
1952 j = nlohmann::json{
1953 TOJSON_IMPL(groupId),
1954 TOJSON_IMPL(alias),
1955 TOJSON_IMPL(status)
1956 };
1957 }
1958 static void from_json(const nlohmann::json& j, PresenceDescriptorGroupItem& p)
1959 {
1960 p.clear();
1961 getOptional<std::string>("groupId", p.groupId, j);
1962 getOptional<std::string>("alias", p.alias, j);
1963 getOptional<uint16_t>("status", p.status, j);
1964 }
1965
1966
1967 //-----------------------------------------------------------
1968 JSON_SERIALIZED_CLASS(PresenceDescriptor)
1979 {
1980 IMPLEMENT_JSON_SERIALIZATION()
1981 IMPLEMENT_JSON_DOCUMENTATION(PresenceDescriptor)
1982
1983 public:
1984
1990 bool self;
1991
1997 uint32_t ts;
1998
2004 uint32_t nextUpdate;
2005
2008
2010 std::string comment;
2011
2025 uint32_t disposition;
2026
2028 std::vector<PresenceDescriptorGroupItem> groupAliases;
2029
2032
2034 std::string custom;
2035
2038
2041
2044
2046 {
2047 clear();
2048 }
2049
2050 void clear()
2051 {
2052 self = false;
2053 ts = 0;
2054 nextUpdate = 0;
2055 identity.clear();
2056 comment.clear();
2057 disposition = 0;
2058 groupAliases.clear();
2059 location.clear();
2060 custom.clear();
2061 announceOnReceive = false;
2062 connectivity.clear();
2063 power.clear();
2064 }
2065
2066 virtual void initForDocumenting()
2067 {
2068 clear();
2069
2070 self = true;
2071 ts = 123;
2072 nextUpdate = 0;
2073 identity.initForDocumenting();
2074 comment = "This is a comment";
2075 disposition = 123;
2076
2077 PresenceDescriptorGroupItem gi;
2078 gi.initForDocumenting();
2079 groupAliases.push_back(gi);
2080
2081 location.initForDocumenting();
2082 custom = "{}";
2083 announceOnReceive = true;
2084 connectivity.initForDocumenting();
2085 power.initForDocumenting();
2086 }
2087 };
2088
2089 static void to_json(nlohmann::json& j, const PresenceDescriptor& p)
2090 {
2091 j = nlohmann::json{
2092 TOJSON_IMPL(ts),
2093 TOJSON_IMPL(nextUpdate),
2094 TOJSON_IMPL(identity),
2095 TOJSON_IMPL(comment),
2096 TOJSON_IMPL(disposition),
2097 TOJSON_IMPL(groupAliases),
2098 TOJSON_IMPL(location),
2099 TOJSON_IMPL(custom),
2100 TOJSON_IMPL(announceOnReceive),
2101 TOJSON_IMPL(connectivity),
2102 TOJSON_IMPL(power)
2103 };
2104
2105 if(!p.comment.empty()) j["comment"] = p.comment;
2106 if(!p.custom.empty()) j["custom"] = p.custom;
2107
2108 if(p.self)
2109 {
2110 j["self"] = true;
2111 }
2112 }
2113 static void from_json(const nlohmann::json& j, PresenceDescriptor& p)
2114 {
2115 p.clear();
2116 getOptional<bool>("self", p.self, j);
2117 getOptional<uint32_t>("ts", p.ts, j);
2118 getOptional<uint32_t>("nextUpdate", p.nextUpdate, j);
2119 getOptional<Identity>("identity", p.identity, j);
2120 getOptional<std::string>("comment", p.comment, j);
2121 getOptional<uint32_t>("disposition", p.disposition, j);
2122 getOptional<std::vector<PresenceDescriptorGroupItem>>("groupAliases", p.groupAliases, j);
2123 getOptional<Location>("location", p.location, j);
2124 getOptional<std::string>("custom", p.custom, j);
2125 getOptional<bool>("announceOnReceive", p.announceOnReceive, j);
2126 getOptional<Connectivity>("connectivity", p.connectivity, j);
2127 getOptional<Power>("power", p.power, j);
2128 }
2129
2135 typedef enum
2136 {
2139
2142
2145
2147 priVoice = 3
2148 } TxPriority_t;
2149
2155 typedef enum
2156 {
2159
2162
2165
2167 arpIpv6ThenIpv4 = 64
2168 } AddressResolutionPolicy_t;
2169
2170 //-----------------------------------------------------------
2171 JSON_SERIALIZED_CLASS(NetworkTxOptions)
2184 {
2185 IMPLEMENT_JSON_SERIALIZATION()
2186 IMPLEMENT_JSON_DOCUMENTATION(NetworkTxOptions)
2187
2188 public:
2191
2197 int ttl;
2198
2200 {
2201 clear();
2202 }
2203
2204 void clear()
2205 {
2206 priority = priVoice;
2207 ttl = 1;
2208 }
2209
2210 virtual void initForDocumenting()
2211 {
2212 }
2213 };
2214
2215 static void to_json(nlohmann::json& j, const NetworkTxOptions& p)
2216 {
2217 j = nlohmann::json{
2218 TOJSON_IMPL(priority),
2219 TOJSON_IMPL(ttl)
2220 };
2221 }
2222 static void from_json(const nlohmann::json& j, NetworkTxOptions& p)
2223 {
2224 p.clear();
2225 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
2226 getOptional<int>("ttl", p.ttl, j, 1);
2227 }
2228
2229
2230 //-----------------------------------------------------------
2231 JSON_SERIALIZED_CLASS(TcpNetworkTxOptions)
2240 {
2241 IMPLEMENT_JSON_SERIALIZATION()
2242 IMPLEMENT_JSON_DOCUMENTATION(TcpNetworkTxOptions)
2243
2244 public:
2246 {
2247 clear();
2248 }
2249
2250 void clear()
2251 {
2252 priority = priVoice;
2253 ttl = -1;
2254 }
2255
2256 virtual void initForDocumenting()
2257 {
2258 }
2259 };
2260
2261 static void to_json(nlohmann::json& j, const TcpNetworkTxOptions& p)
2262 {
2263 j = nlohmann::json{
2264 TOJSON_IMPL(priority),
2265 TOJSON_IMPL(ttl)
2266 };
2267 }
2268 static void from_json(const nlohmann::json& j, TcpNetworkTxOptions& p)
2269 {
2270 p.clear();
2271 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
2272 getOptional<int>("ttl", p.ttl, j, -1);
2273 }
2274
2275 typedef enum
2276 {
2279
2282
2284 ifIp6 = 6
2285 } IpFamilyType_t;
2286
2287 //-----------------------------------------------------------
2288 JSON_SERIALIZED_CLASS(NetworkAddress)
2300 {
2301 IMPLEMENT_JSON_SERIALIZATION()
2302 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddress)
2303
2304 public:
2306 std::string address;
2307
2309 int port;
2310
2312 {
2313 clear();
2314 }
2315
2316 void clear()
2317 {
2318 address.clear();
2319 port = 0;
2320 }
2321
2322 bool matches(const NetworkAddress& other)
2323 {
2324 if(address.compare(other.address) != 0)
2325 {
2326 return false;
2327 }
2328
2329 if(port != other.port)
2330 {
2331 return false;
2332 }
2333
2334 return true;
2335 }
2336 };
2337
2338 static void to_json(nlohmann::json& j, const NetworkAddress& p)
2339 {
2340 j = nlohmann::json{
2341 TOJSON_IMPL(address),
2342 TOJSON_IMPL(port)
2343 };
2344 }
2345 static void from_json(const nlohmann::json& j, NetworkAddress& p)
2346 {
2347 p.clear();
2348 getOptional<std::string>("address", p.address, j);
2349 getOptional<int>("port", p.port, j);
2350 }
2351
2352
2353 //-----------------------------------------------------------
2354 JSON_SERIALIZED_CLASS(NetworkAddressRxTx)
2366 {
2367 IMPLEMENT_JSON_SERIALIZATION()
2368 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddressRxTx)
2369
2370 public:
2373
2376
2378 {
2379 clear();
2380 }
2381
2382 void clear()
2383 {
2384 rx.clear();
2385 tx.clear();
2386 }
2387 };
2388
2389 static void to_json(nlohmann::json& j, const NetworkAddressRxTx& p)
2390 {
2391 j = nlohmann::json{
2392 TOJSON_IMPL(rx),
2393 TOJSON_IMPL(tx)
2394 };
2395 }
2396 static void from_json(const nlohmann::json& j, NetworkAddressRxTx& p)
2397 {
2398 p.clear();
2399 getOptional<NetworkAddress>("rx", p.rx, j);
2400 getOptional<NetworkAddress>("tx", p.tx, j);
2401 }
2402
2404 typedef enum
2405 {
2408
2410 graptStrict = 1
2411 } GroupRestrictionAccessPolicyType_t;
2412
2413 static bool isValidGroupRestrictionAccessPolicyType(GroupRestrictionAccessPolicyType_t t)
2414 {
2415 return (t == GroupRestrictionAccessPolicyType_t::graptPermissive ||
2416 t == GroupRestrictionAccessPolicyType_t::graptStrict );
2417 }
2418
2420 typedef enum
2421 {
2424
2427
2429 rtBlacklist = 2
2430 } RestrictionType_t;
2431
2432 static bool isValidRestrictionType(RestrictionType_t t)
2433 {
2434 return (t == RestrictionType_t::rtUndefined ||
2435 t == RestrictionType_t::rtWhitelist ||
2436 t == RestrictionType_t::rtBlacklist );
2437 }
2438
2463
2464 static bool isValidRestrictionElementType(RestrictionElementType_t t)
2465 {
2466 return (t == RestrictionElementType_t::retGroupId ||
2467 t == RestrictionElementType_t::retGroupIdPattern ||
2468 t == RestrictionElementType_t::retGenericAccessTagPattern ||
2469 t == RestrictionElementType_t::retCertificateSerialNumberPattern ||
2470 t == RestrictionElementType_t::retCertificateFingerprintPattern ||
2471 t == RestrictionElementType_t::retCertificateSubjectPattern ||
2472 t == RestrictionElementType_t::retCertificateIssuerPattern);
2473 }
2474
2475
2476 //-----------------------------------------------------------
2477 JSON_SERIALIZED_CLASS(NetworkAddressRestrictionList)
2489 {
2490 IMPLEMENT_JSON_SERIALIZATION()
2491 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddressRestrictionList)
2492
2493 public:
2496
2498 std::vector<NetworkAddressRxTx> elements;
2499
2501 {
2502 clear();
2503 }
2504
2505 void clear()
2506 {
2507 type = RestrictionType_t::rtUndefined;
2508 elements.clear();
2509 }
2510 };
2511
2512 static void to_json(nlohmann::json& j, const NetworkAddressRestrictionList& p)
2513 {
2514 j = nlohmann::json{
2515 TOJSON_IMPL(type),
2516 TOJSON_IMPL(elements)
2517 };
2518 }
2519 static void from_json(const nlohmann::json& j, NetworkAddressRestrictionList& p)
2520 {
2521 p.clear();
2522 getOptional<RestrictionType_t>("type", p.type, j, RestrictionType_t::rtUndefined);
2523 getOptional<std::vector<NetworkAddressRxTx>>("elements", p.elements, j);
2524 }
2525
2526 //-----------------------------------------------------------
2527 JSON_SERIALIZED_CLASS(StringRestrictionList)
2539 {
2540 IMPLEMENT_JSON_SERIALIZATION()
2541 IMPLEMENT_JSON_DOCUMENTATION(StringRestrictionList)
2542
2543 public:
2546
2549
2551 std::vector<std::string> elements;
2552
2554 {
2555 type = RestrictionType_t::rtUndefined;
2556 elementsType = RestrictionElementType_t::retGroupId;
2557 clear();
2558 }
2559
2560 void clear()
2561 {
2562 elements.clear();
2563 }
2564 };
2565
2566 static void to_json(nlohmann::json& j, const StringRestrictionList& p)
2567 {
2568 j = nlohmann::json{
2569 TOJSON_IMPL(type),
2570 TOJSON_IMPL(elementsType),
2571 TOJSON_IMPL(elements)
2572 };
2573 }
2574 static void from_json(const nlohmann::json& j, StringRestrictionList& p)
2575 {
2576 p.clear();
2577 getOptional<RestrictionType_t>("type", p.type, j, RestrictionType_t::rtUndefined);
2578 getOptional<RestrictionElementType_t>("elementsType", p.elementsType, j, RestrictionElementType_t::retGroupId);
2579 getOptional<std::vector<std::string>>("elements", p.elements, j);
2580 }
2581
2582
2583 //-----------------------------------------------------------
2584 JSON_SERIALIZED_CLASS(PacketCapturer)
2594 {
2595 IMPLEMENT_JSON_SERIALIZATION()
2596 IMPLEMENT_JSON_DOCUMENTATION(PacketCapturer)
2597
2598 public:
2599 bool enabled;
2600 uint32_t maxMb;
2601 std::string filePrefix;
2602
2604 {
2605 clear();
2606 }
2607
2608 void clear()
2609 {
2610 enabled = false;
2611 maxMb = 10;
2612 filePrefix.clear();
2613 }
2614 };
2615
2616 static void to_json(nlohmann::json& j, const PacketCapturer& p)
2617 {
2618 j = nlohmann::json{
2619 TOJSON_IMPL(enabled),
2620 TOJSON_IMPL(maxMb),
2621 TOJSON_IMPL(filePrefix)
2622 };
2623 }
2624 static void from_json(const nlohmann::json& j, PacketCapturer& p)
2625 {
2626 p.clear();
2627 getOptional<bool>("enabled", p.enabled, j, false);
2628 getOptional<uint32_t>("maxMb", p.maxMb, j, 10);
2629 getOptional<std::string>("filePrefix", p.filePrefix, j, EMPTY_STRING);
2630 }
2631
2632
2633 //-----------------------------------------------------------
2634 JSON_SERIALIZED_CLASS(TransportImpairment)
2644 {
2645 IMPLEMENT_JSON_SERIALIZATION()
2646 IMPLEMENT_JSON_DOCUMENTATION(TransportImpairment)
2647
2648 public:
2649 int applicationPercentage;
2650 int jitterMs;
2651 int lossPercentage;
2652
2654 {
2655 clear();
2656 }
2657
2658 void clear()
2659 {
2660 applicationPercentage = 0;
2661 jitterMs = 0;
2662 lossPercentage = 0;
2663 }
2664 };
2665
2666 static void to_json(nlohmann::json& j, const TransportImpairment& p)
2667 {
2668 j = nlohmann::json{
2669 TOJSON_IMPL(applicationPercentage),
2670 TOJSON_IMPL(jitterMs),
2671 TOJSON_IMPL(lossPercentage)
2672 };
2673 }
2674 static void from_json(const nlohmann::json& j, TransportImpairment& p)
2675 {
2676 p.clear();
2677 getOptional<int>("applicationPercentage", p.applicationPercentage, j, 0);
2678 getOptional<int>("jitterMs", p.jitterMs, j, 0);
2679 getOptional<int>("lossPercentage", p.lossPercentage, j, 0);
2680 }
2681
2682 //-----------------------------------------------------------
2683 JSON_SERIALIZED_CLASS(NsmNetworking)
2693 {
2694 IMPLEMENT_JSON_SERIALIZATION()
2695 IMPLEMENT_JSON_DOCUMENTATION(NsmNetworking)
2696
2697 public:
2698 std::string interfaceName;
2699 NetworkAddress address;
2700 int ttl;
2701 int tos;
2702 int txOversend;
2703 TransportImpairment rxImpairment;
2704 TransportImpairment txImpairment;
2705 std::string cryptoPassword;
2706
2708 {
2709 clear();
2710 }
2711
2712 void clear()
2713 {
2714 interfaceName.clear();
2715 address.clear();
2716 ttl = 1;
2717 tos = 56;
2718 txOversend = 0;
2719 rxImpairment.clear();
2720 txImpairment.clear();
2721 cryptoPassword.clear();
2722 }
2723 };
2724
2725 static void to_json(nlohmann::json& j, const NsmNetworking& p)
2726 {
2727 j = nlohmann::json{
2728 TOJSON_IMPL(interfaceName),
2729 TOJSON_IMPL(address),
2730 TOJSON_IMPL(ttl),
2731 TOJSON_IMPL(tos),
2732 TOJSON_IMPL(txOversend),
2733 TOJSON_IMPL(rxImpairment),
2734 TOJSON_IMPL(txImpairment),
2735 TOJSON_IMPL(cryptoPassword)
2736 };
2737 }
2738 static void from_json(const nlohmann::json& j, NsmNetworking& p)
2739 {
2740 p.clear();
2741 getOptional("interfaceName", p.interfaceName, j, EMPTY_STRING);
2742 getOptional<NetworkAddress>("address", p.address, j);
2743 getOptional<int>("ttl", p.ttl, j, 1);
2744 getOptional<int>("tos", p.tos, j, 56);
2745 getOptional<int>("txOversend", p.txOversend, j, 0);
2746 getOptional<TransportImpairment>("rxImpairment", p.rxImpairment, j);
2747 getOptional<TransportImpairment>("txImpairment", p.txImpairment, j);
2748 getOptional("cryptoPassword", p.cryptoPassword, j, EMPTY_STRING);
2749 }
2750
2751
2752 //-----------------------------------------------------------
2753 JSON_SERIALIZED_CLASS(NsmConfiguration)
2763 {
2764 IMPLEMENT_JSON_SERIALIZATION()
2765 IMPLEMENT_JSON_DOCUMENTATION(NsmConfiguration)
2766
2767 public:
2768
2769 std::string id;
2770 bool favorUptime;
2771 NsmNetworking networking;
2772 std::vector<std::string> resources;
2773 int tokenStart;
2774 int tokenEnd;
2775 int intervalSecs;
2776 int transitionSecsFactor;
2777
2779 {
2780 clear();
2781 }
2782
2783 void clear()
2784 {
2785 id.clear();
2786 favorUptime = false;
2787 networking.clear();
2788 resources.clear();
2789 tokenStart = 1000000;
2790 tokenEnd = 2000000;
2791 intervalSecs = 1;
2792 transitionSecsFactor = 3;
2793 }
2794 };
2795
2796 static void to_json(nlohmann::json& j, const NsmConfiguration& p)
2797 {
2798 j = nlohmann::json{
2799 TOJSON_IMPL(id),
2800 TOJSON_IMPL(favorUptime),
2801 TOJSON_IMPL(networking),
2802 TOJSON_IMPL(resources),
2803 TOJSON_IMPL(tokenStart),
2804 TOJSON_IMPL(tokenEnd),
2805 TOJSON_IMPL(intervalSecs),
2806 TOJSON_IMPL(transitionSecsFactor)
2807 };
2808 }
2809 static void from_json(const nlohmann::json& j, NsmConfiguration& p)
2810 {
2811 p.clear();
2812 getOptional("id", p.id, j);
2813 getOptional<bool>("favorUptime", p.favorUptime, j, false);
2814 getOptional<NsmNetworking>("networking", p.networking, j);
2815 getOptional<std::vector<std::string>>("resources", p.resources, j);
2816 getOptional<int>("tokenStart", p.tokenStart, j, 1000000);
2817 getOptional<int>("tokenEnd", p.tokenEnd, j, 2000000);
2818 getOptional<int>("intervalSecs", p.intervalSecs, j, 1);
2819 getOptional<int>("transitionSecsFactor", p.transitionSecsFactor, j, 3);
2820 }
2821
2822
2823 //-----------------------------------------------------------
2824 JSON_SERIALIZED_CLASS(Rallypoint)
2833 {
2834 IMPLEMENT_JSON_SERIALIZATION()
2835 IMPLEMENT_JSON_DOCUMENTATION(Rallypoint)
2836
2837 public:
2842 typedef enum
2843 {
2845 rppTlsTcp = 0,
2846
2848 rppTlsWs = 1,
2849
2851 rppInvalid = -1
2852 } RpProtocol_t;
2853
2859
2871 std::string certificate;
2872
2884 std::string certificateKey;
2885
2890
2895
2899 std::vector<std::string> caCertificates;
2900
2905
2910
2913
2916
2922 std::string sni;
2923
2924
2927
2929 std::string path;
2930
2933
2934
2935 Rallypoint()
2936 {
2937 clear();
2938 }
2939
2940 void clear()
2941 {
2942 host.clear();
2943 certificate.clear();
2944 certificateKey.clear();
2945 caCertificates.clear();
2946 verifyPeer = false;
2947 transactionTimeoutMs = 0;
2948 disableMessageSigning = false;
2949 connectionTimeoutSecs = 0;
2950 tcpTxOptions.clear();
2951 sni.clear();
2952 protocol = rppTlsTcp;
2953 path.clear();
2954 additionalProtocols.clear();
2955 }
2956
2957 bool matches(const Rallypoint& other)
2958 {
2959 if(!host.matches(other.host))
2960 {
2961 return false;
2962 }
2963
2964 if(protocol != other.protocol)
2965 {
2966 return false;
2967 }
2968
2969 if(path.compare(other.path) != 0)
2970 {
2971 return false;
2972 }
2973
2974 if(certificate.compare(other.certificate) != 0)
2975 {
2976 return false;
2977 }
2978
2979 if(certificateKey.compare(other.certificateKey) != 0)
2980 {
2981 return false;
2982 }
2983
2984 if(verifyPeer != other.verifyPeer)
2985 {
2986 return false;
2987 }
2988
2989 if(allowSelfSignedCertificate != other.allowSelfSignedCertificate)
2990 {
2991 return false;
2992 }
2993
2994 if(caCertificates.size() != other.caCertificates.size())
2995 {
2996 return false;
2997 }
2998
2999 for(size_t x = 0; x < caCertificates.size(); x++)
3000 {
3001 bool found = false;
3002
3003 for(size_t y = 0; y < other.caCertificates.size(); y++)
3004 {
3005 if(caCertificates[x].compare(other.caCertificates[y]) == 0)
3006 {
3007 found = true;
3008 break;
3009 }
3010 }
3011
3012 if(!found)
3013 {
3014 return false;
3015 }
3016 }
3017
3018 if(transactionTimeoutMs != other.transactionTimeoutMs)
3019 {
3020 return false;
3021 }
3022
3023 if(disableMessageSigning != other.disableMessageSigning)
3024 {
3025 return false;
3026 }
3027 if(connectionTimeoutSecs != other.connectionTimeoutSecs)
3028 {
3029 return false;
3030 }
3031 if(tcpTxOptions.priority != other.tcpTxOptions.priority)
3032 {
3033 return false;
3034 }
3035 if(sni.compare(other.sni) != 0)
3036 {
3037 return false;
3038 }
3039
3040 return true;
3041 }
3042 };
3043
3044 static void to_json(nlohmann::json& j, const Rallypoint& p)
3045 {
3046 j = nlohmann::json{
3047 TOJSON_IMPL(host),
3048 TOJSON_IMPL(certificate),
3049 TOJSON_IMPL(certificateKey),
3050 TOJSON_IMPL(verifyPeer),
3051 TOJSON_IMPL(allowSelfSignedCertificate),
3052 TOJSON_IMPL(caCertificates),
3053 TOJSON_IMPL(transactionTimeoutMs),
3054 TOJSON_IMPL(disableMessageSigning),
3055 TOJSON_IMPL(connectionTimeoutSecs),
3056 TOJSON_IMPL(tcpTxOptions),
3057 TOJSON_IMPL(sni),
3058 TOJSON_IMPL(protocol),
3059 TOJSON_IMPL(path),
3060 TOJSON_IMPL(additionalProtocols)
3061 };
3062 }
3063
3064 static void from_json(const nlohmann::json& j, Rallypoint& p)
3065 {
3066 p.clear();
3067 j.at("host").get_to(p.host);
3068 getOptional("certificate", p.certificate, j);
3069 getOptional("certificateKey", p.certificateKey, j);
3070 getOptional<bool>("verifyPeer", p.verifyPeer, j, true);
3071 getOptional<bool>("allowSelfSignedCertificate", p.allowSelfSignedCertificate, j, false);
3072 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
3073 getOptional<int>("transactionTimeoutMs", p.transactionTimeoutMs, j, 0);
3074 getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
3075 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
3076 getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
3077 getOptional<std::string>("sni", p.sni, j);
3078 getOptional<Rallypoint::RpProtocol_t>("protocol", p.protocol, j, Rallypoint::RpProtocol_t::rppTlsTcp);
3079 getOptional<std::string>("path", p.path, j);
3080 getOptional<std::string>("additionalProtocols", p.additionalProtocols, j);
3081 }
3082
3083 //-----------------------------------------------------------
3084 JSON_SERIALIZED_CLASS(RallypointCluster)
3096 {
3097 IMPLEMENT_JSON_SERIALIZATION()
3098 IMPLEMENT_JSON_DOCUMENTATION(RallypointCluster)
3099
3100 public:
3106 typedef enum
3107 {
3109 csRoundRobin = 0,
3110
3112 csFailback = 1
3113 } ConnectionStrategy_t;
3114
3117
3119 std::vector<Rallypoint> rallypoints;
3120
3123
3126
3129
3131 {
3132 clear();
3133 }
3134
3135 void clear()
3136 {
3137 connectionStrategy = csRoundRobin;
3138 rallypoints.clear();
3139 rolloverSecs = 10;
3140 connectionTimeoutSecs = 5;
3141 transactionTimeoutMs = 10000;
3142 }
3143 };
3144
3145 static void to_json(nlohmann::json& j, const RallypointCluster& p)
3146 {
3147 j = nlohmann::json{
3148 TOJSON_IMPL(connectionStrategy),
3149 TOJSON_IMPL(rallypoints),
3150 TOJSON_IMPL(rolloverSecs),
3151 TOJSON_IMPL(connectionTimeoutSecs),
3152 TOJSON_IMPL(transactionTimeoutMs)
3153 };
3154 }
3155 static void from_json(const nlohmann::json& j, RallypointCluster& p)
3156 {
3157 p.clear();
3158 getOptional<RallypointCluster::ConnectionStrategy_t>("connectionStrategy", p.connectionStrategy, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
3159 getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
3160 getOptional<int>("rolloverSecs", p.rolloverSecs, j, 10);
3161 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 5);
3162 getOptional<int>("transactionTimeoutMs", p.transactionTimeoutMs, j, 10000);
3163 }
3164
3165
3166 //-----------------------------------------------------------
3167 JSON_SERIALIZED_CLASS(NetworkDeviceDescriptor)
3178 {
3179 IMPLEMENT_JSON_SERIALIZATION()
3180 IMPLEMENT_JSON_DOCUMENTATION(NetworkDeviceDescriptor)
3181
3182 public:
3188
3190 std::string name;
3191
3193 std::string manufacturer;
3194
3196 std::string model;
3197
3199 std::string hardwareId;
3200
3202 std::string serialNumber;
3203
3205 std::string type;
3206
3208 std::string extra;
3209
3211 {
3212 clear();
3213 }
3214
3215 void clear()
3216 {
3217 deviceId = 0;
3218
3219 name.clear();
3220 manufacturer.clear();
3221 model.clear();
3222 hardwareId.clear();
3223 serialNumber.clear();
3224 type.clear();
3225 extra.clear();
3226 }
3227
3228 virtual std::string toString()
3229 {
3230 char buff[2048];
3231
3232 snprintf(buff, sizeof(buff), "deviceId=%d, name=%s, manufacturer=%s, model=%s, hardwareId=%s, serialNumber=%s, type=%s, extra=%s",
3233 deviceId,
3234 name.c_str(),
3235 manufacturer.c_str(),
3236 model.c_str(),
3237 hardwareId.c_str(),
3238 serialNumber.c_str(),
3239 type.c_str(),
3240 extra.c_str());
3241
3242 return std::string(buff);
3243 }
3244 };
3245
3246 static void to_json(nlohmann::json& j, const NetworkDeviceDescriptor& p)
3247 {
3248 j = nlohmann::json{
3249 TOJSON_IMPL(deviceId),
3250 TOJSON_IMPL(name),
3251 TOJSON_IMPL(manufacturer),
3252 TOJSON_IMPL(model),
3253 TOJSON_IMPL(hardwareId),
3254 TOJSON_IMPL(serialNumber),
3255 TOJSON_IMPL(type),
3256 TOJSON_IMPL(extra)
3257 };
3258 }
3259 static void from_json(const nlohmann::json& j, NetworkDeviceDescriptor& p)
3260 {
3261 p.clear();
3262 getOptional<int>("deviceId", p.deviceId, j, 0);
3263 getOptional("name", p.name, j);
3264 getOptional("manufacturer", p.manufacturer, j);
3265 getOptional("model", p.model, j);
3266 getOptional("hardwareId", p.hardwareId, j);
3267 getOptional("serialNumber", p.serialNumber, j);
3268 getOptional("type", p.type, j);
3269 getOptional("extra", p.extra, j);
3270 }
3271
3272 //-----------------------------------------------------------
3273 JSON_SERIALIZED_CLASS(AudioGate)
3283 {
3284 IMPLEMENT_JSON_SERIALIZATION()
3285 IMPLEMENT_JSON_DOCUMENTATION(AudioGate)
3286
3287 public:
3290
3293
3295 uint32_t hangMs;
3296
3298 uint32_t windowMin;
3299
3301 uint32_t windowMax;
3302
3305
3306
3307 AudioGate()
3308 {
3309 clear();
3310 }
3311
3312 void clear()
3313 {
3314 enabled = false;
3315 useVad = false;
3316 hangMs = 1500;
3317 windowMin = 25;
3318 windowMax = 125;
3319 coefficient = 1.75;
3320 }
3321 };
3322
3323 static void to_json(nlohmann::json& j, const AudioGate& p)
3324 {
3325 j = nlohmann::json{
3326 TOJSON_IMPL(enabled),
3327 TOJSON_IMPL(useVad),
3328 TOJSON_IMPL(hangMs),
3329 TOJSON_IMPL(windowMin),
3330 TOJSON_IMPL(windowMax),
3331 TOJSON_IMPL(coefficient)
3332 };
3333 }
3334 static void from_json(const nlohmann::json& j, AudioGate& p)
3335 {
3336 p.clear();
3337 getOptional<bool>("enabled", p.enabled, j, false);
3338 getOptional<bool>("useVad", p.useVad, j, false);
3339 getOptional<uint32_t>("hangMs", p.hangMs, j, 1500);
3340 getOptional<uint32_t>("windowMin", p.windowMin, j, 25);
3341 getOptional<uint32_t>("windowMax", p.windowMax, j, 125);
3342 getOptional<double>("coefficient", p.coefficient, j, 1.75);
3343 }
3344
3345 //-----------------------------------------------------------
3346 JSON_SERIALIZED_CLASS(TxAudio)
3360 {
3361 IMPLEMENT_JSON_SERIALIZATION()
3362 IMPLEMENT_JSON_DOCUMENTATION(TxAudio)
3363
3364 public:
3370 typedef enum
3371 {
3373 ctExternal = -1,
3374
3376 ctUnknown = 0,
3377
3378 /* G.711 */
3380 ctG711ulaw = 1,
3381
3383 ctG711alaw = 2,
3384
3385
3386 /* GSM */
3388 ctGsm610 = 3,
3389
3390
3391 /* G.729 */
3393 ctG729a = 4,
3394
3395
3396 /* PCM */
3398 ctPcm = 5,
3399
3400 // AMR Narrowband */
3402 ctAmrNb4750 = 10,
3403
3405 ctAmrNb5150 = 11,
3406
3408 ctAmrNb5900 = 12,
3409
3411 ctAmrNb6700 = 13,
3412
3414 ctAmrNb7400 = 14,
3415
3417 ctAmrNb7950 = 15,
3418
3420 ctAmrNb10200 = 16,
3421
3423 ctAmrNb12200 = 17,
3424
3425
3426 /* Opus */
3428 ctOpus6000 = 20,
3429
3431 ctOpus8000 = 21,
3432
3434 ctOpus10000 = 22,
3435
3437 ctOpus12000 = 23,
3438
3440 ctOpus14000 = 24,
3441
3443 ctOpus16000 = 25,
3444
3446 ctOpus18000 = 26,
3447
3449 ctOpus20000 = 27,
3450
3452 ctOpus22000 = 28,
3453
3455 ctOpus24000 = 29,
3456
3457
3458 /* Speex */
3460 ctSpxNb2150 = 30,
3461
3463 ctSpxNb3950 = 31,
3464
3466 ctSpxNb5950 = 32,
3467
3469 ctSpxNb8000 = 33,
3470
3472 ctSpxNb11000 = 34,
3473
3475 ctSpxNb15000 = 35,
3476
3478 ctSpxNb18200 = 36,
3479
3481 ctSpxNb24600 = 37,
3482
3483
3484 /* Codec2 */
3486 ctC2450 = 40,
3487
3489 ctC2700 = 41,
3490
3492 ctC21200 = 42,
3493
3495 ctC21300 = 43,
3496
3498 ctC21400 = 44,
3499
3501 ctC21600 = 45,
3502
3504 ctC22400 = 46,
3505
3507 ctC23200 = 47,
3508
3509
3510 /* MELPe */
3512 ctMelpe600 = 50,
3513
3515 ctMelpe1200 = 51,
3516
3518 ctMelpe2400 = 52,
3519
3520 /* CVSD */
3522 ctCvsd = 60
3523 } TxCodec_t;
3524
3530 typedef enum
3531 {
3533 hetEngageStandard = 0,
3534
3536 hetNatoStanga5643 = 1
3537 } HeaderExtensionType_t;
3538
3541
3544
3546 std::string encoderName;
3547
3550
3553
3555 bool fdx;
3556
3564
3567
3574
3581
3584
3587
3590
3595
3597 uint32_t internalKey;
3598
3601
3604
3606 bool dtx;
3607
3610
3611 TxAudio()
3612 {
3613 clear();
3614 }
3615
3616 void clear()
3617 {
3618 enabled = true;
3619 encoder = TxAudio::TxCodec_t::ctUnknown;
3620 encoderName.clear();
3621 framingMs = 60;
3622 blockCount = 0;
3623 fdx = false;
3624 noHdrExt = false;
3625 maxTxSecs = 0;
3626 extensionSendInterval = 10;
3627 initialHeaderBurst = 5;
3628 trailingHeaderBurst = 5;
3629 startTxNotifications = 5;
3630 customRtpPayloadType = -1;
3631 internalKey = 0;
3632 resetRtpOnTx = true;
3633 enableSmoothing = true;
3634 dtx = false;
3635 smoothedHangTimeMs = 0;
3636 hdrExtType = HeaderExtensionType_t::hetEngageStandard;
3637 }
3638 };
3639
3640 static void to_json(nlohmann::json& j, const TxAudio& p)
3641 {
3642 j = nlohmann::json{
3643 TOJSON_IMPL(enabled),
3644 TOJSON_IMPL(encoder),
3645 TOJSON_IMPL(encoderName),
3646 TOJSON_IMPL(framingMs),
3647 TOJSON_IMPL(blockCount),
3648 TOJSON_IMPL(fdx),
3649 TOJSON_IMPL(noHdrExt),
3650 TOJSON_IMPL(maxTxSecs),
3651 TOJSON_IMPL(extensionSendInterval),
3652 TOJSON_IMPL(initialHeaderBurst),
3653 TOJSON_IMPL(trailingHeaderBurst),
3654 TOJSON_IMPL(startTxNotifications),
3655 TOJSON_IMPL(customRtpPayloadType),
3656 TOJSON_IMPL(resetRtpOnTx),
3657 TOJSON_IMPL(enableSmoothing),
3658 TOJSON_IMPL(dtx),
3659 TOJSON_IMPL(smoothedHangTimeMs),
3660 TOJSON_IMPL(hdrExtType)
3661 };
3662
3663 // internalKey is not serialized
3664 }
3665 static void from_json(const nlohmann::json& j, TxAudio& p)
3666 {
3667 p.clear();
3668 getOptional<bool>("enabled", p.enabled, j, true);
3669 getOptional<TxAudio::TxCodec_t>("encoder", p.encoder, j, TxAudio::TxCodec_t::ctOpus8000);
3670 getOptional<std::string>("encoderName", p.encoderName, j, EMPTY_STRING);
3671 getOptional("framingMs", p.framingMs, j, 60);
3672 getOptional("blockCount", p.blockCount, j, 0);
3673 getOptional("fdx", p.fdx, j, false);
3674 getOptional("noHdrExt", p.noHdrExt, j, false);
3675 getOptional("maxTxSecs", p.maxTxSecs, j, 0);
3676 getOptional("extensionSendInterval", p.extensionSendInterval, j, 10);
3677 getOptional("initialHeaderBurst", p.initialHeaderBurst, j, 5);
3678 getOptional("trailingHeaderBurst", p.trailingHeaderBurst, j, 5);
3679 getOptional("startTxNotifications", p.startTxNotifications, j, 5);
3680 getOptional("customRtpPayloadType", p.customRtpPayloadType, j, -1);
3681 getOptional("resetRtpOnTx", p.resetRtpOnTx, j, true);
3682 getOptional("enableSmoothing", p.enableSmoothing, j, true);
3683 getOptional("dtx", p.dtx, j, false);
3684 getOptional("smoothedHangTimeMs", p.smoothedHangTimeMs, j, 0);
3685 getOptional("hdrExtType", p.hdrExtType, j, TxAudio::HeaderExtensionType_t::hetEngageStandard);
3686
3687 // internalKey is not serialized
3688 }
3689
3690 //-----------------------------------------------------------
3691 JSON_SERIALIZED_CLASS(AudioRegistryDevice)
3702 {
3703 IMPLEMENT_JSON_SERIALIZATION()
3704 IMPLEMENT_JSON_DOCUMENTATION(AudioRegistryDevice)
3705
3706 public:
3708 std::string hardwareId;
3709
3712
3714 std::string name;
3715
3717 std::string manufacturer;
3718
3720 std::string model;
3721
3723 std::string serialNumber;
3724
3725
3727 std::string type;
3728
3730 std::string extra;
3731
3733 {
3734 clear();
3735 }
3736
3737 void clear()
3738 {
3739 hardwareId.clear();
3740 isDefault = false;
3741 name.clear();
3742 manufacturer.clear();
3743 model.clear();
3744 serialNumber.clear();
3745 type.clear();
3746 extra.clear();
3747 }
3748
3749 virtual std::string toString()
3750 {
3751 char buff[2048];
3752
3753 snprintf(buff, sizeof(buff), "hardwareId=%s, isDefault=%d, name=%s, manufacturer=%s, model=%s, serialNumber=%s, type=%s, extra=%s",
3754 hardwareId.c_str(),
3755 (int)isDefault,
3756 name.c_str(),
3757 manufacturer.c_str(),
3758 model.c_str(),
3759 serialNumber.c_str(),
3760 type.c_str(),
3761 extra.c_str());
3762
3763 return std::string(buff);
3764 }
3765 };
3766
3767 static void to_json(nlohmann::json& j, const AudioRegistryDevice& p)
3768 {
3769 j = nlohmann::json{
3770 TOJSON_IMPL(hardwareId),
3771 TOJSON_IMPL(isDefault),
3772 TOJSON_IMPL(name),
3773 TOJSON_IMPL(manufacturer),
3774 TOJSON_IMPL(model),
3775 TOJSON_IMPL(serialNumber),
3776 TOJSON_IMPL(type),
3777 TOJSON_IMPL(extra)
3778 };
3779 }
3780 static void from_json(const nlohmann::json& j, AudioRegistryDevice& p)
3781 {
3782 p.clear();
3783 getOptional<std::string>("hardwareId", p.hardwareId, j, EMPTY_STRING);
3784 getOptional<bool>("isDefault", p.isDefault, j, false);
3785 getOptional("name", p.name, j);
3786 getOptional("manufacturer", p.manufacturer, j);
3787 getOptional("model", p.model, j);
3788 getOptional("serialNumber", p.serialNumber, j);
3789 getOptional("type", p.type, j);
3790 getOptional("extra", p.extra, j);
3791 }
3792
3793
3794 //-----------------------------------------------------------
3795 JSON_SERIALIZED_CLASS(AudioRegistry)
3806 {
3807 IMPLEMENT_JSON_SERIALIZATION()
3808 IMPLEMENT_JSON_DOCUMENTATION(AudioRegistry)
3809
3810 public:
3812 std::vector<AudioRegistryDevice> inputs;
3813
3815 std::vector<AudioRegistryDevice> outputs;
3816
3818 {
3819 clear();
3820 }
3821
3822 void clear()
3823 {
3824 inputs.clear();
3825 outputs.clear();
3826 }
3827
3828 virtual std::string toString()
3829 {
3830 return std::string("");
3831 }
3832 };
3833
3834 static void to_json(nlohmann::json& j, const AudioRegistry& p)
3835 {
3836 j = nlohmann::json{
3837 TOJSON_IMPL(inputs),
3838 TOJSON_IMPL(outputs)
3839 };
3840 }
3841 static void from_json(const nlohmann::json& j, AudioRegistry& p)
3842 {
3843 p.clear();
3844 getOptional<std::vector<AudioRegistryDevice>>("inputs", p.inputs, j);
3845 getOptional<std::vector<AudioRegistryDevice>>("outputs", p.outputs, j);
3846 }
3847
3848 //-----------------------------------------------------------
3849 JSON_SERIALIZED_CLASS(AudioDeviceDescriptor)
3860 {
3861 IMPLEMENT_JSON_SERIALIZATION()
3862 IMPLEMENT_JSON_DOCUMENTATION(AudioDeviceDescriptor)
3863
3864 public:
3865
3867 typedef enum
3868 {
3870 dirUnknown = 0,
3871
3874
3877
3879 dirBoth
3880 } Direction_t;
3881
3887
3895
3903
3906
3914
3917
3919 std::string name;
3920
3922 std::string manufacturer;
3923
3925 std::string model;
3926
3928 std::string hardwareId;
3929
3931 std::string serialNumber;
3932
3935
3937 std::string type;
3938
3940 std::string extra;
3941
3944
3946 {
3947 clear();
3948 }
3949
3950 void clear()
3951 {
3952 deviceId = 0;
3953 samplingRate = 0;
3954 channels = 0;
3955 direction = dirUnknown;
3956 boostPercentage = 0;
3957 isAdad = false;
3958 isDefault = false;
3959
3960 name.clear();
3961 manufacturer.clear();
3962 model.clear();
3963 hardwareId.clear();
3964 serialNumber.clear();
3965 type.clear();
3966 extra.clear();
3967 isPresent = false;
3968 }
3969
3970 virtual std::string toString()
3971 {
3972 char buff[2048];
3973
3974 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",
3975 deviceId,
3976 samplingRate,
3977 channels,
3978 (int)direction,
3979 boostPercentage,
3980 (int)isAdad,
3981 name.c_str(),
3982 manufacturer.c_str(),
3983 model.c_str(),
3984 hardwareId.c_str(),
3985 serialNumber.c_str(),
3986 (int)isDefault,
3987 type.c_str(),
3988 (int)isPresent,
3989 extra.c_str());
3990
3991 return std::string(buff);
3992 }
3993 };
3994
3995 static void to_json(nlohmann::json& j, const AudioDeviceDescriptor& p)
3996 {
3997 j = nlohmann::json{
3998 TOJSON_IMPL(deviceId),
3999 TOJSON_IMPL(samplingRate),
4000 TOJSON_IMPL(channels),
4001 TOJSON_IMPL(direction),
4002 TOJSON_IMPL(boostPercentage),
4003 TOJSON_IMPL(isAdad),
4004 TOJSON_IMPL(name),
4005 TOJSON_IMPL(manufacturer),
4006 TOJSON_IMPL(model),
4007 TOJSON_IMPL(hardwareId),
4008 TOJSON_IMPL(serialNumber),
4009 TOJSON_IMPL(isDefault),
4010 TOJSON_IMPL(type),
4011 TOJSON_IMPL(extra),
4012 TOJSON_IMPL(isPresent)
4013 };
4014 }
4015 static void from_json(const nlohmann::json& j, AudioDeviceDescriptor& p)
4016 {
4017 p.clear();
4018 getOptional<int>("deviceId", p.deviceId, j, 0);
4019 getOptional<int>("samplingRate", p.samplingRate, j, 0);
4020 getOptional<int>("channels", p.channels, j, 0);
4021 getOptional<AudioDeviceDescriptor::Direction_t>("direction", p.direction, j,
4022 AudioDeviceDescriptor::Direction_t::dirUnknown);
4023 getOptional<int>("boostPercentage", p.boostPercentage, j, 0);
4024
4025 getOptional<bool>("isAdad", p.isAdad, j, false);
4026 getOptional("name", p.name, j);
4027 getOptional("manufacturer", p.manufacturer, j);
4028 getOptional("model", p.model, j);
4029 getOptional("hardwareId", p.hardwareId, j);
4030 getOptional("serialNumber", p.serialNumber, j);
4031 getOptional("isDefault", p.isDefault, j);
4032 getOptional("type", p.type, j);
4033 getOptional("extra", p.extra, j);
4034 getOptional<bool>("isPresent", p.isPresent, j, false);
4035 }
4036
4037 //-----------------------------------------------------------
4038 JSON_SERIALIZED_CLASS(ListOfAudioDeviceDescriptor)
4040 {
4041 IMPLEMENT_JSON_SERIALIZATION()
4042 IMPLEMENT_JSON_DOCUMENTATION(ListOfAudioDeviceDescriptor)
4043
4044 public:
4045 std::vector<AudioDeviceDescriptor> list;
4046
4048 {
4049 clear();
4050 }
4051
4052 void clear()
4053 {
4054 list.clear();
4055 }
4056 };
4057
4058 static void to_json(nlohmann::json& j, const ListOfAudioDeviceDescriptor& p)
4059 {
4060 j = nlohmann::json{
4061 TOJSON_IMPL(list)
4062 };
4063 }
4064 static void from_json(const nlohmann::json& j, ListOfAudioDeviceDescriptor& p)
4065 {
4066 p.clear();
4067 getOptional<std::vector<AudioDeviceDescriptor>>("list", p.list, j);
4068 }
4069
4070 //-----------------------------------------------------------
4071 JSON_SERIALIZED_CLASS(Audio)
4080 {
4081 IMPLEMENT_JSON_SERIALIZATION()
4082 IMPLEMENT_JSON_DOCUMENTATION(Audio)
4083
4084 public:
4087
4090
4092 std::string inputHardwareId;
4093
4096
4099
4101 std::string outputHardwareId;
4102
4105
4108
4111
4114
4115 Audio()
4116 {
4117 clear();
4118 }
4119
4120 void clear()
4121 {
4122 enabled = true;
4123 inputId = 0;
4124 inputHardwareId.clear();
4125 inputGain = 0;
4126 outputId = 0;
4127 outputHardwareId.clear();
4128 outputGain = 0;
4129 outputLevelLeft = 100;
4130 outputLevelRight = 100;
4131 outputMuted = false;
4132 }
4133 };
4134
4135 static void to_json(nlohmann::json& j, const Audio& p)
4136 {
4137 j = nlohmann::json{
4138 TOJSON_IMPL(enabled),
4139 TOJSON_IMPL(inputId),
4140 TOJSON_IMPL(inputHardwareId),
4141 TOJSON_IMPL(inputGain),
4142 TOJSON_IMPL(outputId),
4143 TOJSON_IMPL(outputHardwareId),
4144 TOJSON_IMPL(outputLevelLeft),
4145 TOJSON_IMPL(outputLevelRight),
4146 TOJSON_IMPL(outputMuted)
4147 };
4148 }
4149 static void from_json(const nlohmann::json& j, Audio& p)
4150 {
4151 p.clear();
4152 getOptional<bool>("enabled", p.enabled, j, true);
4153 getOptional<int>("inputId", p.inputId, j, 0);
4154 getOptional<std::string>("inputHardwareId", p.inputHardwareId, j, EMPTY_STRING);
4155 getOptional<int>("inputGain", p.inputGain, j, 0);
4156 getOptional<int>("outputId", p.outputId, j, 0);
4157 getOptional<std::string>("outputHardwareId", p.outputHardwareId, j, EMPTY_STRING);
4158 getOptional<int>("outputGain", p.outputGain, j, 0);
4159 getOptional<int>("outputLevelLeft", p.outputLevelLeft, j, 100);
4160 getOptional<int>("outputLevelRight", p.outputLevelRight, j, 100);
4161 getOptional<bool>("outputMuted", p.outputMuted, j, false);
4162 }
4163
4164 //-----------------------------------------------------------
4165 JSON_SERIALIZED_CLASS(TalkerInformation)
4176 {
4177 IMPLEMENT_JSON_SERIALIZATION()
4178 IMPLEMENT_JSON_DOCUMENTATION(TalkerInformation)
4179
4180 public:
4184 typedef enum
4185 {
4187 matNone = 0,
4188
4190 matAnonymous = 1,
4191
4193 matSsrcGenerated = 2
4194 } ManufacturedAliasType_t;
4195
4197 std::string alias;
4198
4200 std::string nodeId;
4201
4203 uint16_t rxFlags;
4204
4207
4209 uint32_t txId;
4210
4213
4216
4219
4221 uint32_t ssrc;
4222
4225
4227 {
4228 clear();
4229 }
4230
4231 void clear()
4232 {
4233 alias.clear();
4234 nodeId.clear();
4235 rxFlags = 0;
4236 txPriority = 0;
4237 txId = 0;
4238 duplicateCount = 0;
4239 aliasSpecializer = 0;
4240 rxMuted = false;
4241 manufacturedAliasType = ManufacturedAliasType_t::matNone;
4242 ssrc = 0;
4243 }
4244 };
4245
4246 static void to_json(nlohmann::json& j, const TalkerInformation& p)
4247 {
4248 j = nlohmann::json{
4249 TOJSON_IMPL(alias),
4250 TOJSON_IMPL(nodeId),
4251 TOJSON_IMPL(rxFlags),
4252 TOJSON_IMPL(txPriority),
4253 TOJSON_IMPL(txId),
4254 TOJSON_IMPL(duplicateCount),
4255 TOJSON_IMPL(aliasSpecializer),
4256 TOJSON_IMPL(rxMuted),
4257 TOJSON_IMPL(manufacturedAliasType),
4258 TOJSON_IMPL(ssrc)
4259 };
4260 }
4261 static void from_json(const nlohmann::json& j, TalkerInformation& p)
4262 {
4263 p.clear();
4264 getOptional<std::string>("alias", p.alias, j, EMPTY_STRING);
4265 getOptional<std::string>("nodeId", p.nodeId, j, EMPTY_STRING);
4266 getOptional<uint16_t>("rxFlags", p.rxFlags, j, 0);
4267 getOptional<int>("txPriority", p.txPriority, j, 0);
4268 getOptional<uint32_t>("txId", p.txId, j, 0);
4269 getOptional<int>("duplicateCount", p.duplicateCount, j, 0);
4270 getOptional<uint16_t>("aliasSpecializer", p.aliasSpecializer, j, 0);
4271 getOptional<bool>("rxMuted", p.rxMuted, j, false);
4272 getOptional<TalkerInformation::ManufacturedAliasType_t>("manufacturedAliasType", p.manufacturedAliasType, j, TalkerInformation::ManufacturedAliasType_t::matNone);
4273 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
4274 }
4275
4276 //-----------------------------------------------------------
4277 JSON_SERIALIZED_CLASS(GroupTalkers)
4290 {
4291 IMPLEMENT_JSON_SERIALIZATION()
4292 IMPLEMENT_JSON_DOCUMENTATION(GroupTalkers)
4293
4294 public:
4296 std::vector<TalkerInformation> list;
4297
4298 GroupTalkers()
4299 {
4300 clear();
4301 }
4302
4303 void clear()
4304 {
4305 list.clear();
4306 }
4307 };
4308
4309 static void to_json(nlohmann::json& j, const GroupTalkers& p)
4310 {
4311 j = nlohmann::json{
4312 TOJSON_IMPL(list)
4313 };
4314 }
4315 static void from_json(const nlohmann::json& j, GroupTalkers& p)
4316 {
4317 p.clear();
4318 getOptional<std::vector<TalkerInformation>>("list", p.list, j);
4319 }
4320
4321 //-----------------------------------------------------------
4322 JSON_SERIALIZED_CLASS(Presence)
4333 {
4334 IMPLEMENT_JSON_SERIALIZATION()
4335 IMPLEMENT_JSON_DOCUMENTATION(Presence)
4336
4337 public:
4341 typedef enum
4342 {
4344 pfUnknown = 0,
4345
4347 pfEngage = 1,
4348
4355 pfCot = 2
4356 } Format_t;
4357
4360
4363
4366
4369
4372
4373 Presence()
4374 {
4375 clear();
4376 }
4377
4378 void clear()
4379 {
4380 format = pfUnknown;
4381 intervalSecs = 30;
4382 listenOnly = false;
4383 minIntervalSecs = 5;
4384 reduceImmediacy = false;
4385 }
4386 };
4387
4388 static void to_json(nlohmann::json& j, const Presence& p)
4389 {
4390 j = nlohmann::json{
4391 TOJSON_IMPL(format),
4392 TOJSON_IMPL(intervalSecs),
4393 TOJSON_IMPL(listenOnly),
4394 TOJSON_IMPL(minIntervalSecs),
4395 TOJSON_IMPL(reduceImmediacy)
4396 };
4397 }
4398 static void from_json(const nlohmann::json& j, Presence& p)
4399 {
4400 p.clear();
4401 getOptional<Presence::Format_t>("format", p.format, j, Presence::Format_t::pfEngage);
4402 getOptional<int>("intervalSecs", p.intervalSecs, j, 30);
4403 getOptional<bool>("listenOnly", p.listenOnly, j, false);
4404 getOptional<int>("minIntervalSecs", p.minIntervalSecs, j, 5);
4405 getOptional<bool>("reduceImmediacy", p.reduceImmediacy, j, false);
4406 }
4407
4408
4409 //-----------------------------------------------------------
4410 JSON_SERIALIZED_CLASS(Advertising)
4421 {
4422 IMPLEMENT_JSON_SERIALIZATION()
4423 IMPLEMENT_JSON_DOCUMENTATION(Advertising)
4424
4425 public:
4428
4431
4434
4435 Advertising()
4436 {
4437 clear();
4438 }
4439
4440 void clear()
4441 {
4442 enabled = false;
4443 intervalMs = 20000;
4444 alwaysAdvertise = false;
4445 }
4446 };
4447
4448 static void to_json(nlohmann::json& j, const Advertising& p)
4449 {
4450 j = nlohmann::json{
4451 TOJSON_IMPL(enabled),
4452 TOJSON_IMPL(intervalMs),
4453 TOJSON_IMPL(alwaysAdvertise)
4454 };
4455 }
4456 static void from_json(const nlohmann::json& j, Advertising& p)
4457 {
4458 p.clear();
4459 getOptional("enabled", p.enabled, j, false);
4460 getOptional<int>("intervalMs", p.intervalMs, j, 20000);
4461 getOptional<bool>("alwaysAdvertise", p.alwaysAdvertise, j, false);
4462 }
4463
4464 //-----------------------------------------------------------
4465 JSON_SERIALIZED_CLASS(GroupPriorityTranslation)
4476 {
4477 IMPLEMENT_JSON_SERIALIZATION()
4478 IMPLEMENT_JSON_DOCUMENTATION(GroupPriorityTranslation)
4479
4480 public:
4483
4486
4489
4491 {
4492 clear();
4493 }
4494
4495 void clear()
4496 {
4497 rx.clear();
4498 tx.clear();
4499 priority = 0;
4500 }
4501 };
4502
4503 static void to_json(nlohmann::json& j, const GroupPriorityTranslation& p)
4504 {
4505 j = nlohmann::json{
4506 TOJSON_IMPL(rx),
4507 TOJSON_IMPL(tx),
4508 TOJSON_IMPL(priority)
4509 };
4510 }
4511 static void from_json(const nlohmann::json& j, GroupPriorityTranslation& p)
4512 {
4513 p.clear();
4514 j.at("rx").get_to(p.rx);
4515 j.at("tx").get_to(p.tx);
4516 FROMJSON_IMPL(priority, int, 0);
4517 }
4518
4519 //-----------------------------------------------------------
4520 JSON_SERIALIZED_CLASS(GroupTimeline)
4533 {
4534 IMPLEMENT_JSON_SERIALIZATION()
4535 IMPLEMENT_JSON_DOCUMENTATION(GroupTimeline)
4536
4537 public:
4540
4543 bool recordAudio;
4544
4546 {
4547 clear();
4548 }
4549
4550 void clear()
4551 {
4552 enabled = true;
4553 maxAudioTimeMs = 30000;
4554 recordAudio = true;
4555 }
4556 };
4557
4558 static void to_json(nlohmann::json& j, const GroupTimeline& p)
4559 {
4560 j = nlohmann::json{
4561 TOJSON_IMPL(enabled),
4562 TOJSON_IMPL(maxAudioTimeMs),
4563 TOJSON_IMPL(recordAudio)
4564 };
4565 }
4566 static void from_json(const nlohmann::json& j, GroupTimeline& p)
4567 {
4568 p.clear();
4569 getOptional("enabled", p.enabled, j, true);
4570 getOptional<int>("maxAudioTimeMs", p.maxAudioTimeMs, j, 30000);
4571 getOptional("recordAudio", p.recordAudio, j, true);
4572 }
4573
4581 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_INTERNAL = "com.rallytac.engage.internal";
4583 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_CORE = "com.rallytac.magellan.core";
4585 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_CISTECH = "com.rallytac.engage.magellan.cistech";
4587 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_TRELLISWARE = "com.rallytac.engage.magellan.trellisware";
4589 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_SILVUS = "com.rallytac.engage.magellan.silvus";
4591 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_PERSISTENT = "com.rallytac.engage.magellan.persistent";
4593 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_DOMO = "com.rallytac.engage.magellan.domo";
4595 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_KENWOOD = "com.rallytac.engage.magellan.kenwood";
4597 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_TAIT = "com.rallytac.engage.magellan.tait";
4599 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_VOCALITY = "com.rallytac.engage.magellan.vocality";
4620
4645
4661 //-----------------------------------------------------------
4662 JSON_SERIALIZED_CLASS(GroupAppTransport)
4673 {
4674 IMPLEMENT_JSON_SERIALIZATION()
4675 IMPLEMENT_JSON_DOCUMENTATION(GroupAppTransport)
4676
4677 public:
4680
4682 std::string id;
4683
4685 {
4686 clear();
4687 }
4688
4689 void clear()
4690 {
4691 enabled = false;
4692 id.clear();
4693 }
4694 };
4695
4696 static void to_json(nlohmann::json& j, const GroupAppTransport& p)
4697 {
4698 j = nlohmann::json{
4699 TOJSON_IMPL(enabled),
4700 TOJSON_IMPL(id)
4701 };
4702 }
4703 static void from_json(const nlohmann::json& j, GroupAppTransport& p)
4704 {
4705 p.clear();
4706 getOptional<bool>("enabled", p.enabled, j, false);
4707 getOptional<std::string>("id", p.id, j);
4708 }
4709
4710 //-----------------------------------------------------------
4711 JSON_SERIALIZED_CLASS(RtpProfile)
4722 {
4723 IMPLEMENT_JSON_SERIALIZATION()
4724 IMPLEMENT_JSON_DOCUMENTATION(RtpProfile)
4725
4726 public:
4732 typedef enum
4733 {
4735 jmStandard = 0,
4736
4738 jmLowLatency = 1,
4739
4741 jmReleaseOnTxEnd = 2
4742 } JitterMode_t;
4743
4746
4749
4752
4755
4758
4761
4764
4767
4770
4773
4776
4779
4782
4785
4788
4791
4795
4796 RtpProfile()
4797 {
4798 clear();
4799 }
4800
4801 void clear()
4802 {
4803 mode = jmStandard;
4804 jitterMaxMs = 10000;
4805 jitterMinMs = 100;
4806 jitterMaxFactor = 8;
4807 jitterTrimPercentage = 10;
4808 jitterUnderrunReductionThresholdMs = 1500;
4809 jitterUnderrunReductionAger = 100;
4810 latePacketSequenceRange = 5;
4811 latePacketTimestampRangeMs = 2000;
4812 inboundProcessorInactivityMs = 500;
4813 jitterForceTrimAtMs = 0;
4814 rtcpPresenceTimeoutMs = 45000;
4815 jitterMaxExceededClipPerc = 10;
4816 jitterMaxExceededClipHangMs = 1500;
4817 zombieLifetimeMs = 15000;
4818 jitterMaxTrimMs = 250;
4819 signalledInboundProcessorInactivityMs = (inboundProcessorInactivityMs * 4);
4820 }
4821 };
4822
4823 static void to_json(nlohmann::json& j, const RtpProfile& p)
4824 {
4825 j = nlohmann::json{
4826 TOJSON_IMPL(mode),
4827 TOJSON_IMPL(jitterMaxMs),
4828 TOJSON_IMPL(inboundProcessorInactivityMs),
4829 TOJSON_IMPL(jitterMinMs),
4830 TOJSON_IMPL(jitterMaxFactor),
4831 TOJSON_IMPL(jitterTrimPercentage),
4832 TOJSON_IMPL(jitterUnderrunReductionThresholdMs),
4833 TOJSON_IMPL(jitterUnderrunReductionAger),
4834 TOJSON_IMPL(latePacketSequenceRange),
4835 TOJSON_IMPL(latePacketTimestampRangeMs),
4836 TOJSON_IMPL(inboundProcessorInactivityMs),
4837 TOJSON_IMPL(jitterForceTrimAtMs),
4838 TOJSON_IMPL(jitterMaxExceededClipPerc),
4839 TOJSON_IMPL(jitterMaxExceededClipHangMs),
4840 TOJSON_IMPL(zombieLifetimeMs),
4841 TOJSON_IMPL(jitterMaxTrimMs),
4842 TOJSON_IMPL(signalledInboundProcessorInactivityMs)
4843 };
4844 }
4845 static void from_json(const nlohmann::json& j, RtpProfile& p)
4846 {
4847 p.clear();
4848 FROMJSON_IMPL(mode, RtpProfile::JitterMode_t, RtpProfile::JitterMode_t::jmStandard);
4849 FROMJSON_IMPL(jitterMaxMs, int, 10000);
4850 FROMJSON_IMPL(jitterMinMs, int, 20);
4851 FROMJSON_IMPL(jitterMaxFactor, int, 8);
4852 FROMJSON_IMPL(jitterTrimPercentage, int, 10);
4853 FROMJSON_IMPL(jitterUnderrunReductionThresholdMs, int, 1500);
4854 FROMJSON_IMPL(jitterUnderrunReductionAger, int, 100);
4855 FROMJSON_IMPL(latePacketSequenceRange, int, 5);
4856 FROMJSON_IMPL(latePacketTimestampRangeMs, int, 2000);
4857 FROMJSON_IMPL(inboundProcessorInactivityMs, int, 500);
4858 FROMJSON_IMPL(jitterForceTrimAtMs, int, 0);
4859 FROMJSON_IMPL(rtcpPresenceTimeoutMs, int, 45000);
4860 FROMJSON_IMPL(jitterMaxExceededClipPerc, int, 10);
4861 FROMJSON_IMPL(jitterMaxExceededClipHangMs, int, 1500);
4862 FROMJSON_IMPL(zombieLifetimeMs, int, 15000);
4863 FROMJSON_IMPL(jitterMaxTrimMs, int, 250);
4864 FROMJSON_IMPL(signalledInboundProcessorInactivityMs, int, (p.inboundProcessorInactivityMs * 4));
4865 }
4866
4867 //-----------------------------------------------------------
4868 JSON_SERIALIZED_CLASS(Tls)
4879 {
4880 IMPLEMENT_JSON_SERIALIZATION()
4881 IMPLEMENT_JSON_DOCUMENTATION(Tls)
4882
4883 public:
4884
4887
4890
4892 std::vector<std::string> caCertificates;
4893
4896
4899
4901 std::vector<std::string> crlSerials;
4902
4903 Tls()
4904 {
4905 clear();
4906 }
4907
4908 void clear()
4909 {
4910 verifyPeers = true;
4911 allowSelfSignedCertificates = false;
4912 caCertificates.clear();
4913 subjectRestrictions.clear();
4914 issuerRestrictions.clear();
4915 crlSerials.clear();
4916 }
4917 };
4918
4919 static void to_json(nlohmann::json& j, const Tls& p)
4920 {
4921 j = nlohmann::json{
4922 TOJSON_IMPL(verifyPeers),
4923 TOJSON_IMPL(allowSelfSignedCertificates),
4924 TOJSON_IMPL(caCertificates),
4925 TOJSON_IMPL(subjectRestrictions),
4926 TOJSON_IMPL(issuerRestrictions),
4927 TOJSON_IMPL(crlSerials)
4928 };
4929 }
4930 static void from_json(const nlohmann::json& j, Tls& p)
4931 {
4932 p.clear();
4933 getOptional<bool>("verifyPeers", p.verifyPeers, j, true);
4934 getOptional<bool>("allowSelfSignedCertificates", p.allowSelfSignedCertificates, j, false);
4935 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
4936 getOptional<StringRestrictionList>("subjectRestrictions", p.subjectRestrictions, j);
4937 getOptional<StringRestrictionList>("issuerRestrictions", p.issuerRestrictions, j);
4938 getOptional<std::vector<std::string>>("crlSerials", p.crlSerials, j);
4939 }
4940
4941 //-----------------------------------------------------------
4942 JSON_SERIALIZED_CLASS(RangerPackets)
4955 {
4956 IMPLEMENT_JSON_SERIALIZATION()
4957 IMPLEMENT_JSON_DOCUMENTATION(RangerPackets)
4958
4959 public:
4962
4965
4967 {
4968 clear();
4969 }
4970
4971 void clear()
4972 {
4973 hangTimerSecs = -1;
4974 count = 5;
4975 }
4976
4977 virtual void initForDocumenting()
4978 {
4979 }
4980 };
4981
4982 static void to_json(nlohmann::json& j, const RangerPackets& p)
4983 {
4984 j = nlohmann::json{
4985 TOJSON_IMPL(hangTimerSecs),
4986 TOJSON_IMPL(count)
4987 };
4988 }
4989 static void from_json(const nlohmann::json& j, RangerPackets& p)
4990 {
4991 p.clear();
4992 getOptional<int>("hangTimerSecs", p.hangTimerSecs, j, 11);
4993 getOptional<int>("count", p.count, j, 5);
4994 }
4995
4996 //-----------------------------------------------------------
4997 JSON_SERIALIZED_CLASS(Source)
5010 {
5011 IMPLEMENT_JSON_SERIALIZATION()
5012 IMPLEMENT_JSON_DOCUMENTATION(Source)
5013
5014 public:
5016 std::string nodeId;
5017
5018 /* NOTE: Not serialized ! */
5019 uint8_t _internal_binary_nodeId[ENGAGE_MAX_NODE_ID_SIZE];
5020
5022 std::string alias;
5023
5024 /* NOTE: Not serialized ! */
5025 uint8_t _internal_binary_alias[ENGAGE_MAX_ALIAS_SIZE];
5026
5027 Source()
5028 {
5029 clear();
5030 }
5031
5032 void clear()
5033 {
5034 nodeId.clear();
5035 memset(_internal_binary_nodeId, 0, sizeof(_internal_binary_nodeId));
5036
5037 alias.clear();
5038 memset(_internal_binary_alias, 0, sizeof(_internal_binary_alias));
5039 }
5040
5041 virtual void initForDocumenting()
5042 {
5043 }
5044 };
5045
5046 static void to_json(nlohmann::json& j, const Source& p)
5047 {
5048 j = nlohmann::json{
5049 TOJSON_IMPL(nodeId),
5050 TOJSON_IMPL(alias)
5051 };
5052 }
5053 static void from_json(const nlohmann::json& j, Source& p)
5054 {
5055 p.clear();
5056 FROMJSON_IMPL_SIMPLE(nodeId);
5057 FROMJSON_IMPL_SIMPLE(alias);
5058 }
5059
5060 //-----------------------------------------------------------
5061 JSON_SERIALIZED_CLASS(GroupBridgeTargetOutputDetail)
5074 {
5075 IMPLEMENT_JSON_SERIALIZATION()
5076 IMPLEMENT_JSON_DOCUMENTATION(GroupBridgeTargetOutputDetail)
5077
5078 public:
5080 typedef enum
5081 {
5085 bomRaw = 0,
5086
5089 bomMultistream = 1,
5090
5093 bomMixedStream = 2,
5094
5096 bomNone = 3
5097 } BridgingOpMode_t;
5098
5101
5104
5106 {
5107 clear();
5108 }
5109
5110 void clear()
5111 {
5112 mode = BridgingOpMode_t::bomRaw;
5113 mixedStreamTxParams.clear();
5114 }
5115
5116 virtual void initForDocumenting()
5117 {
5118 clear();
5119 }
5120 };
5121
5122 static void to_json(nlohmann::json& j, const GroupBridgeTargetOutputDetail& p)
5123 {
5124 j = nlohmann::json{
5125 TOJSON_IMPL(mode),
5126 TOJSON_IMPL(mixedStreamTxParams)
5127 };
5128 }
5129 static void from_json(const nlohmann::json& j, GroupBridgeTargetOutputDetail& p)
5130 {
5131 p.clear();
5132 FROMJSON_IMPL_SIMPLE(mode);
5133 FROMJSON_IMPL_SIMPLE(mixedStreamTxParams);
5134 }
5135
5136 //-----------------------------------------------------------
5137 JSON_SERIALIZED_CLASS(GroupDefaultAudioPriority)
5150 {
5151 IMPLEMENT_JSON_SERIALIZATION()
5152 IMPLEMENT_JSON_DOCUMENTATION(GroupDefaultAudioPriority)
5153
5154 public:
5156 uint8_t tx;
5157
5159 uint8_t rx;
5160
5162 {
5163 clear();
5164 }
5165
5166 void clear()
5167 {
5168 tx = 0;
5169 rx = 0;
5170 }
5171
5172 virtual void initForDocumenting()
5173 {
5174 clear();
5175 }
5176 };
5177
5178 static void to_json(nlohmann::json& j, const GroupDefaultAudioPriority& p)
5179 {
5180 j = nlohmann::json{
5181 TOJSON_IMPL(tx),
5182 TOJSON_IMPL(rx)
5183 };
5184 }
5185 static void from_json(const nlohmann::json& j, GroupDefaultAudioPriority& p)
5186 {
5187 p.clear();
5188 FROMJSON_IMPL_SIMPLE(tx);
5189 FROMJSON_IMPL_SIMPLE(rx);
5190 }
5191
5192 //-----------------------------------------------------------
5193 JSON_SERIALIZED_CLASS(Group)
5205 {
5206 IMPLEMENT_JSON_SERIALIZATION()
5207 IMPLEMENT_JSON_DOCUMENTATION(Group)
5208
5209 public:
5211 typedef enum
5212 {
5214 gtUnknown = 0,
5215
5217 gtAudio = 1,
5218
5220 gtPresence = 2,
5221
5223 gtRaw = 3
5224 } Type_t;
5225
5227 typedef enum
5228 {
5230 iagpAnonymousAlias = 0,
5231
5233 iagpSsrcInHex = 1
5234 } InboundAliasGenerationPolicy_t;
5235
5238
5241
5244
5251 std::string id;
5252
5254 std::string name;
5255
5257 std::string spokenName;
5258
5260 std::string interfaceName;
5261
5264
5267
5270
5273
5276
5278 std::string cryptoPassword;
5279
5282
5284 std::vector<Rallypoint> rallypoints;
5285
5288
5291
5300
5302 std::string alias;
5303
5306
5308 std::string source;
5309
5316
5319
5322
5325
5327 std::vector<std::string> presenceGroupAffinities;
5328
5331
5334
5336 std::vector<RtpPayloadTypeTranslation> inboundRtpPayloadTypeTranslations;
5337
5340
5343
5345 std::string anonymousAlias;
5346
5349
5352
5355
5358
5361
5364
5367
5369 std::vector<uint16_t> specializerAffinities;
5370
5373
5375 std::vector<Source> ignoreSources;
5376
5378 std::string languageCode;
5379
5381 std::string synVoice;
5382
5385
5388
5391
5394
5397
5400
5401 Group()
5402 {
5403 clear();
5404 }
5405
5406 void clear()
5407 {
5408 type = gtUnknown;
5409 bridgeTargetOutputDetail.clear();
5410 defaultAudioPriority.clear();
5411 id.clear();
5412 name.clear();
5413 spokenName.clear();
5414 interfaceName.clear();
5415 rx.clear();
5416 tx.clear();
5417 txOptions.clear();
5418 txAudio.clear();
5419 presence.clear();
5420 cryptoPassword.clear();
5421
5422 alias.clear();
5423
5424 rallypoints.clear();
5425 rallypointCluster.clear();
5426
5427 audio.clear();
5428 timeline.clear();
5429
5430 blockAdvertising = false;
5431
5432 source.clear();
5433
5434 maxRxSecs = 0;
5435
5436 enableMulticastFailover = false;
5437 multicastFailoverSecs = 10;
5438
5439 rtcpPresenceRx.clear();
5440
5441 presenceGroupAffinities.clear();
5442 disablePacketEvents = false;
5443
5444 rfc4733RtpPayloadId = 0;
5445 inboundRtpPayloadTypeTranslations.clear();
5446 priorityTranslation.clear();
5447
5448 stickyTidHangSecs = 10;
5449 anonymousAlias.clear();
5450 lbCrypto = false;
5451
5452 appTransport.clear();
5453 allowLoopback = false;
5454
5455 rtpProfile.clear();
5456 rangerPackets.clear();
5457
5458 _wasDeserialized_rtpProfile = false;
5459
5460 txImpairment.clear();
5461 rxImpairment.clear();
5462
5463 specializerAffinities.clear();
5464
5465 securityLevel = 0;
5466
5467 ignoreSources.clear();
5468
5469 languageCode.clear();
5470 synVoice.clear();
5471
5472 rxCapture.clear();
5473 txCapture.clear();
5474
5475 blobRtpPayloadType = ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE;
5476 inboundAliasGenerationPolicy = iagpAnonymousAlias;
5477 gateIn.clear();
5478
5479 ignoreAudioTraffic = false;
5480 }
5481 };
5482
5483 static void to_json(nlohmann::json& j, const Group& p)
5484 {
5485 j = nlohmann::json{
5486 TOJSON_IMPL(type),
5487 TOJSON_IMPL(bridgeTargetOutputDetail),
5488 TOJSON_IMPL(defaultAudioPriority),
5489 TOJSON_IMPL(id),
5490 TOJSON_IMPL(name),
5491 TOJSON_IMPL(spokenName),
5492 TOJSON_IMPL(interfaceName),
5493 TOJSON_IMPL(rx),
5494 TOJSON_IMPL(tx),
5495 TOJSON_IMPL(txOptions),
5496 TOJSON_IMPL(txAudio),
5497 TOJSON_IMPL(presence),
5498 TOJSON_IMPL(cryptoPassword),
5499 TOJSON_IMPL(alias),
5500
5501 // See below
5502 //TOJSON_IMPL(rallypoints),
5503 //TOJSON_IMPL(rallypointCluster),
5504
5505 TOJSON_IMPL(alias),
5506 TOJSON_IMPL(audio),
5507 TOJSON_IMPL(timeline),
5508 TOJSON_IMPL(blockAdvertising),
5509 TOJSON_IMPL(source),
5510 TOJSON_IMPL(maxRxSecs),
5511 TOJSON_IMPL(enableMulticastFailover),
5512 TOJSON_IMPL(multicastFailoverSecs),
5513 TOJSON_IMPL(rtcpPresenceRx),
5514 TOJSON_IMPL(presenceGroupAffinities),
5515 TOJSON_IMPL(disablePacketEvents),
5516 TOJSON_IMPL(rfc4733RtpPayloadId),
5517 TOJSON_IMPL(inboundRtpPayloadTypeTranslations),
5518 TOJSON_IMPL(priorityTranslation),
5519 TOJSON_IMPL(stickyTidHangSecs),
5520 TOJSON_IMPL(anonymousAlias),
5521 TOJSON_IMPL(lbCrypto),
5522 TOJSON_IMPL(appTransport),
5523 TOJSON_IMPL(allowLoopback),
5524 TOJSON_IMPL(rangerPackets),
5525
5526 TOJSON_IMPL(txImpairment),
5527 TOJSON_IMPL(rxImpairment),
5528
5529 TOJSON_IMPL(specializerAffinities),
5530
5531 TOJSON_IMPL(securityLevel),
5532
5533 TOJSON_IMPL(ignoreSources),
5534
5535 TOJSON_IMPL(languageCode),
5536 TOJSON_IMPL(synVoice),
5537
5538 TOJSON_IMPL(rxCapture),
5539 TOJSON_IMPL(txCapture),
5540
5541 TOJSON_IMPL(blobRtpPayloadType),
5542
5543 TOJSON_IMPL(inboundAliasGenerationPolicy),
5544
5545 TOJSON_IMPL(gateIn),
5546
5547 TOJSON_IMPL(ignoreAudioTraffic)
5548 };
5549
5550 TOJSON_BASE_IMPL();
5551
5552 // TODO: need a better way to indicate whether rtpProfile is present
5553 if(p._wasDeserialized_rtpProfile || p.isDocumenting())
5554 {
5555 j["rtpProfile"] = p.rtpProfile;
5556 }
5557
5558 if(p.isDocumenting())
5559 {
5560 j["rallypointCluster"] = p.rallypointCluster;
5561 j["rallypoints"] = p.rallypoints;
5562 }
5563 else
5564 {
5565 // rallypointCluster takes precedence if it has elements
5566 if(!p.rallypointCluster.rallypoints.empty())
5567 {
5568 j["rallypointCluster"] = p.rallypointCluster;
5569 }
5570 else if(!p.rallypoints.empty())
5571 {
5572 j["rallypoints"] = p.rallypoints;
5573 }
5574 }
5575 }
5576 static void from_json(const nlohmann::json& j, Group& p)
5577 {
5578 p.clear();
5579 j.at("type").get_to(p.type);
5580 getOptional<GroupBridgeTargetOutputDetail>("bridgeTargetOutputDetail", p.bridgeTargetOutputDetail, j);
5581 j.at("id").get_to(p.id);
5582 getOptional<std::string>("name", p.name, j);
5583 getOptional<std::string>("spokenName", p.spokenName, j);
5584 getOptional<std::string>("interfaceName", p.interfaceName, j);
5585 getOptional<NetworkAddress>("rx", p.rx, j);
5586 getOptional<NetworkAddress>("tx", p.tx, j);
5587 getOptional<NetworkTxOptions>("txOptions", p.txOptions, j);
5588 getOptional<std::string>("cryptoPassword", p.cryptoPassword, j);
5589 getOptional<std::string>("alias", p.alias, j);
5590 getOptional<TxAudio>("txAudio", p.txAudio, j);
5591 getOptional<Presence>("presence", p.presence, j);
5592 getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
5593 getOptional<RallypointCluster>("rallypointCluster", p.rallypointCluster, j);
5594 getOptional<Audio>("audio", p.audio, j);
5595 getOptional<GroupTimeline>("timeline", p.timeline, j);
5596 getOptional<bool>("blockAdvertising", p.blockAdvertising, j, false);
5597 getOptional<std::string>("source", p.source, j);
5598 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
5599 getOptional<bool>("enableMulticastFailover", p.enableMulticastFailover, j, false);
5600 getOptional<int>("multicastFailoverSecs", p.multicastFailoverSecs, j, 10);
5601 getOptional<NetworkAddress>("rtcpPresenceRx", p.rtcpPresenceRx, j);
5602 getOptional<std::vector<std::string>>("presenceGroupAffinities", p.presenceGroupAffinities, j);
5603 getOptional<bool>("disablePacketEvents", p.disablePacketEvents, j, false);
5604 getOptional<int>("rfc4733RtpPayloadId", p.rfc4733RtpPayloadId, j, 0);
5605 getOptional<std::vector<RtpPayloadTypeTranslation>>("inboundRtpPayloadTypeTranslations", p.inboundRtpPayloadTypeTranslations, j);
5606 getOptional<GroupPriorityTranslation>("priorityTranslation", p.priorityTranslation, j);
5607 getOptional<GroupDefaultAudioPriority>("defaultAudioPriority", p.defaultAudioPriority, j);
5608 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
5609 getOptional<std::string>("anonymousAlias", p.anonymousAlias, j);
5610 getOptional<bool>("lbCrypto", p.lbCrypto, j, false);
5611 getOptional<GroupAppTransport>("appTransport", p.appTransport, j);
5612 getOptional<bool>("allowLoopback", p.allowLoopback, j, false);
5613 getOptionalWithIndicator<RtpProfile>("rtpProfile", p.rtpProfile, j, &p._wasDeserialized_rtpProfile);
5614 getOptional<RangerPackets>("rangerPackets", p.rangerPackets, j);
5615 getOptional<TransportImpairment>("txImpairment", p.txImpairment, j);
5616 getOptional<TransportImpairment>("rxImpairment", p.rxImpairment, j);
5617 getOptional<std::vector<uint16_t>>("specializerAffinities", p.specializerAffinities, j);
5618 getOptional<uint32_t>("securityLevel", p.securityLevel, j, 0);
5619 getOptional<std::vector<Source>>("ignoreSources", p.ignoreSources, j);
5620 getOptional<std::string>("languageCode", p.languageCode, j);
5621 getOptional<std::string>("synVoice", p.synVoice, j);
5622
5623 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
5624 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
5625
5626 getOptional<uint16_t>("blobRtpPayloadType", p.blobRtpPayloadType, j, ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE);
5627
5628 getOptional<Group::InboundAliasGenerationPolicy_t>("inboundAliasGenerationPolicy", p.inboundAliasGenerationPolicy, j, Group::InboundAliasGenerationPolicy_t::iagpAnonymousAlias);
5629
5630 getOptional<AudioGate>("gateIn", p.gateIn, j);
5631
5632 getOptional<bool>("ignoreAudioTraffic", p.ignoreAudioTraffic, j, false);
5633
5634 FROMJSON_BASE_IMPL();
5635 }
5636
5637
5638 //-----------------------------------------------------------
5639 JSON_SERIALIZED_CLASS(Mission)
5641 {
5642 IMPLEMENT_JSON_SERIALIZATION()
5643 IMPLEMENT_JSON_DOCUMENTATION(Mission)
5644
5645 public:
5646 std::string id;
5647 std::string name;
5648 std::vector<Group> groups;
5649 std::chrono::system_clock::time_point begins;
5650 std::chrono::system_clock::time_point ends;
5651 std::string certStoreId;
5652 int multicastFailoverPolicy;
5653 Rallypoint rallypoint;
5654
5655 void clear()
5656 {
5657 id.clear();
5658 name.clear();
5659 groups.clear();
5660 certStoreId.clear();
5661 multicastFailoverPolicy = 0;
5662 rallypoint.clear();
5663 }
5664 };
5665
5666 static void to_json(nlohmann::json& j, const Mission& p)
5667 {
5668 j = nlohmann::json{
5669 TOJSON_IMPL(id),
5670 TOJSON_IMPL(name),
5671 TOJSON_IMPL(groups),
5672 TOJSON_IMPL(certStoreId),
5673 TOJSON_IMPL(multicastFailoverPolicy),
5674 TOJSON_IMPL(rallypoint)
5675 };
5676 }
5677
5678 static void from_json(const nlohmann::json& j, Mission& p)
5679 {
5680 p.clear();
5681 j.at("id").get_to(p.id);
5682 j.at("name").get_to(p.name);
5683
5684 // Groups are optional
5685 try
5686 {
5687 j.at("groups").get_to(p.groups);
5688 }
5689 catch(...)
5690 {
5691 p.groups.clear();
5692 }
5693
5694 FROMJSON_IMPL(certStoreId, std::string, EMPTY_STRING);
5695 FROMJSON_IMPL(multicastFailoverPolicy, int, 0);
5696 getOptional<Rallypoint>("rallypoint", p.rallypoint, j);
5697 }
5698
5699 //-----------------------------------------------------------
5700 JSON_SERIALIZED_CLASS(LicenseDescriptor)
5711 {
5712 IMPLEMENT_JSON_SERIALIZATION()
5713 IMPLEMENT_JSON_DOCUMENTATION(LicenseDescriptor)
5714
5715 public:
5721 static const int STATUS_OK = 0;
5722 static const int ERR_NULL_ENTITLEMENT_KEY = -1;
5723 static const int ERR_NULL_LICENSE_KEY = -2;
5724 static const int ERR_INVALID_LICENSE_KEY_LEN = -3;
5725 static const int ERR_LICENSE_KEY_VERIFICATION_FAILURE = -4;
5726 static const int ERR_ACTIVATION_CODE_VERIFICATION_FAILURE = -5;
5727 static const int ERR_INVALID_EXPIRATION_DATE = -6;
5728 static const int ERR_GENERAL_FAILURE = -7;
5729 static const int ERR_NOT_INITIALIZED = -8;
5730 static const int ERR_REQUIRES_ACTIVATION = -9;
5731 static const int ERR_LICENSE_NOT_SUITED_FOR_ACTIVATION = -10;
5739 static const uint8_t LIC_CARGO_FLAG_LIMIT_TO_FEATURES = 0x01;
5750 std::string entitlement;
5751
5758 std::string key;
5759
5761 std::string activationCode;
5762
5764 std::string deviceId;
5765
5767 int type;
5768
5770 time_t expires;
5771
5773 std::string expiresFormatted;
5774
5779 uint32_t flags;
5780
5782 std::string cargo;
5783
5785 uint8_t cargoFlags;
5786
5792
5794 std::string manufacturerId;
5795
5797 std::string activationHmac;
5798
5800 {
5801 clear();
5802 }
5803
5804 void clear()
5805 {
5806 entitlement.clear();
5807 key.clear();
5808 activationCode.clear();
5809 type = 0;
5810 expires = 0;
5811 expiresFormatted.clear();
5812 flags = 0;
5813 cargo.clear();
5814 cargoFlags = 0;
5815 deviceId.clear();
5816 status = ERR_NOT_INITIALIZED;
5817 manufacturerId.clear();
5818 activationHmac.clear();
5819 }
5820 };
5821
5822 static void to_json(nlohmann::json& j, const LicenseDescriptor& p)
5823 {
5824 j = nlohmann::json{
5825 //TOJSON_IMPL(entitlement),
5826 {"entitlement", "*entitlement*"},
5827 TOJSON_IMPL(key),
5828 TOJSON_IMPL(activationCode),
5829 TOJSON_IMPL(type),
5830 TOJSON_IMPL(expires),
5831 TOJSON_IMPL(expiresFormatted),
5832 TOJSON_IMPL(flags),
5833 TOJSON_IMPL(deviceId),
5834 TOJSON_IMPL(status),
5835 //TOJSON_IMPL(manufacturerId),
5836 {"manufacturerId", "*manufacturerId*"},
5837 TOJSON_IMPL(cargo),
5838 TOJSON_IMPL(cargoFlags),
5839 TOJSON_IMPL(activationHmac)
5840 };
5841 }
5842
5843 static void from_json(const nlohmann::json& j, LicenseDescriptor& p)
5844 {
5845 p.clear();
5846 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
5847 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
5848 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
5849 FROMJSON_IMPL(type, int, 0);
5850 FROMJSON_IMPL(expires, time_t, 0);
5851 FROMJSON_IMPL(expiresFormatted, std::string, EMPTY_STRING);
5852 FROMJSON_IMPL(flags, uint32_t, 0);
5853 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
5854 FROMJSON_IMPL(status, int, LicenseDescriptor::ERR_NOT_INITIALIZED);
5855 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
5856 FROMJSON_IMPL(cargo, std::string, EMPTY_STRING);
5857 FROMJSON_IMPL(cargoFlags, uint8_t, 0);
5858 FROMJSON_IMPL(activationHmac, std::string, EMPTY_STRING);
5859 }
5860
5861
5862 //-----------------------------------------------------------
5863 JSON_SERIALIZED_CLASS(EngineNetworkingRpUdpStreaming)
5876 {
5877 IMPLEMENT_JSON_SERIALIZATION()
5878 IMPLEMENT_JSON_DOCUMENTATION(EngineNetworkingRpUdpStreaming)
5879
5880 public:
5883
5885 int port;
5886
5889
5892
5894 int ttl;
5895
5897 {
5898 clear();
5899 }
5900
5901 void clear()
5902 {
5903 enabled = false;
5904 port = 0;
5905 keepaliveIntervalSecs = 15;
5906 priority = TxPriority_t::priVoice;
5907 ttl = 64;
5908 }
5909
5910 virtual void initForDocumenting()
5911 {
5912 }
5913 };
5914
5915 static void to_json(nlohmann::json& j, const EngineNetworkingRpUdpStreaming& p)
5916 {
5917 j = nlohmann::json{
5918 TOJSON_IMPL(enabled),
5919 TOJSON_IMPL(port),
5920 TOJSON_IMPL(keepaliveIntervalSecs),
5921 TOJSON_IMPL(priority),
5922 TOJSON_IMPL(ttl)
5923 };
5924 }
5925 static void from_json(const nlohmann::json& j, EngineNetworkingRpUdpStreaming& p)
5926 {
5927 p.clear();
5928 getOptional<bool>("enabled", p.enabled, j, false);
5929 getOptional<int>("port", p.port, j, 0);
5930 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
5931 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
5932 getOptional<int>("ttl", p.ttl, j, 64);
5933 }
5934
5935 //-----------------------------------------------------------
5936 JSON_SERIALIZED_CLASS(EnginePolicyNetworking)
5946 {
5947 IMPLEMENT_JSON_SERIALIZATION()
5948 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNetworking)
5949
5950 public:
5952 std::string defaultNic;
5953
5956
5959
5962
5965
5968
5971
5974
5976 {
5977 clear();
5978 }
5979
5980 void clear()
5981 {
5982 defaultNic.clear();
5983 multicastRejoinSecs = 8;
5984 rallypointRtTestIntervalMs = 60000;
5985 logRtpJitterBufferStats = false;
5986 preventMulticastFailover = false;
5987 addressResolutionPolicy = AddressResolutionPolicy_t::arpIpv6ThenIpv4;
5988
5989 rpUdpStreaming.clear();
5990 rtpProfile.clear();
5991 }
5992 };
5993
5994 static void to_json(nlohmann::json& j, const EnginePolicyNetworking& p)
5995 {
5996 j = nlohmann::json{
5997 TOJSON_IMPL(defaultNic),
5998 TOJSON_IMPL(multicastRejoinSecs),
5999
6000 TOJSON_IMPL(rallypointRtTestIntervalMs),
6001 TOJSON_IMPL(logRtpJitterBufferStats),
6002 TOJSON_IMPL(preventMulticastFailover),
6003
6004 TOJSON_IMPL(rpUdpStreaming),
6005 TOJSON_IMPL(rtpProfile),
6006 TOJSON_IMPL(addressResolutionPolicy)
6007 };
6008 }
6009 static void from_json(const nlohmann::json& j, EnginePolicyNetworking& p)
6010 {
6011 p.clear();
6012 FROMJSON_IMPL(defaultNic, std::string, EMPTY_STRING);
6013 FROMJSON_IMPL(multicastRejoinSecs, int, 8);
6014 FROMJSON_IMPL(rallypointRtTestIntervalMs, int, 60000);
6015 FROMJSON_IMPL(logRtpJitterBufferStats, bool, false);
6016 FROMJSON_IMPL(preventMulticastFailover, bool, false);
6017
6018 getOptional<EngineNetworkingRpUdpStreaming>("rpUdpStreaming", p.rpUdpStreaming, j);
6019 getOptional<RtpProfile>("rtpProfile", p.rtpProfile, j);
6020 getOptional<AddressResolutionPolicy_t>("addressResolutionPolicy", p.addressResolutionPolicy, j, AddressResolutionPolicy_t::arpIpv6ThenIpv4);
6021 }
6022
6023 //-----------------------------------------------------------
6024 JSON_SERIALIZED_CLASS(Aec)
6035 {
6036 IMPLEMENT_JSON_SERIALIZATION()
6037 IMPLEMENT_JSON_DOCUMENTATION(Aec)
6038
6039 public:
6045 typedef enum
6046 {
6048 aecmDefault = 0,
6049
6051 aecmLow = 1,
6052
6054 aecmMedium = 2,
6055
6057 aecmHigh = 3,
6058
6060 aecmVeryHigh = 4,
6061
6063 aecmHighest = 5
6064 } Mode_t;
6065
6068
6071
6074
6076 bool cng;
6077
6078 Aec()
6079 {
6080 clear();
6081 }
6082
6083 void clear()
6084 {
6085 enabled = false;
6086 mode = aecmDefault;
6087 speakerTailMs = 60;
6088 cng = true;
6089 }
6090 };
6091
6092 static void to_json(nlohmann::json& j, const Aec& p)
6093 {
6094 j = nlohmann::json{
6095 TOJSON_IMPL(enabled),
6096 TOJSON_IMPL(mode),
6097 TOJSON_IMPL(speakerTailMs),
6098 TOJSON_IMPL(cng)
6099 };
6100 }
6101 static void from_json(const nlohmann::json& j, Aec& p)
6102 {
6103 p.clear();
6104 FROMJSON_IMPL(enabled, bool, false);
6105 FROMJSON_IMPL(mode, Aec::Mode_t, Aec::Mode_t::aecmDefault);
6106 FROMJSON_IMPL(speakerTailMs, int, 60);
6107 FROMJSON_IMPL(cng, bool, true);
6108 }
6109
6110 //-----------------------------------------------------------
6111 JSON_SERIALIZED_CLASS(Vad)
6122 {
6123 IMPLEMENT_JSON_SERIALIZATION()
6124 IMPLEMENT_JSON_DOCUMENTATION(Vad)
6125
6126 public:
6132 typedef enum
6133 {
6135 vamDefault = 0,
6136
6138 vamLowBitRate = 1,
6139
6141 vamAggressive = 2,
6142
6144 vamVeryAggressive = 3
6145 } Mode_t;
6146
6149
6152
6153 Vad()
6154 {
6155 clear();
6156 }
6157
6158 void clear()
6159 {
6160 enabled = false;
6161 mode = vamDefault;
6162 }
6163 };
6164
6165 static void to_json(nlohmann::json& j, const Vad& p)
6166 {
6167 j = nlohmann::json{
6168 TOJSON_IMPL(enabled),
6169 TOJSON_IMPL(mode)
6170 };
6171 }
6172 static void from_json(const nlohmann::json& j, Vad& p)
6173 {
6174 p.clear();
6175 FROMJSON_IMPL(enabled, bool, false);
6176 FROMJSON_IMPL(mode, Vad::Mode_t, Vad::Mode_t::vamDefault);
6177 }
6178
6179 //-----------------------------------------------------------
6180 JSON_SERIALIZED_CLASS(Bridge)
6191 {
6192 IMPLEMENT_JSON_SERIALIZATION()
6193 IMPLEMENT_JSON_DOCUMENTATION(Bridge)
6194
6195 public:
6197 std::string id;
6198
6200 std::string name;
6201
6203 std::vector<std::string> groups;
6204
6209
6210 Bridge()
6211 {
6212 clear();
6213 }
6214
6215 void clear()
6216 {
6217 id.clear();
6218 name.clear();
6219 groups.clear();
6220 enabled = true;
6221 }
6222 };
6223
6224 static void to_json(nlohmann::json& j, const Bridge& p)
6225 {
6226 j = nlohmann::json{
6227 TOJSON_IMPL(id),
6228 TOJSON_IMPL(name),
6229 TOJSON_IMPL(groups),
6230 TOJSON_IMPL(enabled)
6231 };
6232 }
6233 static void from_json(const nlohmann::json& j, Bridge& p)
6234 {
6235 p.clear();
6236 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
6237 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
6238 getOptional<std::vector<std::string>>("groups", p.groups, j);
6239 FROMJSON_IMPL(enabled, bool, true);
6240 }
6241
6242 //-----------------------------------------------------------
6243 JSON_SERIALIZED_CLASS(AndroidAudio)
6254 {
6255 IMPLEMENT_JSON_SERIALIZATION()
6256 IMPLEMENT_JSON_DOCUMENTATION(AndroidAudio)
6257
6258 public:
6259 constexpr static int INVALID_SESSION_ID = -9999;
6260
6262 int api;
6263
6266
6269
6285
6293
6303
6306
6309
6310
6311 AndroidAudio()
6312 {
6313 clear();
6314 }
6315
6316 void clear()
6317 {
6318 api = 0;
6319 sharingMode = 0;
6320 performanceMode = 12;
6321 usage = 2;
6322 contentType = 1;
6323 inputPreset = 7;
6324 sessionId = AndroidAudio::INVALID_SESSION_ID;
6325 engineMode = 0;
6326 }
6327 };
6328
6329 static void to_json(nlohmann::json& j, const AndroidAudio& p)
6330 {
6331 j = nlohmann::json{
6332 TOJSON_IMPL(api),
6333 TOJSON_IMPL(sharingMode),
6334 TOJSON_IMPL(performanceMode),
6335 TOJSON_IMPL(usage),
6336 TOJSON_IMPL(contentType),
6337 TOJSON_IMPL(inputPreset),
6338 TOJSON_IMPL(sessionId),
6339 TOJSON_IMPL(engineMode)
6340 };
6341 }
6342 static void from_json(const nlohmann::json& j, AndroidAudio& p)
6343 {
6344 p.clear();
6345 FROMJSON_IMPL(api, int, 0);
6346 FROMJSON_IMPL(sharingMode, int, 0);
6347 FROMJSON_IMPL(performanceMode, int, 12);
6348 FROMJSON_IMPL(usage, int, 2);
6349 FROMJSON_IMPL(contentType, int, 1);
6350 FROMJSON_IMPL(inputPreset, int, 7);
6351 FROMJSON_IMPL(sessionId, int, AndroidAudio::INVALID_SESSION_ID);
6352 FROMJSON_IMPL(engineMode, int, 0);
6353 }
6354
6355 //-----------------------------------------------------------
6356 JSON_SERIALIZED_CLASS(EnginePolicyAudio)
6367 {
6368 IMPLEMENT_JSON_SERIALIZATION()
6369 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyAudio)
6370
6371 public:
6374
6377
6380
6383
6386
6389
6392
6395
6398
6401
6404
6407
6410
6413
6416
6417
6419 {
6420 clear();
6421 }
6422
6423 void clear()
6424 {
6425 enabled = true;
6426 hardwareEnabled = true;
6427 internalRate = 16000;
6428 internalChannels = 2;
6429 muteTxOnTx = false;
6430 aec.clear();
6431 vad.clear();
6432 android.clear();
6433 inputAgc.clear();
6434 outputAgc.clear();
6435 denoiseInput = false;
6436 denoiseOutput = false;
6437 saveInputPcm = false;
6438 saveOutputPcm = false;
6439 registry.clear();
6440 }
6441 };
6442
6443 static void to_json(nlohmann::json& j, const EnginePolicyAudio& p)
6444 {
6445 j = nlohmann::json{
6446 TOJSON_IMPL(enabled),
6447 TOJSON_IMPL(hardwareEnabled),
6448 TOJSON_IMPL(internalRate),
6449 TOJSON_IMPL(internalChannels),
6450 TOJSON_IMPL(muteTxOnTx),
6451 TOJSON_IMPL(aec),
6452 TOJSON_IMPL(vad),
6453 TOJSON_IMPL(android),
6454 TOJSON_IMPL(inputAgc),
6455 TOJSON_IMPL(outputAgc),
6456 TOJSON_IMPL(denoiseInput),
6457 TOJSON_IMPL(denoiseOutput),
6458 TOJSON_IMPL(saveInputPcm),
6459 TOJSON_IMPL(saveOutputPcm),
6460 TOJSON_IMPL(registry)
6461 };
6462 }
6463 static void from_json(const nlohmann::json& j, EnginePolicyAudio& p)
6464 {
6465 p.clear();
6466 getOptional<bool>("enabled", p.enabled, j, true);
6467 getOptional<bool>("hardwareEnabled", p.hardwareEnabled, j, true);
6468 FROMJSON_IMPL(internalRate, int, 16000);
6469 FROMJSON_IMPL(internalChannels, int, 2);
6470
6471 FROMJSON_IMPL(muteTxOnTx, bool, false);
6472 getOptional<Aec>("aec", p.aec, j);
6473 getOptional<Vad>("vad", p.vad, j);
6474 getOptional<AndroidAudio>("android", p.android, j);
6475 getOptional<Agc>("inputAgc", p.inputAgc, j);
6476 getOptional<Agc>("outputAgc", p.outputAgc, j);
6477 FROMJSON_IMPL(denoiseInput, bool, false);
6478 FROMJSON_IMPL(denoiseOutput, bool, false);
6479 FROMJSON_IMPL(saveInputPcm, bool, false);
6480 FROMJSON_IMPL(saveOutputPcm, bool, false);
6481 getOptional<AudioRegistry>("registry", p.registry, j);
6482 }
6483
6484 //-----------------------------------------------------------
6485 JSON_SERIALIZED_CLASS(SecurityCertificate)
6496 {
6497 IMPLEMENT_JSON_SERIALIZATION()
6498 IMPLEMENT_JSON_DOCUMENTATION(SecurityCertificate)
6499
6500 public:
6501
6507 std::string certificate;
6508
6510 std::string key;
6511
6513 {
6514 clear();
6515 }
6516
6517 void clear()
6518 {
6519 certificate.clear();
6520 key.clear();
6521 }
6522 };
6523
6524 static void to_json(nlohmann::json& j, const SecurityCertificate& p)
6525 {
6526 j = nlohmann::json{
6527 TOJSON_IMPL(certificate),
6528 TOJSON_IMPL(key)
6529 };
6530 }
6531 static void from_json(const nlohmann::json& j, SecurityCertificate& p)
6532 {
6533 p.clear();
6534 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
6535 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
6536 }
6537
6538 // This is where spell checking stops
6539 //-----------------------------------------------------------
6540 JSON_SERIALIZED_CLASS(EnginePolicySecurity)
6541
6542
6552 {
6553 IMPLEMENT_JSON_SERIALIZATION()
6554 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicySecurity)
6555
6556 public:
6557
6569
6577 std::vector<std::string> caCertificates;
6578
6580 {
6581 clear();
6582 }
6583
6584 void clear()
6585 {
6586 certificate.clear();
6587 caCertificates.clear();
6588 }
6589 };
6590
6591 static void to_json(nlohmann::json& j, const EnginePolicySecurity& p)
6592 {
6593 j = nlohmann::json{
6594 TOJSON_IMPL(certificate),
6595 TOJSON_IMPL(caCertificates)
6596 };
6597 }
6598 static void from_json(const nlohmann::json& j, EnginePolicySecurity& p)
6599 {
6600 p.clear();
6601 getOptional("certificate", p.certificate, j);
6602 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
6603 }
6604
6605 //-----------------------------------------------------------
6606 JSON_SERIALIZED_CLASS(EnginePolicyLogging)
6617 {
6618 IMPLEMENT_JSON_SERIALIZATION()
6619 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyLogging)
6620
6621 public:
6622
6639
6642
6644 {
6645 clear();
6646 }
6647
6648 void clear()
6649 {
6650 maxLevel = 4; // ILogger::Level::debug
6651 enableSyslog = false;
6652 }
6653 };
6654
6655 static void to_json(nlohmann::json& j, const EnginePolicyLogging& p)
6656 {
6657 j = nlohmann::json{
6658 TOJSON_IMPL(maxLevel),
6659 TOJSON_IMPL(enableSyslog)
6660 };
6661 }
6662 static void from_json(const nlohmann::json& j, EnginePolicyLogging& p)
6663 {
6664 p.clear();
6665 getOptional("maxLevel", p.maxLevel, j, 4); // ILogger::Level::debug
6666 getOptional("enableSyslog", p.enableSyslog, j);
6667 }
6668
6669
6670 //-----------------------------------------------------------
6671 JSON_SERIALIZED_CLASS(EnginePolicyDatabase)
6673 {
6674 IMPLEMENT_JSON_SERIALIZATION()
6675 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyDatabase)
6676
6677 public:
6678 typedef enum
6679 {
6680 dbtFixedMemory = 0,
6681 dbtPagedMemory = 1,
6682 dbtFixedFile = 2
6683 } DatabaseType_t;
6684
6685 DatabaseType_t type;
6686 std::string fixedFileName;
6687 bool forceMaintenance;
6688 bool reclaimSpace;
6689
6691 {
6692 clear();
6693 }
6694
6695 void clear()
6696 {
6697 type = DatabaseType_t::dbtFixedMemory;
6698 fixedFileName.clear();
6699 forceMaintenance = false;
6700 reclaimSpace = false;
6701 }
6702 };
6703
6704 static void to_json(nlohmann::json& j, const EnginePolicyDatabase& p)
6705 {
6706 j = nlohmann::json{
6707 TOJSON_IMPL(type),
6708 TOJSON_IMPL(fixedFileName),
6709 TOJSON_IMPL(forceMaintenance),
6710 TOJSON_IMPL(reclaimSpace)
6711 };
6712 }
6713 static void from_json(const nlohmann::json& j, EnginePolicyDatabase& p)
6714 {
6715 p.clear();
6716 FROMJSON_IMPL(type, EnginePolicyDatabase::DatabaseType_t, EnginePolicyDatabase::DatabaseType_t::dbtFixedMemory);
6717 FROMJSON_IMPL(fixedFileName, std::string, EMPTY_STRING);
6718 FROMJSON_IMPL(forceMaintenance, bool, false);
6719 FROMJSON_IMPL(reclaimSpace, bool, false);
6720 }
6721
6722
6723 //-----------------------------------------------------------
6724 JSON_SERIALIZED_CLASS(SecureSignature)
6733 {
6734 IMPLEMENT_JSON_SERIALIZATION()
6735 IMPLEMENT_JSON_DOCUMENTATION(SecureSignature)
6736
6737 public:
6738
6740 std::string certificate;
6741
6742 // /** @brief Contains the PEM-formatted text of the certificate's public key */
6743 //std::string publicKey;
6744
6746 std::string signature;
6747
6749 {
6750 clear();
6751 }
6752
6753 void clear()
6754 {
6755 certificate.clear();
6756 //publicKey.clear();
6757 signature.clear();
6758 }
6759 };
6760
6761 static void to_json(nlohmann::json& j, const SecureSignature& p)
6762 {
6763 j = nlohmann::json{
6764 TOJSON_IMPL(certificate),
6765 //TOJSON_IMPL(publicKey),
6766 TOJSON_IMPL(signature)
6767 };
6768 }
6769 static void from_json(const nlohmann::json& j, SecureSignature& p)
6770 {
6771 p.clear();
6772 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
6773 //FROMJSON_IMPL(publicKey, std::string, EMPTY_STRING);
6774 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
6775 }
6776
6777 //-----------------------------------------------------------
6778 JSON_SERIALIZED_CLASS(NamedAudioDevice)
6780 {
6781 IMPLEMENT_JSON_SERIALIZATION()
6782 IMPLEMENT_JSON_DOCUMENTATION(NamedAudioDevice)
6783
6784 public:
6785 std::string name;
6786 std::string manufacturer;
6787 std::string model;
6788 std::string id;
6789 std::string serialNumber;
6790 std::string type;
6791 std::string extra;
6792 bool isDefault;
6793
6795 {
6796 clear();
6797 }
6798
6799 void clear()
6800 {
6801 name.clear();
6802 manufacturer.clear();
6803 model.clear();
6804 id.clear();
6805 serialNumber.clear();
6806 type.clear();
6807 extra.clear();
6808 isDefault = false;
6809 }
6810 };
6811
6812 static void to_json(nlohmann::json& j, const NamedAudioDevice& p)
6813 {
6814 j = nlohmann::json{
6815 TOJSON_IMPL(name),
6816 TOJSON_IMPL(manufacturer),
6817 TOJSON_IMPL(model),
6818 TOJSON_IMPL(id),
6819 TOJSON_IMPL(serialNumber),
6820 TOJSON_IMPL(type),
6821 TOJSON_IMPL(extra),
6822 TOJSON_IMPL(isDefault),
6823 };
6824 }
6825 static void from_json(const nlohmann::json& j, NamedAudioDevice& p)
6826 {
6827 p.clear();
6828 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
6829 getOptional<std::string>("manufacturer", p.manufacturer, j, EMPTY_STRING);
6830 getOptional<std::string>("model", p.model, j, EMPTY_STRING);
6831 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
6832 getOptional<std::string>("serialNumber", p.serialNumber, j, EMPTY_STRING);
6833 getOptional<std::string>("type", p.type, j, EMPTY_STRING);
6834 getOptional<std::string>("extra", p.extra, j, EMPTY_STRING);
6835 getOptional<bool>("isDefault", p.isDefault, j, false);
6836 }
6837
6838
6839 //-----------------------------------------------------------
6840 JSON_SERIALIZED_CLASS(EnginePolicyNamedAudioDevices)
6842 {
6843 IMPLEMENT_JSON_SERIALIZATION()
6844 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNamedAudioDevices)
6845
6846 public:
6847 std::vector<NamedAudioDevice> inputs;
6848 std::vector<NamedAudioDevice> outputs;
6849
6851 {
6852 clear();
6853 }
6854
6855 void clear()
6856 {
6857 inputs.clear();
6858 outputs.clear();
6859 }
6860 };
6861
6862 static void to_json(nlohmann::json& j, const EnginePolicyNamedAudioDevices& p)
6863 {
6864 j = nlohmann::json{
6865 TOJSON_IMPL(inputs),
6866 TOJSON_IMPL(outputs)
6867 };
6868 }
6869 static void from_json(const nlohmann::json& j, EnginePolicyNamedAudioDevices& p)
6870 {
6871 p.clear();
6872 getOptional<std::vector<NamedAudioDevice>>("inputs", p.inputs, j);
6873 getOptional<std::vector<NamedAudioDevice>>("outputs", p.outputs, j);
6874 }
6875
6876 //-----------------------------------------------------------
6877 JSON_SERIALIZED_CLASS(Licensing)
6890 {
6891 IMPLEMENT_JSON_SERIALIZATION()
6892 IMPLEMENT_JSON_DOCUMENTATION(Licensing)
6893
6894 public:
6895
6897 std::string entitlement;
6898
6900 std::string key;
6901
6903 std::string activationCode;
6904
6906 std::string deviceId;
6907
6909 std::string manufacturerId;
6910
6911 Licensing()
6912 {
6913 clear();
6914 }
6915
6916 void clear()
6917 {
6918 entitlement.clear();
6919 key.clear();
6920 activationCode.clear();
6921 deviceId.clear();
6922 manufacturerId.clear();
6923 }
6924 };
6925
6926 static void to_json(nlohmann::json& j, const Licensing& p)
6927 {
6928 j = nlohmann::json{
6929 TOJSON_IMPL(entitlement),
6930 TOJSON_IMPL(key),
6931 TOJSON_IMPL(activationCode),
6932 TOJSON_IMPL(deviceId),
6933 TOJSON_IMPL(manufacturerId)
6934 };
6935 }
6936 static void from_json(const nlohmann::json& j, Licensing& p)
6937 {
6938 p.clear();
6939 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
6940 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
6941 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
6942 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
6943 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
6944 }
6945
6946 //-----------------------------------------------------------
6947 JSON_SERIALIZED_CLASS(DiscoveryMagellan)
6958 {
6959 IMPLEMENT_JSON_SERIALIZATION()
6960 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryMagellan)
6961
6962 public:
6963
6966
6968 std::string interfaceName;
6969
6972
6975
6977 {
6978 clear();
6979 }
6980
6981 void clear()
6982 {
6983 enabled = false;
6984 interfaceName.clear();
6985 security.clear();
6986 tls.clear();
6987 }
6988 };
6989
6990 static void to_json(nlohmann::json& j, const DiscoveryMagellan& p)
6991 {
6992 j = nlohmann::json{
6993 TOJSON_IMPL(enabled),
6994 TOJSON_IMPL(interfaceName),
6995 TOJSON_IMPL(security),
6996 TOJSON_IMPL(tls)
6997 };
6998 }
6999 static void from_json(const nlohmann::json& j, DiscoveryMagellan& p)
7000 {
7001 p.clear();
7002 getOptional("enabled", p.enabled, j, false);
7003 getOptional<Tls>("tls", p.tls, j);
7004 getOptional<SecurityCertificate>("security", p.security, j);
7005 FROMJSON_IMPL(interfaceName, std::string, EMPTY_STRING);
7006 }
7007
7008 //-----------------------------------------------------------
7009 JSON_SERIALIZED_CLASS(DiscoverySsdp)
7020 {
7021 IMPLEMENT_JSON_SERIALIZATION()
7022 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySsdp)
7023
7024 public:
7025
7028
7030 std::string interfaceName;
7031
7034
7036 std::vector<std::string> searchTerms;
7037
7040
7043
7045 {
7046 clear();
7047 }
7048
7049 void clear()
7050 {
7051 enabled = false;
7052 interfaceName.clear();
7053 address.clear();
7054 searchTerms.clear();
7055 ageTimeoutMs = 30000;
7056 advertising.clear();
7057 }
7058 };
7059
7060 static void to_json(nlohmann::json& j, const DiscoverySsdp& p)
7061 {
7062 j = nlohmann::json{
7063 TOJSON_IMPL(enabled),
7064 TOJSON_IMPL(interfaceName),
7065 TOJSON_IMPL(address),
7066 TOJSON_IMPL(searchTerms),
7067 TOJSON_IMPL(ageTimeoutMs),
7068 TOJSON_IMPL(advertising)
7069 };
7070 }
7071 static void from_json(const nlohmann::json& j, DiscoverySsdp& p)
7072 {
7073 p.clear();
7074 getOptional("enabled", p.enabled, j, false);
7075 getOptional<std::string>("interfaceName", p.interfaceName, j);
7076
7077 getOptional<NetworkAddress>("address", p.address, j);
7078 if(p.address.address.empty())
7079 {
7080 p.address.address = "255.255.255.255";
7081 }
7082 if(p.address.port <= 0)
7083 {
7084 p.address.port = 1900;
7085 }
7086
7087 getOptional<std::vector<std::string>>("searchTerms", p.searchTerms, j);
7088 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7089 getOptional<Advertising>("advertising", p.advertising, j);
7090 }
7091
7092 //-----------------------------------------------------------
7093 JSON_SERIALIZED_CLASS(DiscoverySap)
7104 {
7105 IMPLEMENT_JSON_SERIALIZATION()
7106 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySap)
7107
7108 public:
7111
7113 std::string interfaceName;
7114
7117
7120
7123
7124 DiscoverySap()
7125 {
7126 clear();
7127 }
7128
7129 void clear()
7130 {
7131 enabled = false;
7132 interfaceName.clear();
7133 address.clear();
7134 ageTimeoutMs = 30000;
7135 advertising.clear();
7136 }
7137 };
7138
7139 static void to_json(nlohmann::json& j, const DiscoverySap& p)
7140 {
7141 j = nlohmann::json{
7142 TOJSON_IMPL(enabled),
7143 TOJSON_IMPL(interfaceName),
7144 TOJSON_IMPL(address),
7145 TOJSON_IMPL(ageTimeoutMs),
7146 TOJSON_IMPL(advertising)
7147 };
7148 }
7149 static void from_json(const nlohmann::json& j, DiscoverySap& p)
7150 {
7151 p.clear();
7152 getOptional("enabled", p.enabled, j, false);
7153 getOptional<std::string>("interfaceName", p.interfaceName, j);
7154 getOptional<NetworkAddress>("address", p.address, j);
7155 if(p.address.address.empty())
7156 {
7157 p.address.address = "224.2.127.254";
7158 }
7159 if(p.address.port <= 0)
7160 {
7161 p.address.port = 9875;
7162 }
7163
7164 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7165 getOptional<Advertising>("advertising", p.advertising, j);
7166 }
7167
7168 //-----------------------------------------------------------
7169 JSON_SERIALIZED_CLASS(DiscoveryCistech)
7182 {
7183 IMPLEMENT_JSON_SERIALIZATION()
7184 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryCistech)
7185
7186 public:
7187 bool enabled;
7188 std::string interfaceName;
7189 NetworkAddress address;
7190 int ageTimeoutMs;
7191
7193 {
7194 clear();
7195 }
7196
7197 void clear()
7198 {
7199 enabled = false;
7200 interfaceName.clear();
7201 address.clear();
7202 ageTimeoutMs = 30000;
7203 }
7204 };
7205
7206 static void to_json(nlohmann::json& j, const DiscoveryCistech& p)
7207 {
7208 j = nlohmann::json{
7209 TOJSON_IMPL(enabled),
7210 TOJSON_IMPL(interfaceName),
7211 TOJSON_IMPL(address),
7212 TOJSON_IMPL(ageTimeoutMs)
7213 };
7214 }
7215 static void from_json(const nlohmann::json& j, DiscoveryCistech& p)
7216 {
7217 p.clear();
7218 getOptional("enabled", p.enabled, j, false);
7219 getOptional<std::string>("interfaceName", p.interfaceName, j);
7220 getOptional<NetworkAddress>("address", p.address, j);
7221 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7222 }
7223
7224
7225 //-----------------------------------------------------------
7226 JSON_SERIALIZED_CLASS(DiscoveryTrellisware)
7237 {
7238 IMPLEMENT_JSON_SERIALIZATION()
7239 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryTrellisware)
7240
7241 public:
7242
7245
7248
7250 {
7251 clear();
7252 }
7253
7254 void clear()
7255 {
7256 enabled = false;
7257 security.clear();
7258 }
7259 };
7260
7261 static void to_json(nlohmann::json& j, const DiscoveryTrellisware& p)
7262 {
7263 j = nlohmann::json{
7264 TOJSON_IMPL(enabled),
7265 TOJSON_IMPL(security)
7266 };
7267 }
7268 static void from_json(const nlohmann::json& j, DiscoveryTrellisware& p)
7269 {
7270 p.clear();
7271 getOptional("enabled", p.enabled, j, false);
7272 getOptional<SecurityCertificate>("security", p.security, j);
7273 }
7274
7275 //-----------------------------------------------------------
7276 JSON_SERIALIZED_CLASS(DiscoveryConfiguration)
7287 {
7288 IMPLEMENT_JSON_SERIALIZATION()
7289 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryConfiguration)
7290
7291 public:
7294
7297
7300
7303
7306
7308 {
7309 clear();
7310 }
7311
7312 void clear()
7313 {
7314 magellan.clear();
7315 ssdp.clear();
7316 sap.clear();
7317 cistech.clear();
7318 }
7319 };
7320
7321 static void to_json(nlohmann::json& j, const DiscoveryConfiguration& p)
7322 {
7323 j = nlohmann::json{
7324 TOJSON_IMPL(magellan),
7325 TOJSON_IMPL(ssdp),
7326 TOJSON_IMPL(sap),
7327 TOJSON_IMPL(cistech),
7328 TOJSON_IMPL(trellisware)
7329 };
7330 }
7331 static void from_json(const nlohmann::json& j, DiscoveryConfiguration& p)
7332 {
7333 p.clear();
7334 getOptional<DiscoveryMagellan>("magellan", p.magellan, j);
7335 getOptional<DiscoverySsdp>("ssdp", p.ssdp, j);
7336 getOptional<DiscoverySap>("sap", p.sap, j);
7337 getOptional<DiscoveryCistech>("cistech", p.cistech, j);
7338 getOptional<DiscoveryTrellisware>("trellisware", p.trellisware, j);
7339 }
7340
7341
7342 //-----------------------------------------------------------
7343 JSON_SERIALIZED_CLASS(EnginePolicyInternals)
7356 {
7357 IMPLEMENT_JSON_SERIALIZATION()
7358 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyInternals)
7359
7360 public:
7363
7366
7369
7370 int maxRxSecs;
7371
7372 int logTaskQueueStatsIntervalMs;
7373
7374 bool enableLazySpeakerClosure;
7375
7378
7381
7384
7387
7390
7393
7396
7399
7402
7404 {
7405 clear();
7406 }
7407
7408 void clear()
7409 {
7410 watchdog.clear();
7411 housekeeperIntervalMs = 1000;
7412 logTaskQueueStatsIntervalMs = 0;
7413 maxTxSecs = 30;
7414 maxRxSecs = 0;
7415 enableLazySpeakerClosure = false;
7416 rpClusterStrategy = RallypointCluster::ConnectionStrategy_t::csRoundRobin;
7417 rpClusterRolloverSecs = 10;
7418 rtpExpirationCheckIntervalMs = 250;
7419 rpConnectionTimeoutSecs = 0;
7420 rpTransactionTimeoutMs = 0;
7421 stickyTidHangSecs = 10;
7422 uriStreamingIntervalMs = 60;
7423 delayedMicrophoneClosureSecs = 15;
7424 tuning.clear();
7425 }
7426 };
7427
7428 static void to_json(nlohmann::json& j, const EnginePolicyInternals& p)
7429 {
7430 j = nlohmann::json{
7431 TOJSON_IMPL(watchdog),
7432 TOJSON_IMPL(housekeeperIntervalMs),
7433 TOJSON_IMPL(logTaskQueueStatsIntervalMs),
7434 TOJSON_IMPL(maxTxSecs),
7435 TOJSON_IMPL(maxRxSecs),
7436 TOJSON_IMPL(enableLazySpeakerClosure),
7437 TOJSON_IMPL(rpClusterStrategy),
7438 TOJSON_IMPL(rpClusterRolloverSecs),
7439 TOJSON_IMPL(rtpExpirationCheckIntervalMs),
7440 TOJSON_IMPL(rpConnectionTimeoutSecs),
7441 TOJSON_IMPL(rpTransactionTimeoutMs),
7442 TOJSON_IMPL(stickyTidHangSecs),
7443 TOJSON_IMPL(uriStreamingIntervalMs),
7444 TOJSON_IMPL(delayedMicrophoneClosureSecs),
7445 TOJSON_IMPL(tuning)
7446 };
7447 }
7448 static void from_json(const nlohmann::json& j, EnginePolicyInternals& p)
7449 {
7450 p.clear();
7451 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
7452 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
7453 getOptional<int>("logTaskQueueStatsIntervalMs", p.logTaskQueueStatsIntervalMs, j, 0);
7454 getOptional<int>("maxTxSecs", p.maxTxSecs, j, 30);
7455 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
7456 getOptional<bool>("enableLazySpeakerClosure", p.enableLazySpeakerClosure, j, false);
7457 getOptional<RallypointCluster::ConnectionStrategy_t>("rpClusterStrategy", p.rpClusterStrategy, j, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
7458 getOptional<int>("rpClusterRolloverSecs", p.rpClusterRolloverSecs, j, 10);
7459 getOptional<int>("rtpExpirationCheckIntervalMs", p.rtpExpirationCheckIntervalMs, j, 250);
7460 getOptional<int>("rpConnectionTimeoutSecs", p.rpConnectionTimeoutSecs, j, 0);
7461 getOptional<int>("rpTransactionTimeoutMs", p.rpTransactionTimeoutMs, j, 0);
7462 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
7463 getOptional<int>("uriStreamingIntervalMs", p.uriStreamingIntervalMs, j, 60);
7464 getOptional<int>("delayedMicrophoneClosureSecs", p.delayedMicrophoneClosureSecs, j, 15);
7465 getOptional<TuningSettings>("tuning", p.tuning, j);
7466 }
7467
7468 //-----------------------------------------------------------
7469 JSON_SERIALIZED_CLASS(EnginePolicyTimelines)
7482 {
7483 IMPLEMENT_JSON_SERIALIZATION()
7484 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyTimelines)
7485
7486 public:
7487
7494
7496 std::string storageRoot;
7497
7500
7503
7506
7509
7512
7515
7518
7527
7530
7533
7536
7538 {
7539 clear();
7540 }
7541
7542 void clear()
7543 {
7544 enabled = true;
7545 storageRoot.clear();
7546 maxStorageMb = 1024; // 1 Gigabyte
7547 maxMemMb = maxStorageMb;
7548 maxAudioEventMemMb = maxMemMb;
7549 maxDiskMb = maxStorageMb;
7550 maxEventAgeSecs = (86400 * 30); // 30 days
7551 groomingIntervalSecs = (60 * 30); // 30 minutes
7552 maxEvents = 1000;
7553 autosaveIntervalSecs = 5;
7554 security.clear();
7555 disableSigningAndVerification = false;
7556 ephemeral = false;
7557 }
7558 };
7559
7560 static void to_json(nlohmann::json& j, const EnginePolicyTimelines& p)
7561 {
7562 j = nlohmann::json{
7563 TOJSON_IMPL(enabled),
7564 TOJSON_IMPL(storageRoot),
7565 TOJSON_IMPL(maxMemMb),
7566 TOJSON_IMPL(maxAudioEventMemMb),
7567 TOJSON_IMPL(maxDiskMb),
7568 TOJSON_IMPL(maxEventAgeSecs),
7569 TOJSON_IMPL(maxEvents),
7570 TOJSON_IMPL(groomingIntervalSecs),
7571 TOJSON_IMPL(autosaveIntervalSecs),
7572 TOJSON_IMPL(security),
7573 TOJSON_IMPL(disableSigningAndVerification),
7574 TOJSON_IMPL(ephemeral)
7575 };
7576 }
7577 static void from_json(const nlohmann::json& j, EnginePolicyTimelines& p)
7578 {
7579 p.clear();
7580 getOptional<bool>("enabled", p.enabled, j, true);
7581 getOptional<std::string>("storageRoot", p.storageRoot, j, EMPTY_STRING);
7582
7583 getOptional<int>("maxStorageMb", p.maxStorageMb, j, 1024);
7584 getOptional<int>("maxMemMb", p.maxMemMb, j, p.maxStorageMb);
7585 getOptional<int>("maxAudioEventMemMb", p.maxAudioEventMemMb, j, p.maxMemMb);
7586 getOptional<int>("maxDiskMb", p.maxDiskMb, j, p.maxStorageMb);
7587 getOptional<long>("maxEventAgeSecs", p.maxEventAgeSecs, j, (86400 * 30));
7588 getOptional<long>("groomingIntervalSecs", p.groomingIntervalSecs, j, (60 * 30));
7589 getOptional<long>("autosaveIntervalSecs", p.autosaveIntervalSecs, j, 5);
7590 getOptional<int>("maxEvents", p.maxEvents, j, 1000);
7591 getOptional<SecurityCertificate>("security", p.security, j);
7592 getOptional<bool>("disableSigningAndVerification", p.disableSigningAndVerification, j, false);
7593 getOptional<bool>("ephemeral", p.ephemeral, j, false);
7594 }
7595
7596
7597 //-----------------------------------------------------------
7598 JSON_SERIALIZED_CLASS(RtpMapEntry)
7609 {
7610 IMPLEMENT_JSON_SERIALIZATION()
7611 IMPLEMENT_JSON_DOCUMENTATION(RtpMapEntry)
7612
7613 public:
7615 std::string name;
7616
7619
7622
7623 RtpMapEntry()
7624 {
7625 clear();
7626 }
7627
7628 void clear()
7629 {
7630 name.clear();
7631 engageType = -1;
7632 rtpPayloadType = -1;
7633 }
7634 };
7635
7636 static void to_json(nlohmann::json& j, const RtpMapEntry& p)
7637 {
7638 j = nlohmann::json{
7639 TOJSON_IMPL(name),
7640 TOJSON_IMPL(engageType),
7641 TOJSON_IMPL(rtpPayloadType)
7642 };
7643 }
7644 static void from_json(const nlohmann::json& j, RtpMapEntry& p)
7645 {
7646 p.clear();
7647 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7648 getOptional<int>("engageType", p.engageType, j, -1);
7649 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
7650 }
7651
7652 //-----------------------------------------------------------
7653 JSON_SERIALIZED_CLASS(ExternalModule)
7664 {
7665 IMPLEMENT_JSON_SERIALIZATION()
7666 IMPLEMENT_JSON_DOCUMENTATION(ExternalModule)
7667
7668 public:
7670 std::string name;
7671
7673 std::string file;
7674
7676 nlohmann::json configuration;
7677
7679 {
7680 clear();
7681 }
7682
7683 void clear()
7684 {
7685 name.clear();
7686 file.clear();
7687 configuration.clear();
7688 }
7689 };
7690
7691 static void to_json(nlohmann::json& j, const ExternalModule& p)
7692 {
7693 j = nlohmann::json{
7694 TOJSON_IMPL(name),
7695 TOJSON_IMPL(file)
7696 };
7697
7698 if(!p.configuration.empty())
7699 {
7700 j["configuration"] = p.configuration;
7701 }
7702 }
7703 static void from_json(const nlohmann::json& j, ExternalModule& p)
7704 {
7705 p.clear();
7706 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7707 getOptional<std::string>("file", p.file, j, EMPTY_STRING);
7708
7709 try
7710 {
7711 p.configuration = j.at("configuration");
7712 }
7713 catch(...)
7714 {
7715 p.configuration.clear();
7716 }
7717 }
7718
7719
7720 //-----------------------------------------------------------
7721 JSON_SERIALIZED_CLASS(ExternalCodecDescriptor)
7732 {
7733 IMPLEMENT_JSON_SERIALIZATION()
7734 IMPLEMENT_JSON_DOCUMENTATION(ExternalCodecDescriptor)
7735
7736 public:
7739
7742
7745
7748
7750 {
7751 clear();
7752 }
7753
7754 void clear()
7755 {
7756 rtpPayloadType = -1;
7757 samplingRate = -1;
7758 channels = -1;
7759 rtpTsMultiplier = 0;
7760 }
7761 };
7762
7763 static void to_json(nlohmann::json& j, const ExternalCodecDescriptor& p)
7764 {
7765 j = nlohmann::json{
7766 TOJSON_IMPL(rtpPayloadType),
7767 TOJSON_IMPL(samplingRate),
7768 TOJSON_IMPL(channels),
7769 TOJSON_IMPL(rtpTsMultiplier)
7770 };
7771 }
7772 static void from_json(const nlohmann::json& j, ExternalCodecDescriptor& p)
7773 {
7774 p.clear();
7775
7776 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
7777 getOptional<int>("samplingRate", p.samplingRate, j, -1);
7778 getOptional<int>("channels", p.channels, j, -1);
7779 getOptional<int>("rtpTsMultiplier", p.rtpTsMultiplier, j, -1);
7780 }
7781
7782 //-----------------------------------------------------------
7783 JSON_SERIALIZED_CLASS(EngineStatusReportConfiguration)
7794 {
7795 IMPLEMENT_JSON_SERIALIZATION()
7796 IMPLEMENT_JSON_DOCUMENTATION(EngineStatusReportConfiguration)
7797
7798 public:
7800 std::string fileName;
7801
7804
7807
7809 std::string runCmd;
7810
7813
7816
7818 {
7819 clear();
7820 }
7821
7822 void clear()
7823 {
7824 fileName.clear();
7825 intervalSecs = 60;
7826 enabled = false;
7827 includeMemoryDetail = false;
7828 includeTaskQueueDetail = false;
7829 runCmd.clear();
7830 }
7831 };
7832
7833 static void to_json(nlohmann::json& j, const EngineStatusReportConfiguration& p)
7834 {
7835 j = nlohmann::json{
7836 TOJSON_IMPL(fileName),
7837 TOJSON_IMPL(intervalSecs),
7838 TOJSON_IMPL(enabled),
7839 TOJSON_IMPL(includeMemoryDetail),
7840 TOJSON_IMPL(includeTaskQueueDetail),
7841 TOJSON_IMPL(runCmd)
7842 };
7843 }
7844 static void from_json(const nlohmann::json& j, EngineStatusReportConfiguration& p)
7845 {
7846 p.clear();
7847 getOptional<std::string>("fileName", p.fileName, j);
7848 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
7849 getOptional<bool>("enabled", p.enabled, j, false);
7850 getOptional<std::string>("runCmd", p.runCmd, j);
7851 getOptional<bool>("includeMemoryDetail", p.includeMemoryDetail, j, false);
7852 getOptional<bool>("includeTaskQueueDetail", p.includeTaskQueueDetail, j, false);
7853 }
7854
7855 //-----------------------------------------------------------
7856 JSON_SERIALIZED_CLASS(EnginePolicy)
7869 {
7870 IMPLEMENT_JSON_SERIALIZATION()
7871 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicy)
7872
7873 public:
7874
7876 std::string dataDirectory;
7877
7880
7883
7886
7889
7892
7895
7898
7901
7904
7907
7910
7912 std::vector<ExternalModule> externalCodecs;
7913
7915 std::vector<RtpMapEntry> rtpMap;
7916
7919
7920 EnginePolicy()
7921 {
7922 clear();
7923 }
7924
7925 void clear()
7926 {
7927 dataDirectory.clear();
7928 licensing.clear();
7929 security.clear();
7930 networking.clear();
7931 audio.clear();
7932 discovery.clear();
7933 logging.clear();
7934 internals.clear();
7935 timelines.clear();
7936 database.clear();
7937 featureset.clear();
7938 namedAudioDevices.clear();
7939 externalCodecs.clear();
7940 rtpMap.clear();
7941 statusReport.clear();
7942 }
7943 };
7944
7945 static void to_json(nlohmann::json& j, const EnginePolicy& p)
7946 {
7947 j = nlohmann::json{
7948 TOJSON_IMPL(dataDirectory),
7949 TOJSON_IMPL(licensing),
7950 TOJSON_IMPL(security),
7951 TOJSON_IMPL(networking),
7952 TOJSON_IMPL(audio),
7953 TOJSON_IMPL(discovery),
7954 TOJSON_IMPL(logging),
7955 TOJSON_IMPL(internals),
7956 TOJSON_IMPL(timelines),
7957 TOJSON_IMPL(database),
7958 TOJSON_IMPL(featureset),
7959 TOJSON_IMPL(namedAudioDevices),
7960 TOJSON_IMPL(externalCodecs),
7961 TOJSON_IMPL(rtpMap),
7962 TOJSON_IMPL(statusReport)
7963 };
7964 }
7965 static void from_json(const nlohmann::json& j, EnginePolicy& p)
7966 {
7967 p.clear();
7968 FROMJSON_IMPL_SIMPLE(dataDirectory);
7969 FROMJSON_IMPL_SIMPLE(licensing);
7970 FROMJSON_IMPL_SIMPLE(security);
7971 FROMJSON_IMPL_SIMPLE(networking);
7972 FROMJSON_IMPL_SIMPLE(audio);
7973 FROMJSON_IMPL_SIMPLE(discovery);
7974 FROMJSON_IMPL_SIMPLE(logging);
7975 FROMJSON_IMPL_SIMPLE(internals);
7976 FROMJSON_IMPL_SIMPLE(timelines);
7977 FROMJSON_IMPL_SIMPLE(database);
7978 FROMJSON_IMPL_SIMPLE(featureset);
7979 FROMJSON_IMPL_SIMPLE(namedAudioDevices);
7980 FROMJSON_IMPL_SIMPLE(externalCodecs);
7981 FROMJSON_IMPL_SIMPLE(rtpMap);
7982 FROMJSON_IMPL_SIMPLE(statusReport);
7983 }
7984
7985
7986 //-----------------------------------------------------------
7987 JSON_SERIALIZED_CLASS(TalkgroupAsset)
7998 {
7999 IMPLEMENT_JSON_SERIALIZATION()
8000 IMPLEMENT_JSON_DOCUMENTATION(TalkgroupAsset)
8001
8002 public:
8003
8005 std::string nodeId;
8006
8009
8011 {
8012 clear();
8013 }
8014
8015 void clear()
8016 {
8017 nodeId.clear();
8018 group.clear();
8019 }
8020 };
8021
8022 static void to_json(nlohmann::json& j, const TalkgroupAsset& p)
8023 {
8024 j = nlohmann::json{
8025 TOJSON_IMPL(nodeId),
8026 TOJSON_IMPL(group)
8027 };
8028 }
8029 static void from_json(const nlohmann::json& j, TalkgroupAsset& p)
8030 {
8031 p.clear();
8032 getOptional<std::string>("nodeId", p.nodeId, j);
8033 getOptional<Group>("group", p.group, j);
8034 }
8035
8036 //-----------------------------------------------------------
8037 JSON_SERIALIZED_CLASS(EngageDiscoveredGroup)
8046 {
8047 IMPLEMENT_JSON_SERIALIZATION()
8048 IMPLEMENT_JSON_DOCUMENTATION(EngageDiscoveredGroup)
8049
8050 public:
8052 std::string id;
8053
8055 int type;
8056
8059
8062
8064 {
8065 clear();
8066 }
8067
8068 void clear()
8069 {
8070 id.clear();
8071 type = 0;
8072 rx.clear();
8073 tx.clear();
8074 }
8075 };
8076
8077 static void to_json(nlohmann::json& j, const EngageDiscoveredGroup& p)
8078 {
8079 j = nlohmann::json{
8080 TOJSON_IMPL(id),
8081 TOJSON_IMPL(type),
8082 TOJSON_IMPL(rx),
8083 TOJSON_IMPL(tx)
8084 };
8085 }
8086 static void from_json(const nlohmann::json& j, EngageDiscoveredGroup& p)
8087 {
8088 p.clear();
8089 getOptional<std::string>("id", p.id, j);
8090 getOptional<int>("type", p.type, j, 0);
8091 getOptional<NetworkAddress>("rx", p.rx, j);
8092 getOptional<NetworkAddress>("tx", p.tx, j);
8093 }
8094
8095 //-----------------------------------------------------------
8096 JSON_SERIALIZED_CLASS(RallypointPeer)
8107 {
8108 IMPLEMENT_JSON_SERIALIZATION()
8109 IMPLEMENT_JSON_DOCUMENTATION(RallypointPeer)
8110
8111 public:
8112 typedef enum
8113 {
8115 olpUseRpConfiguration = 0,
8116
8118 olpIsMeshLeaf = 1,
8119
8121 olpNotMeshLeaf = 2
8122 } OutboundLeafPolicy_t;
8123
8124 typedef enum
8125 {
8127 olpUseRpWebSocketTlsConfiguration = 0,
8128
8130 olpUseTlsForWebSocket = 1,
8131
8133 olpDoNotUseTlsForWebSocket = 2
8134 } OutboundWebSocketTlsPolicy_t;
8135
8137 std::string id;
8138
8141
8144
8147
8150
8153
8154 OutboundLeafPolicy_t outboundLeafPolicy;
8155
8158
8160 std::string path;
8161
8164
8167
8169 {
8170 clear();
8171 }
8172
8173 void clear()
8174 {
8175 id.clear();
8176 enabled = true;
8177 host.clear();
8178 certificate.clear();
8179 connectionTimeoutSecs = 0;
8180 forceIsMeshLeaf = false;
8181 outboundLeafPolicy = OutboundLeafPolicy_t::olpUseRpConfiguration;
8182 protocol = Rallypoint::RpProtocol_t::rppTlsTcp;
8183 path.clear();
8184 additionalProtocols.clear();
8185 outboundWebSocketTlsPolicy = OutboundWebSocketTlsPolicy_t::olpUseRpWebSocketTlsConfiguration;
8186 }
8187 };
8188
8189 static void to_json(nlohmann::json& j, const RallypointPeer& p)
8190 {
8191 j = nlohmann::json{
8192 TOJSON_IMPL(id),
8193 TOJSON_IMPL(enabled),
8194 TOJSON_IMPL(host),
8195 TOJSON_IMPL(certificate),
8196 TOJSON_IMPL(connectionTimeoutSecs),
8197 TOJSON_IMPL(forceIsMeshLeaf),
8198 TOJSON_IMPL(outboundLeafPolicy),
8199 TOJSON_IMPL(protocol),
8200 TOJSON_IMPL(path),
8201 TOJSON_IMPL(additionalProtocols),
8202 TOJSON_IMPL(outboundWebSocketTlsPolicy)
8203 };
8204 }
8205 static void from_json(const nlohmann::json& j, RallypointPeer& p)
8206 {
8207 p.clear();
8208 j.at("id").get_to(p.id);
8209 getOptional<bool>("enabled", p.enabled, j, true);
8210 getOptional<NetworkAddress>("host", p.host, j);
8211 getOptional<SecurityCertificate>("certificate", p.certificate, j);
8212 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
8213 getOptional<bool>("forceIsMeshLeaf", p.forceIsMeshLeaf, j, false);
8214 getOptional<RallypointPeer::OutboundLeafPolicy_t>("outboundLeafPolicy", p.outboundLeafPolicy, j, RallypointPeer::OutboundLeafPolicy_t::olpUseRpConfiguration);
8215 getOptional<Rallypoint::RpProtocol_t>("protocol", p.protocol, j, Rallypoint::RpProtocol_t::rppTlsTcp);
8216 getOptional<std::string>("path", p.path, j);
8217 getOptional<std::string>("additionalProtocols", p.additionalProtocols, j);
8218 getOptional<RallypointPeer::OutboundWebSocketTlsPolicy_t>("outboundWebSocketTlsPolicy", p.outboundWebSocketTlsPolicy, j, RallypointPeer::OutboundWebSocketTlsPolicy_t::olpUseRpWebSocketTlsConfiguration);
8219 }
8220
8221 //-----------------------------------------------------------
8222 JSON_SERIALIZED_CLASS(RallypointServerLimits)
8233 {
8234 IMPLEMENT_JSON_SERIALIZATION()
8235 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLimits)
8236
8237 public:
8239 uint32_t maxClients;
8240
8242 uint32_t maxPeers;
8243
8246
8249
8252
8255
8258
8261
8264
8267
8270
8273
8276
8279
8282
8284 {
8285 clear();
8286 }
8287
8288 void clear()
8289 {
8290 maxClients = 0;
8291 maxPeers = 0;
8292 maxMulticastReflectors = 0;
8293 maxRegisteredStreams = 0;
8294 maxStreamPaths = 0;
8295 maxRxPacketsPerSec = 0;
8296 maxTxPacketsPerSec = 0;
8297 maxRxBytesPerSec = 0;
8298 maxTxBytesPerSec = 0;
8299 maxQOpsPerSec = 0;
8300 maxInboundBacklog = 64;
8301 lowPriorityQueueThreshold = 64;
8302 normalPriorityQueueThreshold = 256;
8303 denyNewConnectionCpuThreshold = 75;
8304 warnAtCpuThreshold = 65;
8305 }
8306 };
8307
8308 static void to_json(nlohmann::json& j, const RallypointServerLimits& p)
8309 {
8310 j = nlohmann::json{
8311 TOJSON_IMPL(maxClients),
8312 TOJSON_IMPL(maxPeers),
8313 TOJSON_IMPL(maxMulticastReflectors),
8314 TOJSON_IMPL(maxRegisteredStreams),
8315 TOJSON_IMPL(maxStreamPaths),
8316 TOJSON_IMPL(maxRxPacketsPerSec),
8317 TOJSON_IMPL(maxTxPacketsPerSec),
8318 TOJSON_IMPL(maxRxBytesPerSec),
8319 TOJSON_IMPL(maxTxBytesPerSec),
8320 TOJSON_IMPL(maxQOpsPerSec),
8321 TOJSON_IMPL(maxInboundBacklog),
8322 TOJSON_IMPL(lowPriorityQueueThreshold),
8323 TOJSON_IMPL(normalPriorityQueueThreshold),
8324 TOJSON_IMPL(denyNewConnectionCpuThreshold),
8325 TOJSON_IMPL(warnAtCpuThreshold)
8326 };
8327 }
8328 static void from_json(const nlohmann::json& j, RallypointServerLimits& p)
8329 {
8330 p.clear();
8331 getOptional<uint32_t>("maxClients", p.maxClients, j, 0);
8332 getOptional<uint32_t>("maxPeers", p.maxPeers, j, 0);
8333 getOptional<uint32_t>("maxMulticastReflectors", p.maxMulticastReflectors, j, 0);
8334 getOptional<uint32_t>("maxRegisteredStreams", p.maxRegisteredStreams, j, 0);
8335 getOptional<uint32_t>("maxStreamPaths", p.maxStreamPaths, j, 0);
8336 getOptional<uint32_t>("maxRxPacketsPerSec", p.maxRxPacketsPerSec, j, 0);
8337 getOptional<uint32_t>("maxTxPacketsPerSec", p.maxTxPacketsPerSec, j, 0);
8338 getOptional<uint32_t>("maxRxBytesPerSec", p.maxRxBytesPerSec, j, 0);
8339 getOptional<uint32_t>("maxTxBytesPerSec", p.maxTxBytesPerSec, j, 0);
8340 getOptional<uint32_t>("maxQOpsPerSec", p.maxQOpsPerSec, j, 0);
8341 getOptional<uint32_t>("maxInboundBacklog", p.maxInboundBacklog, j, 64);
8342 getOptional<uint32_t>("lowPriorityQueueThreshold", p.lowPriorityQueueThreshold, j, 64);
8343 getOptional<uint32_t>("normalPriorityQueueThreshold", p.normalPriorityQueueThreshold, j, 256);
8344 getOptional<uint32_t>("denyNewConnectionCpuThreshold", p.denyNewConnectionCpuThreshold, j, 75);
8345 getOptional<uint32_t>("warnAtCpuThreshold", p.warnAtCpuThreshold, j, 65);
8346 }
8347
8348 //-----------------------------------------------------------
8349 JSON_SERIALIZED_CLASS(RallypointServerStatusReportConfiguration)
8360 {
8361 IMPLEMENT_JSON_SERIALIZATION()
8362 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerStatusReportConfiguration)
8363
8364 public:
8366 std::string fileName;
8367
8370
8373
8376
8379
8382
8384 std::string runCmd;
8385
8387 {
8388 clear();
8389 }
8390
8391 void clear()
8392 {
8393 fileName.clear();
8394 intervalSecs = 60;
8395 enabled = false;
8396 includeLinks = false;
8397 includePeerLinkDetails = false;
8398 includeClientLinkDetails = false;
8399 runCmd.clear();
8400 }
8401 };
8402
8403 static void to_json(nlohmann::json& j, const RallypointServerStatusReportConfiguration& p)
8404 {
8405 j = nlohmann::json{
8406 TOJSON_IMPL(fileName),
8407 TOJSON_IMPL(intervalSecs),
8408 TOJSON_IMPL(enabled),
8409 TOJSON_IMPL(includeLinks),
8410 TOJSON_IMPL(includePeerLinkDetails),
8411 TOJSON_IMPL(includeClientLinkDetails),
8412 TOJSON_IMPL(runCmd)
8413 };
8414 }
8415 static void from_json(const nlohmann::json& j, RallypointServerStatusReportConfiguration& p)
8416 {
8417 p.clear();
8418 getOptional<std::string>("fileName", p.fileName, j);
8419 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8420 getOptional<bool>("enabled", p.enabled, j, false);
8421 getOptional<bool>("includeLinks", p.includeLinks, j, false);
8422 getOptional<bool>("includePeerLinkDetails", p.includePeerLinkDetails, j, false);
8423 getOptional<bool>("includeClientLinkDetails", p.includeClientLinkDetails, j, false);
8424 getOptional<std::string>("runCmd", p.runCmd, j);
8425 }
8426
8427 //-----------------------------------------------------------
8428 JSON_SERIALIZED_CLASS(RallypointServerLinkGraph)
8430 {
8431 IMPLEMENT_JSON_SERIALIZATION()
8432 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLinkGraph)
8433
8434 public:
8436 std::string fileName;
8437
8440
8443
8446
8451
8453 std::string coreRpStyling;
8454
8456 std::string leafRpStyling;
8457
8459 std::string clientStyling;
8460
8462 std::string runCmd;
8463
8465 {
8466 clear();
8467 }
8468
8469 void clear()
8470 {
8471 fileName.clear();
8472 minRefreshSecs = 5;
8473 enabled = false;
8474 includeDigraphEnclosure = true;
8475 includeClients = false;
8476 coreRpStyling = "[shape=hexagon color=firebrick style=filled]";
8477 leafRpStyling = "[shape=box color=gray style=filled]";
8478 clientStyling.clear();
8479 runCmd.clear();
8480 }
8481 };
8482
8483 static void to_json(nlohmann::json& j, const RallypointServerLinkGraph& p)
8484 {
8485 j = nlohmann::json{
8486 TOJSON_IMPL(fileName),
8487 TOJSON_IMPL(minRefreshSecs),
8488 TOJSON_IMPL(enabled),
8489 TOJSON_IMPL(includeDigraphEnclosure),
8490 TOJSON_IMPL(includeClients),
8491 TOJSON_IMPL(coreRpStyling),
8492 TOJSON_IMPL(leafRpStyling),
8493 TOJSON_IMPL(clientStyling),
8494 TOJSON_IMPL(runCmd)
8495 };
8496 }
8497 static void from_json(const nlohmann::json& j, RallypointServerLinkGraph& p)
8498 {
8499 p.clear();
8500 getOptional<std::string>("fileName", p.fileName, j);
8501 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
8502 getOptional<bool>("enabled", p.enabled, j, false);
8503 getOptional<bool>("includeDigraphEnclosure", p.includeDigraphEnclosure, j, true);
8504 getOptional<bool>("includeClients", p.includeClients, j, false);
8505 getOptional<std::string>("coreRpStyling", p.coreRpStyling, j, "[shape=hexagon color=firebrick style=filled]");
8506 getOptional<std::string>("leafRpStyling", p.leafRpStyling, j, "[shape=box color=gray style=filled]");
8507 getOptional<std::string>("clientStyling", p.clientStyling, j);
8508 getOptional<std::string>("runCmd", p.runCmd, j);
8509 }
8510
8511
8512 //-----------------------------------------------------------
8513 JSON_SERIALIZED_CLASS(RallypointServerStreamStatsExport)
8522 {
8523 IMPLEMENT_JSON_SERIALIZATION()
8524 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerStreamStatsExport)
8525
8526 public:
8528 typedef enum
8529 {
8531 fmtCsv = 0,
8532
8534 fmtJson = 1
8535 } ExportFormat_t;
8536
8538 std::string fileName;
8539
8542
8545
8548
8550 std::string runCmd;
8551
8554
8555
8557 {
8558 clear();
8559 }
8560
8561 void clear()
8562 {
8563 fileName.clear();
8564 intervalSecs = 60;
8565 enabled = false;
8566 resetCountersAfterExport = false;
8567 runCmd.clear();
8568 format = fmtJson;
8569 }
8570 };
8571
8572 static void to_json(nlohmann::json& j, const RallypointServerStreamStatsExport& p)
8573 {
8574 j = nlohmann::json{
8575 TOJSON_IMPL(fileName),
8576 TOJSON_IMPL(intervalSecs),
8577 TOJSON_IMPL(enabled),
8578 TOJSON_IMPL(resetCountersAfterExport),
8579 TOJSON_IMPL(runCmd),
8580 TOJSON_IMPL(format)
8581 };
8582 }
8583 static void from_json(const nlohmann::json& j, RallypointServerStreamStatsExport& p)
8584 {
8585 p.clear();
8586 getOptional<std::string>("fileName", p.fileName, j);
8587 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8588 getOptional<bool>("enabled", p.enabled, j, false);
8589 getOptional<bool>("resetCountersAfterExport", p.resetCountersAfterExport, j, false);
8590 getOptional<std::string>("runCmd", p.runCmd, j);
8591 getOptional<RallypointServerStreamStatsExport::ExportFormat_t>("format", p.format, j, RallypointServerStreamStatsExport::ExportFormat_t::fmtCsv);
8592 }
8593
8594 //-----------------------------------------------------------
8595 JSON_SERIALIZED_CLASS(RallypointServerRouteMap)
8597 {
8598 IMPLEMENT_JSON_SERIALIZATION()
8599 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerRouteMap)
8600
8601 public:
8603 std::string fileName;
8604
8607
8610
8612 std::string runCmd;
8613
8615 {
8616 clear();
8617 }
8618
8619 void clear()
8620 {
8621 fileName.clear();
8622 minRefreshSecs = 5;
8623 enabled = false;
8624 }
8625 };
8626
8627 static void to_json(nlohmann::json& j, const RallypointServerRouteMap& p)
8628 {
8629 j = nlohmann::json{
8630 TOJSON_IMPL(fileName),
8631 TOJSON_IMPL(minRefreshSecs),
8632 TOJSON_IMPL(enabled),
8633 TOJSON_IMPL(runCmd)
8634 };
8635 }
8636 static void from_json(const nlohmann::json& j, RallypointServerRouteMap& p)
8637 {
8638 p.clear();
8639 getOptional<std::string>("fileName", p.fileName, j);
8640 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
8641 getOptional<bool>("enabled", p.enabled, j, false);
8642 getOptional<std::string>("runCmd", p.runCmd, j);
8643 }
8644
8645
8646 //-----------------------------------------------------------
8647 JSON_SERIALIZED_CLASS(ExternalHealthCheckResponder)
8658 {
8659 IMPLEMENT_JSON_SERIALIZATION()
8660 IMPLEMENT_JSON_DOCUMENTATION(ExternalHealthCheckResponder)
8661
8662 public:
8663
8666
8669
8671 {
8672 clear();
8673 }
8674
8675 void clear()
8676 {
8677 listenPort = 0;
8678 immediateClose = true;
8679 }
8680 };
8681
8682 static void to_json(nlohmann::json& j, const ExternalHealthCheckResponder& p)
8683 {
8684 j = nlohmann::json{
8685 TOJSON_IMPL(listenPort),
8686 TOJSON_IMPL(immediateClose)
8687 };
8688 }
8689 static void from_json(const nlohmann::json& j, ExternalHealthCheckResponder& p)
8690 {
8691 p.clear();
8692 getOptional<int>("listenPort", p.listenPort, j, 0);
8693 getOptional<bool>("immediateClose", p.immediateClose, j, true);
8694 }
8695
8696
8697 //-----------------------------------------------------------
8698 JSON_SERIALIZED_CLASS(PeeringConfiguration)
8707 {
8708 IMPLEMENT_JSON_SERIALIZATION()
8709 IMPLEMENT_JSON_DOCUMENTATION(PeeringConfiguration)
8710
8711 public:
8712
8714 std::string id;
8715
8718
8720 std::string comments;
8721
8723 std::vector<RallypointPeer> peers;
8724
8726 {
8727 clear();
8728 }
8729
8730 void clear()
8731 {
8732 id.clear();
8733 version = 0;
8734 comments.clear();
8735 }
8736 };
8737
8738 static void to_json(nlohmann::json& j, const PeeringConfiguration& p)
8739 {
8740 j = nlohmann::json{
8741 TOJSON_IMPL(id),
8742 TOJSON_IMPL(version),
8743 TOJSON_IMPL(comments),
8744 TOJSON_IMPL(peers)
8745 };
8746 }
8747 static void from_json(const nlohmann::json& j, PeeringConfiguration& p)
8748 {
8749 p.clear();
8750 getOptional<std::string>("id", p.id, j);
8751 getOptional<int>("version", p.version, j, 0);
8752 getOptional<std::string>("comments", p.comments, j);
8753 getOptional<std::vector<RallypointPeer>>("peers", p.peers, j);
8754 }
8755
8756 //-----------------------------------------------------------
8757 JSON_SERIALIZED_CLASS(IgmpSnooping)
8766 {
8767 IMPLEMENT_JSON_SERIALIZATION()
8768 IMPLEMENT_JSON_DOCUMENTATION(IgmpSnooping)
8769
8770 public:
8771
8774
8777
8780
8781
8782 IgmpSnooping()
8783 {
8784 clear();
8785 }
8786
8787 void clear()
8788 {
8789 enabled = false;
8790 queryIntervalMs = 125000;
8791 subscriptionTimeoutMs = 0;
8792 }
8793 };
8794
8795 static void to_json(nlohmann::json& j, const IgmpSnooping& p)
8796 {
8797 j = nlohmann::json{
8798 TOJSON_IMPL(enabled),
8799 TOJSON_IMPL(queryIntervalMs),
8800 TOJSON_IMPL(subscriptionTimeoutMs)
8801 };
8802 }
8803 static void from_json(const nlohmann::json& j, IgmpSnooping& p)
8804 {
8805 p.clear();
8806 getOptional<bool>("enabled", p.enabled, j);
8807 getOptional<int>("queryIntervalMs", p.queryIntervalMs, j, 125000);
8808 getOptional<int>("subscriptionTimeoutMs", p.subscriptionTimeoutMs, j, 0);
8809 }
8810
8811
8812 //-----------------------------------------------------------
8813 JSON_SERIALIZED_CLASS(RallypointReflector)
8821 {
8822 IMPLEMENT_JSON_SERIALIZATION()
8823 IMPLEMENT_JSON_DOCUMENTATION(RallypointReflector)
8824
8825 public:
8827 typedef enum
8828 {
8830 drNone = 0,
8831
8833 drRxOnly = 1,
8834
8836 drTxOnly = 2
8837 } DirectionRestriction_t;
8838
8842 std::string id;
8843
8846
8849
8852
8854 std::vector<NetworkAddress> additionalTx;
8855
8858
8860 {
8861 clear();
8862 }
8863
8864 void clear()
8865 {
8866 id.clear();
8867 rx.clear();
8868 tx.clear();
8869 multicastInterfaceName.clear();
8870 additionalTx.clear();
8871 directionRestriction = drNone;
8872 }
8873 };
8874
8875 static void to_json(nlohmann::json& j, const RallypointReflector& p)
8876 {
8877 j = nlohmann::json{
8878 TOJSON_IMPL(id),
8879 TOJSON_IMPL(rx),
8880 TOJSON_IMPL(tx),
8881 TOJSON_IMPL(multicastInterfaceName),
8882 TOJSON_IMPL(additionalTx),
8883 TOJSON_IMPL(directionRestriction)
8884 };
8885 }
8886 static void from_json(const nlohmann::json& j, RallypointReflector& p)
8887 {
8888 p.clear();
8889 j.at("id").get_to(p.id);
8890 j.at("rx").get_to(p.rx);
8891 j.at("tx").get_to(p.tx);
8892 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
8893 getOptional<std::vector<NetworkAddress>>("additionalTx", p.additionalTx, j);
8894 getOptional<RallypointReflector::DirectionRestriction_t>("directionRestriction", p.directionRestriction, j, RallypointReflector::DirectionRestriction_t::drNone);
8895 }
8896
8897
8898 //-----------------------------------------------------------
8899 JSON_SERIALIZED_CLASS(RallypointUdpStreamingIpvX)
8907 {
8908 IMPLEMENT_JSON_SERIALIZATION()
8909 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreamingIpvX)
8910
8911 public:
8914
8917
8919 {
8920 clear();
8921 }
8922
8923 void clear()
8924 {
8925 enabled = true;
8926 external.clear();
8927 }
8928 };
8929
8930 static void to_json(nlohmann::json& j, const RallypointUdpStreamingIpvX& p)
8931 {
8932 j = nlohmann::json{
8933 TOJSON_IMPL(enabled),
8934 TOJSON_IMPL(external)
8935 };
8936 }
8937 static void from_json(const nlohmann::json& j, RallypointUdpStreamingIpvX& p)
8938 {
8939 p.clear();
8940 getOptional<bool>("enabled", p.enabled, j, true);
8941 getOptional<NetworkAddress>("external", p.external, j);
8942 }
8943
8944 //-----------------------------------------------------------
8945 JSON_SERIALIZED_CLASS(RallypointUdpStreaming)
8953 {
8954 IMPLEMENT_JSON_SERIALIZATION()
8955 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreaming)
8956
8957 public:
8959 typedef enum
8960 {
8962 ctUnknown = 0,
8963
8965 ctSharedKeyAes256FullIv = 1,
8966
8968 ctSharedKeyAes256IdxIv = 2,
8969
8971 ctSharedKeyChaCha20FullIv = 3,
8972
8974 ctSharedKeyChaCha20IdxIv = 4
8975 } CryptoType_t;
8976
8979
8982
8985
8988
8991
8994
8997
8999 int ttl;
9000
9001
9003 {
9004 clear();
9005 }
9006
9007 void clear()
9008 {
9009 enabled = true;
9010 cryptoType = CryptoType_t::ctSharedKeyAes256FullIv;
9011 listenPort = 7444;
9012 ipv4.clear();
9013 ipv6.clear();
9014 keepaliveIntervalSecs = 15;
9015 priority = TxPriority_t::priVoice;
9016 ttl = 64;
9017 }
9018 };
9019
9020 static void to_json(nlohmann::json& j, const RallypointUdpStreaming& p)
9021 {
9022 j = nlohmann::json{
9023 TOJSON_IMPL(enabled),
9024 TOJSON_IMPL(cryptoType),
9025 TOJSON_IMPL(listenPort),
9026 TOJSON_IMPL(keepaliveIntervalSecs),
9027 TOJSON_IMPL(ipv4),
9028 TOJSON_IMPL(ipv6),
9029 TOJSON_IMPL(priority),
9030 TOJSON_IMPL(ttl)
9031 };
9032 }
9033 static void from_json(const nlohmann::json& j, RallypointUdpStreaming& p)
9034 {
9035 p.clear();
9036 getOptional<bool>("enabled", p.enabled, j, true);
9037 getOptional<RallypointUdpStreaming::CryptoType_t>("cryptoType", p.cryptoType, j, RallypointUdpStreaming::CryptoType_t::ctSharedKeyAes256FullIv);
9038 getOptional<int>("listenPort", p.listenPort, j, 7444);
9039 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
9040 getOptional<RallypointUdpStreamingIpvX>("ipv4", p.ipv4, j);
9041 getOptional<RallypointUdpStreamingIpvX>("ipv6", p.ipv6, j);
9042 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
9043 getOptional<int>("ttl", p.ttl, j, 64);
9044 }
9045
9046 //-----------------------------------------------------------
9047 JSON_SERIALIZED_CLASS(RallypointRpRtTimingBehavior)
9055 {
9056 IMPLEMENT_JSON_SERIALIZATION()
9057 IMPLEMENT_JSON_DOCUMENTATION(RallypointRpRtTimingBehavior)
9058
9059 public:
9061 typedef enum
9062 {
9065
9068
9071
9074
9076 btDrop = 99
9077 } BehaviorType_t;
9078
9081
9083 uint32_t atOrAboveMs;
9084
9086 std::string runCmd;
9087
9089 {
9090 clear();
9091 }
9092
9093 void clear()
9094 {
9095 behavior = btNone;
9096 atOrAboveMs = 0;
9097 runCmd.clear();
9098 }
9099 };
9100
9101 static void to_json(nlohmann::json& j, const RallypointRpRtTimingBehavior& p)
9102 {
9103 j = nlohmann::json{
9104 TOJSON_IMPL(behavior),
9105 TOJSON_IMPL(atOrAboveMs),
9106 TOJSON_IMPL(runCmd)
9107 };
9108 }
9109 static void from_json(const nlohmann::json& j, RallypointRpRtTimingBehavior& p)
9110 {
9111 p.clear();
9112 getOptional<RallypointRpRtTimingBehavior::BehaviorType_t>("behavior", p.behavior, j, RallypointRpRtTimingBehavior::BehaviorType_t::btNone);
9113 getOptional<uint32_t>("atOrAboveMs", p.atOrAboveMs, j, 0);
9114 getOptional<std::string>("runCmd", p.runCmd, j);
9115 }
9116
9117
9118 //-----------------------------------------------------------
9119 JSON_SERIALIZED_CLASS(RallypointWebsocketSettings)
9127 {
9128 IMPLEMENT_JSON_SERIALIZATION()
9129 IMPLEMENT_JSON_DOCUMENTATION(RallypointWebsocketSettings)
9130
9131 public:
9134
9137
9140
9143
9146
9148 {
9149 clear();
9150 }
9151
9152 void clear()
9153 {
9154 enabled = false;
9155 listenPort = 8443;
9156 certificate.clear();
9157 requireClientCertificate = false;
9158 requireTls = true;
9159 }
9160 };
9161
9162 static void to_json(nlohmann::json& j, const RallypointWebsocketSettings& p)
9163 {
9164 j = nlohmann::json{
9165 TOJSON_IMPL(enabled),
9166 TOJSON_IMPL(listenPort),
9167 TOJSON_IMPL(certificate),
9168 TOJSON_IMPL(requireClientCertificate),
9169 TOJSON_IMPL(requireTls)
9170 };
9171 }
9172 static void from_json(const nlohmann::json& j, RallypointWebsocketSettings& p)
9173 {
9174 p.clear();
9175 getOptional<bool>("enabled", p.enabled, j, false);
9176 getOptional<int>("listenPort", p.listenPort, j, 8443);
9177 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9178 getOptional<bool>("requireClientCertificate", p.requireClientCertificate, j, false);
9179 getOptional<bool>("requireTls", p.requireTls, j, true);
9180 }
9181
9182
9183
9184 //-----------------------------------------------------------
9185 JSON_SERIALIZED_CLASS(RallypointAdvertisingSettings)
9193 {
9194 IMPLEMENT_JSON_SERIALIZATION()
9195 IMPLEMENT_JSON_DOCUMENTATION(RallypointAdvertisingSettings)
9196
9197 public:
9200
9202 std::string hostName;
9203
9205 std::string serviceName;
9206
9208 std::string interfaceName;
9209
9211 int port;
9212
9214 int ttl;
9215
9217 {
9218 clear();
9219 }
9220
9221 void clear()
9222 {
9223 enabled = false;
9224 hostName.clear();
9225 serviceName = "_rallypoint._tcp.local.";
9226 interfaceName.clear();
9227 port = 0;
9228 ttl = 60;
9229 }
9230 };
9231
9232 static void to_json(nlohmann::json& j, const RallypointAdvertisingSettings& p)
9233 {
9234 j = nlohmann::json{
9235 TOJSON_IMPL(enabled),
9236 TOJSON_IMPL(hostName),
9237 TOJSON_IMPL(serviceName),
9238 TOJSON_IMPL(interfaceName),
9239 TOJSON_IMPL(port),
9240 TOJSON_IMPL(ttl)
9241 };
9242 }
9243 static void from_json(const nlohmann::json& j, RallypointAdvertisingSettings& p)
9244 {
9245 p.clear();
9246 getOptional<bool>("enabled", p.enabled, j, false);
9247 getOptional<std::string>("hostName", p.hostName, j);
9248 getOptional<std::string>("serviceName", p.serviceName, j, "_rallypoint._tcp.local.");
9249 getOptional<std::string>("interfaceName", p.interfaceName, j);
9250
9251 getOptional<int>("port", p.port, j, 0);
9252 getOptional<int>("ttl", p.ttl, j, 60);
9253 }
9254
9255
9256
9257
9258 //-----------------------------------------------------------
9259 JSON_SERIALIZED_CLASS(NamedIdentity)
9267 {
9268 IMPLEMENT_JSON_SERIALIZATION()
9269 IMPLEMENT_JSON_DOCUMENTATION(NamedIdentity)
9270
9271 public:
9273 std::string name;
9274
9277
9279 {
9280 clear();
9281 }
9282
9283 void clear()
9284 {
9285 name.clear();
9286 certificate.clear();
9287 }
9288 };
9289
9290 static void to_json(nlohmann::json& j, const NamedIdentity& p)
9291 {
9292 j = nlohmann::json{
9293 TOJSON_IMPL(name),
9294 TOJSON_IMPL(certificate)
9295 };
9296 }
9297 static void from_json(const nlohmann::json& j, NamedIdentity& p)
9298 {
9299 p.clear();
9300 getOptional<std::string>("name", p.name, j);
9301 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9302 }
9303
9304 //-----------------------------------------------------------
9305 JSON_SERIALIZED_CLASS(RallypointExtendedGroupRestriction)
9313 {
9314 IMPLEMENT_JSON_SERIALIZATION()
9315 IMPLEMENT_JSON_DOCUMENTATION(RallypointExtendedGroupRestriction)
9316
9317 public:
9319 std::string id;
9320
9322 std::vector<StringRestrictionList> restrictions;
9323
9325 {
9326 clear();
9327 }
9328
9329 void clear()
9330 {
9331 id.clear();
9332 restrictions.clear();
9333 }
9334 };
9335
9336 static void to_json(nlohmann::json& j, const RallypointExtendedGroupRestriction& p)
9337 {
9338 j = nlohmann::json{
9339 TOJSON_IMPL(id),
9340 TOJSON_IMPL(restrictions)
9341 };
9342 }
9343 static void from_json(const nlohmann::json& j, RallypointExtendedGroupRestriction& p)
9344 {
9345 p.clear();
9346 getOptional<std::string>("id", p.id, j);
9347 getOptional<std::vector<StringRestrictionList>>("restrictions", p.restrictions, j);
9348 }
9349
9350
9351 //-----------------------------------------------------------
9352 JSON_SERIALIZED_CLASS(RallypointServer)
9362 {
9363 IMPLEMENT_JSON_SERIALIZATION()
9364 IMPLEMENT_JSON_DOCUMENTATION(RallypointServer)
9365
9366 public:
9367 typedef enum
9368 {
9369 sptDefault = 0,
9370 sptCertificate = 1,
9371 sptCertPublicKey = 2,
9372 sptCertSubject = 3,
9373 sptCertIssuer = 4,
9374 sptCertFingerprint = 5,
9375 sptCertSerial = 6,
9376 sptSubjectC = 7,
9377 sptSubjectST = 8,
9378 sptSubjectL = 9,
9379 sptSubjectO = 10,
9380 sptSubjectOU = 11,
9381 sptSubjectCN = 12,
9382 sptIssuerC = 13,
9383 sptIssuerST = 14,
9384 sptIssuerL = 15,
9385 sptIssuerO = 16,
9386 sptIssuerOU = 17,
9387 sptIssuerCN = 18
9388 } StreamIdPrivacyType_t;
9389
9391 StreamIdPrivacyType_t streamIdPrivacyType;
9392
9395
9398
9400 std::string id;
9401
9403 std::string name;
9404
9407
9410
9412 std::string interfaceName;
9413
9416
9419
9422
9425
9428
9431
9434
9437
9440
9443
9446
9449
9452
9455
9458
9461
9463 PeeringConfiguration peeringConfiguration; // NOTE: This is NOT serialized
9464
9467
9470
9473
9476
9478 std::vector<RallypointReflector> staticReflectors;
9479
9482
9485
9488
9491
9494
9497
9499 std::vector<RallypointExtendedGroupRestriction> extendedGroupRestrictions;
9500
9503
9506
9509
9512
9514 uint32_t sysFlags;
9515
9518
9521
9524
9527
9530
9533
9536
9539
9541 std::vector<RallypointRpRtTimingBehavior> peerRtBehaviors;
9542
9545
9548
9551
9554
9557
9559 std::string domainName;
9560
9562 std::vector<std::string> allowedDomains;
9563
9565 std::vector<std::string> blockedDomains;
9566
9568 std::vector<std::string> extraDomains;
9569
9572
9574 std::vector<NamedIdentity> additionalIdentities;
9575
9577 {
9578 clear();
9579 }
9580
9581 void clear()
9582 {
9583 fipsCrypto.clear();
9584 watchdog.clear();
9585 id.clear();
9586 name.clear();
9587 listenPort = 7443;
9588 interfaceName.clear();
9589 certificate.clear();
9590 allowMulticastForwarding = false;
9591 peeringConfiguration.clear();
9592 peeringConfigurationFileName.clear();
9593 peeringConfigurationFileCommand.clear();
9594 peeringConfigurationFileCheckSecs = 60;
9595 ioPools = -1;
9596 statusReport.clear();
9597 limits.clear();
9598 linkGraph.clear();
9599 externalHealthCheckResponder.clear();
9600 allowPeerForwarding = false;
9601 multicastInterfaceName.clear();
9602 tls.clear();
9603 discovery.clear();
9604 forwardDiscoveredGroups = false;
9605 forwardMulticastAddressing = false;
9606 isMeshLeaf = false;
9607 disableMessageSigning = false;
9608 multicastRestrictions.clear();
9609 igmpSnooping.clear();
9610 staticReflectors.clear();
9611 tcpTxOptions.clear();
9612 multicastTxOptions.clear();
9613 certStoreFileName.clear();
9614 certStorePasswordHex.clear();
9615 groupRestrictions.clear();
9616 configurationCheckSignalName = "rts.7b392d1.${id}";
9617 licensing.clear();
9618 featureset.clear();
9619 udpStreaming.clear();
9620 sysFlags = 0;
9621 normalTaskQueueBias = 0;
9622 enableLeafReflectionReverseSubscription = false;
9623 disableLoopDetection = false;
9624 maxSecurityLevel = 0;
9625 routeMap.clear();
9626 streamStatsExport.clear();
9627 maxOutboundPeerConnectionIntervalDeltaSecs = 15;
9628 peerRtTestIntervalMs = 60000;
9629 peerRtBehaviors.clear();
9630 websocket.clear();
9631 nsm.clear();
9632 advertising.clear();
9633 extendedGroupRestrictions.clear();
9634 groupRestrictionAccessPolicyType = GroupRestrictionAccessPolicyType_t::graptPermissive;
9635 ipFamily = IpFamilyType_t::ifIp4;
9636 rxCapture.clear();
9637 txCapture.clear();
9638 domainName.clear();
9639 allowedDomains.clear();
9640 blockedDomains.clear();
9641 extraDomains.clear();
9642 tuning.clear();
9643 additionalIdentities.clear();
9644 streamIdPrivacyType = StreamIdPrivacyType_t::sptDefault;
9645 }
9646 };
9647
9648 static void to_json(nlohmann::json& j, const RallypointServer& p)
9649 {
9650 j = nlohmann::json{
9651 TOJSON_IMPL(fipsCrypto),
9652 TOJSON_IMPL(watchdog),
9653 TOJSON_IMPL(id),
9654 TOJSON_IMPL(name),
9655 TOJSON_IMPL(listenPort),
9656 TOJSON_IMPL(interfaceName),
9657 TOJSON_IMPL(certificate),
9658 TOJSON_IMPL(allowMulticastForwarding),
9659 // TOJSON_IMPL(peeringConfiguration), // NOTE: Not serialized!
9660 TOJSON_IMPL(peeringConfigurationFileName),
9661 TOJSON_IMPL(peeringConfigurationFileCommand),
9662 TOJSON_IMPL(peeringConfigurationFileCheckSecs),
9663 TOJSON_IMPL(ioPools),
9664 TOJSON_IMPL(statusReport),
9665 TOJSON_IMPL(limits),
9666 TOJSON_IMPL(linkGraph),
9667 TOJSON_IMPL(externalHealthCheckResponder),
9668 TOJSON_IMPL(allowPeerForwarding),
9669 TOJSON_IMPL(multicastInterfaceName),
9670 TOJSON_IMPL(tls),
9671 TOJSON_IMPL(discovery),
9672 TOJSON_IMPL(forwardDiscoveredGroups),
9673 TOJSON_IMPL(forwardMulticastAddressing),
9674 TOJSON_IMPL(isMeshLeaf),
9675 TOJSON_IMPL(disableMessageSigning),
9676 TOJSON_IMPL(multicastRestrictions),
9677 TOJSON_IMPL(igmpSnooping),
9678 TOJSON_IMPL(staticReflectors),
9679 TOJSON_IMPL(tcpTxOptions),
9680 TOJSON_IMPL(multicastTxOptions),
9681 TOJSON_IMPL(certStoreFileName),
9682 TOJSON_IMPL(certStorePasswordHex),
9683 TOJSON_IMPL(groupRestrictions),
9684 TOJSON_IMPL(configurationCheckSignalName),
9685 TOJSON_IMPL(featureset),
9686 TOJSON_IMPL(licensing),
9687 TOJSON_IMPL(udpStreaming),
9688 TOJSON_IMPL(sysFlags),
9689 TOJSON_IMPL(normalTaskQueueBias),
9690 TOJSON_IMPL(enableLeafReflectionReverseSubscription),
9691 TOJSON_IMPL(disableLoopDetection),
9692 TOJSON_IMPL(maxSecurityLevel),
9693 TOJSON_IMPL(routeMap),
9694 TOJSON_IMPL(streamStatsExport),
9695 TOJSON_IMPL(maxOutboundPeerConnectionIntervalDeltaSecs),
9696 TOJSON_IMPL(peerRtTestIntervalMs),
9697 TOJSON_IMPL(peerRtBehaviors),
9698 TOJSON_IMPL(websocket),
9699 TOJSON_IMPL(nsm),
9700 TOJSON_IMPL(advertising),
9701 TOJSON_IMPL(extendedGroupRestrictions),
9702 TOJSON_IMPL(groupRestrictionAccessPolicyType),
9703 TOJSON_IMPL(ipFamily),
9704 TOJSON_IMPL(rxCapture),
9705 TOJSON_IMPL(txCapture),
9706 TOJSON_IMPL(domainName),
9707 TOJSON_IMPL(allowedDomains),
9708 TOJSON_IMPL(blockedDomains),
9709 TOJSON_IMPL(extraDomains),
9710 TOJSON_IMPL(tuning),
9711 TOJSON_IMPL(additionalIdentities),
9712 TOJSON_IMPL(streamIdPrivacyType)
9713 };
9714 }
9715 static void from_json(const nlohmann::json& j, RallypointServer& p)
9716 {
9717 p.clear();
9718 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
9719 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
9720 getOptional<std::string>("id", p.id, j);
9721 getOptional<std::string>("name", p.name, j);
9722 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9723 getOptional<std::string>("interfaceName", p.interfaceName, j);
9724 getOptional<int>("listenPort", p.listenPort, j, 7443);
9725 getOptional<bool>("allowMulticastForwarding", p.allowMulticastForwarding, j, false);
9726 //getOptional<PeeringConfiguration>("peeringConfiguration", p.peeringConfiguration, j); // NOTE: Not serialized!
9727 getOptional<std::string>("peeringConfigurationFileName", p.peeringConfigurationFileName, j);
9728 getOptional<std::string>("peeringConfigurationFileCommand", p.peeringConfigurationFileCommand, j);
9729 getOptional<int>("peeringConfigurationFileCheckSecs", p.peeringConfigurationFileCheckSecs, j, 60);
9730 getOptional<int>("ioPools", p.ioPools, j, -1);
9731 getOptional<RallypointServerStatusReportConfiguration>("statusReport", p.statusReport, j);
9732 getOptional<RallypointServerLimits>("limits", p.limits, j);
9733 getOptional<RallypointServerLinkGraph>("linkGraph", p.linkGraph, j);
9734 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
9735 getOptional<bool>("allowPeerForwarding", p.allowPeerForwarding, j, false);
9736 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
9737 getOptional<Tls>("tls", p.tls, j);
9738 getOptional<DiscoveryConfiguration>("discovery", p.discovery, j);
9739 getOptional<bool>("forwardDiscoveredGroups", p.forwardDiscoveredGroups, j, false);
9740 getOptional<bool>("forwardMulticastAddressing", p.forwardMulticastAddressing, j, false);
9741 getOptional<bool>("isMeshLeaf", p.isMeshLeaf, j, false);
9742 getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
9743 getOptional<NetworkAddressRestrictionList>("multicastRestrictions", p.multicastRestrictions, j);
9744 getOptional<IgmpSnooping>("igmpSnooping", p.igmpSnooping, j);
9745 getOptional<std::vector<RallypointReflector>>("staticReflectors", p.staticReflectors, j);
9746 getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
9747 getOptional<NetworkTxOptions>("multicastTxOptions", p.multicastTxOptions, j);
9748 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
9749 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
9750 getOptional<StringRestrictionList>("groupRestrictions", p.groupRestrictions, j);
9751 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.7b392d1.${id}");
9752 getOptional<Licensing>("licensing", p.licensing, j);
9753 getOptional<Featureset>("featureset", p.featureset, j);
9754 getOptional<RallypointUdpStreaming>("udpStreaming", p.udpStreaming, j);
9755 getOptional<uint32_t>("sysFlags", p.sysFlags, j, 0);
9756 getOptional<uint32_t>("normalTaskQueueBias", p.normalTaskQueueBias, j, 0);
9757 getOptional<bool>("enableLeafReflectionReverseSubscription", p.enableLeafReflectionReverseSubscription, j, false);
9758 getOptional<bool>("disableLoopDetection", p.disableLoopDetection, j, false);
9759 getOptional<uint32_t>("maxSecurityLevel", p.maxSecurityLevel, j, 0);
9760 getOptional<RallypointServerRouteMap>("routeMap", p.routeMap, j);
9761 getOptional<RallypointServerStreamStatsExport>("streamStatsExport", p.streamStatsExport, j);
9762 getOptional<uint32_t>("maxOutboundPeerConnectionIntervalDeltaSecs", p.maxOutboundPeerConnectionIntervalDeltaSecs, j, 15);
9763 getOptional<int>("peerRtTestIntervalMs", p.peerRtTestIntervalMs, j, 60000);
9764 getOptional<std::vector<RallypointRpRtTimingBehavior>>("peerRtBehaviors", p.peerRtBehaviors, j);
9765 getOptional<RallypointWebsocketSettings>("websocket", p.websocket, j);
9766 getOptional<NsmConfiguration>("nsm", p.nsm, j);
9767 getOptional<RallypointAdvertisingSettings>("advertising", p.advertising, j);
9768 getOptional<std::vector<RallypointExtendedGroupRestriction>>("extendedGroupRestrictions", p.extendedGroupRestrictions, j);
9769 getOptional<GroupRestrictionAccessPolicyType_t>("groupRestrictionAccessPolicyType", p.groupRestrictionAccessPolicyType, j, GroupRestrictionAccessPolicyType_t::graptPermissive);
9770 getOptional<IpFamilyType_t>("ipFamily", p.ipFamily, j, IpFamilyType_t::ifIp4);
9771 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
9772 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
9773 getOptional<std::string>("domainName", p.domainName, j);
9774 getOptional<std::vector<std::string>>("allowedDomains", p.allowedDomains, j);
9775 getOptional<std::vector<std::string>>("blockedDomains", p.blockedDomains, j);
9776 getOptional<std::vector<std::string>>("extraDomains", p.extraDomains, j);
9777 getOptional<TuningSettings>("tuning", p.tuning, j);
9778 getOptional<std::vector<NamedIdentity>>("additionalIdentities", p.additionalIdentities, j);
9779 getOptional<RallypointServer::StreamIdPrivacyType_t>("streamIdPrivacyType", p.streamIdPrivacyType, j, RallypointServer::StreamIdPrivacyType_t::sptDefault);
9780 }
9781
9782 //-----------------------------------------------------------
9783 JSON_SERIALIZED_CLASS(PlatformDiscoveredService)
9794 {
9795 IMPLEMENT_JSON_SERIALIZATION()
9796 IMPLEMENT_JSON_DOCUMENTATION(PlatformDiscoveredService)
9797
9798 public:
9799
9801 std::string id;
9802
9804 std::string type;
9805
9807 std::string name;
9808
9811
9813 std::string uri;
9814
9817
9819 {
9820 clear();
9821 }
9822
9823 void clear()
9824 {
9825 id.clear();
9826 type.clear();
9827 name.clear();
9828 address.clear();
9829 uri.clear();
9830 configurationVersion = 0;
9831 }
9832 };
9833
9834 static void to_json(nlohmann::json& j, const PlatformDiscoveredService& p)
9835 {
9836 j = nlohmann::json{
9837 TOJSON_IMPL(id),
9838 TOJSON_IMPL(type),
9839 TOJSON_IMPL(name),
9840 TOJSON_IMPL(address),
9841 TOJSON_IMPL(uri),
9842 TOJSON_IMPL(configurationVersion)
9843 };
9844 }
9845 static void from_json(const nlohmann::json& j, PlatformDiscoveredService& p)
9846 {
9847 p.clear();
9848 getOptional<std::string>("id", p.id, j);
9849 getOptional<std::string>("type", p.type, j);
9850 getOptional<std::string>("name", p.name, j);
9851 getOptional<NetworkAddress>("address", p.address, j);
9852 getOptional<std::string>("uri", p.uri, j);
9853 getOptional<uint32_t>("configurationVersion", p.configurationVersion, j, 0);
9854 }
9855
9856
9857 //-----------------------------------------------------------
9859 {
9860 public:
9861 typedef enum
9862 {
9863 etUndefined = 0,
9864 etAudio = 1,
9865 etLocation = 2,
9866 etUser = 3
9867 } EventType_t;
9868
9869 typedef enum
9870 {
9871 dNone = 0,
9872 dInbound = 1,
9873 dOutbound = 2,
9874 dBoth = 3,
9875 dUndefined = 4,
9876 } Direction_t;
9877 };
9878
9879
9880 //-----------------------------------------------------------
9881 JSON_SERIALIZED_CLASS(TimelineQueryParameters)
9892 {
9893 IMPLEMENT_JSON_SERIALIZATION()
9894 IMPLEMENT_JSON_DOCUMENTATION(TimelineQueryParameters)
9895
9896 public:
9897
9900
9903
9906
9909
9912
9915
9918
9920 std::string onlyAlias;
9921
9923 std::string onlyNodeId;
9924
9927
9929 std::string sql;
9930
9932 {
9933 clear();
9934 }
9935
9936 void clear()
9937 {
9938 maxCount = 50;
9939 mostRecentFirst = true;
9940 startedOnOrAfter = 0;
9941 endedOnOrBefore = 0;
9942 onlyDirection = 0;
9943 onlyType = 0;
9944 onlyCommitted = true;
9945 onlyAlias.clear();
9946 onlyNodeId.clear();
9947 sql.clear();
9948 onlyTxId = 0;
9949 }
9950 };
9951
9952 static void to_json(nlohmann::json& j, const TimelineQueryParameters& p)
9953 {
9954 j = nlohmann::json{
9955 TOJSON_IMPL(maxCount),
9956 TOJSON_IMPL(mostRecentFirst),
9957 TOJSON_IMPL(startedOnOrAfter),
9958 TOJSON_IMPL(endedOnOrBefore),
9959 TOJSON_IMPL(onlyDirection),
9960 TOJSON_IMPL(onlyType),
9961 TOJSON_IMPL(onlyCommitted),
9962 TOJSON_IMPL(onlyAlias),
9963 TOJSON_IMPL(onlyNodeId),
9964 TOJSON_IMPL(onlyTxId),
9965 TOJSON_IMPL(sql)
9966 };
9967 }
9968 static void from_json(const nlohmann::json& j, TimelineQueryParameters& p)
9969 {
9970 p.clear();
9971 getOptional<long>("maxCount", p.maxCount, j, 50);
9972 getOptional<bool>("mostRecentFirst", p.mostRecentFirst, j, false);
9973 getOptional<uint64_t>("startedOnOrAfter", p.startedOnOrAfter, j, 0);
9974 getOptional<uint64_t>("endedOnOrBefore", p.endedOnOrBefore, j, 0);
9975 getOptional<int>("onlyDirection", p.onlyDirection, j, 0);
9976 getOptional<int>("onlyType", p.onlyType, j, 0);
9977 getOptional<bool>("onlyCommitted", p.onlyCommitted, j, true);
9978 getOptional<std::string>("onlyAlias", p.onlyAlias, j, EMPTY_STRING);
9979 getOptional<std::string>("onlyNodeId", p.onlyNodeId, j, EMPTY_STRING);
9980 getOptional<int>("onlyTxId", p.onlyTxId, j, 0);
9981 getOptional<std::string>("sql", p.sql, j, EMPTY_STRING);
9982 }
9983
9984 //-----------------------------------------------------------
9985 JSON_SERIALIZED_CLASS(CertStoreCertificate)
9993 {
9994 IMPLEMENT_JSON_SERIALIZATION()
9995 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificate)
9996
9997 public:
9999 std::string id;
10000
10002 std::string certificatePem;
10003
10005 std::string privateKeyPem;
10006
10009
10011 std::string tags;
10012
10014 {
10015 clear();
10016 }
10017
10018 void clear()
10019 {
10020 id.clear();
10021 certificatePem.clear();
10022 privateKeyPem.clear();
10023 internalData = nullptr;
10024 tags.clear();
10025 }
10026 };
10027
10028 static void to_json(nlohmann::json& j, const CertStoreCertificate& p)
10029 {
10030 j = nlohmann::json{
10031 TOJSON_IMPL(id),
10032 TOJSON_IMPL(certificatePem),
10033 TOJSON_IMPL(privateKeyPem),
10034 TOJSON_IMPL(tags)
10035 };
10036 }
10037 static void from_json(const nlohmann::json& j, CertStoreCertificate& p)
10038 {
10039 p.clear();
10040 j.at("id").get_to(p.id);
10041 j.at("certificatePem").get_to(p.certificatePem);
10042 getOptional<std::string>("privateKeyPem", p.privateKeyPem, j, EMPTY_STRING);
10043 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
10044 }
10045
10046 //-----------------------------------------------------------
10047 JSON_SERIALIZED_CLASS(CertStore)
10055 {
10056 IMPLEMENT_JSON_SERIALIZATION()
10057 IMPLEMENT_JSON_DOCUMENTATION(CertStore)
10058
10059 public:
10061 std::string id;
10062
10064 std::vector<CertStoreCertificate> certificates;
10065
10067 std::vector<KvPair> kvp;
10068
10069 CertStore()
10070 {
10071 clear();
10072 }
10073
10074 void clear()
10075 {
10076 id.clear();
10077 certificates.clear();
10078 kvp.clear();
10079 }
10080 };
10081
10082 static void to_json(nlohmann::json& j, const CertStore& p)
10083 {
10084 j = nlohmann::json{
10085 TOJSON_IMPL(id),
10086 TOJSON_IMPL(certificates),
10087 TOJSON_IMPL(kvp)
10088 };
10089 }
10090 static void from_json(const nlohmann::json& j, CertStore& p)
10091 {
10092 p.clear();
10093 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10094 getOptional<std::vector<CertStoreCertificate>>("certificates", p.certificates, j);
10095 getOptional<std::vector<KvPair>>("kvp", p.kvp, j);
10096 }
10097
10098 //-----------------------------------------------------------
10099 JSON_SERIALIZED_CLASS(CertStoreCertificateElement)
10107 {
10108 IMPLEMENT_JSON_SERIALIZATION()
10109 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificateElement)
10110
10111 public:
10113 std::string id;
10114
10117
10119 std::string certificatePem;
10120
10122 std::string tags;
10123
10125 {
10126 clear();
10127 }
10128
10129 void clear()
10130 {
10131 id.clear();
10132 hasPrivateKey = false;
10133 tags.clear();
10134 }
10135 };
10136
10137 static void to_json(nlohmann::json& j, const CertStoreCertificateElement& p)
10138 {
10139 j = nlohmann::json{
10140 TOJSON_IMPL(id),
10141 TOJSON_IMPL(hasPrivateKey),
10142 TOJSON_IMPL(tags)
10143 };
10144
10145 if(!p.certificatePem.empty())
10146 {
10147 j["certificatePem"] = p.certificatePem;
10148 }
10149 }
10150 static void from_json(const nlohmann::json& j, CertStoreCertificateElement& p)
10151 {
10152 p.clear();
10153 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10154 getOptional<bool>("hasPrivateKey", p.hasPrivateKey, j, false);
10155 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
10156 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
10157 }
10158
10159 //-----------------------------------------------------------
10160 JSON_SERIALIZED_CLASS(CertStoreDescriptor)
10168 {
10169 IMPLEMENT_JSON_SERIALIZATION()
10170 IMPLEMENT_JSON_DOCUMENTATION(CertStoreDescriptor)
10171
10172 public:
10174 std::string id;
10175
10177 std::string fileName;
10178
10181
10184
10186 std::vector<CertStoreCertificateElement> certificates;
10187
10189 std::vector<KvPair> kvp;
10190
10192 {
10193 clear();
10194 }
10195
10196 void clear()
10197 {
10198 id.clear();
10199 fileName.clear();
10200 version = 0;
10201 flags = 0;
10202 certificates.clear();
10203 kvp.clear();
10204 }
10205 };
10206
10207 static void to_json(nlohmann::json& j, const CertStoreDescriptor& p)
10208 {
10209 j = nlohmann::json{
10210 TOJSON_IMPL(id),
10211 TOJSON_IMPL(fileName),
10212 TOJSON_IMPL(version),
10213 TOJSON_IMPL(flags),
10214 TOJSON_IMPL(certificates),
10215 TOJSON_IMPL(kvp)
10216 };
10217 }
10218 static void from_json(const nlohmann::json& j, CertStoreDescriptor& p)
10219 {
10220 p.clear();
10221 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10222 getOptional<std::string>("fileName", p.fileName, j, EMPTY_STRING);
10223 getOptional<int>("version", p.version, j, 0);
10224 getOptional<int>("flags", p.flags, j, 0);
10225 getOptional<std::vector<CertStoreCertificateElement>>("certificates", p.certificates, j);
10226 getOptional<std::vector<KvPair>>("kvp", p.kvp, j);
10227 }
10228
10229 //-----------------------------------------------------------
10230 JSON_SERIALIZED_CLASS(CertificateSubjectElement)
10238 {
10239 IMPLEMENT_JSON_SERIALIZATION()
10240 IMPLEMENT_JSON_DOCUMENTATION(CertificateSubjectElement)
10241
10242 public:
10244 std::string name;
10245
10247 std::string value;
10248
10250 {
10251 clear();
10252 }
10253
10254 void clear()
10255 {
10256 name.clear();
10257 value.clear();
10258 }
10259 };
10260
10261 static void to_json(nlohmann::json& j, const CertificateSubjectElement& p)
10262 {
10263 j = nlohmann::json{
10264 TOJSON_IMPL(name),
10265 TOJSON_IMPL(value)
10266 };
10267 }
10268 static void from_json(const nlohmann::json& j, CertificateSubjectElement& p)
10269 {
10270 p.clear();
10271 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
10272 getOptional<std::string>("value", p.value, j, EMPTY_STRING);
10273 }
10274
10275
10276 //-----------------------------------------------------------
10277 JSON_SERIALIZED_CLASS(CertificateDescriptor)
10285 {
10286 IMPLEMENT_JSON_SERIALIZATION()
10287 IMPLEMENT_JSON_DOCUMENTATION(CertificateDescriptor)
10288
10289 public:
10291 std::string subject;
10292
10294 std::string issuer;
10295
10298
10301
10303 std::string notBefore;
10304
10306 std::string notAfter;
10307
10309 std::string serial;
10310
10312 std::string fingerprint;
10313
10315 std::vector<CertificateSubjectElement> subjectElements;
10316
10318 std::vector<CertificateSubjectElement> issuerElements;
10319
10321 std::string certificatePem;
10322
10324 std::string publicKeyPem;
10325
10327 {
10328 clear();
10329 }
10330
10331 void clear()
10332 {
10333 subject.clear();
10334 issuer.clear();
10335 selfSigned = false;
10336 version = 0;
10337 notBefore.clear();
10338 notAfter.clear();
10339 serial.clear();
10340 fingerprint.clear();
10341 subjectElements.clear();
10342 issuerElements.clear();
10343 certificatePem.clear();
10344 publicKeyPem.clear();
10345 }
10346 };
10347
10348 static void to_json(nlohmann::json& j, const CertificateDescriptor& p)
10349 {
10350 j = nlohmann::json{
10351 TOJSON_IMPL(subject),
10352 TOJSON_IMPL(issuer),
10353 TOJSON_IMPL(selfSigned),
10354 TOJSON_IMPL(version),
10355 TOJSON_IMPL(notBefore),
10356 TOJSON_IMPL(notAfter),
10357 TOJSON_IMPL(serial),
10358 TOJSON_IMPL(fingerprint),
10359 TOJSON_IMPL(subjectElements),
10360 TOJSON_IMPL(issuerElements),
10361 TOJSON_IMPL(certificatePem),
10362 TOJSON_IMPL(publicKeyPem)
10363 };
10364 }
10365 static void from_json(const nlohmann::json& j, CertificateDescriptor& p)
10366 {
10367 p.clear();
10368 getOptional<std::string>("subject", p.subject, j, EMPTY_STRING);
10369 getOptional<std::string>("issuer", p.issuer, j, EMPTY_STRING);
10370 getOptional<bool>("selfSigned", p.selfSigned, j, false);
10371 getOptional<int>("version", p.version, j, 0);
10372 getOptional<std::string>("notBefore", p.notBefore, j, EMPTY_STRING);
10373 getOptional<std::string>("notAfter", p.notAfter, j, EMPTY_STRING);
10374 getOptional<std::string>("serial", p.serial, j, EMPTY_STRING);
10375 getOptional<std::string>("fingerprint", p.fingerprint, j, EMPTY_STRING);
10376 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
10377 getOptional<std::string>("publicKeyPem", p.publicKeyPem, j, EMPTY_STRING);
10378 getOptional<std::vector<CertificateSubjectElement>>("subjectElements", p.subjectElements, j);
10379 getOptional<std::vector<CertificateSubjectElement>>("issuerElements", p.issuerElements, j);
10380 }
10381
10382
10383 //-----------------------------------------------------------
10384 JSON_SERIALIZED_CLASS(RiffDescriptor)
10395 {
10396 IMPLEMENT_JSON_SERIALIZATION()
10397 IMPLEMENT_JSON_DOCUMENTATION(RiffDescriptor)
10398
10399 public:
10401 std::string file;
10402
10405
10408
10411
10413 std::string meta;
10414
10416 std::string certPem;
10417
10420
10422 std::string signature;
10423
10425 {
10426 clear();
10427 }
10428
10429 void clear()
10430 {
10431 file.clear();
10432 verified = false;
10433 channels = 0;
10434 sampleCount = 0;
10435 meta.clear();
10436 certPem.clear();
10437 certDescriptor.clear();
10438 signature.clear();
10439 }
10440 };
10441
10442 static void to_json(nlohmann::json& j, const RiffDescriptor& p)
10443 {
10444 j = nlohmann::json{
10445 TOJSON_IMPL(file),
10446 TOJSON_IMPL(verified),
10447 TOJSON_IMPL(channels),
10448 TOJSON_IMPL(sampleCount),
10449 TOJSON_IMPL(meta),
10450 TOJSON_IMPL(certPem),
10451 TOJSON_IMPL(certDescriptor),
10452 TOJSON_IMPL(signature)
10453 };
10454 }
10455
10456 static void from_json(const nlohmann::json& j, RiffDescriptor& p)
10457 {
10458 p.clear();
10459 FROMJSON_IMPL(file, std::string, EMPTY_STRING);
10460 FROMJSON_IMPL(verified, bool, false);
10461 FROMJSON_IMPL(channels, int, 0);
10462 FROMJSON_IMPL(sampleCount, int, 0);
10463 FROMJSON_IMPL(meta, std::string, EMPTY_STRING);
10464 FROMJSON_IMPL(certPem, std::string, EMPTY_STRING);
10465 getOptional<CertificateDescriptor>("certDescriptor", p.certDescriptor, j);
10466 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
10467 }
10468
10469
10470 //-----------------------------------------------------------
10471 JSON_SERIALIZED_CLASS(BridgeCreationDetail)
10479 {
10480 IMPLEMENT_JSON_SERIALIZATION()
10481 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(BridgeCreationDetail)
10482 IMPLEMENT_JSON_DOCUMENTATION(BridgeCreationDetail)
10483
10484 public:
10486 typedef enum
10487 {
10489 csUndefined = 0,
10490
10492 csOk = 1,
10493
10495 csNoJson = -1,
10496
10498 csAlreadyExists = -3,
10499
10501 csInvalidConfiguration = -4,
10502
10504 csInvalidJson = -5,
10505
10507 csInsufficientGroups = -6,
10508
10510 csTooManyGroups = -7,
10511
10513 csDuplicateGroup = -8,
10514
10516 csLocalLoopDetected = -9,
10517 } CreationStatus_t;
10518
10520 std::string id;
10521
10524
10526 {
10527 clear();
10528 }
10529
10530 void clear()
10531 {
10532 id.clear();
10533 status = csUndefined;
10534 }
10535 };
10536
10537 static void to_json(nlohmann::json& j, const BridgeCreationDetail& p)
10538 {
10539 j = nlohmann::json{
10540 TOJSON_IMPL(id),
10541 TOJSON_IMPL(status)
10542 };
10543 }
10544 static void from_json(const nlohmann::json& j, BridgeCreationDetail& p)
10545 {
10546 p.clear();
10547 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10548 getOptional<BridgeCreationDetail::CreationStatus_t>("status", p.status, j, BridgeCreationDetail::CreationStatus_t::csUndefined);
10549 }
10550 //-----------------------------------------------------------
10551 JSON_SERIALIZED_CLASS(GroupConnectionDetail)
10559 {
10560 IMPLEMENT_JSON_SERIALIZATION()
10561 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupConnectionDetail)
10562 IMPLEMENT_JSON_DOCUMENTATION(GroupConnectionDetail)
10563
10564 public:
10566 typedef enum
10567 {
10569 ctUndefined = 0,
10570
10572 ctDirectDatagram = 1,
10573
10575 ctRallypoint = 2
10576 } ConnectionType_t;
10577
10579 std::string id;
10580
10583
10585 std::string peer;
10586
10589
10591 std::string reason;
10592
10594 {
10595 clear();
10596 }
10597
10598 void clear()
10599 {
10600 id.clear();
10601 connectionType = ctUndefined;
10602 peer.clear();
10603 asFailover = false;
10604 reason.clear();
10605 }
10606 };
10607
10608 static void to_json(nlohmann::json& j, const GroupConnectionDetail& p)
10609 {
10610 j = nlohmann::json{
10611 TOJSON_IMPL(id),
10612 TOJSON_IMPL(connectionType),
10613 TOJSON_IMPL(peer),
10614 TOJSON_IMPL(asFailover),
10615 TOJSON_IMPL(reason)
10616 };
10617
10618 if(p.asFailover)
10619 {
10620 j["asFailover"] = p.asFailover;
10621 }
10622 }
10623 static void from_json(const nlohmann::json& j, GroupConnectionDetail& p)
10624 {
10625 p.clear();
10626 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10627 getOptional<GroupConnectionDetail::ConnectionType_t>("connectionType", p.connectionType, j, GroupConnectionDetail::ConnectionType_t::ctUndefined);
10628 getOptional<std::string>("peer", p.peer, j, EMPTY_STRING);
10629 getOptional<bool>("asFailover", p.asFailover, j, false);
10630 getOptional<std::string>("reason", p.reason, j, EMPTY_STRING);
10631 }
10632
10633 //-----------------------------------------------------------
10634 JSON_SERIALIZED_CLASS(GroupTxDetail)
10642 {
10643 IMPLEMENT_JSON_SERIALIZATION()
10644 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupTxDetail)
10645 IMPLEMENT_JSON_DOCUMENTATION(GroupTxDetail)
10646
10647 public:
10649 typedef enum
10650 {
10652 txsUndefined = 0,
10653
10655 txsTxStarted = 1,
10656
10658 txsTxEnded = 2,
10659
10661 txsNotAnAudioGroup = -1,
10662
10664 txsNotJoined = -2,
10665
10667 txsNotConnected = -3,
10668
10670 txsAlreadyTransmitting = -4,
10671
10673 txsInvalidParams = -5,
10674
10676 txsPriorityTooLow = -6,
10677
10679 txsRxActiveOnNonFdx = -7,
10680
10682 txsCannotSubscribeToInput = -8,
10683
10685 txsInvalidId = -9,
10686
10688 txsTxEndedWithFailure = -10,
10689
10691 txsBridgedButNotMultistream = -11,
10692
10694 txsAutoEndedDueToNonMultistreamBridge = -12,
10695
10697 txsReBeginWithoutPriorBegin = -13
10698 } TxStatus_t;
10699
10701 std::string id;
10702
10705
10708
10711
10714
10716 uint32_t txId;
10717
10719 {
10720 clear();
10721 }
10722
10723 void clear()
10724 {
10725 id.clear();
10726 status = txsUndefined;
10727 localPriority = 0;
10728 remotePriority = 0;
10729 nonFdxMsHangRemaining = 0;
10730 txId = 0;
10731 }
10732 };
10733
10734 static void to_json(nlohmann::json& j, const GroupTxDetail& p)
10735 {
10736 j = nlohmann::json{
10737 TOJSON_IMPL(id),
10738 TOJSON_IMPL(status),
10739 TOJSON_IMPL(localPriority),
10740 TOJSON_IMPL(txId)
10741 };
10742
10743 // Include remote priority if status is related to that
10744 if(p.status == GroupTxDetail::TxStatus_t::txsPriorityTooLow)
10745 {
10746 j["remotePriority"] = p.remotePriority;
10747 }
10748 else if(p.status == GroupTxDetail::TxStatus_t::txsRxActiveOnNonFdx)
10749 {
10750 j["nonFdxMsHangRemaining"] = p.nonFdxMsHangRemaining;
10751 }
10752 }
10753 static void from_json(const nlohmann::json& j, GroupTxDetail& p)
10754 {
10755 p.clear();
10756 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10757 getOptional<GroupTxDetail::TxStatus_t>("status", p.status, j, GroupTxDetail::TxStatus_t::txsUndefined);
10758 getOptional<int>("localPriority", p.localPriority, j, 0);
10759 getOptional<int>("remotePriority", p.remotePriority, j, 0);
10760 getOptional<long>("nonFdxMsHangRemaining", p.nonFdxMsHangRemaining, j, 0);
10761 getOptional<uint32_t>("txId", p.txId, j, 0);
10762 }
10763
10764 //-----------------------------------------------------------
10765 JSON_SERIALIZED_CLASS(GroupCreationDetail)
10773 {
10774 IMPLEMENT_JSON_SERIALIZATION()
10775 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupCreationDetail)
10776 IMPLEMENT_JSON_DOCUMENTATION(GroupCreationDetail)
10777
10778 public:
10780 typedef enum
10781 {
10783 csUndefined = 0,
10784
10786 csOk = 1,
10787
10789 csNoJson = -1,
10790
10792 csConflictingRpListAndCluster = -2,
10793
10795 csAlreadyExists = -3,
10796
10798 csInvalidConfiguration = -4,
10799
10801 csInvalidJson = -5,
10802
10804 csCryptoFailure = -6,
10805
10807 csAudioInputFailure = -7,
10808
10810 csAudioOutputFailure = -8,
10811
10813 csUnsupportedAudioEncoder = -9,
10814
10816 csNoLicense = -10,
10817
10819 csInvalidTransport = -11,
10820
10822 csAudioInputDeviceNotFound = -12,
10823
10825 csAudioOutputDeviceNotFound = -13
10826 } CreationStatus_t;
10827
10829 std::string id;
10830
10833
10835 {
10836 clear();
10837 }
10838
10839 void clear()
10840 {
10841 id.clear();
10842 status = csUndefined;
10843 }
10844 };
10845
10846 static void to_json(nlohmann::json& j, const GroupCreationDetail& p)
10847 {
10848 j = nlohmann::json{
10849 TOJSON_IMPL(id),
10850 TOJSON_IMPL(status)
10851 };
10852 }
10853 static void from_json(const nlohmann::json& j, GroupCreationDetail& p)
10854 {
10855 p.clear();
10856 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10857 getOptional<GroupCreationDetail::CreationStatus_t>("status", p.status, j, GroupCreationDetail::CreationStatus_t::csUndefined);
10858 }
10859
10860
10861 //-----------------------------------------------------------
10862 JSON_SERIALIZED_CLASS(GroupReconfigurationDetail)
10870 {
10871 IMPLEMENT_JSON_SERIALIZATION()
10872 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupReconfigurationDetail)
10873 IMPLEMENT_JSON_DOCUMENTATION(GroupReconfigurationDetail)
10874
10875 public:
10877 typedef enum
10878 {
10880 rsUndefined = 0,
10881
10883 rsOk = 1,
10884
10886 rsNoJson = -1,
10887
10889 rsInvalidConfiguration = -2,
10890
10892 rsInvalidJson = -3,
10893
10895 rsAudioInputFailure = -4,
10896
10898 rsAudioOutputFailure = -5,
10899
10901 rsDoesNotExist = -6,
10902
10904 rsAudioInputInUse = -7,
10905
10907 rsAudioDisabledForGroup = -8,
10908
10910 rsGroupIsNotAudio = -9
10911 } ReconfigurationStatus_t;
10912
10914 std::string id;
10915
10918
10920 {
10921 clear();
10922 }
10923
10924 void clear()
10925 {
10926 id.clear();
10927 status = rsUndefined;
10928 }
10929 };
10930
10931 static void to_json(nlohmann::json& j, const GroupReconfigurationDetail& p)
10932 {
10933 j = nlohmann::json{
10934 TOJSON_IMPL(id),
10935 TOJSON_IMPL(status)
10936 };
10937 }
10938 static void from_json(const nlohmann::json& j, GroupReconfigurationDetail& p)
10939 {
10940 p.clear();
10941 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10942 getOptional<GroupReconfigurationDetail::ReconfigurationStatus_t>("status", p.status, j, GroupReconfigurationDetail::ReconfigurationStatus_t::rsUndefined);
10943 }
10944
10945
10946 //-----------------------------------------------------------
10947 JSON_SERIALIZED_CLASS(GroupHealthReport)
10955 {
10956 IMPLEMENT_JSON_SERIALIZATION()
10957 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupHealthReport)
10958 IMPLEMENT_JSON_DOCUMENTATION(GroupHealthReport)
10959
10960 public:
10961 std::string id;
10962 uint64_t lastErrorTs;
10963 uint64_t decryptionErrors;
10964 uint64_t encryptionErrors;
10965 uint64_t unsupportDecoderErrors;
10966 uint64_t decoderFailures;
10967 uint64_t decoderStartFailures;
10968 uint64_t inboundRtpPacketAllocationFailures;
10969 uint64_t inboundRtpPacketLoadFailures;
10970 uint64_t latePacketsDiscarded;
10971 uint64_t jitterBufferInsertionFailures;
10972 uint64_t presenceDeserializationFailures;
10973 uint64_t notRtpErrors;
10974 uint64_t generalErrors;
10975 uint64_t inboundRtpProcessorAllocationFailures;
10976
10978 {
10979 clear();
10980 }
10981
10982 void clear()
10983 {
10984 id.clear();
10985 lastErrorTs = 0;
10986 decryptionErrors = 0;
10987 encryptionErrors = 0;
10988 unsupportDecoderErrors = 0;
10989 decoderFailures = 0;
10990 decoderStartFailures = 0;
10991 inboundRtpPacketAllocationFailures = 0;
10992 inboundRtpPacketLoadFailures = 0;
10993 latePacketsDiscarded = 0;
10994 jitterBufferInsertionFailures = 0;
10995 presenceDeserializationFailures = 0;
10996 notRtpErrors = 0;
10997 generalErrors = 0;
10998 inboundRtpProcessorAllocationFailures = 0;
10999 }
11000 };
11001
11002 static void to_json(nlohmann::json& j, const GroupHealthReport& p)
11003 {
11004 j = nlohmann::json{
11005 TOJSON_IMPL(id),
11006 TOJSON_IMPL(lastErrorTs),
11007 TOJSON_IMPL(decryptionErrors),
11008 TOJSON_IMPL(encryptionErrors),
11009 TOJSON_IMPL(unsupportDecoderErrors),
11010 TOJSON_IMPL(decoderFailures),
11011 TOJSON_IMPL(decoderStartFailures),
11012 TOJSON_IMPL(inboundRtpPacketAllocationFailures),
11013 TOJSON_IMPL(inboundRtpPacketLoadFailures),
11014 TOJSON_IMPL(latePacketsDiscarded),
11015 TOJSON_IMPL(jitterBufferInsertionFailures),
11016 TOJSON_IMPL(presenceDeserializationFailures),
11017 TOJSON_IMPL(notRtpErrors),
11018 TOJSON_IMPL(generalErrors),
11019 TOJSON_IMPL(inboundRtpProcessorAllocationFailures)
11020 };
11021 }
11022 static void from_json(const nlohmann::json& j, GroupHealthReport& p)
11023 {
11024 p.clear();
11025 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11026 getOptional<uint64_t>("lastErrorTs", p.lastErrorTs, j, 0);
11027 getOptional<uint64_t>("decryptionErrors", p.decryptionErrors, j, 0);
11028 getOptional<uint64_t>("encryptionErrors", p.encryptionErrors, j, 0);
11029 getOptional<uint64_t>("unsupportDecoderErrors", p.unsupportDecoderErrors, j, 0);
11030 getOptional<uint64_t>("decoderFailures", p.decoderFailures, j, 0);
11031 getOptional<uint64_t>("decoderStartFailures", p.decoderStartFailures, j, 0);
11032 getOptional<uint64_t>("inboundRtpPacketAllocationFailures", p.inboundRtpPacketAllocationFailures, j, 0);
11033 getOptional<uint64_t>("inboundRtpPacketLoadFailures", p.inboundRtpPacketLoadFailures, j, 0);
11034 getOptional<uint64_t>("latePacketsDiscarded", p.latePacketsDiscarded, j, 0);
11035 getOptional<uint64_t>("jitterBufferInsertionFailures", p.jitterBufferInsertionFailures, j, 0);
11036 getOptional<uint64_t>("presenceDeserializationFailures", p.presenceDeserializationFailures, j, 0);
11037 getOptional<uint64_t>("notRtpErrors", p.notRtpErrors, j, 0);
11038 getOptional<uint64_t>("generalErrors", p.generalErrors, j, 0);
11039 getOptional<uint64_t>("inboundRtpProcessorAllocationFailures", p.inboundRtpProcessorAllocationFailures, j, 0);
11040 }
11041
11042 //-----------------------------------------------------------
11043 JSON_SERIALIZED_CLASS(InboundProcessorStats)
11051 {
11052 IMPLEMENT_JSON_SERIALIZATION()
11053 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(InboundProcessorStats)
11054 IMPLEMENT_JSON_DOCUMENTATION(InboundProcessorStats)
11055
11056 public:
11057 uint32_t ssrc;
11058 double jitter;
11059 uint64_t minRtpSamplesInQueue;
11060 uint64_t maxRtpSamplesInQueue;
11061 uint64_t totalSamplesTrimmed;
11062 uint64_t underruns;
11063 uint64_t overruns;
11064 uint64_t samplesInQueue;
11065 uint64_t totalPacketsReceived;
11066 uint64_t totalPacketsLost;
11067 uint64_t totalPacketsDiscarded;
11068
11070 {
11071 clear();
11072 }
11073
11074 void clear()
11075 {
11076 ssrc = 0;
11077 jitter = 0.0;
11078 minRtpSamplesInQueue = 0;
11079 maxRtpSamplesInQueue = 0;
11080 totalSamplesTrimmed = 0;
11081 underruns = 0;
11082 overruns = 0;
11083 samplesInQueue = 0;
11084 totalPacketsReceived = 0;
11085 totalPacketsLost = 0;
11086 totalPacketsDiscarded = 0;
11087 }
11088 };
11089
11090 static void to_json(nlohmann::json& j, const InboundProcessorStats& p)
11091 {
11092 j = nlohmann::json{
11093 TOJSON_IMPL(ssrc),
11094 TOJSON_IMPL(jitter),
11095 TOJSON_IMPL(minRtpSamplesInQueue),
11096 TOJSON_IMPL(maxRtpSamplesInQueue),
11097 TOJSON_IMPL(totalSamplesTrimmed),
11098 TOJSON_IMPL(underruns),
11099 TOJSON_IMPL(overruns),
11100 TOJSON_IMPL(samplesInQueue),
11101 TOJSON_IMPL(totalPacketsReceived),
11102 TOJSON_IMPL(totalPacketsLost),
11103 TOJSON_IMPL(totalPacketsDiscarded)
11104 };
11105 }
11106 static void from_json(const nlohmann::json& j, InboundProcessorStats& p)
11107 {
11108 p.clear();
11109 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
11110 getOptional<double>("jitter", p.jitter, j, 0.0);
11111 getOptional<uint64_t>("minRtpSamplesInQueue", p.minRtpSamplesInQueue, j, 0);
11112 getOptional<uint64_t>("maxRtpSamplesInQueue", p.maxRtpSamplesInQueue, j, 0);
11113 getOptional<uint64_t>("totalSamplesTrimmed", p.totalSamplesTrimmed, j, 0);
11114 getOptional<uint64_t>("underruns", p.underruns, j, 0);
11115 getOptional<uint64_t>("overruns", p.overruns, j, 0);
11116 getOptional<uint64_t>("samplesInQueue", p.samplesInQueue, j, 0);
11117 getOptional<uint64_t>("totalPacketsReceived", p.totalPacketsReceived, j, 0);
11118 getOptional<uint64_t>("totalPacketsLost", p.totalPacketsLost, j, 0);
11119 getOptional<uint64_t>("totalPacketsDiscarded", p.totalPacketsDiscarded, j, 0);
11120 }
11121
11122 //-----------------------------------------------------------
11123 JSON_SERIALIZED_CLASS(TrafficCounter)
11131 {
11132 IMPLEMENT_JSON_SERIALIZATION()
11133 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(TrafficCounter)
11134 IMPLEMENT_JSON_DOCUMENTATION(TrafficCounter)
11135
11136 public:
11137 uint64_t packets;
11138 uint64_t bytes;
11139 uint64_t errors;
11140
11142 {
11143 clear();
11144 }
11145
11146 void clear()
11147 {
11148 packets = 0;
11149 bytes = 0;
11150 errors = 0;
11151 }
11152 };
11153
11154 static void to_json(nlohmann::json& j, const TrafficCounter& p)
11155 {
11156 j = nlohmann::json{
11157 TOJSON_IMPL(packets),
11158 TOJSON_IMPL(bytes),
11159 TOJSON_IMPL(errors)
11160 };
11161 }
11162 static void from_json(const nlohmann::json& j, TrafficCounter& p)
11163 {
11164 p.clear();
11165 getOptional<uint64_t>("packets", p.packets, j, 0);
11166 getOptional<uint64_t>("bytes", p.bytes, j, 0);
11167 getOptional<uint64_t>("errors", p.errors, j, 0);
11168 }
11169
11170 //-----------------------------------------------------------
11171 JSON_SERIALIZED_CLASS(GroupStats)
11179 {
11180 IMPLEMENT_JSON_SERIALIZATION()
11181 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupStats)
11182 IMPLEMENT_JSON_DOCUMENTATION(GroupStats)
11183
11184 public:
11185 std::string id;
11186 //std::vector<InboundProcessorStats> rtpInbounds;
11187 TrafficCounter rxTraffic;
11188 TrafficCounter txTraffic;
11189
11190 GroupStats()
11191 {
11192 clear();
11193 }
11194
11195 void clear()
11196 {
11197 id.clear();
11198 //rtpInbounds.clear();
11199 rxTraffic.clear();
11200 txTraffic.clear();
11201 }
11202 };
11203
11204 static void to_json(nlohmann::json& j, const GroupStats& p)
11205 {
11206 j = nlohmann::json{
11207 TOJSON_IMPL(id),
11208 //TOJSON_IMPL(rtpInbounds),
11209 TOJSON_IMPL(rxTraffic),
11210 TOJSON_IMPL(txTraffic)
11211 };
11212 }
11213 static void from_json(const nlohmann::json& j, GroupStats& p)
11214 {
11215 p.clear();
11216 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11217 //getOptional<std::vector<InboundProcessorStats>>("rtpInbounds", p.rtpInbounds, j);
11218 getOptional<TrafficCounter>("rxTraffic", p.rxTraffic, j);
11219 getOptional<TrafficCounter>("txTraffic", p.txTraffic, j);
11220 }
11221
11222 //-----------------------------------------------------------
11223 JSON_SERIALIZED_CLASS(RallypointConnectionDetail)
11231 {
11232 IMPLEMENT_JSON_SERIALIZATION()
11233 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(RallypointConnectionDetail)
11234 IMPLEMENT_JSON_DOCUMENTATION(RallypointConnectionDetail)
11235
11236 public:
11238 std::string internalId;
11239
11241 std::string host;
11242
11244 int port;
11245
11248
11251
11253 {
11254 clear();
11255 }
11256
11257 void clear()
11258 {
11259 internalId.clear();
11260 host.clear();
11261 port = 0;
11262 msToNextConnectionAttempt = 0;
11263 serverProcessingMs = -1.0f;
11264 }
11265 };
11266
11267 static void to_json(nlohmann::json& j, const RallypointConnectionDetail& p)
11268 {
11269 j = nlohmann::json{
11270 TOJSON_IMPL(internalId),
11271 TOJSON_IMPL(host),
11272 TOJSON_IMPL(port)
11273 };
11274
11275 if(p.msToNextConnectionAttempt > 0)
11276 {
11277 j["msToNextConnectionAttempt"] = p.msToNextConnectionAttempt;
11278 }
11279
11280 if(p.serverProcessingMs >= 0.0)
11281 {
11282 j["serverProcessingMs"] = p.serverProcessingMs;
11283 }
11284 }
11285 static void from_json(const nlohmann::json& j, RallypointConnectionDetail& p)
11286 {
11287 p.clear();
11288 getOptional<std::string>("internalId", p.internalId, j, EMPTY_STRING);
11289 getOptional<std::string>("host", p.host, j, EMPTY_STRING);
11290 getOptional<int>("port", p.port, j, 0);
11291 getOptional<uint64_t>("msToNextConnectionAttempt", p.msToNextConnectionAttempt, j, 0);
11292 getOptional<float>("serverProcessingMs", p.serverProcessingMs, j, -1.0);
11293 }
11294
11295 //-----------------------------------------------------------
11296 JSON_SERIALIZED_CLASS(TranslationSession)
11307 {
11308 IMPLEMENT_JSON_SERIALIZATION()
11309 IMPLEMENT_JSON_DOCUMENTATION(TranslationSession)
11310
11311 public:
11313 std::string id;
11314
11316 std::string name;
11317
11319 std::vector<std::string> groups;
11320
11323
11325 {
11326 clear();
11327 }
11328
11329 void clear()
11330 {
11331 id.clear();
11332 name.clear();
11333 groups.clear();
11334 enabled = true;
11335 }
11336 };
11337
11338 static void to_json(nlohmann::json& j, const TranslationSession& p)
11339 {
11340 j = nlohmann::json{
11341 TOJSON_IMPL(id),
11342 TOJSON_IMPL(name),
11343 TOJSON_IMPL(groups),
11344 TOJSON_IMPL(enabled)
11345 };
11346 }
11347 static void from_json(const nlohmann::json& j, TranslationSession& p)
11348 {
11349 p.clear();
11350 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
11351 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
11352 getOptional<std::vector<std::string>>("groups", p.groups, j);
11353 FROMJSON_IMPL(enabled, bool, true);
11354 }
11355
11356 //-----------------------------------------------------------
11357 JSON_SERIALIZED_CLASS(TranslationConfiguration)
11368 {
11369 IMPLEMENT_JSON_SERIALIZATION()
11370 IMPLEMENT_JSON_DOCUMENTATION(TranslationConfiguration)
11371
11372 public:
11374 std::vector<TranslationSession> sessions;
11375
11377 std::vector<Group> groups;
11378
11380 {
11381 clear();
11382 }
11383
11384 void clear()
11385 {
11386 sessions.clear();
11387 groups.clear();
11388 }
11389 };
11390
11391 static void to_json(nlohmann::json& j, const TranslationConfiguration& p)
11392 {
11393 j = nlohmann::json{
11394 TOJSON_IMPL(sessions),
11395 TOJSON_IMPL(groups)
11396 };
11397 }
11398 static void from_json(const nlohmann::json& j, TranslationConfiguration& p)
11399 {
11400 p.clear();
11401 getOptional<std::vector<TranslationSession>>("sessions", p.sessions, j);
11402 getOptional<std::vector<Group>>("groups", p.groups, j);
11403 }
11404
11405 //-----------------------------------------------------------
11406 JSON_SERIALIZED_CLASS(LingoServerStatusReportConfiguration)
11417 {
11418 IMPLEMENT_JSON_SERIALIZATION()
11419 IMPLEMENT_JSON_DOCUMENTATION(LingoServerStatusReportConfiguration)
11420
11421 public:
11423 std::string fileName;
11424
11427
11430
11432 std::string runCmd;
11433
11436
11439
11442
11444 {
11445 clear();
11446 }
11447
11448 void clear()
11449 {
11450 fileName.clear();
11451 intervalSecs = 60;
11452 enabled = false;
11453 includeGroupDetail = false;
11454 includeSessionDetail = false;
11455 includeSessionGroupDetail = false;
11456 runCmd.clear();
11457 }
11458 };
11459
11460 static void to_json(nlohmann::json& j, const LingoServerStatusReportConfiguration& p)
11461 {
11462 j = nlohmann::json{
11463 TOJSON_IMPL(fileName),
11464 TOJSON_IMPL(intervalSecs),
11465 TOJSON_IMPL(enabled),
11466 TOJSON_IMPL(includeGroupDetail),
11467 TOJSON_IMPL(includeSessionDetail),
11468 TOJSON_IMPL(includeSessionGroupDetail),
11469 TOJSON_IMPL(runCmd)
11470 };
11471 }
11472 static void from_json(const nlohmann::json& j, LingoServerStatusReportConfiguration& p)
11473 {
11474 p.clear();
11475 getOptional<std::string>("fileName", p.fileName, j);
11476 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
11477 getOptional<bool>("enabled", p.enabled, j, false);
11478 getOptional<std::string>("runCmd", p.runCmd, j);
11479 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
11480 getOptional<bool>("includeSessionDetail", p.includeSessionDetail, j, false);
11481 getOptional<bool>("includeSessionGroupDetail", p.includeSessionGroupDetail, j, false);
11482 }
11483
11484 //-----------------------------------------------------------
11485 JSON_SERIALIZED_CLASS(LingoServerInternals)
11498 {
11499 IMPLEMENT_JSON_SERIALIZATION()
11500 IMPLEMENT_JSON_DOCUMENTATION(LingoServerInternals)
11501
11502 public:
11505
11508
11511
11513 {
11514 clear();
11515 }
11516
11517 void clear()
11518 {
11519 watchdog.clear();
11520 tuning.clear();
11521 housekeeperIntervalMs = 1000;
11522 }
11523 };
11524
11525 static void to_json(nlohmann::json& j, const LingoServerInternals& p)
11526 {
11527 j = nlohmann::json{
11528 TOJSON_IMPL(watchdog),
11529 TOJSON_IMPL(housekeeperIntervalMs),
11530 TOJSON_IMPL(tuning)
11531 };
11532 }
11533 static void from_json(const nlohmann::json& j, LingoServerInternals& p)
11534 {
11535 p.clear();
11536 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
11537 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
11538 getOptional<TuningSettings>("tuning", p.tuning, j);
11539 }
11540
11541 //-----------------------------------------------------------
11542 JSON_SERIALIZED_CLASS(LingoServerConfiguration)
11552 {
11553 IMPLEMENT_JSON_SERIALIZATION()
11554 IMPLEMENT_JSON_DOCUMENTATION(LingoServerConfiguration)
11555
11556 public:
11558 std::string id;
11559
11562
11565
11568
11571
11574
11577
11580
11583
11586
11589
11592
11595
11598
11601
11603 {
11604 clear();
11605 }
11606
11607 void clear()
11608 {
11609 id.clear();
11610 serviceConfigurationFileCheckSecs = 60;
11611 lingoConfigurationFileName.clear();
11612 lingoConfigurationFileCommand.clear();
11613 lingoConfigurationFileCheckSecs = 60;
11614 statusReport.clear();
11615 externalHealthCheckResponder.clear();
11616 internals.clear();
11617 certStoreFileName.clear();
11618 certStorePasswordHex.clear();
11619 enginePolicy.clear();
11620 configurationCheckSignalName = "rts.22f4ec3.${id}";
11621 fipsCrypto.clear();
11622 proxy.clear();
11623 nsm.clear();
11624 }
11625 };
11626
11627 static void to_json(nlohmann::json& j, const LingoServerConfiguration& p)
11628 {
11629 j = nlohmann::json{
11630 TOJSON_IMPL(id),
11631 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
11632 TOJSON_IMPL(lingoConfigurationFileName),
11633 TOJSON_IMPL(lingoConfigurationFileCommand),
11634 TOJSON_IMPL(lingoConfigurationFileCheckSecs),
11635 TOJSON_IMPL(statusReport),
11636 TOJSON_IMPL(externalHealthCheckResponder),
11637 TOJSON_IMPL(internals),
11638 TOJSON_IMPL(certStoreFileName),
11639 TOJSON_IMPL(certStorePasswordHex),
11640 TOJSON_IMPL(enginePolicy),
11641 TOJSON_IMPL(configurationCheckSignalName),
11642 TOJSON_IMPL(fipsCrypto),
11643 TOJSON_IMPL(proxy),
11644 TOJSON_IMPL(nsm)
11645 };
11646 }
11647 static void from_json(const nlohmann::json& j, LingoServerConfiguration& p)
11648 {
11649 p.clear();
11650 getOptional<std::string>("id", p.id, j);
11651 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
11652 getOptional<std::string>("lingoConfigurationFileName", p.lingoConfigurationFileName, j);
11653 getOptional<std::string>("lingoConfigurationFileCommand", p.lingoConfigurationFileCommand, j);
11654 getOptional<int>("lingoConfigurationFileCheckSecs", p.lingoConfigurationFileCheckSecs, j, 60);
11655 getOptional<LingoServerStatusReportConfiguration>("statusReport", p.statusReport, j);
11656 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
11657 getOptional<LingoServerInternals>("internals", p.internals, j);
11658 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
11659 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
11660 j.at("enginePolicy").get_to(p.enginePolicy);
11661 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.22f4ec3.${id}");
11662 getOptional<FipsCryptoSettings>("fipsCrypo", p.fipsCrypto, j);
11663 getOptional<NetworkAddress>("proxy", p.proxy, j);
11664 getOptional<NsmConfiguration>("nsm", p.nsm, j);
11665 }
11666
11667
11668 //-----------------------------------------------------------
11669 JSON_SERIALIZED_CLASS(VoiceToVoiceSession)
11680 {
11681 IMPLEMENT_JSON_SERIALIZATION()
11682 IMPLEMENT_JSON_DOCUMENTATION(VoiceToVoiceSession)
11683
11684 public:
11686 std::string id;
11687
11689 std::string name;
11690
11692 std::vector<std::string> groups;
11693
11696
11698 {
11699 clear();
11700 }
11701
11702 void clear()
11703 {
11704 id.clear();
11705 name.clear();
11706 groups.clear();
11707 enabled = true;
11708 }
11709 };
11710
11711 static void to_json(nlohmann::json& j, const VoiceToVoiceSession& p)
11712 {
11713 j = nlohmann::json{
11714 TOJSON_IMPL(id),
11715 TOJSON_IMPL(name),
11716 TOJSON_IMPL(groups),
11717 TOJSON_IMPL(enabled)
11718 };
11719 }
11720 static void from_json(const nlohmann::json& j, VoiceToVoiceSession& p)
11721 {
11722 p.clear();
11723 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
11724 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
11725 getOptional<std::vector<std::string>>("groups", p.groups, j);
11726 FROMJSON_IMPL(enabled, bool, true);
11727 }
11728
11729 //-----------------------------------------------------------
11730 JSON_SERIALIZED_CLASS(LingoConfiguration)
11741 {
11742 IMPLEMENT_JSON_SERIALIZATION()
11743 IMPLEMENT_JSON_DOCUMENTATION(LingoConfiguration)
11744
11745 public:
11747 std::vector<VoiceToVoiceSession> voiceToVoiceSessions;
11748
11750 std::vector<Group> groups;
11751
11753 {
11754 clear();
11755 }
11756
11757 void clear()
11758 {
11759 voiceToVoiceSessions.clear();
11760 groups.clear();
11761 }
11762 };
11763
11764 static void to_json(nlohmann::json& j, const LingoConfiguration& p)
11765 {
11766 j = nlohmann::json{
11767 TOJSON_IMPL(voiceToVoiceSessions),
11768 TOJSON_IMPL(groups)
11769 };
11770 }
11771 static void from_json(const nlohmann::json& j, LingoConfiguration& p)
11772 {
11773 p.clear();
11774 getOptional<std::vector<VoiceToVoiceSession>>("voiceToVoiceSessions", p.voiceToVoiceSessions, j);
11775 getOptional<std::vector<Group>>("groups", p.groups, j);
11776 }
11777
11778 //-----------------------------------------------------------
11779 JSON_SERIALIZED_CLASS(BridgingConfiguration)
11790 {
11791 IMPLEMENT_JSON_SERIALIZATION()
11792 IMPLEMENT_JSON_DOCUMENTATION(BridgingConfiguration)
11793
11794 public:
11796 std::vector<Bridge> bridges;
11797
11799 std::vector<Group> groups;
11800
11802 {
11803 clear();
11804 }
11805
11806 void clear()
11807 {
11808 bridges.clear();
11809 groups.clear();
11810 }
11811 };
11812
11813 static void to_json(nlohmann::json& j, const BridgingConfiguration& p)
11814 {
11815 j = nlohmann::json{
11816 TOJSON_IMPL(bridges),
11817 TOJSON_IMPL(groups)
11818 };
11819 }
11820 static void from_json(const nlohmann::json& j, BridgingConfiguration& p)
11821 {
11822 p.clear();
11823 getOptional<std::vector<Bridge>>("bridges", p.bridges, j);
11824 getOptional<std::vector<Group>>("groups", p.groups, j);
11825 }
11826
11827 //-----------------------------------------------------------
11828 JSON_SERIALIZED_CLASS(BridgingServerStatusReportConfiguration)
11839 {
11840 IMPLEMENT_JSON_SERIALIZATION()
11841 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerStatusReportConfiguration)
11842
11843 public:
11845 std::string fileName;
11846
11849
11852
11854 std::string runCmd;
11855
11858
11861
11864
11866 {
11867 clear();
11868 }
11869
11870 void clear()
11871 {
11872 fileName.clear();
11873 intervalSecs = 60;
11874 enabled = false;
11875 includeGroupDetail = false;
11876 includeBridgeDetail = false;
11877 includeBridgeGroupDetail = false;
11878 runCmd.clear();
11879 }
11880 };
11881
11882 static void to_json(nlohmann::json& j, const BridgingServerStatusReportConfiguration& p)
11883 {
11884 j = nlohmann::json{
11885 TOJSON_IMPL(fileName),
11886 TOJSON_IMPL(intervalSecs),
11887 TOJSON_IMPL(enabled),
11888 TOJSON_IMPL(includeGroupDetail),
11889 TOJSON_IMPL(includeBridgeDetail),
11890 TOJSON_IMPL(includeBridgeGroupDetail),
11891 TOJSON_IMPL(runCmd)
11892 };
11893 }
11894 static void from_json(const nlohmann::json& j, BridgingServerStatusReportConfiguration& p)
11895 {
11896 p.clear();
11897 getOptional<std::string>("fileName", p.fileName, j);
11898 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
11899 getOptional<bool>("enabled", p.enabled, j, false);
11900 getOptional<std::string>("runCmd", p.runCmd, j);
11901 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
11902 getOptional<bool>("includeBridgeDetail", p.includeBridgeDetail, j, false);
11903 getOptional<bool>("includeBridgeGroupDetail", p.includeBridgeGroupDetail, j, false);
11904 }
11905
11906 //-----------------------------------------------------------
11907 JSON_SERIALIZED_CLASS(BridgingServerInternals)
11920 {
11921 IMPLEMENT_JSON_SERIALIZATION()
11922 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerInternals)
11923
11924 public:
11927
11930
11933
11935 {
11936 clear();
11937 }
11938
11939 void clear()
11940 {
11941 watchdog.clear();
11942 tuning.clear();
11943 housekeeperIntervalMs = 1000;
11944 }
11945 };
11946
11947 static void to_json(nlohmann::json& j, const BridgingServerInternals& p)
11948 {
11949 j = nlohmann::json{
11950 TOJSON_IMPL(watchdog),
11951 TOJSON_IMPL(housekeeperIntervalMs),
11952 TOJSON_IMPL(tuning)
11953 };
11954 }
11955 static void from_json(const nlohmann::json& j, BridgingServerInternals& p)
11956 {
11957 p.clear();
11958 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
11959 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
11960 getOptional<TuningSettings>("tuning", p.tuning, j);
11961 }
11962
11963 //-----------------------------------------------------------
11964 JSON_SERIALIZED_CLASS(BridgingServerConfiguration)
11974 {
11975 IMPLEMENT_JSON_SERIALIZATION()
11976 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerConfiguration)
11977
11978 public:
11985 typedef enum
11986 {
11988 omRaw = 0,
11989
11992 omMultistream = 1,
11993
11996 omMixedStream = 2,
11997
11999 omADictatedByGroup = 3,
12000 } OpMode_t;
12001
12003 std::string id;
12004
12007
12010
12013
12016
12019
12022
12025
12028
12031
12034
12037
12040
12043
12046
12048 {
12049 clear();
12050 }
12051
12052 void clear()
12053 {
12054 id.clear();
12055 mode = omRaw;
12056 serviceConfigurationFileCheckSecs = 60;
12057 bridgingConfigurationFileName.clear();
12058 bridgingConfigurationFileCommand.clear();
12059 bridgingConfigurationFileCheckSecs = 60;
12060 statusReport.clear();
12061 externalHealthCheckResponder.clear();
12062 internals.clear();
12063 certStoreFileName.clear();
12064 certStorePasswordHex.clear();
12065 enginePolicy.clear();
12066 configurationCheckSignalName = "rts.6cc0651.${id}";
12067 fipsCrypto.clear();
12068 nsm.clear();
12069 }
12070 };
12071
12072 static void to_json(nlohmann::json& j, const BridgingServerConfiguration& p)
12073 {
12074 j = nlohmann::json{
12075 TOJSON_IMPL(id),
12076 TOJSON_IMPL(mode),
12077 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
12078 TOJSON_IMPL(bridgingConfigurationFileName),
12079 TOJSON_IMPL(bridgingConfigurationFileCommand),
12080 TOJSON_IMPL(bridgingConfigurationFileCheckSecs),
12081 TOJSON_IMPL(statusReport),
12082 TOJSON_IMPL(externalHealthCheckResponder),
12083 TOJSON_IMPL(internals),
12084 TOJSON_IMPL(certStoreFileName),
12085 TOJSON_IMPL(certStorePasswordHex),
12086 TOJSON_IMPL(enginePolicy),
12087 TOJSON_IMPL(configurationCheckSignalName),
12088 TOJSON_IMPL(fipsCrypto),
12089 TOJSON_IMPL(nsm)
12090 };
12091 }
12092 static void from_json(const nlohmann::json& j, BridgingServerConfiguration& p)
12093 {
12094 p.clear();
12095 getOptional<std::string>("id", p.id, j);
12096 getOptional<BridgingServerConfiguration::OpMode_t>("mode", p.mode, j, BridgingServerConfiguration::OpMode_t::omRaw);
12097 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
12098 getOptional<std::string>("bridgingConfigurationFileName", p.bridgingConfigurationFileName, j);
12099 getOptional<std::string>("bridgingConfigurationFileCommand", p.bridgingConfigurationFileCommand, j);
12100 getOptional<int>("bridgingConfigurationFileCheckSecs", p.bridgingConfigurationFileCheckSecs, j, 60);
12101 getOptional<BridgingServerStatusReportConfiguration>("statusReport", p.statusReport, j);
12102 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
12103 getOptional<BridgingServerInternals>("internals", p.internals, j);
12104 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
12105 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
12106 j.at("enginePolicy").get_to(p.enginePolicy);
12107 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.6cc0651.${id}");
12108 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
12109 getOptional<NsmConfiguration>("nsm", p.nsm, j);
12110 }
12111
12112
12113 //-----------------------------------------------------------
12114 JSON_SERIALIZED_CLASS(EarGroupsConfiguration)
12125 {
12126 IMPLEMENT_JSON_SERIALIZATION()
12127 IMPLEMENT_JSON_DOCUMENTATION(EarGroupsConfiguration)
12128
12129 public:
12131 std::vector<Group> groups;
12132
12134 {
12135 clear();
12136 }
12137
12138 void clear()
12139 {
12140 groups.clear();
12141 }
12142 };
12143
12144 static void to_json(nlohmann::json& j, const EarGroupsConfiguration& p)
12145 {
12146 j = nlohmann::json{
12147 TOJSON_IMPL(groups)
12148 };
12149 }
12150 static void from_json(const nlohmann::json& j, EarGroupsConfiguration& p)
12151 {
12152 p.clear();
12153 getOptional<std::vector<Group>>("groups", p.groups, j);
12154 }
12155
12156 //-----------------------------------------------------------
12157 JSON_SERIALIZED_CLASS(EarServerStatusReportConfiguration)
12168 {
12169 IMPLEMENT_JSON_SERIALIZATION()
12170 IMPLEMENT_JSON_DOCUMENTATION(EarServerStatusReportConfiguration)
12171
12172 public:
12174 std::string fileName;
12175
12178
12181
12183 std::string runCmd;
12184
12187
12189 {
12190 clear();
12191 }
12192
12193 void clear()
12194 {
12195 fileName.clear();
12196 intervalSecs = 60;
12197 enabled = false;
12198 includeGroupDetail = false;
12199 runCmd.clear();
12200 }
12201 };
12202
12203 static void to_json(nlohmann::json& j, const EarServerStatusReportConfiguration& p)
12204 {
12205 j = nlohmann::json{
12206 TOJSON_IMPL(fileName),
12207 TOJSON_IMPL(intervalSecs),
12208 TOJSON_IMPL(enabled),
12209 TOJSON_IMPL(includeGroupDetail),
12210 TOJSON_IMPL(runCmd)
12211 };
12212 }
12213 static void from_json(const nlohmann::json& j, EarServerStatusReportConfiguration& p)
12214 {
12215 p.clear();
12216 getOptional<std::string>("fileName", p.fileName, j);
12217 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
12218 getOptional<bool>("enabled", p.enabled, j, false);
12219 getOptional<std::string>("runCmd", p.runCmd, j);
12220 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
12221 }
12222
12223 //-----------------------------------------------------------
12224 JSON_SERIALIZED_CLASS(EarServerInternals)
12237 {
12238 IMPLEMENT_JSON_SERIALIZATION()
12239 IMPLEMENT_JSON_DOCUMENTATION(EarServerInternals)
12240
12241 public:
12244
12247
12250
12252 {
12253 clear();
12254 }
12255
12256 void clear()
12257 {
12258 watchdog.clear();
12259 tuning.clear();
12260 housekeeperIntervalMs = 1000;
12261 }
12262 };
12263
12264 static void to_json(nlohmann::json& j, const EarServerInternals& p)
12265 {
12266 j = nlohmann::json{
12267 TOJSON_IMPL(watchdog),
12268 TOJSON_IMPL(housekeeperIntervalMs),
12269 TOJSON_IMPL(tuning)
12270 };
12271 }
12272 static void from_json(const nlohmann::json& j, EarServerInternals& p)
12273 {
12274 p.clear();
12275 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
12276 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
12277 getOptional<TuningSettings>("tuning", p.tuning, j);
12278 }
12279
12280 //-----------------------------------------------------------
12281 JSON_SERIALIZED_CLASS(EarServerConfiguration)
12291 {
12292 IMPLEMENT_JSON_SERIALIZATION()
12293 IMPLEMENT_JSON_DOCUMENTATION(EarServerConfiguration)
12294
12295 public:
12296
12298 std::string id;
12299
12302
12305
12308
12311
12314
12317
12320
12323
12326
12329
12332
12335
12338
12340 {
12341 clear();
12342 }
12343
12344 void clear()
12345 {
12346 id.clear();
12347 serviceConfigurationFileCheckSecs = 60;
12348 groupsConfigurationFileName.clear();
12349 groupsConfigurationFileCommand.clear();
12350 groupsConfigurationFileCheckSecs = 60;
12351 statusReport.clear();
12352 externalHealthCheckResponder.clear();
12353 internals.clear();
12354 certStoreFileName.clear();
12355 certStorePasswordHex.clear();
12356 enginePolicy.clear();
12357 configurationCheckSignalName = "rts.9a164fa.${id}";
12358 fipsCrypto.clear();
12359 nsm.clear();
12360 }
12361 };
12362
12363 static void to_json(nlohmann::json& j, const EarServerConfiguration& p)
12364 {
12365 j = nlohmann::json{
12366 TOJSON_IMPL(id),
12367 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
12368 TOJSON_IMPL(groupsConfigurationFileName),
12369 TOJSON_IMPL(groupsConfigurationFileCommand),
12370 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
12371 TOJSON_IMPL(statusReport),
12372 TOJSON_IMPL(externalHealthCheckResponder),
12373 TOJSON_IMPL(internals),
12374 TOJSON_IMPL(certStoreFileName),
12375 TOJSON_IMPL(certStorePasswordHex),
12376 TOJSON_IMPL(enginePolicy),
12377 TOJSON_IMPL(configurationCheckSignalName),
12378 TOJSON_IMPL(fipsCrypto),
12379 TOJSON_IMPL(nsm)
12380 };
12381 }
12382 static void from_json(const nlohmann::json& j, EarServerConfiguration& p)
12383 {
12384 p.clear();
12385 getOptional<std::string>("id", p.id, j);
12386 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
12387 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
12388 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
12389 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
12390 getOptional<EarServerStatusReportConfiguration>("statusReport", p.statusReport, j);
12391 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
12392 getOptional<EarServerInternals>("internals", p.internals, j);
12393 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
12394 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
12395 j.at("enginePolicy").get_to(p.enginePolicy);
12396 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
12397 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
12398 getOptional<NsmConfiguration>("nsm", p.nsm, j);
12399 }
12400
12401//-----------------------------------------------------------
12402 JSON_SERIALIZED_CLASS(EngageSemGroupsConfiguration)
12413 {
12414 IMPLEMENT_JSON_SERIALIZATION()
12415 IMPLEMENT_JSON_DOCUMENTATION(EngageSemGroupsConfiguration)
12416
12417 public:
12419 std::vector<Group> groups;
12420
12422 {
12423 clear();
12424 }
12425
12426 void clear()
12427 {
12428 groups.clear();
12429 }
12430 };
12431
12432 static void to_json(nlohmann::json& j, const EngageSemGroupsConfiguration& p)
12433 {
12434 j = nlohmann::json{
12435 TOJSON_IMPL(groups)
12436 };
12437 }
12438 static void from_json(const nlohmann::json& j, EngageSemGroupsConfiguration& p)
12439 {
12440 p.clear();
12441 getOptional<std::vector<Group>>("groups", p.groups, j);
12442 }
12443
12444 //-----------------------------------------------------------
12445 JSON_SERIALIZED_CLASS(EngageSemServerStatusReportConfiguration)
12456 {
12457 IMPLEMENT_JSON_SERIALIZATION()
12458 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerStatusReportConfiguration)
12459
12460 public:
12462 std::string fileName;
12463
12466
12469
12471 std::string runCmd;
12472
12475
12477 {
12478 clear();
12479 }
12480
12481 void clear()
12482 {
12483 fileName.clear();
12484 intervalSecs = 60;
12485 enabled = false;
12486 includeGroupDetail = false;
12487 runCmd.clear();
12488 }
12489 };
12490
12491 static void to_json(nlohmann::json& j, const EngageSemServerStatusReportConfiguration& p)
12492 {
12493 j = nlohmann::json{
12494 TOJSON_IMPL(fileName),
12495 TOJSON_IMPL(intervalSecs),
12496 TOJSON_IMPL(enabled),
12497 TOJSON_IMPL(includeGroupDetail),
12498 TOJSON_IMPL(runCmd)
12499 };
12500 }
12501 static void from_json(const nlohmann::json& j, EngageSemServerStatusReportConfiguration& p)
12502 {
12503 p.clear();
12504 getOptional<std::string>("fileName", p.fileName, j);
12505 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
12506 getOptional<bool>("enabled", p.enabled, j, false);
12507 getOptional<std::string>("runCmd", p.runCmd, j);
12508 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
12509 }
12510
12511 //-----------------------------------------------------------
12512 JSON_SERIALIZED_CLASS(EngageSemServerInternals)
12525 {
12526 IMPLEMENT_JSON_SERIALIZATION()
12527 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerInternals)
12528
12529 public:
12532
12535
12538
12540 {
12541 clear();
12542 }
12543
12544 void clear()
12545 {
12546 watchdog.clear();
12547 tuning.clear();
12548 housekeeperIntervalMs = 1000;
12549 }
12550 };
12551
12552 static void to_json(nlohmann::json& j, const EngageSemServerInternals& p)
12553 {
12554 j = nlohmann::json{
12555 TOJSON_IMPL(watchdog),
12556 TOJSON_IMPL(housekeeperIntervalMs),
12557 TOJSON_IMPL(tuning)
12558 };
12559 }
12560 static void from_json(const nlohmann::json& j, EngageSemServerInternals& p)
12561 {
12562 p.clear();
12563 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
12564 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
12565 getOptional<TuningSettings>("tuning", p.tuning, j);
12566 }
12567
12568 //-----------------------------------------------------------
12569 JSON_SERIALIZED_CLASS(EngageSemServerConfiguration)
12579 {
12580 IMPLEMENT_JSON_SERIALIZATION()
12581 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerConfiguration)
12582
12583 public:
12584
12586 std::string id;
12587
12590
12593
12596
12599
12602
12605
12608
12611
12614
12617
12620
12623
12626
12627 int maxQueueLen;
12628 int minQueuingMs;
12629 int maxQueuingMs;
12630 int minPriority;
12631 int maxPriority;
12632
12634 {
12635 clear();
12636 }
12637
12638 void clear()
12639 {
12640 id.clear();
12641 serviceConfigurationFileCheckSecs = 60;
12642 groupsConfigurationFileName.clear();
12643 groupsConfigurationFileCommand.clear();
12644 groupsConfigurationFileCheckSecs = 60;
12645 statusReport.clear();
12646 externalHealthCheckResponder.clear();
12647 internals.clear();
12648 certStoreFileName.clear();
12649 certStorePasswordHex.clear();
12650 enginePolicy.clear();
12651 configurationCheckSignalName = "rts.9a164fa.${id}";
12652 fipsCrypto.clear();
12653 nsm.clear();
12654
12655 maxQueueLen = 64;
12656 minQueuingMs = 0;
12657 maxQueuingMs = 15000;
12658 minPriority = 0;
12659 maxPriority = 255;
12660 }
12661 };
12662
12663 static void to_json(nlohmann::json& j, const EngageSemServerConfiguration& p)
12664 {
12665 j = nlohmann::json{
12666 TOJSON_IMPL(id),
12667 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
12668 TOJSON_IMPL(groupsConfigurationFileName),
12669 TOJSON_IMPL(groupsConfigurationFileCommand),
12670 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
12671 TOJSON_IMPL(statusReport),
12672 TOJSON_IMPL(externalHealthCheckResponder),
12673 TOJSON_IMPL(internals),
12674 TOJSON_IMPL(certStoreFileName),
12675 TOJSON_IMPL(certStorePasswordHex),
12676 TOJSON_IMPL(enginePolicy),
12677 TOJSON_IMPL(configurationCheckSignalName),
12678 TOJSON_IMPL(fipsCrypto),
12679 TOJSON_IMPL(nsm),
12680 TOJSON_IMPL(maxQueueLen),
12681 TOJSON_IMPL(minQueuingMs),
12682 TOJSON_IMPL(maxQueuingMs),
12683 TOJSON_IMPL(minPriority),
12684 TOJSON_IMPL(maxPriority)
12685 };
12686 }
12687 static void from_json(const nlohmann::json& j, EngageSemServerConfiguration& p)
12688 {
12689 p.clear();
12690 getOptional<std::string>("id", p.id, j);
12691 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
12692 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
12693 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
12694 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
12695 getOptional<EngageSemServerStatusReportConfiguration>("statusReport", p.statusReport, j);
12696 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
12697 getOptional<EngageSemServerInternals>("internals", p.internals, j);
12698 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
12699 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
12700 j.at("enginePolicy").get_to(p.enginePolicy);
12701 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
12702 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
12703 getOptional<NsmConfiguration>("nsm", p.nsm, j);
12704 getOptional<int>("maxQueueLen", p.maxQueueLen, j, 64);
12705 getOptional<int>("minQueuingMs", p.minQueuingMs, j, 0);
12706 getOptional<int>("maxQueuingMs", p.maxQueuingMs, j, 15000);
12707 getOptional<int>("minPriority", p.minPriority, j, 0);
12708 getOptional<int>("maxPriority", p.maxPriority, j, 255);
12709 }
12710
12711 //-----------------------------------------------------------
12712 JSON_SERIALIZED_CLASS(EngateGroup)
12722 class EngateGroup : public Group
12723 {
12724 IMPLEMENT_JSON_SERIALIZATION()
12725 IMPLEMENT_JSON_DOCUMENTATION(EngateGroup)
12726
12727 public:
12728 bool useVad;
12729 uint32_t inputHangMs;
12730 uint32_t inputActivationPowerThreshold;
12731 uint32_t inputDeactivationPowerThreshold;
12732
12733 EngateGroup()
12734 {
12735 clear();
12736 }
12737
12738 void clear()
12739 {
12740 Group::clear();
12741 useVad = false;
12742 inputHangMs = 750;
12743 inputActivationPowerThreshold = 700;
12744 inputDeactivationPowerThreshold = 125;
12745 }
12746 };
12747
12748 static void to_json(nlohmann::json& j, const EngateGroup& p)
12749 {
12750 nlohmann::json g;
12751 to_json(g, static_cast<const Group&>(p));
12752
12753 j = nlohmann::json{
12754 TOJSON_IMPL(useVad),
12755 TOJSON_IMPL(inputHangMs),
12756 TOJSON_IMPL(inputActivationPowerThreshold),
12757 TOJSON_IMPL(inputDeactivationPowerThreshold)
12758 };
12759 }
12760 static void from_json(const nlohmann::json& j, EngateGroup& p)
12761 {
12762 p.clear();
12763 from_json(j, static_cast<Group&>(p));
12764 getOptional<uint32_t>("inputHangMs", p.inputHangMs, j, 750);
12765 getOptional<uint32_t>("inputActivationPowerThreshold", p.inputActivationPowerThreshold, j, 700);
12766 getOptional<uint32_t>("inputDeactivationPowerThreshold", p.inputDeactivationPowerThreshold, j, 125);
12767 }
12768
12769 //-----------------------------------------------------------
12770 JSON_SERIALIZED_CLASS(EngateGroupsConfiguration)
12781 {
12782 IMPLEMENT_JSON_SERIALIZATION()
12783 IMPLEMENT_JSON_DOCUMENTATION(EngateGroupsConfiguration)
12784
12785 public:
12787 std::vector<EngateGroup> groups;
12788
12790 {
12791 clear();
12792 }
12793
12794 void clear()
12795 {
12796 groups.clear();
12797 }
12798 };
12799
12800 static void to_json(nlohmann::json& j, const EngateGroupsConfiguration& p)
12801 {
12802 j = nlohmann::json{
12803 TOJSON_IMPL(groups)
12804 };
12805 }
12806 static void from_json(const nlohmann::json& j, EngateGroupsConfiguration& p)
12807 {
12808 p.clear();
12809 getOptional<std::vector<EngateGroup>>("groups", p.groups, j);
12810 }
12811
12812 //-----------------------------------------------------------
12813 JSON_SERIALIZED_CLASS(EngateServerStatusReportConfiguration)
12824 {
12825 IMPLEMENT_JSON_SERIALIZATION()
12826 IMPLEMENT_JSON_DOCUMENTATION(EngateServerStatusReportConfiguration)
12827
12828 public:
12830 std::string fileName;
12831
12834
12837
12839 std::string runCmd;
12840
12843
12845 {
12846 clear();
12847 }
12848
12849 void clear()
12850 {
12851 fileName.clear();
12852 intervalSecs = 60;
12853 enabled = false;
12854 includeGroupDetail = false;
12855 runCmd.clear();
12856 }
12857 };
12858
12859 static void to_json(nlohmann::json& j, const EngateServerStatusReportConfiguration& p)
12860 {
12861 j = nlohmann::json{
12862 TOJSON_IMPL(fileName),
12863 TOJSON_IMPL(intervalSecs),
12864 TOJSON_IMPL(enabled),
12865 TOJSON_IMPL(includeGroupDetail),
12866 TOJSON_IMPL(runCmd)
12867 };
12868 }
12869 static void from_json(const nlohmann::json& j, EngateServerStatusReportConfiguration& p)
12870 {
12871 p.clear();
12872 getOptional<std::string>("fileName", p.fileName, j);
12873 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
12874 getOptional<bool>("enabled", p.enabled, j, false);
12875 getOptional<std::string>("runCmd", p.runCmd, j);
12876 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
12877 }
12878
12879 //-----------------------------------------------------------
12880 JSON_SERIALIZED_CLASS(EngateServerInternals)
12893 {
12894 IMPLEMENT_JSON_SERIALIZATION()
12895 IMPLEMENT_JSON_DOCUMENTATION(EngateServerInternals)
12896
12897 public:
12900
12903
12906
12908 {
12909 clear();
12910 }
12911
12912 void clear()
12913 {
12914 watchdog.clear();
12915 tuning.clear();
12916 housekeeperIntervalMs = 1000;
12917 }
12918 };
12919
12920 static void to_json(nlohmann::json& j, const EngateServerInternals& p)
12921 {
12922 j = nlohmann::json{
12923 TOJSON_IMPL(watchdog),
12924 TOJSON_IMPL(housekeeperIntervalMs),
12925 TOJSON_IMPL(tuning)
12926 };
12927 }
12928 static void from_json(const nlohmann::json& j, EngateServerInternals& p)
12929 {
12930 p.clear();
12931 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
12932 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
12933 getOptional<TuningSettings>("tuning", p.tuning, j);
12934 }
12935
12936 //-----------------------------------------------------------
12937 JSON_SERIALIZED_CLASS(EngateServerConfiguration)
12947 {
12948 IMPLEMENT_JSON_SERIALIZATION()
12949 IMPLEMENT_JSON_DOCUMENTATION(EngateServerConfiguration)
12950
12951 public:
12952
12954 std::string id;
12955
12958
12961
12964
12967
12970
12973
12976
12979
12982
12985
12988
12991
12994
12996 {
12997 clear();
12998 }
12999
13000 void clear()
13001 {
13002 id.clear();
13003 serviceConfigurationFileCheckSecs = 60;
13004 groupsConfigurationFileName.clear();
13005 groupsConfigurationFileCommand.clear();
13006 groupsConfigurationFileCheckSecs = 60;
13007 statusReport.clear();
13008 externalHealthCheckResponder.clear();
13009 internals.clear();
13010 certStoreFileName.clear();
13011 certStorePasswordHex.clear();
13012 enginePolicy.clear();
13013 configurationCheckSignalName = "rts.9a164fa.${id}";
13014 fipsCrypto.clear();
13015 nsm.clear();
13016 }
13017 };
13018
13019 static void to_json(nlohmann::json& j, const EngateServerConfiguration& p)
13020 {
13021 j = nlohmann::json{
13022 TOJSON_IMPL(id),
13023 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
13024 TOJSON_IMPL(groupsConfigurationFileName),
13025 TOJSON_IMPL(groupsConfigurationFileCommand),
13026 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
13027 TOJSON_IMPL(statusReport),
13028 TOJSON_IMPL(externalHealthCheckResponder),
13029 TOJSON_IMPL(internals),
13030 TOJSON_IMPL(certStoreFileName),
13031 TOJSON_IMPL(certStorePasswordHex),
13032 TOJSON_IMPL(enginePolicy),
13033 TOJSON_IMPL(configurationCheckSignalName),
13034 TOJSON_IMPL(fipsCrypto),
13035 TOJSON_IMPL(nsm)
13036 };
13037 }
13038 static void from_json(const nlohmann::json& j, EngateServerConfiguration& p)
13039 {
13040 p.clear();
13041 getOptional<std::string>("id", p.id, j);
13042 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
13043 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
13044 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
13045 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
13046 getOptional<EngateServerStatusReportConfiguration>("statusReport", p.statusReport, j);
13047 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
13048 getOptional<EngateServerInternals>("internals", p.internals, j);
13049 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
13050 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
13051 j.at("enginePolicy").get_to(p.enginePolicy);
13052 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
13053 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
13054 getOptional<NsmConfiguration>("nsm", p.nsm, j);
13055 }
13056
13057 //-----------------------------------------------------------
13058 static inline void dumpExampleConfigurations(const char *path)
13059 {
13060 WatchdogSettings::document();
13061 FileRecordingRequest::document();
13062 Feature::document();
13063 Featureset::document();
13064 Agc::document();
13065 RtpPayloadTypeTranslation::document();
13066 NetworkInterfaceDevice::document();
13067 ListOfNetworkInterfaceDevice::document();
13068 RtpHeader::document();
13069 BlobInfo::document();
13070 TxAudioUri::document();
13071 AdvancedTxParams::document();
13072 Identity::document();
13073 Location::document();
13074 Power::document();
13075 Connectivity::document();
13076 PresenceDescriptorGroupItem::document();
13077 PresenceDescriptor::document();
13078 NetworkTxOptions::document();
13079 TcpNetworkTxOptions::document();
13080 NetworkAddress::document();
13081 NetworkAddressRxTx::document();
13082 NetworkAddressRestrictionList::document();
13083 StringRestrictionList::document();
13084 Rallypoint::document();
13085 RallypointCluster::document();
13086 NetworkDeviceDescriptor::document();
13087 TxAudio::document();
13088 AudioDeviceDescriptor::document();
13089 ListOfAudioDeviceDescriptor::document();
13090 Audio::document();
13091 TalkerInformation::document();
13092 GroupTalkers::document();
13093 Presence::document();
13094 Advertising::document();
13095 GroupPriorityTranslation::document();
13096 GroupTimeline::document();
13097 GroupAppTransport::document();
13098 RtpProfile::document();
13099 Group::document();
13100 Mission::document();
13101 LicenseDescriptor::document();
13102 EngineNetworkingRpUdpStreaming::document();
13103 EnginePolicyNetworking::document();
13104 Aec::document();
13105 Vad::document();
13106 Bridge::document();
13107 AndroidAudio::document();
13108 EnginePolicyAudio::document();
13109 SecurityCertificate::document();
13110 EnginePolicySecurity::document();
13111 EnginePolicyLogging::document();
13112 EnginePolicyDatabase::document();
13113 NamedAudioDevice::document();
13114 EnginePolicyNamedAudioDevices::document();
13115 Licensing::document();
13116 DiscoveryMagellan::document();
13117 DiscoverySsdp::document();
13118 DiscoverySap::document();
13119 DiscoveryCistech::document();
13120 DiscoveryTrellisware::document();
13121 DiscoveryConfiguration::document();
13122 EnginePolicyInternals::document();
13123 EnginePolicyTimelines::document();
13124 RtpMapEntry::document();
13125 ExternalModule::document();
13126 ExternalCodecDescriptor::document();
13127 EnginePolicy::document();
13128 TalkgroupAsset::document();
13129 EngageDiscoveredGroup::document();
13130 RallypointPeer::document();
13131 RallypointServerLimits::document();
13132 RallypointServerStatusReportConfiguration::document();
13133 RallypointServerLinkGraph::document();
13134 ExternalHealthCheckResponder::document();
13135 Tls::document();
13136 PeeringConfiguration::document();
13137 IgmpSnooping::document();
13138 RallypointReflector::document();
13139 RallypointUdpStreaming::document();
13140 RallypointServer::document();
13141 PlatformDiscoveredService::document();
13142 TimelineQueryParameters::document();
13143 CertStoreCertificate::document();
13144 CertStore::document();
13145 CertStoreCertificateElement::document();
13146 CertStoreDescriptor::document();
13147 CertificateDescriptor::document();
13148 BridgeCreationDetail::document();
13149 GroupConnectionDetail::document();
13150 GroupTxDetail::document();
13151 GroupCreationDetail::document();
13152 GroupReconfigurationDetail::document();
13153 GroupHealthReport::document();
13154 InboundProcessorStats::document();
13155 TrafficCounter::document();
13156 GroupStats::document();
13157 RallypointConnectionDetail::document();
13158 BridgingConfiguration::document();
13159 BridgingServerStatusReportConfiguration::document();
13160 BridgingServerInternals::document();
13161 BridgingServerConfiguration::document();
13162 EarGroupsConfiguration::document();
13163 EarServerStatusReportConfiguration::document();
13164 EarServerInternals::document();
13165 EarServerConfiguration::document();
13166 RangerPackets::document();
13167 TransportImpairment::document();
13168
13169 EngageSemGroupsConfiguration::document();
13170 EngageSemServerStatusReportConfiguration::document();
13171 EngageSemServerInternals::document();
13172 EngageSemServerConfiguration::document();
13173 }
13174}
13175
13176#ifndef WIN32
13177 #pragma GCC diagnostic pop
13178#endif
13179
13180#endif /* ConfigurationObjects_h */
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.
GroupRestrictionAccessPolicyType_t
Enum describing restriction types.
@ graptStrict
Registration for groups is NOT allowed by default - requires definitive access through something like...
@ graptPermissive
Registration for groups is allowed by default.
RestrictionType_t
Enum describing restriction types.
@ rtWhitelist
Elements are whitelisted.
@ rtBlacklist
Elements are blacklisted.
Configuration when using the engageBeginGroupTxAdvanced API.
TxAudioUri audioUri
[Optional] A URI to stream from instead of the audio input device
uint8_t priority
[Optional, Default: 0] Transmit priority between 0 (lowest) and 255 (highest).
bool receiverRxMuteForAliasSpecializer
[Optional, Default: false] Indicates that the aliasSpecializer must cause receivers to mute this tran...
uint16_t subchannelTag
[Optional, Default: 0] Defines a sub channel within a group. Audio will be opaque to all other client...
bool reBegin
[Optional, Default: false] Indicates that the transmission should be restarted.
uint16_t aliasSpecializer
[Optional, Default: 0] Defines a numeric affinity value to be included in the transmission....
uint16_t flags
[Optional, Default: 0] Combination of the ENGAGE_TXFLAG_xxx flags
std::string alias
[Optional, Default: empty string] The Engage Engine should transmit the user's alias as part of the h...
bool includeNodeId
[Optional, Default: false] The Engage Engine should transmit the NodeId as part of the header extensi...
uint32_t txId
[Optional, Default: 0] Transmission ID
bool muted
[Optional, Default: false] While the microphone should be opened, captured audio should be ignored un...
Defines parameters for advertising of an entity such as a known, public, group.
int intervalMs
[Optional, Default: 20000] Interval at which the advertisement should be sent in milliseconds.
bool enabled
[Optional, Default: false] Enabled advertising
bool alwaysAdvertise
[Optional, Default: false] If true, the node will advertise the item even if it detects other nodes m...
Acoustic Echo Cancellation settings.
int speakerTailMs
[Optional, Default: 60] Milliseconds of speaker tail
bool cng
[Optional, Default: true] Enable comfort noise generation
bool enabled
[Optional, Default: false] Enable acoustic echo cancellation
Mode_t
Acoustic echo cancellation mode enum.
Mode_t mode
[Optional, Default: aecmDefault] Specifies AEC mode. See Mode_t for all modes
bool enabled
[Optional, Default: false] Enables automatic gain control.
int compressionGainDb
[Optional, Default: 25, Minimum = 0, Maximum = 125] Gain in db.
bool enableLimiter
[Optional, Default: false] Enables limiter to prevent overdrive.
int maxLevel
[Optional, Default: 255] Maximum level.
int minLevel
[Optional, Default: 0] Minimum level.
int targetLevelDb
[Optional, Default: 9] Target gain level if there is no compression gain.
Default audio settings for AndroidAudio.
int api
[Optional, Default 0] Android audio API version: 0=Unspecified, 1=AAudio, 2=OpenGLES
int sessionId
[Optional, Default INVALID_SESSION_ID] A session ID from the Android AudioManager
int contentType
[Optional, Default 1] Usage type: 1=Speech 2=Music 3=Movie 4=Sonification
int sharingMode
[Optional, Default 0] Sharing mode: 0=Exclusive, 1=Shared
int performanceMode
[Optional, Default 12] Performance mode: 10=None/Default, 11=PowerSaving, 12=LowLatency
int inputPreset
[Optional, Default 7] Input preset: 1=Generic 5=Camcorder 6=VoiceRecognition 7=VoiceCommunication 9=U...
int usage
[Optional, Default 2] Usage type: 1=Media 2=VoiceCommunication 3=VoiceCommunicationSignalling 4=Alarm...
int engineMode
[Optional, Default 0] 0=use legacy low-level APIs, 1=use high-level Android APIs
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.
std::vector< std::string > groups
List of group IDs to be included in the session.
bool enabled
[Optional, Default: true] Enable the bridge NOTE: this is only used bt EBS and is ignored when callin...
std::vector< Group > groups
Array of bridges in the configuration.
std::vector< Bridge > bridges
Array of bridges in the configuration.
std::string certStoreFileName
Path to the certificate store.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
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.
NsmConfiguration nsm
[Optional] Settings for NSM.
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
TuningSettings tuning
[Optional] Low-level tuning
WatchdogSettings watchdog
[Optional] Settings for the watchdog.
TODO: Configuration for the bridging server status report file.
Description of a certstore certificate element.
bool hasPrivateKey
True if the certificate has a private key associated with it.
Holds a certificate and (optionally) a private key in a certstore.
std::string certificatePem
Certificate in PEM format.
std::string privateKeyPem
Private key in PEM format.
std::vector< CertStoreCertificateElement > certificates
Array of certificate elements.
std::string fileName
Name of the file the certstore resides in.
std::vector< KvPair > kvp
Array of kv pairs.
std::vector< KvPair > kvp
[Optional] Array of KV pairs
std::vector< CertStoreCertificate > certificates
Array of certificates in this store.
std::string id
The ID of the certstore.
std::vector< CertificateSubjectElement > subjectElements
Array of subject elements.
std::string publicKeyPem
PEM version of the public key.
std::vector< CertificateSubjectElement > issuerElements
Array of issuer elements.
bool selfSigned
Indicates whether the certificqte is self-signed.
std::string certificatePem
PEM version of the certificate.
Description of a certificate subject element.
Connectivity Information used as part of the PresenceDescriptor.
int type
Is the type of connectivity the device has to the network.
int strength
Is the strength of the connection connection as reported by the OS - usually in dbm.
int rating
Is the quality of the network connection as reported by the OS - OS dependent.
Configuration for the Discovery features.
DiscoveryMagellan Discovery settings.
Tls tls
[Optional] Details concerning Transport Layer Security.
std::string interfaceName
[Optional, Default: default system interface] The network interface to bind to for discovery packets.
Session Announcement Discovery settings settings.
int ageTimeoutMs
[Optional, Default 30000] Number of milliseconds of no SAP announcment before the advertised entity i...
Advertising advertising
Parameters for advertising.
NetworkAddress address
[Optional, Default 224.2.127.254:9875] IP address and port.
bool enabled
[Optional, Default: false] Enables the Engage Engine to use SAP for asset discovery.
std::string interfaceName
[Optional, Default: default system interface] The network interface to bind to for discovery packets.
Simple Service Discovery Protocol settings.
bool enabled
[Optional, Default: false] Enables the Engage Engine to use SSDP for asset discovery.
std::vector< std::string > searchTerms
[Optional] An array of regex strings to be used to filter SSDP requests and responses.
int ageTimeoutMs
[Optional, Default 30000] Number of milliseconds of no SSDP announcment before the advertised entity ...
Advertising advertising
Parameters for advertising.
std::string interfaceName
[Optional, Default: default system interface] The network interface to bind to for discovery packets.
NetworkAddress address
[Optional, Default 255.255.255.255:1900] IP address and port.
std::vector< Group > groups
Array of groups in the configuration.
std::string id
A unqiue identifier for the EAR server.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
NsmConfiguration nsm
[Optional] Settings for NSM.
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....
NsmConfiguration nsm
[Optional] Settings for NSM.
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.
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.
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.
NsmConfiguration nsm
[Optional] Settings for NSM.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
EnginePolicy enginePolicy
The policy to be used for the underlying Engage Engine.
int serviceConfigurationFileCheckSecs
Number of seconds between checks to see if the service configuration has been updated....
std::string id
A unqiue identifier for the EAR server.
std::string groupsConfigurationFileCommand
Command-line to execute that returns a configuration.
TuningSettings tuning
[Optional] Low-level tuning
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
WatchdogSettings watchdog
[Optional] Settings for the EAR's watchdog.
TODO: Configuration for the engate server status report file.
TxPriority_t priority
[Optional, Default: priVoice] Transmission priority. This has meaning on some operating systems based...
int keepaliveIntervalSecs
Optional, Default: 15] Seconds interval at which to send UDP keepalives to Rallypoints....
int ttl
[Optional, Default: 64] Time to live or hop limit is a mechanism that limits the lifespan or lifetime...
int port
[Optional, 0] The port to be used for Rallypoint UDP streaming. A value of 0 will result in an epheme...
bool enabled
[Optional, false] Enables UDP streaming if the RP supports it
Default audio settings for Engage Engine policy.
AudioRegistry registry
[Optional] If specified, this registry will be used to discover the input and output devices
Vad vad
[Optional] Voice activity detection settings
Agc outputAgc
[Optional] Automatic Gain Control for audio outputs
bool saveOutputPcm
[Optional, Default: false] If true, input audio is written to a PCM file in the data directory
bool enabled
[Optional, Default: true] Enables audio processing
AndroidAudio android
[Optional] Android-specific audio settings
int internalRate
[Optional, Default: 16000] Internal sampling rate - 8000 or 16000
bool muteTxOnTx
[Optional, Default: false] Automatically mute TX when TX begins
Agc inputAgc
[Optional] Automatic Gain Control for audio inputs
bool hardwareEnabled
[Optional, Default: true] Enables local machine hardware audio
Aec aec
[Optional] Acoustic echo cancellation settings
bool denoiseInput
[Optional, Default: false] Denoise input
bool saveInputPcm
[Optional, Default: false] If true, input audio is written to a PCM file in the data directory
bool denoiseOutput
[Optional, Default: false] Denoise output
int internalChannels
[Optional, Default: 2] Internal audio channel count rate - 1 or 2
Provides Engage Engine policy configuration.
std::vector< ExternalModule > externalCodecs
Optional external codecs.
EnginePolicyNamedAudioDevices namedAudioDevices
Optional named audio devices (Linux only)
Featureset featureset
Optional feature set.
EnginePolicyDatabase database
Database settings.
EnginePolicyAudio audio
Audio settings.
std::string dataDirectory
Specifies the root of the physical path to store data.
EnginePolicyLogging logging
Logging settings.
DiscoveryConfiguration discovery
Discovery settings.
std::vector< RtpMapEntry > rtpMap
Optional RTP - overrides the default.
EngineStatusReportConfiguration statusReport
Optional statusReport - details for the status report.
EnginePolicyInternals internals
Internal settings.
EnginePolicySecurity security
Security settings.
EnginePolicyTimelines timelines
Timelines settings.
EnginePolicyNetworking networking
Security settings.
TuningSettings tuning
[Optional] Low-level tuning
int stickyTidHangSecs
[Optional, Default: 10] The number of seconds after which "sticky" transmission IDs expire.
int maxTxSecs
[Optional, Default: 30] The default duration the engageBeginGroupTx and engageBeginGroupTxAdvanced fu...
int rpConnectionTimeoutSecs
[Optional, Default: 5] Connection timeout in seconds to RP
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 preventMulticastFailover
[Optional, Default: false] Overrides/cancels group-level multicast failover if set to true
Default certificate to use for security operation in the Engage Engine.
SecurityCertificate certificate
The default certificate and private key for the Engine instance.
std::vector< std::string > caCertificates
[Optional] An array of CA certificates to be used for validation of far-end X.509 certificates
long autosaveIntervalSecs
[Default 5] Interval at which events are to be saved from memory to disk (a slow operation)
int maxStorageMb
Specifies the maximum storage space to use.
bool enabled
[Optional, Default: true] Specifies if Time Lines are enabled by default.
int maxDiskMb
Specifies the maximum disk space to use - defaults to maxStorageMb.
SecurityCertificate security
The certificate to use for signing the recording.
int maxAudioEventMemMb
Specifies the maximum number of megabytes to allow for a single audio event's memory block - defaults...
long maxEventAgeSecs
Maximum age of an event after which it is to be erased.
int maxMemMb
Specifies the maximum memory to use - defaults to maxStorageMb.
std::string storageRoot
Specifies where the timeline recordings will be stored physically.
bool ephemeral
[Default false] If true, recordings are automatically purged when the Engine is shut down and/or rein...
bool disableSigningAndVerification
[Default false] If true, prevents signing of events - i.e. no anti-tanpering features will be availab...
int maxEvents
Maximum number of events to be retained.
long groomingIntervalSecs
Interval at which events are to be checked for age-based grooming.
TODO: Configuration for the translation server status report file.
TODO: Configuration to enable external systems to use to check if the service is still running.
Base for a description of an external module.
nlohmann::json configuration
Optional free-form JSON configuration to be passed to the module.
bool debug
[Optional, Default false] If true, requests the crypto engine module to run in debugging mode.
bool enabled
[Optional, Default false] If true, requires FIPS140-2 crypto operation.
std::string curves
[Optional] Specifies the NIST-approved curves to be used for FIPS
std::string path
Path where the crypto engine module is located
std::string ciphers
[Optional] Specifies the NIST-approved ciphers to be used for FIPS
Configuration for the optional custom transport functionality for Group.
bool enabled
[Optional, Default: false] Enables custom feature.
std::string id
The id/name of the transport. This must match the id/name supplied when registering the app transport...
BridgingOpMode_t
Enum describing bridging operation mode types where applicable.
AdvancedTxParams mixedStreamTxParams
[Optional] Parameters to be applied when output is mixed (bomMixedStream)
BridgingOpMode_t mode
[Optional] The output mode
Detailed information for a group connection.
bool asFailover
Indicates whether the connection is for purposes of failover.
ConnectionType_t connectionType
The connection type.
std::string reason
[Optional] Additional reason information
Detailed information for a group creation.
CreationStatus_t status
The creation status.
uint8_t tx
[Optional] The default audio priority
uint8_t rx
[Optional] The default audio RX priority
Detailed information regarding a group's health.
GroupAppTransport appTransport
[Optional] Settings necessary if the group is transported via an application-supplied custom transpor...
std::string source
[Optional, Default: null] Indicates the source of this configuration - e.g. from the application or d...
Presence presence
Presence configuration (see Presence).
std::vector< uint16_t > specializerAffinities
List of specializer IDs that the local node has an affinity for/member of.
std::vector< Source > ignoreSources
[Optional] List of sources to ignore for this group
NetworkAddress rtcpPresenceRx
The network address for receiving RTCP presencing packets.
bool allowLoopback
[Optional, Default: false] Allows for processing of looped back packets - primarily meant for debuggi...
Type_t
Enum describing the group types.
NetworkAddress tx
The network address for transmitting network traffic to.
std::string alias
User alias to transmit as part of the realtime audio stream when using the engageBeginGroupTx API.
int stickyTidHangSecs
[Optional, Default: 10] The number of seconds after which "sticky" transmission IDs expire.
TxAudio txAudio
Audio transmit options such as codec, framing size etc (see TxAudio).
int maxRxSecs
[Optional, Default: 0] Maximum number of seconds the Engine will receive for on this group.
PacketCapturer txCapture
Details for capture of transmitted packets
NetworkTxOptions txOptions
Transmit options for the group (see NetworkTxOptions).
std::string synVoice
Name of the synthesis voice to use for the group
TransportImpairment rxImpairment
[Optional] The RX impairment to apply
std::string languageCode
ISO 639-2 language code for the group
std::string cryptoPassword
Password to be used for encryption. Note that this is not the encryption key but, rather,...
std::vector< std::string > presenceGroupAffinities
List of presence group IDs with which this group has an affinity.
GroupTimeline timeline
Audio timeline is configuration.
GroupPriorityTranslation priorityTranslation
[Optional] Describe how traffic for this group on a different addressing scheme translates to priorit...
bool disablePacketEvents
[Optional, Default: false] Disable packet events.
bool blockAdvertising
[Optional, Default: false] Set this to true if you do not want the Engine to advertise this Group on ...
bool ignoreAudioTraffic
[Optional, Default: false] Indicates that the group should ignore traffic that is audio-related
std::string interfaceName
The name of the network interface to use for multicasting for this group. If not provided,...
bool _wasDeserialized_rtpProfile
[Internal - not serialized
bool enableMulticastFailover
[Optional, Default: false] Set this to true to enable failover to multicast operation if a Rallypoint...
std::string name
The human readable name for the group.
NetworkAddress rx
The network address for receiving network traffic on.
Type_t type
Specifies the group type (see Type_t).
GroupDefaultAudioPriority defaultAudioPriority
Default audio priority for the group (see GroupDefaultAudioPriority).
uint16_t blobRtpPayloadType
[Optional, Default: ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE] The RTP payload type to be used for blobs s...
std::vector< Rallypoint > rallypoints
[DEPRECATED] List of Rallypoint (s) the Group should use to connect to a Rallypoint router....
RtpProfile rtpProfile
[Optional] RTP profile the group
std::vector< RtpPayloadTypeTranslation > inboundRtpPayloadTypeTranslations
[Optional] A vector of translations from external entity RTP payload types to those used by Engage
int multicastFailoverSecs
[Optional, Default: 10] Specifies the number fo seconds to wait after Rallypoint connection failure t...
InboundAliasGenerationPolicy_t
Enum describing the alias generation policy.
RangerPackets rangerPackets
[Optional] Ranger packet options
int rfc4733RtpPayloadId
[Optional, Default: 0] The RTP payload ID by which to identify (RX and TX) payloads encoded according...
uint32_t securityLevel
[Optional, Default: 0] The security classification level of the group.
PacketCapturer rxCapture
Details for capture of received packets
GroupBridgeTargetOutputDetail bridgeTargetOutputDetail
Output details for when the group is a target in a bridge (see GroupBridgeTargetOutputDetail).
std::string id
Unique identity for the group.
AudioGate gateIn
[Optional] Inbound gating of audio - only audio allowed through by the gate will be processed
RallypointCluster rallypointCluster
Cluster of one or more Rallypoints the group may use.
TransportImpairment txImpairment
[Optional] The TX impairment to apply
Audio audio
Sets audio properties like which audio device to use, audio gain etc (see Audio).
bool lbCrypto
[Optional, Default: false] Use low-bandwidth crypto
std::string spokenName
The group name as spoken - typically by a text-to-speech system
InboundAliasGenerationPolicy_t inboundAliasGenerationPolicy
[Optional, Default: iagpAnonymousAlias]
std::string anonymousAlias
[Optional] Alias to use for inbound streams that do not have an alias component
Details for priority transmission based on unique network addressing.
Detailed information for a group reconfiguration.
ReconfigurationStatus_t status
The creation status.
List of TalkerInformation objects.
std::vector< TalkerInformation > list
List of TalkerInformation objects.
Configuration for Timeline functionality for Group.
bool enabled
[Optional, Default: true] Enables timeline feature.
int maxAudioTimeMs
[Optional, Default: 30000] Maximum audio block size to record in milliseconds.
Detailed information for a group transmit.
int remotePriority
Remote TX priority (optional)
long nonFdxMsHangRemaining
Milliseconds of hang time remaining on a non-FDX group (optional)
int localPriority
Local TX priority (optional)
uint32_t txId
Transmission ID (optional)
std::string displayName
[Optional, Default: empty string] The display name to be used for the user.
std::string userId
[Optional, Default: empty string] The user ID to be used to represent the user.
std::string nodeId
[Optional, Default: Auto Generated] This is the Node ID to use to represent instance on the network.
std::string avatar
[Optional, Default: empty string] This is a application defined field used to indicate a users avatar...
Configuration for IGMP snooping.
int queryIntervalMs
[Optional, Default 125000] Interval between sending IGMP membership queries. If 0,...
int subscriptionTimeoutMs
[Optional, Default 0] Typically calculated according to RFC specifications. Set a value here to manua...
bool enabled
Enables IGMP. Default is false.
Detailed statistics for an inbound processor.
Helper class for serializing and deserializing the LicenseDescriptor JSON.
std::string activationHmac
The HMAC to be used for activation purposes.
std::string entitlement
Entitlement key to use for the product.
std::string cargo
Reserved for internal use.
std::string manufacturerId
[Read only] Manufacturer ID.
std::string key
License Key to be used for the application.
uint8_t cargoFlags
Reserved for internal use.
int type
[Read only] 0 = unknown, 1 = perpetual, 2 = expires
std::string deviceId
[Read only] Unique device identifier generated by the Engine.
time_t expires
[Read only] The time that the license key or activation code expires in Unix timestamp - Zulu/UTC.
std::string activationCode
If the key required activation, this is the activation code generated using the entitlement,...
std::string expiresFormatted
[Read only] The time that the license key or activation code expires formatted in ISO 8601 format,...
std::string deviceId
Device Identifier. See LicenseDescriptor::deviceId for details.
std::string manufacturerId
Manufacturer ID to use for the product. See LicenseDescriptor::manufacturerId for details.
std::string activationCode
Activation Code issued for the license key. See LicenseDescriptor::activationCode for details.
std::string key
License key. See LicenseDescriptor::key for details.
std::string entitlement
Entitlement key to use for the product. See LicenseDescriptor::entitlement for details.
std::vector< Group > groups
Array of groups in the configuration.
std::vector< VoiceToVoiceSession > voiceToVoiceSessions
Array of voiceToVoice sessions in the configuration.
Configuration for the linguistics server.
LingoServerStatusReportConfiguration statusReport
Details for producing a status report.
std::string lingoConfigurationFileName
Name of a file containing the linguistics configuration.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
std::string id
A unqiue identifier for the linguistics server.
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
NsmConfiguration nsm
[Optional] Settings for NSM.
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.
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...
Description of a packet capturer.
int version
TODO: A version number for the domain configuration. Change this whenever you update your configurati...
std::string id
An identifier useful for organizations that track different domain configurations by ID.
std::vector< RallypointPeer > peers
List of Rallypoint peers to connect to.
uint32_t configurationVersion
Internal configuration version.
Device Power Information used as part of the PresenceDescriptor.
int state
[Optional, Default: 0] Is the current state that the power system is in.
int source
[Optional, Default: 0] Is the source the power is being delivered from
int level
[Optional, Default: 0] Is the current level of the battery or power system as a percentage....
Group Alias used as part of the PresenceDescriptor.
uint16_t status
Status flags for the user's participation on the group.
std::string groupId
Group Id the alias is associated with.
Represents an endpoints presence properties. Used in engageUpdatePresenceDescriptor API and PFN_ENGAG...
Power power
[Optional, Default: see Power] Device power information like charging state, battery level,...
std::string custom
[Optional, Default: empty string] Custom string application can use of presence descriptor....
bool self
[Read Only] Indicates that this presence declaration was generated by the Engage Engine the applicati...
uint32_t nextUpdate
[Read Only, Unix timestamp - Zulu/UTC] Indicates the next time the presence descriptor will be sent.
std::vector< PresenceDescriptorGroupItem > groupAliases
[Read Only] List of group items associated with this presence descriptor.
Identity identity
[Optional, Default see Identity] Endpoint's identity information.
bool announceOnReceive
[Read Only] Indicates that the Engine will announce its PresenceDescriptor in response to this messag...
uint32_t ts
[Read Only, Unix timestamp - Zulu/UTC] Indicates the timestamp that the message was originally sent.
std::string comment
[Optional] No defined limit on size but the total size of the serialized JSON object must fit inside ...
Connectivity connectivity
[Optional, Default: see Connectivity] Device connectivity information like wifi/cellular,...
uint32_t disposition
[Optional] Indicates the users disposition
Location location
[Optional, Default: see Location] Location information
Describes how the Presence is configured for a group of type Group::gtPresence in Group::Type_t.
Format_t format
Format to be used to represent presence information.
bool reduceImmediacy
[Optional, Default: false] Instructs the Engage Engine reduce the immediacy of presence announcements...
bool listenOnly
Instructs the Engage Engine to not transmit presence descriptor.
int minIntervalSecs
[Optional, Default: 5] The minimum interval to send at to prevent network flooding
int intervalSecs
[Optional, Default: 30] The interval in seconds at which to send the presence descriptor on the prese...
Defines settings for Rallypoint advertising.
std::string interfaceName
The multicast network interface for mDNS.
std::string serviceName
[Optional, Default "_rallypoint._tcp.local."] The service name
std::string hostName
[Optional] This Rallypoint's DNS-SD host name
int port
[Default: RP port] The multicast network interface for mDNS
bool enabled
[Default: false] Advertising is enabled
int rolloverSecs
Seconds between switching to a new target.
int transactionTimeoutMs
[Optional, Default: 10000] Default transaction time in milliseconds to any RP in the cluster
int connectionTimeoutSecs
[Optional, Default: 5] Default connection timeout in seconds to any RP in the cluster
std::vector< Rallypoint > rallypoints
List of Rallypoints.
ConnectionStrategy_t connectionStrategy
[Optional, Default: csRoundRobin] Specifies the connection strategy to be followed....
Detailed information for a rallypoint connection.
float serverProcessingMs
Server processing time in milliseconds - used for roundtrip reports.
uint64_t msToNextConnectionAttempt
Milliseconds until next connection attempt.
Defines settings for Rallypoint extended group restrictions.
std::vector< StringRestrictionList > restrictions
Restrictions.
int transactionTimeoutMs
[Optional, Default 10000] Number of milliseconds that a transaction may take before the link is consi...
bool allowSelfSignedCertificate
[Optional, Default false] Allows the Rallypoint to accept self-signed certificates from the far-end
std::string sni
[Optional] A user-defined string sent as the Server Name Indication (SNI) field in the TLS setup....
std::vector< std::string > caCertificates
[Optional] A vector of certificates (raw content, file names, or certificate store elements) used to ...
std::string certificate
This is the X509 certificate to use for mutual authentication.
bool verifyPeer
[Optional, Default true] Indicates whether the connection peer is to be verified by checking the vali...
bool disableMessageSigning
[Optional, Default false] Indicates whether to forego ECSDA signing of control-plane messages.
NetworkAddress host
This is the host address for the Engine to connect to the RallyPoint service.
std::string additionalProtocols
[Optional, Default: ""] Additional protocols to use for the Rallypoint connection (only used for WebS...
RpProtocol_t protocol
[Optional, Default: rppTlsTcp] Specifies the protocol to be used for the Rallypoint connection....
std::string certificateKey
This is the private key used to generate the X509 certificate.
int connectionTimeoutSecs
[Optional, Default: 5] Connection timeout in seconds to the RP
TcpNetworkTxOptions tcpTxOptions
[Optional] Tx options for the TCP link
std::string path
[Optional, Default: ""] Path to use for the RP connection (only used for WebSocket)
SecurityCertificate certificate
Internal certificate detail.
std::string additionalProtocols
[Optional, Default: ""] Additional protocols to use for the peer (only used for WebSocket)
bool forceIsMeshLeaf
Internal enablement setting.
int connectionTimeoutSecs
[Optional, Default: 0 - OS platform default] Connection timeout in seconds to the peer
NetworkAddress host
Internal host detail.
std::string path
[Optional, Default: ""] Path to use for the peer (only used for WebSocket)
bool enabled
Internal enablement setting.
OutboundWebSocketTlsPolicy_t outboundWebSocketTlsPolicy
Internal enablement setting.
Rallypoint::RpProtocol_t protocol
[Optional, Default: Rallypoint::RpProtocol_t::rppTlsTcp] Protocol to use for the peer
Definition of a static group for Rallypoints.
NetworkAddress rx
The network address for receiving network traffic on.
std::string id
Unique identity for the group.
std::vector< NetworkAddress > additionalTx
[Optional] Vector of additional TX addresses .
NetworkAddress tx
The network address for transmitting network traffic to.
DirectionRestriction_t directionRestriction
[Optional] Restriction of direction of traffic flow
DirectionRestriction_t
Enum describing direction(s) for the reflector.
std::string multicastInterfaceName
[Optional] The name of the NIC on which to send and receive multicast traffic.
Defines a behavior for a Rallypoint peer roundtrip time.
BehaviorType_t behavior
Specifies the streaming mode type (see BehaviorType_t).
Configuration for the Rallypoint server.
uint32_t maxSecurityLevel
[Optional, Default 0] Sets the maximum item security level that can be registered with the RP
bool forwardDiscoveredGroups
Enables automatic forwarding of discovered multicast traffic to peer Rallypoints.
std::string interfaceName
Name of the NIC to bind to for listening for incoming TCP connections.
NetworkTxOptions multicastTxOptions
Tx options for multicast.
bool disableMessageSigning
Set to true to forgo DSA signing of messages. Doing so is is a security risk but can be useful on CPU...
SecurityCertificate certificate
X.509 certificate and private key that identifies the Rallypoint.
std::string multicastInterfaceName
The name of the NIC on which to send and receive multicast traffic.
StringRestrictionList groupRestrictions
Group IDs to be restricted (inclusive or exclusive)
std::string peeringConfigurationFileName
Name of a file containing a JSON array of Rallypoint peers to connect to.
uint32_t sysFlags
[Optional, Default 0] Internal system flags
int listenPort
TCP port to listen on. Default is 7443.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
NetworkAddressRestrictionList multicastRestrictions
Multicasts to be restricted (inclusive or exclusive)
uint32_t normalTaskQueueBias
[Optional, Default 0] Sets the queue's normal task bias
std::string name
A human-readable name for the Rallypoint.
PacketCapturer txCapture
Details for capture of transmitted packets
std::vector< RallypointReflector > staticReflectors
Vector of static groups.
bool enableLeafReflectionReverseSubscription
If enabled, causes a domain leaf to reverse-subscribe to a core node upon the core subscribing and a ...
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
IpFamilyType_t ipFamily
[Optional, Default IpFamilyType_t::ifIp4] Address familiy to be used for listening
int peerRtTestIntervalMs
[Optional, Default: 60000] Milliseconds between sending round-trip test requests to peers
WatchdogSettings watchdog
[Optional] Settings for the Rallypoint's watchdog.
DiscoveryConfiguration discovery
Details discovery capabilities.
bool isMeshLeaf
Indicates whether this Rallypoint is part of a core domain or hangs off the periphery as a leaf node.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
GroupRestrictionAccessPolicyType_t groupRestrictionAccessPolicyType
The policy employed to allow group registration.
RallypointServerStreamStatsExport streamStatsExport
Details for exporting stream statistics.
PacketCapturer rxCapture
Details for capture of received packets
std::vector< std::string > extraDomains
[Optional] List of additional domains that can be reached via this RP
uint32_t maxOutboundPeerConnectionIntervalDeltaSecs
[Optional, Default 15] Sets the delta value for the maximum number of seconds to delay when attemptin...
TuningSettings tuning
[Optional] Low-level tuning
RallypointAdvertisingSettings advertising
[Optional] Settings for advertising.
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the Rallypoint's interaction with an external health-checker such as a load-balanc...
std::vector< RallypointExtendedGroupRestriction > extendedGroupRestrictions
Extended group restrictions.
int ioPools
Number of threading pools to create for network I/O. Default is -1 which creates 1 I/O pool per CPU c...
RallypointServerStatusReportConfiguration statusReport
Details for producing a status report.
std::vector< NamedIdentity > additionalIdentities
[Optional] List of additional named identities
IgmpSnooping igmpSnooping
IGMP snooping configuration.
RallypointServerLinkGraph linkGraph
Details for producing a Graphviz-compatible link graph.
RallypointServerLimits limits
Details for capacity limits and determining processing load.
PeeringConfiguration peeringConfiguration
Internal - not serialized.
std::string domainName
[Optional] This Rallypoint's domain name
bool allowMulticastForwarding
Allows traffic received on unicast links to be forwarded to the multicast network.
RallypointWebsocketSettings websocket
[Optional] Settings for websocket operation
std::string peeringConfigurationFileCommand
Command-line to execute that returns a JSON array of Rallypoint peers to connect to.
RallypointServerRouteMap routeMap
Details for producing a report containing the route map.
StreamIdPrivacyType_t streamIdPrivacyType
[Optional, default sptDefault] Modes for stream ID transformation.
bool allowPeerForwarding
Set to true to allow forwarding of packets received from other Rallypoints to all other Rallypoints....
TcpNetworkTxOptions tcpTxOptions
Tx options for TCP.
RallypointUdpStreaming udpStreaming
Optional configuration for high-performance UDP streaming.
bool forwardMulticastAddressing
Enables forwarding of multicast addressing to peer Rallypoints.
std::vector< RallypointRpRtTimingBehavior > peerRtBehaviors
[Optional] Array of behaviors for roundtrip times to peers
std::string id
A unqiue identifier for the Rallypoint.
NsmConfiguration nsm
[Optional] Settings for NSM.
bool disableLoopDetection
If true, turns off loop detection.
std::vector< std::string > blockedDomains
[Optional] List of domains that explictly MAY NOT connect to this RP
std::vector< std::string > allowedDomains
[Optional] List of domains that explicitly MAY connect to this RP
std::string certStoreFileName
Path to the certificate store.
int peeringConfigurationFileCheckSecs
Number of seconds between checks to see if the peering configuration has been updated....
Tls tls
Details concerning Transport Layer Security.
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.
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
RestrictionType_t type
Type indicating how the elements are to be treated.
std::vector< std::string > elements
List of elements.
RestrictionElementType_t elementsType
Type indicating what kind of data each element contains.
Contains talker information used in providing a list in GroupTalkers.
uint32_t txId
Transmission ID associated with a talker's transmission.
uint32_t ssrc
The RTS SSRC associated with a talker's transmission.
int duplicateCount
Number of duplicates detected.
int txPriority
Priority associated with a talker's transmission.
std::string alias
The user alias to represent as a "talker".
std::string nodeId
The nodeId the talker is originating from.
ManufacturedAliasType_t manufacturedAliasType
The method used to "manufacture" the alias.
ManufacturedAliasType_t
Manufactured alias type If an alias is "manufactured" then the alias is not a real user but is instea...
bool rxMuted
Indicates if RX is muted for this talker.
uint16_t rxFlags
Flags associated with a talker's transmission.
uint16_t aliasSpecializer
The numeric specializer (if any) associated with the alias.
std::string nodeId
A unique identifier for the asset.
Parameters for querying the group timeline.
bool onlyCommitted
Include only committed (not in-progress) events.
uint64_t startedOnOrAfter
Include events that started on or after this UNIX millisecond timestamp.
long maxCount
Maximum number of records to return.
uint64_t endedOnOrBefore
Include events that ended on or after this UNIX millisecond timestamp.
std::string sql
Ignore all other settings for SQL construction and use this query string instead.
bool mostRecentFirst
Sorted results with most recent timestamp first.
std::string onlyNodeId
Include events for this transmitter node ID.
int onlyDirection
Include events for this direction.
int onlyTxId
Include events for this transmission ID.
std::string onlyAlias
Include events for this transmitter alias.
TODO: Transport Security Layer (TLS) settings.
bool verifyPeers
[Optional, Default: true] When true, checks the far-end certificate validity and Engage-specific TLS ...
StringRestrictionList subjectRestrictions
[NOT USED AT THIS TIME]
std::vector< std::string > caCertificates
[Optional] Array of CA certificates (PEM or "@" file/certstore references) to be used to validate far...
StringRestrictionList issuerRestrictions
[NOT USED AT THIS TIME]
bool allowSelfSignedCertificates
[Optional, Default: false] When true, accepts far-end certificates that are self-signed.
std::vector< std::string > crlSerials
[Optional] Array of serial numbers certificates that have been revoked
std::vector< TranslationSession > sessions
Array of sessions in the configuration.
std::vector< Group > groups
Array of groups in the configuration.
std::vector< std::string > groups
List of group IDs to be included in the session.
bool enabled
[Optional, Default: true] Enable the session
Description of a transport impairment.
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...