Engage Engine API  1.253.9093
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(BlobInfo)
1227 {
1228 IMPLEMENT_JSON_SERIALIZATION()
1229 IMPLEMENT_JSON_DOCUMENTATION(BlobInfo)
1230
1231 public:
1235 typedef enum
1236 {
1238 bptUndefined = 0,
1239
1241 bptAppTextUtf8 = 1,
1242
1244 bptJsonTextUtf8 = 2,
1245
1247 bptAppBinary = 3,
1248
1250 bptEngageBinaryHumanBiometrics = 4,
1251
1253 bptAppMimeMessage = 5,
1254
1256 bptEngageInternal = 42
1257 } PayloadType_t;
1258
1260 size_t size;
1261
1263 std::string source;
1264
1266 std::string target;
1267
1270
1273
1275 std::string txnId;
1276
1279
1280 BlobInfo()
1281 {
1282 clear();
1283 }
1284
1285 void clear()
1286 {
1287 size = 0;
1288 source.clear();
1289 target.clear();
1290 rtpHeader.clear();
1291 payloadType = PayloadType_t::bptUndefined;
1292 txnId.clear();
1293 txnTimeoutSecs = 0;
1294 }
1295
1296 virtual void initForDocumenting()
1297 {
1298 clear();
1299 rtpHeader.initForDocumenting();
1300 }
1301 };
1302
1303 static void to_json(nlohmann::json& j, const BlobInfo& p)
1304 {
1305 j = nlohmann::json{
1306 TOJSON_IMPL(size),
1307 TOJSON_IMPL(source),
1308 TOJSON_IMPL(target),
1309 TOJSON_IMPL(rtpHeader),
1310 TOJSON_IMPL(payloadType),
1311 TOJSON_IMPL(txnId),
1312 TOJSON_IMPL(txnTimeoutSecs)
1313 };
1314 }
1315 static void from_json(const nlohmann::json& j, BlobInfo& p)
1316 {
1317 p.clear();
1318 getOptional<size_t>("size", p.size, j, 0);
1319 getOptional<std::string>("source", p.source, j, EMPTY_STRING);
1320 getOptional<std::string>("target", p.target, j, EMPTY_STRING);
1321 getOptional<RtpHeader>("rtpHeader", p.rtpHeader, j);
1322 getOptional<BlobInfo::PayloadType_t>("payloadType", p.payloadType, j, BlobInfo::PayloadType_t::bptUndefined);
1323 getOptional<std::string>("txnId", p.txnId, j, EMPTY_STRING);
1324 getOptional<int>("txnTimeoutSecs", p.txnTimeoutSecs, j, 0);
1325 }
1326
1327
1328 //-----------------------------------------------------------
1329 JSON_SERIALIZED_CLASS(TxAudioUri)
1342 {
1343 IMPLEMENT_JSON_SERIALIZATION()
1344 IMPLEMENT_JSON_DOCUMENTATION(TxAudioUri)
1345
1346 public:
1348 std::string uri;
1349
1352
1353 TxAudioUri()
1354 {
1355 clear();
1356 }
1357
1358 void clear()
1359 {
1360 uri.clear();
1361 repeatCount = 0;
1362 }
1363
1364 virtual void initForDocumenting()
1365 {
1366 }
1367 };
1368
1369 static void to_json(nlohmann::json& j, const TxAudioUri& p)
1370 {
1371 j = nlohmann::json{
1372 TOJSON_IMPL(uri),
1373 TOJSON_IMPL(repeatCount)
1374 };
1375 }
1376 static void from_json(const nlohmann::json& j, TxAudioUri& p)
1377 {
1378 p.clear();
1379 getOptional<std::string>("uri", p.uri, j, EMPTY_STRING);
1380 getOptional<int>("repeatCount", p.repeatCount, j, 0);
1381 }
1382
1383
1384 //-----------------------------------------------------------
1385 JSON_SERIALIZED_CLASS(AdvancedTxParams)
1398 {
1399 IMPLEMENT_JSON_SERIALIZATION()
1400 IMPLEMENT_JSON_DOCUMENTATION(AdvancedTxParams)
1401
1402 public:
1403
1405 uint16_t flags;
1406
1408 uint8_t priority;
1409
1412
1415
1417 std::string alias;
1418
1420 bool muted;
1421
1423 uint32_t txId;
1424
1427
1430
1433
1436
1438 {
1439 clear();
1440 }
1441
1442 void clear()
1443 {
1444 flags = 0;
1445 priority = 0;
1446 subchannelTag = 0;
1447 includeNodeId = false;
1448 alias.clear();
1449 muted = false;
1450 txId = 0;
1451 audioUri.clear();
1452 aliasSpecializer = 0;
1453 receiverRxMuteForAliasSpecializer = false;
1454 reBegin = false;
1455 }
1456
1457 virtual void initForDocumenting()
1458 {
1459 }
1460 };
1461
1462 static void to_json(nlohmann::json& j, const AdvancedTxParams& p)
1463 {
1464 j = nlohmann::json{
1465 TOJSON_IMPL(flags),
1466 TOJSON_IMPL(priority),
1467 TOJSON_IMPL(subchannelTag),
1468 TOJSON_IMPL(includeNodeId),
1469 TOJSON_IMPL(alias),
1470 TOJSON_IMPL(muted),
1471 TOJSON_IMPL(txId),
1472 TOJSON_IMPL(audioUri),
1473 TOJSON_IMPL(aliasSpecializer),
1474 TOJSON_IMPL(receiverRxMuteForAliasSpecializer),
1475 TOJSON_IMPL(reBegin)
1476 };
1477 }
1478 static void from_json(const nlohmann::json& j, AdvancedTxParams& p)
1479 {
1480 p.clear();
1481 getOptional<uint16_t>("flags", p.flags, j, 0);
1482 getOptional<uint8_t>("priority", p.priority, j, 0);
1483 getOptional<uint16_t>("subchannelTag", p.subchannelTag, j, 0);
1484 getOptional<bool>("includeNodeId", p.includeNodeId, j, false);
1485 getOptional<std::string>("alias", p.alias, j, EMPTY_STRING);
1486 getOptional<bool>("muted", p.muted, j, false);
1487 getOptional<uint32_t>("txId", p.txId, j, 0);
1488 getOptional<TxAudioUri>("audioUri", p.audioUri, j);
1489 getOptional<uint16_t>("aliasSpecializer", p.aliasSpecializer, j, 0);
1490 getOptional<bool>("receiverRxMuteForAliasSpecializer", p.receiverRxMuteForAliasSpecializer, j, false);
1491 getOptional<bool>("reBegin", p.reBegin, j, false);
1492 }
1493
1494 //-----------------------------------------------------------
1495 JSON_SERIALIZED_CLASS(Identity)
1508 {
1509 IMPLEMENT_JSON_SERIALIZATION()
1510 IMPLEMENT_JSON_DOCUMENTATION(Identity)
1511
1512 public:
1520 std::string nodeId;
1521
1523 std::string userId;
1524
1526 std::string displayName;
1527
1529 std::string avatar;
1530
1531 Identity()
1532 {
1533 clear();
1534 }
1535
1536 void clear()
1537 {
1538 nodeId.clear();
1539 userId.clear();
1540 displayName.clear();
1541 avatar.clear();
1542 }
1543
1544 virtual void initForDocumenting()
1545 {
1546 }
1547 };
1548
1549 static void to_json(nlohmann::json& j, const Identity& p)
1550 {
1551 j = nlohmann::json{
1552 TOJSON_IMPL(nodeId),
1553 TOJSON_IMPL(userId),
1554 TOJSON_IMPL(displayName),
1555 TOJSON_IMPL(avatar)
1556 };
1557 }
1558 static void from_json(const nlohmann::json& j, Identity& p)
1559 {
1560 p.clear();
1561 getOptional<std::string>("nodeId", p.nodeId, j);
1562 getOptional<std::string>("userId", p.userId, j);
1563 getOptional<std::string>("displayName", p.displayName, j);
1564 getOptional<std::string>("avatar", p.avatar, j);
1565 }
1566
1567
1568 //-----------------------------------------------------------
1569 JSON_SERIALIZED_CLASS(Location)
1582 {
1583 IMPLEMENT_JSON_SERIALIZATION()
1584 IMPLEMENT_JSON_DOCUMENTATION(Location)
1585
1586 public:
1587 constexpr static double INVALID_LOCATION_VALUE = -999.999;
1588
1590 uint32_t ts;
1591
1593 double latitude;
1594
1597
1599 double altitude;
1600
1603
1605 double speed;
1606
1607 Location()
1608 {
1609 clear();
1610 }
1611
1612 void clear()
1613 {
1614 ts = 0;
1615 latitude = INVALID_LOCATION_VALUE;
1616 longitude = INVALID_LOCATION_VALUE;
1617 altitude = INVALID_LOCATION_VALUE;
1618 direction = INVALID_LOCATION_VALUE;
1619 speed = INVALID_LOCATION_VALUE;
1620 }
1621
1622 virtual void initForDocumenting()
1623 {
1624 clear();
1625
1626 ts = 123456;
1627 latitude = 123.456;
1628 longitude = 456.789;
1629 altitude = 123;
1630 direction = 1;
1631 speed = 1234;
1632 }
1633 };
1634
1635 static void to_json(nlohmann::json& j, const Location& p)
1636 {
1637 if(p.latitude != Location::INVALID_LOCATION_VALUE && p.longitude != Location::INVALID_LOCATION_VALUE)
1638 {
1639 j = nlohmann::json{
1640 TOJSON_IMPL(latitude),
1641 TOJSON_IMPL(longitude),
1642 };
1643
1644 if(p.ts != 0) j["ts"] = p.ts;
1645 if(p.altitude != Location::INVALID_LOCATION_VALUE) j["altitude"] = p.altitude;
1646 if(p.speed != Location::INVALID_LOCATION_VALUE) j["speed"] = p.speed;
1647 if(p.direction != Location::INVALID_LOCATION_VALUE) j["direction"] = p.direction;
1648 }
1649 }
1650 static void from_json(const nlohmann::json& j, Location& p)
1651 {
1652 p.clear();
1653 getOptional<uint32_t>("ts", p.ts, j, 0);
1654 j.at("latitude").get_to(p.latitude);
1655 j.at("longitude").get_to(p.longitude);
1656 getOptional<double>("altitude", p.altitude, j, Location::INVALID_LOCATION_VALUE);
1657 getOptional<double>("direction", p.direction, j, Location::INVALID_LOCATION_VALUE);
1658 getOptional<double>("speed", p.speed, j, Location::INVALID_LOCATION_VALUE);
1659 }
1660
1661 //-----------------------------------------------------------
1662 JSON_SERIALIZED_CLASS(Power)
1673 {
1674 IMPLEMENT_JSON_SERIALIZATION()
1675 IMPLEMENT_JSON_DOCUMENTATION(Power)
1676
1677 public:
1678
1691
1705
1708
1709 Power()
1710 {
1711 clear();
1712 }
1713
1714 void clear()
1715 {
1716 source = 0;
1717 state = 0;
1718 level = 0;
1719 }
1720
1721 virtual void initForDocumenting()
1722 {
1723 }
1724 };
1725
1726 static void to_json(nlohmann::json& j, const Power& p)
1727 {
1728 if(p.source != 0 && p.state != 0 && p.level != 0)
1729 {
1730 j = nlohmann::json{
1731 TOJSON_IMPL(source),
1732 TOJSON_IMPL(state),
1733 TOJSON_IMPL(level)
1734 };
1735 }
1736 }
1737 static void from_json(const nlohmann::json& j, Power& p)
1738 {
1739 p.clear();
1740 getOptional<int>("source", p.source, j, 0);
1741 getOptional<int>("state", p.state, j, 0);
1742 getOptional<int>("level", p.level, j, 0);
1743 }
1744
1745
1746 //-----------------------------------------------------------
1747 JSON_SERIALIZED_CLASS(Connectivity)
1758 {
1759 IMPLEMENT_JSON_SERIALIZATION()
1760 IMPLEMENT_JSON_DOCUMENTATION(Connectivity)
1761
1762 public:
1776 int type;
1777
1780
1783
1784 Connectivity()
1785 {
1786 clear();
1787 }
1788
1789 void clear()
1790 {
1791 type = 0;
1792 strength = 0;
1793 rating = 0;
1794 }
1795
1796 virtual void initForDocumenting()
1797 {
1798 clear();
1799
1800 type = 1;
1801 strength = 2;
1802 rating = 3;
1803 }
1804 };
1805
1806 static void to_json(nlohmann::json& j, const Connectivity& p)
1807 {
1808 if(p.type != 0)
1809 {
1810 j = nlohmann::json{
1811 TOJSON_IMPL(type),
1812 TOJSON_IMPL(strength),
1813 TOJSON_IMPL(rating)
1814 };
1815 }
1816 }
1817 static void from_json(const nlohmann::json& j, Connectivity& p)
1818 {
1819 p.clear();
1820 getOptional<int>("type", p.type, j, 0);
1821 getOptional<int>("strength", p.strength, j, 0);
1822 getOptional<int>("rating", p.rating, j, 0);
1823 }
1824
1825
1826 //-----------------------------------------------------------
1827 JSON_SERIALIZED_CLASS(PresenceDescriptorGroupItem)
1838 {
1839 IMPLEMENT_JSON_SERIALIZATION()
1840 IMPLEMENT_JSON_DOCUMENTATION(PresenceDescriptorGroupItem)
1841
1842 public:
1844 std::string groupId;
1845
1847 std::string alias;
1848
1850 uint16_t status;
1851
1853 {
1854 clear();
1855 }
1856
1857 void clear()
1858 {
1859 groupId.clear();
1860 alias.clear();
1861 status = 0;
1862 }
1863
1864 virtual void initForDocumenting()
1865 {
1866 groupId = "{123-456}";
1867 alias = "MYALIAS";
1868 status = 0;
1869 }
1870 };
1871
1872 static void to_json(nlohmann::json& j, const PresenceDescriptorGroupItem& p)
1873 {
1874 j = nlohmann::json{
1875 TOJSON_IMPL(groupId),
1876 TOJSON_IMPL(alias),
1877 TOJSON_IMPL(status)
1878 };
1879 }
1880 static void from_json(const nlohmann::json& j, PresenceDescriptorGroupItem& p)
1881 {
1882 p.clear();
1883 getOptional<std::string>("groupId", p.groupId, j);
1884 getOptional<std::string>("alias", p.alias, j);
1885 getOptional<uint16_t>("status", p.status, j);
1886 }
1887
1888
1889 //-----------------------------------------------------------
1890 JSON_SERIALIZED_CLASS(PresenceDescriptor)
1901 {
1902 IMPLEMENT_JSON_SERIALIZATION()
1903 IMPLEMENT_JSON_DOCUMENTATION(PresenceDescriptor)
1904
1905 public:
1906
1912 bool self;
1913
1919 uint32_t ts;
1920
1926 uint32_t nextUpdate;
1927
1930
1932 std::string comment;
1933
1947 uint32_t disposition;
1948
1950 std::vector<PresenceDescriptorGroupItem> groupAliases;
1951
1954
1956 std::string custom;
1957
1960
1963
1966
1968 {
1969 clear();
1970 }
1971
1972 void clear()
1973 {
1974 self = false;
1975 ts = 0;
1976 nextUpdate = 0;
1977 identity.clear();
1978 comment.clear();
1979 disposition = 0;
1980 groupAliases.clear();
1981 location.clear();
1982 custom.clear();
1983 announceOnReceive = false;
1984 connectivity.clear();
1985 power.clear();
1986 }
1987
1988 virtual void initForDocumenting()
1989 {
1990 clear();
1991
1992 self = true;
1993 ts = 123;
1994 nextUpdate = 0;
1995 identity.initForDocumenting();
1996 comment = "This is a comment";
1997 disposition = 123;
1998
1999 PresenceDescriptorGroupItem gi;
2000 gi.initForDocumenting();
2001 groupAliases.push_back(gi);
2002
2003 location.initForDocumenting();
2004 custom = "{}";
2005 announceOnReceive = true;
2006 connectivity.initForDocumenting();
2007 power.initForDocumenting();
2008 }
2009 };
2010
2011 static void to_json(nlohmann::json& j, const PresenceDescriptor& p)
2012 {
2013 j = nlohmann::json{
2014 TOJSON_IMPL(ts),
2015 TOJSON_IMPL(nextUpdate),
2016 TOJSON_IMPL(identity),
2017 TOJSON_IMPL(comment),
2018 TOJSON_IMPL(disposition),
2019 TOJSON_IMPL(groupAliases),
2020 TOJSON_IMPL(location),
2021 TOJSON_IMPL(custom),
2022 TOJSON_IMPL(announceOnReceive),
2023 TOJSON_IMPL(connectivity),
2024 TOJSON_IMPL(power)
2025 };
2026
2027 if(!p.comment.empty()) j["comment"] = p.comment;
2028 if(!p.custom.empty()) j["custom"] = p.custom;
2029
2030 if(p.self)
2031 {
2032 j["self"] = true;
2033 }
2034 }
2035 static void from_json(const nlohmann::json& j, PresenceDescriptor& p)
2036 {
2037 p.clear();
2038 getOptional<bool>("self", p.self, j);
2039 getOptional<uint32_t>("ts", p.ts, j);
2040 getOptional<uint32_t>("nextUpdate", p.nextUpdate, j);
2041 getOptional<Identity>("identity", p.identity, j);
2042 getOptional<std::string>("comment", p.comment, j);
2043 getOptional<uint32_t>("disposition", p.disposition, j);
2044 getOptional<std::vector<PresenceDescriptorGroupItem>>("groupAliases", p.groupAliases, j);
2045 getOptional<Location>("location", p.location, j);
2046 getOptional<std::string>("custom", p.custom, j);
2047 getOptional<bool>("announceOnReceive", p.announceOnReceive, j);
2048 getOptional<Connectivity>("connectivity", p.connectivity, j);
2049 getOptional<Power>("power", p.power, j);
2050 }
2051
2057 typedef enum
2058 {
2061
2064
2067
2069 priVoice = 3
2070 } TxPriority_t;
2071
2077 typedef enum
2078 {
2081
2084
2087
2089 arpIpv6ThenIpv4 = 64
2090 } AddressResolutionPolicy_t;
2091
2092 //-----------------------------------------------------------
2093 JSON_SERIALIZED_CLASS(NetworkTxOptions)
2106 {
2107 IMPLEMENT_JSON_SERIALIZATION()
2108 IMPLEMENT_JSON_DOCUMENTATION(NetworkTxOptions)
2109
2110 public:
2113
2119 int ttl;
2120
2122 {
2123 clear();
2124 }
2125
2126 void clear()
2127 {
2128 priority = priVoice;
2129 ttl = 1;
2130 }
2131
2132 virtual void initForDocumenting()
2133 {
2134 }
2135 };
2136
2137 static void to_json(nlohmann::json& j, const NetworkTxOptions& p)
2138 {
2139 j = nlohmann::json{
2140 TOJSON_IMPL(priority),
2141 TOJSON_IMPL(ttl)
2142 };
2143 }
2144 static void from_json(const nlohmann::json& j, NetworkTxOptions& p)
2145 {
2146 p.clear();
2147 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
2148 getOptional<int>("ttl", p.ttl, j, 1);
2149 }
2150
2151
2152 //-----------------------------------------------------------
2153 JSON_SERIALIZED_CLASS(TcpNetworkTxOptions)
2162 {
2163 IMPLEMENT_JSON_SERIALIZATION()
2164 IMPLEMENT_JSON_DOCUMENTATION(TcpNetworkTxOptions)
2165
2166 public:
2168 {
2169 clear();
2170 }
2171
2172 void clear()
2173 {
2174 priority = priVoice;
2175 ttl = -1;
2176 }
2177
2178 virtual void initForDocumenting()
2179 {
2180 }
2181 };
2182
2183 static void to_json(nlohmann::json& j, const TcpNetworkTxOptions& p)
2184 {
2185 j = nlohmann::json{
2186 TOJSON_IMPL(priority),
2187 TOJSON_IMPL(ttl)
2188 };
2189 }
2190 static void from_json(const nlohmann::json& j, TcpNetworkTxOptions& p)
2191 {
2192 p.clear();
2193 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
2194 getOptional<int>("ttl", p.ttl, j, -1);
2195 }
2196
2197 typedef enum
2198 {
2201
2204
2206 ifIp6 = 6
2207 } IpFamilyType_t;
2208
2209 //-----------------------------------------------------------
2210 JSON_SERIALIZED_CLASS(NetworkAddress)
2222 {
2223 IMPLEMENT_JSON_SERIALIZATION()
2224 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddress)
2225
2226 public:
2228 std::string address;
2229
2231 int port;
2232
2234 {
2235 clear();
2236 }
2237
2238 void clear()
2239 {
2240 address.clear();
2241 port = 0;
2242 }
2243
2244 bool matches(const NetworkAddress& other)
2245 {
2246 if(address.compare(other.address) != 0)
2247 {
2248 return false;
2249 }
2250
2251 if(port != other.port)
2252 {
2253 return false;
2254 }
2255
2256 return true;
2257 }
2258 };
2259
2260 static void to_json(nlohmann::json& j, const NetworkAddress& p)
2261 {
2262 j = nlohmann::json{
2263 TOJSON_IMPL(address),
2264 TOJSON_IMPL(port)
2265 };
2266 }
2267 static void from_json(const nlohmann::json& j, NetworkAddress& p)
2268 {
2269 p.clear();
2270 getOptional<std::string>("address", p.address, j);
2271 getOptional<int>("port", p.port, j);
2272 }
2273
2274
2275 //-----------------------------------------------------------
2276 JSON_SERIALIZED_CLASS(NetworkAddressRxTx)
2288 {
2289 IMPLEMENT_JSON_SERIALIZATION()
2290 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddressRxTx)
2291
2292 public:
2295
2298
2300 {
2301 clear();
2302 }
2303
2304 void clear()
2305 {
2306 rx.clear();
2307 tx.clear();
2308 }
2309 };
2310
2311 static void to_json(nlohmann::json& j, const NetworkAddressRxTx& p)
2312 {
2313 j = nlohmann::json{
2314 TOJSON_IMPL(rx),
2315 TOJSON_IMPL(tx)
2316 };
2317 }
2318 static void from_json(const nlohmann::json& j, NetworkAddressRxTx& p)
2319 {
2320 p.clear();
2321 getOptional<NetworkAddress>("rx", p.rx, j);
2322 getOptional<NetworkAddress>("tx", p.tx, j);
2323 }
2324
2326 typedef enum
2327 {
2330
2332 graptStrict = 1
2333 } GroupRestrictionAccessPolicyType_t;
2334
2335 static bool isValidGroupRestrictionAccessPolicyType(GroupRestrictionAccessPolicyType_t t)
2336 {
2337 return (t == GroupRestrictionAccessPolicyType_t::graptPermissive ||
2338 t == GroupRestrictionAccessPolicyType_t::graptStrict );
2339 }
2340
2342 typedef enum
2343 {
2346
2349
2351 rtBlacklist = 2
2352 } RestrictionType_t;
2353
2354 static bool isValidRestrictionType(RestrictionType_t t)
2355 {
2356 return (t == RestrictionType_t::rtUndefined ||
2357 t == RestrictionType_t::rtWhitelist ||
2358 t == RestrictionType_t::rtBlacklist );
2359 }
2360
2385
2386 static bool isValidRestrictionElementType(RestrictionElementType_t t)
2387 {
2388 return (t == RestrictionElementType_t::retGroupId ||
2389 t == RestrictionElementType_t::retGroupIdPattern ||
2390 t == RestrictionElementType_t::retGenericAccessTagPattern ||
2391 t == RestrictionElementType_t::retCertificateSerialNumberPattern ||
2392 t == RestrictionElementType_t::retCertificateFingerprintPattern ||
2393 t == RestrictionElementType_t::retCertificateSubjectPattern ||
2394 t == RestrictionElementType_t::retCertificateIssuerPattern);
2395 }
2396
2397
2398 //-----------------------------------------------------------
2399 JSON_SERIALIZED_CLASS(NetworkAddressRestrictionList)
2411 {
2412 IMPLEMENT_JSON_SERIALIZATION()
2413 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddressRestrictionList)
2414
2415 public:
2418
2420 std::vector<NetworkAddressRxTx> elements;
2421
2423 {
2424 clear();
2425 }
2426
2427 void clear()
2428 {
2429 type = RestrictionType_t::rtUndefined;
2430 elements.clear();
2431 }
2432 };
2433
2434 static void to_json(nlohmann::json& j, const NetworkAddressRestrictionList& p)
2435 {
2436 j = nlohmann::json{
2437 TOJSON_IMPL(type),
2438 TOJSON_IMPL(elements)
2439 };
2440 }
2441 static void from_json(const nlohmann::json& j, NetworkAddressRestrictionList& p)
2442 {
2443 p.clear();
2444 getOptional<RestrictionType_t>("type", p.type, j, RestrictionType_t::rtUndefined);
2445 getOptional<std::vector<NetworkAddressRxTx>>("elements", p.elements, j);
2446 }
2447
2448 //-----------------------------------------------------------
2449 JSON_SERIALIZED_CLASS(StringRestrictionList)
2461 {
2462 IMPLEMENT_JSON_SERIALIZATION()
2463 IMPLEMENT_JSON_DOCUMENTATION(StringRestrictionList)
2464
2465 public:
2468
2471
2473 std::vector<std::string> elements;
2474
2476 {
2477 type = RestrictionType_t::rtUndefined;
2478 elementsType = RestrictionElementType_t::retGroupId;
2479 clear();
2480 }
2481
2482 void clear()
2483 {
2484 elements.clear();
2485 }
2486 };
2487
2488 static void to_json(nlohmann::json& j, const StringRestrictionList& p)
2489 {
2490 j = nlohmann::json{
2491 TOJSON_IMPL(type),
2492 TOJSON_IMPL(elementsType),
2493 TOJSON_IMPL(elements)
2494 };
2495 }
2496 static void from_json(const nlohmann::json& j, StringRestrictionList& p)
2497 {
2498 p.clear();
2499 getOptional<RestrictionType_t>("type", p.type, j, RestrictionType_t::rtUndefined);
2500 getOptional<RestrictionElementType_t>("elementsType", p.elementsType, j, RestrictionElementType_t::retGroupId);
2501 getOptional<std::vector<std::string>>("elements", p.elements, j);
2502 }
2503
2504
2505 //-----------------------------------------------------------
2506 JSON_SERIALIZED_CLASS(PacketCapturer)
2516 {
2517 IMPLEMENT_JSON_SERIALIZATION()
2518 IMPLEMENT_JSON_DOCUMENTATION(PacketCapturer)
2519
2520 public:
2521 bool enabled;
2522 uint32_t maxMb;
2523 std::string filePrefix;
2524
2526 {
2527 clear();
2528 }
2529
2530 void clear()
2531 {
2532 enabled = false;
2533 maxMb = 10;
2534 filePrefix.clear();
2535 }
2536 };
2537
2538 static void to_json(nlohmann::json& j, const PacketCapturer& p)
2539 {
2540 j = nlohmann::json{
2541 TOJSON_IMPL(enabled),
2542 TOJSON_IMPL(maxMb),
2543 TOJSON_IMPL(filePrefix)
2544 };
2545 }
2546 static void from_json(const nlohmann::json& j, PacketCapturer& p)
2547 {
2548 p.clear();
2549 getOptional<bool>("enabled", p.enabled, j, false);
2550 getOptional<uint32_t>("maxMb", p.maxMb, j, 10);
2551 getOptional<std::string>("filePrefix", p.filePrefix, j, EMPTY_STRING);
2552 }
2553
2554
2555 //-----------------------------------------------------------
2556 JSON_SERIALIZED_CLASS(TransportImpairment)
2566 {
2567 IMPLEMENT_JSON_SERIALIZATION()
2568 IMPLEMENT_JSON_DOCUMENTATION(TransportImpairment)
2569
2570 public:
2571 int applicationPercentage;
2572 int jitterMs;
2573 int lossPercentage;
2574
2576 {
2577 clear();
2578 }
2579
2580 void clear()
2581 {
2582 applicationPercentage = 0;
2583 jitterMs = 0;
2584 lossPercentage = 0;
2585 }
2586 };
2587
2588 static void to_json(nlohmann::json& j, const TransportImpairment& p)
2589 {
2590 j = nlohmann::json{
2591 TOJSON_IMPL(applicationPercentage),
2592 TOJSON_IMPL(jitterMs),
2593 TOJSON_IMPL(lossPercentage)
2594 };
2595 }
2596 static void from_json(const nlohmann::json& j, TransportImpairment& p)
2597 {
2598 p.clear();
2599 getOptional<int>("applicationPercentage", p.applicationPercentage, j, 0);
2600 getOptional<int>("jitterMs", p.jitterMs, j, 0);
2601 getOptional<int>("lossPercentage", p.lossPercentage, j, 0);
2602 }
2603
2604 //-----------------------------------------------------------
2605 JSON_SERIALIZED_CLASS(NsmNetworking)
2615 {
2616 IMPLEMENT_JSON_SERIALIZATION()
2617 IMPLEMENT_JSON_DOCUMENTATION(NsmNetworking)
2618
2619 public:
2620 std::string interfaceName;
2621 NetworkAddress address;
2622 int ttl;
2623 int tos;
2624 int txOversend;
2625 TransportImpairment rxImpairment;
2626 TransportImpairment txImpairment;
2627 std::string cryptoPassword;
2628
2630 {
2631 clear();
2632 }
2633
2634 void clear()
2635 {
2636 interfaceName.clear();
2637 address.clear();
2638 ttl = 1;
2639 tos = 56;
2640 txOversend = 0;
2641 rxImpairment.clear();
2642 txImpairment.clear();
2643 cryptoPassword.clear();
2644 }
2645 };
2646
2647 static void to_json(nlohmann::json& j, const NsmNetworking& p)
2648 {
2649 j = nlohmann::json{
2650 TOJSON_IMPL(interfaceName),
2651 TOJSON_IMPL(address),
2652 TOJSON_IMPL(ttl),
2653 TOJSON_IMPL(tos),
2654 TOJSON_IMPL(txOversend),
2655 TOJSON_IMPL(rxImpairment),
2656 TOJSON_IMPL(txImpairment),
2657 TOJSON_IMPL(cryptoPassword)
2658 };
2659 }
2660 static void from_json(const nlohmann::json& j, NsmNetworking& p)
2661 {
2662 p.clear();
2663 getOptional("interfaceName", p.interfaceName, j, EMPTY_STRING);
2664 getOptional<NetworkAddress>("address", p.address, j);
2665 getOptional<int>("ttl", p.ttl, j, 1);
2666 getOptional<int>("tos", p.tos, j, 56);
2667 getOptional<int>("txOversend", p.txOversend, j, 0);
2668 getOptional<TransportImpairment>("rxImpairment", p.rxImpairment, j);
2669 getOptional<TransportImpairment>("txImpairment", p.txImpairment, j);
2670 getOptional("cryptoPassword", p.cryptoPassword, j, EMPTY_STRING);
2671 }
2672
2673
2674 //-----------------------------------------------------------
2675 JSON_SERIALIZED_CLASS(NsmConfiguration)
2685 {
2686 IMPLEMENT_JSON_SERIALIZATION()
2687 IMPLEMENT_JSON_DOCUMENTATION(NsmConfiguration)
2688
2689 public:
2690
2691 std::string id;
2692 bool favorUptime;
2693 NsmNetworking networking;
2694 std::vector<std::string> resources;
2695 int tokenStart;
2696 int tokenEnd;
2697 int intervalSecs;
2698 int transitionSecsFactor;
2699
2701 {
2702 clear();
2703 }
2704
2705 void clear()
2706 {
2707 id.clear();
2708 favorUptime = false;
2709 networking.clear();
2710 resources.clear();
2711 tokenStart = 1000000;
2712 tokenEnd = 2000000;
2713 intervalSecs = 1;
2714 transitionSecsFactor = 3;
2715 }
2716 };
2717
2718 static void to_json(nlohmann::json& j, const NsmConfiguration& p)
2719 {
2720 j = nlohmann::json{
2721 TOJSON_IMPL(id),
2722 TOJSON_IMPL(favorUptime),
2723 TOJSON_IMPL(networking),
2724 TOJSON_IMPL(resources),
2725 TOJSON_IMPL(tokenStart),
2726 TOJSON_IMPL(tokenEnd),
2727 TOJSON_IMPL(intervalSecs),
2728 TOJSON_IMPL(transitionSecsFactor)
2729 };
2730 }
2731 static void from_json(const nlohmann::json& j, NsmConfiguration& p)
2732 {
2733 p.clear();
2734 getOptional("id", p.id, j);
2735 getOptional<bool>("favorUptime", p.favorUptime, j, false);
2736 getOptional<NsmNetworking>("networking", p.networking, j);
2737 getOptional<std::vector<std::string>>("resources", p.resources, j);
2738 getOptional<int>("tokenStart", p.tokenStart, j, 1000000);
2739 getOptional<int>("tokenEnd", p.tokenEnd, j, 2000000);
2740 getOptional<int>("intervalSecs", p.intervalSecs, j, 1);
2741 getOptional<int>("transitionSecsFactor", p.transitionSecsFactor, j, 3);
2742 }
2743
2744
2745 //-----------------------------------------------------------
2746 JSON_SERIALIZED_CLASS(Rallypoint)
2755 {
2756 IMPLEMENT_JSON_SERIALIZATION()
2757 IMPLEMENT_JSON_DOCUMENTATION(Rallypoint)
2758
2759 public:
2764 typedef enum
2765 {
2767 rppTlsTcp = 0,
2768
2770 rppTlsWs = 1,
2771
2773 rppInvalid = -1
2774 } RpProtocol_t;
2775
2781
2793 std::string certificate;
2794
2806 std::string certificateKey;
2807
2812
2817
2821 std::vector<std::string> caCertificates;
2822
2827
2832
2835
2838
2844 std::string sni;
2845
2846
2849
2851 std::string path;
2852
2855
2856
2857 Rallypoint()
2858 {
2859 clear();
2860 }
2861
2862 void clear()
2863 {
2864 host.clear();
2865 certificate.clear();
2866 certificateKey.clear();
2867 caCertificates.clear();
2868 verifyPeer = false;
2869 transactionTimeoutMs = 0;
2870 disableMessageSigning = false;
2871 connectionTimeoutSecs = 0;
2872 tcpTxOptions.clear();
2873 sni.clear();
2874 protocol = rppTlsTcp;
2875 path.clear();
2876 additionalProtocols.clear();
2877 }
2878
2879 bool matches(const Rallypoint& other)
2880 {
2881 if(!host.matches(other.host))
2882 {
2883 return false;
2884 }
2885
2886 if(protocol != other.protocol)
2887 {
2888 return false;
2889 }
2890
2891 if(path.compare(other.path) != 0)
2892 {
2893 return false;
2894 }
2895
2896 if(certificate.compare(other.certificate) != 0)
2897 {
2898 return false;
2899 }
2900
2901 if(certificateKey.compare(other.certificateKey) != 0)
2902 {
2903 return false;
2904 }
2905
2906 if(verifyPeer != other.verifyPeer)
2907 {
2908 return false;
2909 }
2910
2911 if(allowSelfSignedCertificate != other.allowSelfSignedCertificate)
2912 {
2913 return false;
2914 }
2915
2916 if(caCertificates.size() != other.caCertificates.size())
2917 {
2918 return false;
2919 }
2920
2921 for(size_t x = 0; x < caCertificates.size(); x++)
2922 {
2923 bool found = false;
2924
2925 for(size_t y = 0; y < other.caCertificates.size(); y++)
2926 {
2927 if(caCertificates[x].compare(other.caCertificates[y]) == 0)
2928 {
2929 found = true;
2930 break;
2931 }
2932 }
2933
2934 if(!found)
2935 {
2936 return false;
2937 }
2938 }
2939
2940 if(transactionTimeoutMs != other.transactionTimeoutMs)
2941 {
2942 return false;
2943 }
2944
2945 if(disableMessageSigning != other.disableMessageSigning)
2946 {
2947 return false;
2948 }
2949 if(connectionTimeoutSecs != other.connectionTimeoutSecs)
2950 {
2951 return false;
2952 }
2953 if(tcpTxOptions.priority != other.tcpTxOptions.priority)
2954 {
2955 return false;
2956 }
2957 if(sni.compare(other.sni) != 0)
2958 {
2959 return false;
2960 }
2961
2962 return true;
2963 }
2964 };
2965
2966 static void to_json(nlohmann::json& j, const Rallypoint& p)
2967 {
2968 j = nlohmann::json{
2969 TOJSON_IMPL(host),
2970 TOJSON_IMPL(certificate),
2971 TOJSON_IMPL(certificateKey),
2972 TOJSON_IMPL(verifyPeer),
2973 TOJSON_IMPL(allowSelfSignedCertificate),
2974 TOJSON_IMPL(caCertificates),
2975 TOJSON_IMPL(transactionTimeoutMs),
2976 TOJSON_IMPL(disableMessageSigning),
2977 TOJSON_IMPL(connectionTimeoutSecs),
2978 TOJSON_IMPL(tcpTxOptions),
2979 TOJSON_IMPL(sni),
2980 TOJSON_IMPL(protocol),
2981 TOJSON_IMPL(path),
2982 TOJSON_IMPL(additionalProtocols)
2983 };
2984 }
2985
2986 static void from_json(const nlohmann::json& j, Rallypoint& p)
2987 {
2988 p.clear();
2989 j.at("host").get_to(p.host);
2990 getOptional("certificate", p.certificate, j);
2991 getOptional("certificateKey", p.certificateKey, j);
2992 getOptional<bool>("verifyPeer", p.verifyPeer, j, true);
2993 getOptional<bool>("allowSelfSignedCertificate", p.allowSelfSignedCertificate, j, false);
2994 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
2995 getOptional<int>("transactionTimeoutMs", p.transactionTimeoutMs, j, 0);
2996 getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
2997 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
2998 getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
2999 getOptional<std::string>("sni", p.sni, j);
3000 getOptional<Rallypoint::RpProtocol_t>("protocol", p.protocol, j, Rallypoint::RpProtocol_t::rppTlsTcp);
3001 getOptional<std::string>("path", p.path, j);
3002 getOptional<std::string>("additionalProtocols", p.additionalProtocols, j);
3003 }
3004
3005 //-----------------------------------------------------------
3006 JSON_SERIALIZED_CLASS(RallypointCluster)
3018 {
3019 IMPLEMENT_JSON_SERIALIZATION()
3020 IMPLEMENT_JSON_DOCUMENTATION(RallypointCluster)
3021
3022 public:
3028 typedef enum
3029 {
3031 csRoundRobin = 0,
3032
3034 csFailback = 1
3035 } ConnectionStrategy_t;
3036
3039
3041 std::vector<Rallypoint> rallypoints;
3042
3045
3048
3051
3053 {
3054 clear();
3055 }
3056
3057 void clear()
3058 {
3059 connectionStrategy = csRoundRobin;
3060 rallypoints.clear();
3061 rolloverSecs = 10;
3062 connectionTimeoutSecs = 5;
3063 transactionTimeoutMs = 10000;
3064 }
3065 };
3066
3067 static void to_json(nlohmann::json& j, const RallypointCluster& p)
3068 {
3069 j = nlohmann::json{
3070 TOJSON_IMPL(connectionStrategy),
3071 TOJSON_IMPL(rallypoints),
3072 TOJSON_IMPL(rolloverSecs),
3073 TOJSON_IMPL(connectionTimeoutSecs),
3074 TOJSON_IMPL(transactionTimeoutMs)
3075 };
3076 }
3077 static void from_json(const nlohmann::json& j, RallypointCluster& p)
3078 {
3079 p.clear();
3080 getOptional<RallypointCluster::ConnectionStrategy_t>("connectionStrategy", p.connectionStrategy, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
3081 getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
3082 getOptional<int>("rolloverSecs", p.rolloverSecs, j, 10);
3083 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 5);
3084 getOptional<int>("transactionTimeoutMs", p.transactionTimeoutMs, j, 10000);
3085 }
3086
3087
3088 //-----------------------------------------------------------
3089 JSON_SERIALIZED_CLASS(NetworkDeviceDescriptor)
3100 {
3101 IMPLEMENT_JSON_SERIALIZATION()
3102 IMPLEMENT_JSON_DOCUMENTATION(NetworkDeviceDescriptor)
3103
3104 public:
3110
3112 std::string name;
3113
3115 std::string manufacturer;
3116
3118 std::string model;
3119
3121 std::string hardwareId;
3122
3124 std::string serialNumber;
3125
3127 std::string type;
3128
3130 std::string extra;
3131
3133 {
3134 clear();
3135 }
3136
3137 void clear()
3138 {
3139 deviceId = 0;
3140
3141 name.clear();
3142 manufacturer.clear();
3143 model.clear();
3144 hardwareId.clear();
3145 serialNumber.clear();
3146 type.clear();
3147 extra.clear();
3148 }
3149
3150 virtual std::string toString()
3151 {
3152 char buff[2048];
3153
3154 snprintf(buff, sizeof(buff), "deviceId=%d, name=%s, manufacturer=%s, model=%s, hardwareId=%s, serialNumber=%s, type=%s, extra=%s",
3155 deviceId,
3156 name.c_str(),
3157 manufacturer.c_str(),
3158 model.c_str(),
3159 hardwareId.c_str(),
3160 serialNumber.c_str(),
3161 type.c_str(),
3162 extra.c_str());
3163
3164 return std::string(buff);
3165 }
3166 };
3167
3168 static void to_json(nlohmann::json& j, const NetworkDeviceDescriptor& p)
3169 {
3170 j = nlohmann::json{
3171 TOJSON_IMPL(deviceId),
3172 TOJSON_IMPL(name),
3173 TOJSON_IMPL(manufacturer),
3174 TOJSON_IMPL(model),
3175 TOJSON_IMPL(hardwareId),
3176 TOJSON_IMPL(serialNumber),
3177 TOJSON_IMPL(type),
3178 TOJSON_IMPL(extra)
3179 };
3180 }
3181 static void from_json(const nlohmann::json& j, NetworkDeviceDescriptor& p)
3182 {
3183 p.clear();
3184 getOptional<int>("deviceId", p.deviceId, j, 0);
3185 getOptional("name", p.name, j);
3186 getOptional("manufacturer", p.manufacturer, j);
3187 getOptional("model", p.model, j);
3188 getOptional("hardwareId", p.hardwareId, j);
3189 getOptional("serialNumber", p.serialNumber, j);
3190 getOptional("type", p.type, j);
3191 getOptional("extra", p.extra, j);
3192 }
3193
3194 //-----------------------------------------------------------
3195 JSON_SERIALIZED_CLASS(AudioGate)
3205 {
3206 IMPLEMENT_JSON_SERIALIZATION()
3207 IMPLEMENT_JSON_DOCUMENTATION(AudioGate)
3208
3209 public:
3212
3215
3217 uint32_t hangMs;
3218
3220 uint32_t windowMin;
3221
3223 uint32_t windowMax;
3224
3227
3228
3229 AudioGate()
3230 {
3231 clear();
3232 }
3233
3234 void clear()
3235 {
3236 enabled = false;
3237 useVad = false;
3238 hangMs = 1500;
3239 windowMin = 25;
3240 windowMax = 125;
3241 coefficient = 1.75;
3242 }
3243 };
3244
3245 static void to_json(nlohmann::json& j, const AudioGate& p)
3246 {
3247 j = nlohmann::json{
3248 TOJSON_IMPL(enabled),
3249 TOJSON_IMPL(useVad),
3250 TOJSON_IMPL(hangMs),
3251 TOJSON_IMPL(windowMin),
3252 TOJSON_IMPL(windowMax),
3253 TOJSON_IMPL(coefficient)
3254 };
3255 }
3256 static void from_json(const nlohmann::json& j, AudioGate& p)
3257 {
3258 p.clear();
3259 getOptional<bool>("enabled", p.enabled, j, false);
3260 getOptional<bool>("useVad", p.useVad, j, false);
3261 getOptional<uint32_t>("hangMs", p.hangMs, j, 1500);
3262 getOptional<uint32_t>("windowMin", p.windowMin, j, 25);
3263 getOptional<uint32_t>("windowMax", p.windowMax, j, 125);
3264 getOptional<double>("coefficient", p.coefficient, j, 1.75);
3265 }
3266
3267 //-----------------------------------------------------------
3268 JSON_SERIALIZED_CLASS(TxAudio)
3282 {
3283 IMPLEMENT_JSON_SERIALIZATION()
3284 IMPLEMENT_JSON_DOCUMENTATION(TxAudio)
3285
3286 public:
3292 typedef enum
3293 {
3295 ctExternal = -1,
3296
3298 ctUnknown = 0,
3299
3300 /* G.711 */
3302 ctG711ulaw = 1,
3303
3305 ctG711alaw = 2,
3306
3307
3308 /* GSM */
3310 ctGsm610 = 3,
3311
3312
3313 /* G.729 */
3315 ctG729a = 4,
3316
3317
3318 /* PCM */
3320 ctPcm = 5,
3321
3322 // AMR Narrowband */
3324 ctAmrNb4750 = 10,
3325
3327 ctAmrNb5150 = 11,
3328
3330 ctAmrNb5900 = 12,
3331
3333 ctAmrNb6700 = 13,
3334
3336 ctAmrNb7400 = 14,
3337
3339 ctAmrNb7950 = 15,
3340
3342 ctAmrNb10200 = 16,
3343
3345 ctAmrNb12200 = 17,
3346
3347
3348 /* Opus */
3350 ctOpus6000 = 20,
3351
3353 ctOpus8000 = 21,
3354
3356 ctOpus10000 = 22,
3357
3359 ctOpus12000 = 23,
3360
3362 ctOpus14000 = 24,
3363
3365 ctOpus16000 = 25,
3366
3368 ctOpus18000 = 26,
3369
3371 ctOpus20000 = 27,
3372
3374 ctOpus22000 = 28,
3375
3377 ctOpus24000 = 29,
3378
3379
3380 /* Speex */
3382 ctSpxNb2150 = 30,
3383
3385 ctSpxNb3950 = 31,
3386
3388 ctSpxNb5950 = 32,
3389
3391 ctSpxNb8000 = 33,
3392
3394 ctSpxNb11000 = 34,
3395
3397 ctSpxNb15000 = 35,
3398
3400 ctSpxNb18200 = 36,
3401
3403 ctSpxNb24600 = 37,
3404
3405
3406 /* Codec2 */
3408 ctC2450 = 40,
3409
3411 ctC2700 = 41,
3412
3414 ctC21200 = 42,
3415
3417 ctC21300 = 43,
3418
3420 ctC21400 = 44,
3421
3423 ctC21600 = 45,
3424
3426 ctC22400 = 46,
3427
3429 ctC23200 = 47,
3430
3431
3432 /* MELPe */
3434 ctMelpe600 = 50,
3435
3437 ctMelpe1200 = 51,
3438
3440 ctMelpe2400 = 52
3441 } TxCodec_t;
3442
3445
3448
3450 std::string encoderName;
3451
3454
3457
3459 bool fdx;
3460
3468
3475
3482
3485
3488
3491
3496
3498 uint32_t internalKey;
3499
3502
3505
3507 bool dtx;
3508
3511
3512 TxAudio()
3513 {
3514 clear();
3515 }
3516
3517 void clear()
3518 {
3519 enabled = true;
3520 encoder = TxAudio::TxCodec_t::ctUnknown;
3521 encoderName.clear();
3522 framingMs = 60;
3523 blockCount = 0;
3524 fdx = false;
3525 noHdrExt = false;
3526 maxTxSecs = 0;
3527 extensionSendInterval = 10;
3528 initialHeaderBurst = 5;
3529 trailingHeaderBurst = 5;
3530 startTxNotifications = 5;
3531 customRtpPayloadType = -1;
3532 internalKey = 0;
3533 resetRtpOnTx = true;
3534 enableSmoothing = true;
3535 dtx = false;
3536 smoothedHangTimeMs = 0;
3537 }
3538 };
3539
3540 static void to_json(nlohmann::json& j, const TxAudio& p)
3541 {
3542 j = nlohmann::json{
3543 TOJSON_IMPL(enabled),
3544 TOJSON_IMPL(encoder),
3545 TOJSON_IMPL(encoderName),
3546 TOJSON_IMPL(framingMs),
3547 TOJSON_IMPL(blockCount),
3548 TOJSON_IMPL(fdx),
3549 TOJSON_IMPL(noHdrExt),
3550 TOJSON_IMPL(maxTxSecs),
3551 TOJSON_IMPL(extensionSendInterval),
3552 TOJSON_IMPL(initialHeaderBurst),
3553 TOJSON_IMPL(trailingHeaderBurst),
3554 TOJSON_IMPL(startTxNotifications),
3555 TOJSON_IMPL(customRtpPayloadType),
3556 TOJSON_IMPL(resetRtpOnTx),
3557 TOJSON_IMPL(enableSmoothing),
3558 TOJSON_IMPL(dtx),
3559 TOJSON_IMPL(smoothedHangTimeMs)
3560 };
3561
3562 // internalKey is not serialized
3563 }
3564 static void from_json(const nlohmann::json& j, TxAudio& p)
3565 {
3566 p.clear();
3567 getOptional<bool>("enabled", p.enabled, j, true);
3568 getOptional<TxAudio::TxCodec_t>("encoder", p.encoder, j, TxAudio::TxCodec_t::ctOpus8000);
3569 getOptional<std::string>("encoderName", p.encoderName, j, EMPTY_STRING);
3570 getOptional("framingMs", p.framingMs, j, 60);
3571 getOptional("blockCount", p.blockCount, j, 0);
3572 getOptional("fdx", p.fdx, j, false);
3573 getOptional("noHdrExt", p.noHdrExt, j, false);
3574 getOptional("maxTxSecs", p.maxTxSecs, j, 0);
3575 getOptional("extensionSendInterval", p.extensionSendInterval, j, 10);
3576 getOptional("initialHeaderBurst", p.initialHeaderBurst, j, 5);
3577 getOptional("trailingHeaderBurst", p.trailingHeaderBurst, j, 5);
3578 getOptional("startTxNotifications", p.startTxNotifications, j, 5);
3579 getOptional("customRtpPayloadType", p.customRtpPayloadType, j, -1);
3580 getOptional("resetRtpOnTx", p.resetRtpOnTx, j, true);
3581 getOptional("enableSmoothing", p.enableSmoothing, j, true);
3582 getOptional("dtx", p.dtx, j, false);
3583 getOptional("smoothedHangTimeMs", p.smoothedHangTimeMs, j, 0);
3584
3585 // internalKey is not serialized
3586 }
3587
3588 //-----------------------------------------------------------
3589 JSON_SERIALIZED_CLASS(AudioRegistryDevice)
3600 {
3601 IMPLEMENT_JSON_SERIALIZATION()
3602 IMPLEMENT_JSON_DOCUMENTATION(AudioRegistryDevice)
3603
3604 public:
3606 std::string hardwareId;
3607
3610
3612 std::string name;
3613
3615 std::string manufacturer;
3616
3618 std::string model;
3619
3621 std::string serialNumber;
3622
3623
3625 std::string type;
3626
3628 std::string extra;
3629
3631 {
3632 clear();
3633 }
3634
3635 void clear()
3636 {
3637 hardwareId.clear();
3638 isDefault = false;
3639 name.clear();
3640 manufacturer.clear();
3641 model.clear();
3642 serialNumber.clear();
3643 type.clear();
3644 extra.clear();
3645 }
3646
3647 virtual std::string toString()
3648 {
3649 char buff[2048];
3650
3651 snprintf(buff, sizeof(buff), "hardwareId=%s, isDefault=%d, name=%s, manufacturer=%s, model=%s, serialNumber=%s, type=%s, extra=%s",
3652 hardwareId.c_str(),
3653 (int)isDefault,
3654 name.c_str(),
3655 manufacturer.c_str(),
3656 model.c_str(),
3657 serialNumber.c_str(),
3658 type.c_str(),
3659 extra.c_str());
3660
3661 return std::string(buff);
3662 }
3663 };
3664
3665 static void to_json(nlohmann::json& j, const AudioRegistryDevice& p)
3666 {
3667 j = nlohmann::json{
3668 TOJSON_IMPL(hardwareId),
3669 TOJSON_IMPL(isDefault),
3670 TOJSON_IMPL(name),
3671 TOJSON_IMPL(manufacturer),
3672 TOJSON_IMPL(model),
3673 TOJSON_IMPL(serialNumber),
3674 TOJSON_IMPL(type),
3675 TOJSON_IMPL(extra)
3676 };
3677 }
3678 static void from_json(const nlohmann::json& j, AudioRegistryDevice& p)
3679 {
3680 p.clear();
3681 getOptional<std::string>("hardwareId", p.hardwareId, j, EMPTY_STRING);
3682 getOptional<bool>("isDefault", p.isDefault, j, false);
3683 getOptional("name", p.name, j);
3684 getOptional("manufacturer", p.manufacturer, j);
3685 getOptional("model", p.model, j);
3686 getOptional("serialNumber", p.serialNumber, j);
3687 getOptional("type", p.type, j);
3688 getOptional("extra", p.extra, j);
3689 }
3690
3691
3692 //-----------------------------------------------------------
3693 JSON_SERIALIZED_CLASS(AudioRegistry)
3704 {
3705 IMPLEMENT_JSON_SERIALIZATION()
3706 IMPLEMENT_JSON_DOCUMENTATION(AudioRegistry)
3707
3708 public:
3710 std::vector<AudioRegistryDevice> inputs;
3711
3713 std::vector<AudioRegistryDevice> outputs;
3714
3716 {
3717 clear();
3718 }
3719
3720 void clear()
3721 {
3722 inputs.clear();
3723 outputs.clear();
3724 }
3725
3726 virtual std::string toString()
3727 {
3728 return std::string("");
3729 }
3730 };
3731
3732 static void to_json(nlohmann::json& j, const AudioRegistry& p)
3733 {
3734 j = nlohmann::json{
3735 TOJSON_IMPL(inputs),
3736 TOJSON_IMPL(outputs)
3737 };
3738 }
3739 static void from_json(const nlohmann::json& j, AudioRegistry& p)
3740 {
3741 p.clear();
3742 getOptional<std::vector<AudioRegistryDevice>>("inputs", p.inputs, j);
3743 getOptional<std::vector<AudioRegistryDevice>>("outputs", p.outputs, j);
3744 }
3745
3746 //-----------------------------------------------------------
3747 JSON_SERIALIZED_CLASS(AudioDeviceDescriptor)
3758 {
3759 IMPLEMENT_JSON_SERIALIZATION()
3760 IMPLEMENT_JSON_DOCUMENTATION(AudioDeviceDescriptor)
3761
3762 public:
3763
3765 typedef enum
3766 {
3768 dirUnknown = 0,
3769
3772
3775
3777 dirBoth
3778 } Direction_t;
3779
3785
3793
3801
3804
3812
3815
3817 std::string name;
3818
3820 std::string manufacturer;
3821
3823 std::string model;
3824
3826 std::string hardwareId;
3827
3829 std::string serialNumber;
3830
3833
3835 std::string type;
3836
3838 std::string extra;
3839
3842
3844 {
3845 clear();
3846 }
3847
3848 void clear()
3849 {
3850 deviceId = 0;
3851 samplingRate = 0;
3852 channels = 0;
3853 direction = dirUnknown;
3854 boostPercentage = 0;
3855 isAdad = false;
3856 isDefault = false;
3857
3858 name.clear();
3859 manufacturer.clear();
3860 model.clear();
3861 hardwareId.clear();
3862 serialNumber.clear();
3863 type.clear();
3864 extra.clear();
3865 isPresent = false;
3866 }
3867
3868 virtual std::string toString()
3869 {
3870 char buff[2048];
3871
3872 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",
3873 deviceId,
3874 samplingRate,
3875 channels,
3876 (int)direction,
3877 boostPercentage,
3878 (int)isAdad,
3879 name.c_str(),
3880 manufacturer.c_str(),
3881 model.c_str(),
3882 hardwareId.c_str(),
3883 serialNumber.c_str(),
3884 (int)isDefault,
3885 type.c_str(),
3886 (int)isPresent,
3887 extra.c_str());
3888
3889 return std::string(buff);
3890 }
3891 };
3892
3893 static void to_json(nlohmann::json& j, const AudioDeviceDescriptor& p)
3894 {
3895 j = nlohmann::json{
3896 TOJSON_IMPL(deviceId),
3897 TOJSON_IMPL(samplingRate),
3898 TOJSON_IMPL(channels),
3899 TOJSON_IMPL(direction),
3900 TOJSON_IMPL(boostPercentage),
3901 TOJSON_IMPL(isAdad),
3902 TOJSON_IMPL(name),
3903 TOJSON_IMPL(manufacturer),
3904 TOJSON_IMPL(model),
3905 TOJSON_IMPL(hardwareId),
3906 TOJSON_IMPL(serialNumber),
3907 TOJSON_IMPL(isDefault),
3908 TOJSON_IMPL(type),
3909 TOJSON_IMPL(extra),
3910 TOJSON_IMPL(isPresent)
3911 };
3912 }
3913 static void from_json(const nlohmann::json& j, AudioDeviceDescriptor& p)
3914 {
3915 p.clear();
3916 getOptional<int>("deviceId", p.deviceId, j, 0);
3917 getOptional<int>("samplingRate", p.samplingRate, j, 0);
3918 getOptional<int>("channels", p.channels, j, 0);
3919 getOptional<AudioDeviceDescriptor::Direction_t>("direction", p.direction, j,
3920 AudioDeviceDescriptor::Direction_t::dirUnknown);
3921 getOptional<int>("boostPercentage", p.boostPercentage, j, 0);
3922
3923 getOptional<bool>("isAdad", p.isAdad, j, false);
3924 getOptional("name", p.name, j);
3925 getOptional("manufacturer", p.manufacturer, j);
3926 getOptional("model", p.model, j);
3927 getOptional("hardwareId", p.hardwareId, j);
3928 getOptional("serialNumber", p.serialNumber, j);
3929 getOptional("isDefault", p.isDefault, j);
3930 getOptional("type", p.type, j);
3931 getOptional("extra", p.extra, j);
3932 getOptional<bool>("isPresent", p.isPresent, j, false);
3933 }
3934
3935 //-----------------------------------------------------------
3936 JSON_SERIALIZED_CLASS(ListOfAudioDeviceDescriptor)
3938 {
3939 IMPLEMENT_JSON_SERIALIZATION()
3940 IMPLEMENT_JSON_DOCUMENTATION(ListOfAudioDeviceDescriptor)
3941
3942 public:
3943 std::vector<AudioDeviceDescriptor> list;
3944
3946 {
3947 clear();
3948 }
3949
3950 void clear()
3951 {
3952 list.clear();
3953 }
3954 };
3955
3956 static void to_json(nlohmann::json& j, const ListOfAudioDeviceDescriptor& p)
3957 {
3958 j = nlohmann::json{
3959 TOJSON_IMPL(list)
3960 };
3961 }
3962 static void from_json(const nlohmann::json& j, ListOfAudioDeviceDescriptor& p)
3963 {
3964 p.clear();
3965 getOptional<std::vector<AudioDeviceDescriptor>>("list", p.list, j);
3966 }
3967
3968 //-----------------------------------------------------------
3969 JSON_SERIALIZED_CLASS(Audio)
3978 {
3979 IMPLEMENT_JSON_SERIALIZATION()
3980 IMPLEMENT_JSON_DOCUMENTATION(Audio)
3981
3982 public:
3985
3988
3990 std::string inputHardwareId;
3991
3994
3997
3999 std::string outputHardwareId;
4000
4003
4006
4009
4012
4013 Audio()
4014 {
4015 clear();
4016 }
4017
4018 void clear()
4019 {
4020 enabled = true;
4021 inputId = 0;
4022 inputHardwareId.clear();
4023 inputGain = 0;
4024 outputId = 0;
4025 outputHardwareId.clear();
4026 outputGain = 0;
4027 outputLevelLeft = 100;
4028 outputLevelRight = 100;
4029 outputMuted = false;
4030 }
4031 };
4032
4033 static void to_json(nlohmann::json& j, const Audio& p)
4034 {
4035 j = nlohmann::json{
4036 TOJSON_IMPL(enabled),
4037 TOJSON_IMPL(inputId),
4038 TOJSON_IMPL(inputHardwareId),
4039 TOJSON_IMPL(inputGain),
4040 TOJSON_IMPL(outputId),
4041 TOJSON_IMPL(outputHardwareId),
4042 TOJSON_IMPL(outputLevelLeft),
4043 TOJSON_IMPL(outputLevelRight),
4044 TOJSON_IMPL(outputMuted)
4045 };
4046 }
4047 static void from_json(const nlohmann::json& j, Audio& p)
4048 {
4049 p.clear();
4050 getOptional<bool>("enabled", p.enabled, j, true);
4051 getOptional<int>("inputId", p.inputId, j, 0);
4052 getOptional<std::string>("inputHardwareId", p.inputHardwareId, j, EMPTY_STRING);
4053 getOptional<int>("inputGain", p.inputGain, j, 0);
4054 getOptional<int>("outputId", p.outputId, j, 0);
4055 getOptional<std::string>("outputHardwareId", p.outputHardwareId, j, EMPTY_STRING);
4056 getOptional<int>("outputGain", p.outputGain, j, 0);
4057 getOptional<int>("outputLevelLeft", p.outputLevelLeft, j, 100);
4058 getOptional<int>("outputLevelRight", p.outputLevelRight, j, 100);
4059 getOptional<bool>("outputMuted", p.outputMuted, j, false);
4060 }
4061
4062 //-----------------------------------------------------------
4063 JSON_SERIALIZED_CLASS(TalkerInformation)
4074 {
4075 IMPLEMENT_JSON_SERIALIZATION()
4076 IMPLEMENT_JSON_DOCUMENTATION(TalkerInformation)
4077
4078 public:
4082 typedef enum
4083 {
4085 matNone = 0,
4086
4088 matAnonymous = 1,
4089
4091 matSsrcGenerated = 2
4092 } ManufacturedAliasType_t;
4093
4095 std::string alias;
4096
4098 std::string nodeId;
4099
4101 uint16_t rxFlags;
4102
4105
4107 uint32_t txId;
4108
4111
4114
4117
4119 uint32_t ssrc;
4120
4123
4125 {
4126 clear();
4127 }
4128
4129 void clear()
4130 {
4131 alias.clear();
4132 nodeId.clear();
4133 rxFlags = 0;
4134 txPriority = 0;
4135 txId = 0;
4136 duplicateCount = 0;
4137 aliasSpecializer = 0;
4138 rxMuted = false;
4139 manufacturedAliasType = ManufacturedAliasType_t::matNone;
4140 ssrc = 0;
4141 }
4142 };
4143
4144 static void to_json(nlohmann::json& j, const TalkerInformation& p)
4145 {
4146 j = nlohmann::json{
4147 TOJSON_IMPL(alias),
4148 TOJSON_IMPL(nodeId),
4149 TOJSON_IMPL(rxFlags),
4150 TOJSON_IMPL(txPriority),
4151 TOJSON_IMPL(txId),
4152 TOJSON_IMPL(duplicateCount),
4153 TOJSON_IMPL(aliasSpecializer),
4154 TOJSON_IMPL(rxMuted),
4155 TOJSON_IMPL(manufacturedAliasType),
4156 TOJSON_IMPL(ssrc)
4157 };
4158 }
4159 static void from_json(const nlohmann::json& j, TalkerInformation& p)
4160 {
4161 p.clear();
4162 getOptional<std::string>("alias", p.alias, j, EMPTY_STRING);
4163 getOptional<std::string>("nodeId", p.nodeId, j, EMPTY_STRING);
4164 getOptional<uint16_t>("rxFlags", p.rxFlags, j, 0);
4165 getOptional<int>("txPriority", p.txPriority, j, 0);
4166 getOptional<uint32_t>("txId", p.txId, j, 0);
4167 getOptional<int>("duplicateCount", p.duplicateCount, j, 0);
4168 getOptional<uint16_t>("aliasSpecializer", p.aliasSpecializer, j, 0);
4169 getOptional<bool>("rxMuted", p.rxMuted, j, false);
4170 getOptional<TalkerInformation::ManufacturedAliasType_t>("manufacturedAliasType", p.manufacturedAliasType, j, TalkerInformation::ManufacturedAliasType_t::matNone);
4171 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
4172 }
4173
4174 //-----------------------------------------------------------
4175 JSON_SERIALIZED_CLASS(GroupTalkers)
4188 {
4189 IMPLEMENT_JSON_SERIALIZATION()
4190 IMPLEMENT_JSON_DOCUMENTATION(GroupTalkers)
4191
4192 public:
4194 std::vector<TalkerInformation> list;
4195
4196 GroupTalkers()
4197 {
4198 clear();
4199 }
4200
4201 void clear()
4202 {
4203 list.clear();
4204 }
4205 };
4206
4207 static void to_json(nlohmann::json& j, const GroupTalkers& p)
4208 {
4209 j = nlohmann::json{
4210 TOJSON_IMPL(list)
4211 };
4212 }
4213 static void from_json(const nlohmann::json& j, GroupTalkers& p)
4214 {
4215 p.clear();
4216 getOptional<std::vector<TalkerInformation>>("list", p.list, j);
4217 }
4218
4219 //-----------------------------------------------------------
4220 JSON_SERIALIZED_CLASS(Presence)
4231 {
4232 IMPLEMENT_JSON_SERIALIZATION()
4233 IMPLEMENT_JSON_DOCUMENTATION(Presence)
4234
4235 public:
4239 typedef enum
4240 {
4242 pfUnknown = 0,
4243
4245 pfEngage = 1,
4246
4253 pfCot = 2
4254 } Format_t;
4255
4258
4261
4264
4267
4270
4271 Presence()
4272 {
4273 clear();
4274 }
4275
4276 void clear()
4277 {
4278 format = pfUnknown;
4279 intervalSecs = 30;
4280 listenOnly = false;
4281 minIntervalSecs = 5;
4282 reduceImmediacy = false;
4283 }
4284 };
4285
4286 static void to_json(nlohmann::json& j, const Presence& p)
4287 {
4288 j = nlohmann::json{
4289 TOJSON_IMPL(format),
4290 TOJSON_IMPL(intervalSecs),
4291 TOJSON_IMPL(listenOnly),
4292 TOJSON_IMPL(minIntervalSecs),
4293 TOJSON_IMPL(reduceImmediacy)
4294 };
4295 }
4296 static void from_json(const nlohmann::json& j, Presence& p)
4297 {
4298 p.clear();
4299 getOptional<Presence::Format_t>("format", p.format, j, Presence::Format_t::pfEngage);
4300 getOptional<int>("intervalSecs", p.intervalSecs, j, 30);
4301 getOptional<bool>("listenOnly", p.listenOnly, j, false);
4302 getOptional<int>("minIntervalSecs", p.minIntervalSecs, j, 5);
4303 getOptional<bool>("reduceImmediacy", p.reduceImmediacy, j, false);
4304 }
4305
4306
4307 //-----------------------------------------------------------
4308 JSON_SERIALIZED_CLASS(Advertising)
4319 {
4320 IMPLEMENT_JSON_SERIALIZATION()
4321 IMPLEMENT_JSON_DOCUMENTATION(Advertising)
4322
4323 public:
4326
4329
4332
4333 Advertising()
4334 {
4335 clear();
4336 }
4337
4338 void clear()
4339 {
4340 enabled = false;
4341 intervalMs = 20000;
4342 alwaysAdvertise = false;
4343 }
4344 };
4345
4346 static void to_json(nlohmann::json& j, const Advertising& p)
4347 {
4348 j = nlohmann::json{
4349 TOJSON_IMPL(enabled),
4350 TOJSON_IMPL(intervalMs),
4351 TOJSON_IMPL(alwaysAdvertise)
4352 };
4353 }
4354 static void from_json(const nlohmann::json& j, Advertising& p)
4355 {
4356 p.clear();
4357 getOptional("enabled", p.enabled, j, false);
4358 getOptional<int>("intervalMs", p.intervalMs, j, 20000);
4359 getOptional<bool>("alwaysAdvertise", p.alwaysAdvertise, j, false);
4360 }
4361
4362 //-----------------------------------------------------------
4363 JSON_SERIALIZED_CLASS(GroupPriorityTranslation)
4374 {
4375 IMPLEMENT_JSON_SERIALIZATION()
4376 IMPLEMENT_JSON_DOCUMENTATION(GroupPriorityTranslation)
4377
4378 public:
4381
4384
4387
4389 {
4390 clear();
4391 }
4392
4393 void clear()
4394 {
4395 rx.clear();
4396 tx.clear();
4397 priority = 0;
4398 }
4399 };
4400
4401 static void to_json(nlohmann::json& j, const GroupPriorityTranslation& p)
4402 {
4403 j = nlohmann::json{
4404 TOJSON_IMPL(rx),
4405 TOJSON_IMPL(tx),
4406 TOJSON_IMPL(priority)
4407 };
4408 }
4409 static void from_json(const nlohmann::json& j, GroupPriorityTranslation& p)
4410 {
4411 p.clear();
4412 j.at("rx").get_to(p.rx);
4413 j.at("tx").get_to(p.tx);
4414 FROMJSON_IMPL(priority, int, 0);
4415 }
4416
4417 //-----------------------------------------------------------
4418 JSON_SERIALIZED_CLASS(GroupTimeline)
4431 {
4432 IMPLEMENT_JSON_SERIALIZATION()
4433 IMPLEMENT_JSON_DOCUMENTATION(GroupTimeline)
4434
4435 public:
4438
4441 bool recordAudio;
4442
4444 {
4445 clear();
4446 }
4447
4448 void clear()
4449 {
4450 enabled = true;
4451 maxAudioTimeMs = 30000;
4452 recordAudio = true;
4453 }
4454 };
4455
4456 static void to_json(nlohmann::json& j, const GroupTimeline& p)
4457 {
4458 j = nlohmann::json{
4459 TOJSON_IMPL(enabled),
4460 TOJSON_IMPL(maxAudioTimeMs),
4461 TOJSON_IMPL(recordAudio)
4462 };
4463 }
4464 static void from_json(const nlohmann::json& j, GroupTimeline& p)
4465 {
4466 p.clear();
4467 getOptional("enabled", p.enabled, j, true);
4468 getOptional<int>("maxAudioTimeMs", p.maxAudioTimeMs, j, 30000);
4469 getOptional("recordAudio", p.recordAudio, j, true);
4470 }
4471
4479 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_INTERNAL = "com.rallytac.engage.internal";
4481 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_CORE = "com.rallytac.magellan.core";
4483 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_CISTECH = "com.rallytac.engage.magellan.cistech";
4485 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_TRELLISWARE = "com.rallytac.engage.magellan.trellisware";
4487 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_SILVUS = "com.rallytac.engage.magellan.silvus";
4489 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_PERSISTENT = "com.rallytac.engage.magellan.persistent";
4491 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_DOMO = "com.rallytac.engage.magellan.domo";
4493 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_KENWOOD = "com.rallytac.engage.magellan.kenwood";
4495 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_TAIT = "com.rallytac.engage.magellan.tait";
4497 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_VOCALITY = "com.rallytac.engage.magellan.vocality";
4518
4543
4559 //-----------------------------------------------------------
4560 JSON_SERIALIZED_CLASS(GroupAppTransport)
4571 {
4572 IMPLEMENT_JSON_SERIALIZATION()
4573 IMPLEMENT_JSON_DOCUMENTATION(GroupAppTransport)
4574
4575 public:
4578
4580 std::string id;
4581
4583 {
4584 clear();
4585 }
4586
4587 void clear()
4588 {
4589 enabled = false;
4590 id.clear();
4591 }
4592 };
4593
4594 static void to_json(nlohmann::json& j, const GroupAppTransport& p)
4595 {
4596 j = nlohmann::json{
4597 TOJSON_IMPL(enabled),
4598 TOJSON_IMPL(id)
4599 };
4600 }
4601 static void from_json(const nlohmann::json& j, GroupAppTransport& p)
4602 {
4603 p.clear();
4604 getOptional<bool>("enabled", p.enabled, j, false);
4605 getOptional<std::string>("id", p.id, j);
4606 }
4607
4608 //-----------------------------------------------------------
4609 JSON_SERIALIZED_CLASS(RtpProfile)
4620 {
4621 IMPLEMENT_JSON_SERIALIZATION()
4622 IMPLEMENT_JSON_DOCUMENTATION(RtpProfile)
4623
4624 public:
4630 typedef enum
4631 {
4633 jmStandard = 0,
4634
4636 jmLowLatency = 1,
4637
4639 jmReleaseOnTxEnd = 2
4640 } JitterMode_t;
4641
4644
4647
4650
4653
4656
4659
4662
4665
4668
4671
4674
4677
4680
4683
4686
4689
4693
4694 RtpProfile()
4695 {
4696 clear();
4697 }
4698
4699 void clear()
4700 {
4701 mode = jmStandard;
4702 jitterMaxMs = 10000;
4703 jitterMinMs = 100;
4704 jitterMaxFactor = 8;
4705 jitterTrimPercentage = 10;
4706 jitterUnderrunReductionThresholdMs = 1500;
4707 jitterUnderrunReductionAger = 100;
4708 latePacketSequenceRange = 5;
4709 latePacketTimestampRangeMs = 2000;
4710 inboundProcessorInactivityMs = 500;
4711 jitterForceTrimAtMs = 0;
4712 rtcpPresenceTimeoutMs = 45000;
4713 jitterMaxExceededClipPerc = 10;
4714 jitterMaxExceededClipHangMs = 1500;
4715 zombieLifetimeMs = 15000;
4716 jitterMaxTrimMs = 250;
4717 signalledInboundProcessorInactivityMs = (inboundProcessorInactivityMs * 4);
4718 }
4719 };
4720
4721 static void to_json(nlohmann::json& j, const RtpProfile& p)
4722 {
4723 j = nlohmann::json{
4724 TOJSON_IMPL(mode),
4725 TOJSON_IMPL(jitterMaxMs),
4726 TOJSON_IMPL(inboundProcessorInactivityMs),
4727 TOJSON_IMPL(jitterMinMs),
4728 TOJSON_IMPL(jitterMaxFactor),
4729 TOJSON_IMPL(jitterTrimPercentage),
4730 TOJSON_IMPL(jitterUnderrunReductionThresholdMs),
4731 TOJSON_IMPL(jitterUnderrunReductionAger),
4732 TOJSON_IMPL(latePacketSequenceRange),
4733 TOJSON_IMPL(latePacketTimestampRangeMs),
4734 TOJSON_IMPL(inboundProcessorInactivityMs),
4735 TOJSON_IMPL(jitterForceTrimAtMs),
4736 TOJSON_IMPL(jitterMaxExceededClipPerc),
4737 TOJSON_IMPL(jitterMaxExceededClipHangMs),
4738 TOJSON_IMPL(zombieLifetimeMs),
4739 TOJSON_IMPL(jitterMaxTrimMs),
4740 TOJSON_IMPL(signalledInboundProcessorInactivityMs)
4741 };
4742 }
4743 static void from_json(const nlohmann::json& j, RtpProfile& p)
4744 {
4745 p.clear();
4746 FROMJSON_IMPL(mode, RtpProfile::JitterMode_t, RtpProfile::JitterMode_t::jmStandard);
4747 FROMJSON_IMPL(jitterMaxMs, int, 10000);
4748 FROMJSON_IMPL(jitterMinMs, int, 20);
4749 FROMJSON_IMPL(jitterMaxFactor, int, 8);
4750 FROMJSON_IMPL(jitterTrimPercentage, int, 10);
4751 FROMJSON_IMPL(jitterUnderrunReductionThresholdMs, int, 1500);
4752 FROMJSON_IMPL(jitterUnderrunReductionAger, int, 100);
4753 FROMJSON_IMPL(latePacketSequenceRange, int, 5);
4754 FROMJSON_IMPL(latePacketTimestampRangeMs, int, 2000);
4755 FROMJSON_IMPL(inboundProcessorInactivityMs, int, 500);
4756 FROMJSON_IMPL(jitterForceTrimAtMs, int, 0);
4757 FROMJSON_IMPL(rtcpPresenceTimeoutMs, int, 45000);
4758 FROMJSON_IMPL(jitterMaxExceededClipPerc, int, 10);
4759 FROMJSON_IMPL(jitterMaxExceededClipHangMs, int, 1500);
4760 FROMJSON_IMPL(zombieLifetimeMs, int, 15000);
4761 FROMJSON_IMPL(jitterMaxTrimMs, int, 250);
4762 FROMJSON_IMPL(signalledInboundProcessorInactivityMs, int, (p.inboundProcessorInactivityMs * 4));
4763 }
4764
4765 //-----------------------------------------------------------
4766 JSON_SERIALIZED_CLASS(Tls)
4777 {
4778 IMPLEMENT_JSON_SERIALIZATION()
4779 IMPLEMENT_JSON_DOCUMENTATION(Tls)
4780
4781 public:
4782
4785
4788
4790 std::vector<std::string> caCertificates;
4791
4794
4797
4799 std::vector<std::string> crlSerials;
4800
4801 Tls()
4802 {
4803 clear();
4804 }
4805
4806 void clear()
4807 {
4808 verifyPeers = true;
4809 allowSelfSignedCertificates = false;
4810 caCertificates.clear();
4811 subjectRestrictions.clear();
4812 issuerRestrictions.clear();
4813 crlSerials.clear();
4814 }
4815 };
4816
4817 static void to_json(nlohmann::json& j, const Tls& p)
4818 {
4819 j = nlohmann::json{
4820 TOJSON_IMPL(verifyPeers),
4821 TOJSON_IMPL(allowSelfSignedCertificates),
4822 TOJSON_IMPL(caCertificates),
4823 TOJSON_IMPL(subjectRestrictions),
4824 TOJSON_IMPL(issuerRestrictions),
4825 TOJSON_IMPL(crlSerials)
4826 };
4827 }
4828 static void from_json(const nlohmann::json& j, Tls& p)
4829 {
4830 p.clear();
4831 getOptional<bool>("verifyPeers", p.verifyPeers, j, true);
4832 getOptional<bool>("allowSelfSignedCertificates", p.allowSelfSignedCertificates, j, false);
4833 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
4834 getOptional<StringRestrictionList>("subjectRestrictions", p.subjectRestrictions, j);
4835 getOptional<StringRestrictionList>("issuerRestrictions", p.issuerRestrictions, j);
4836 getOptional<std::vector<std::string>>("crlSerials", p.crlSerials, j);
4837 }
4838
4839 //-----------------------------------------------------------
4840 JSON_SERIALIZED_CLASS(RangerPackets)
4853 {
4854 IMPLEMENT_JSON_SERIALIZATION()
4855 IMPLEMENT_JSON_DOCUMENTATION(RangerPackets)
4856
4857 public:
4860
4863
4865 {
4866 clear();
4867 }
4868
4869 void clear()
4870 {
4871 hangTimerSecs = -1;
4872 count = 5;
4873 }
4874
4875 virtual void initForDocumenting()
4876 {
4877 }
4878 };
4879
4880 static void to_json(nlohmann::json& j, const RangerPackets& p)
4881 {
4882 j = nlohmann::json{
4883 TOJSON_IMPL(hangTimerSecs),
4884 TOJSON_IMPL(count)
4885 };
4886 }
4887 static void from_json(const nlohmann::json& j, RangerPackets& p)
4888 {
4889 p.clear();
4890 getOptional<int>("hangTimerSecs", p.hangTimerSecs, j, 11);
4891 getOptional<int>("count", p.count, j, 5);
4892 }
4893
4894 //-----------------------------------------------------------
4895 JSON_SERIALIZED_CLASS(Source)
4908 {
4909 IMPLEMENT_JSON_SERIALIZATION()
4910 IMPLEMENT_JSON_DOCUMENTATION(Source)
4911
4912 public:
4914 std::string nodeId;
4915
4916 /* NOTE: Not serialized ! */
4917 uint8_t _internal_binary_nodeId[ENGAGE_MAX_NODE_ID_SIZE];
4918
4920 std::string alias;
4921
4922 /* NOTE: Not serialized ! */
4923 uint8_t _internal_binary_alias[ENGAGE_MAX_ALIAS_SIZE];
4924
4925 Source()
4926 {
4927 clear();
4928 }
4929
4930 void clear()
4931 {
4932 nodeId.clear();
4933 memset(_internal_binary_nodeId, 0, sizeof(_internal_binary_nodeId));
4934
4935 alias.clear();
4936 memset(_internal_binary_alias, 0, sizeof(_internal_binary_alias));
4937 }
4938
4939 virtual void initForDocumenting()
4940 {
4941 }
4942 };
4943
4944 static void to_json(nlohmann::json& j, const Source& p)
4945 {
4946 j = nlohmann::json{
4947 TOJSON_IMPL(nodeId),
4948 TOJSON_IMPL(alias)
4949 };
4950 }
4951 static void from_json(const nlohmann::json& j, Source& p)
4952 {
4953 p.clear();
4954 FROMJSON_IMPL_SIMPLE(nodeId);
4955 FROMJSON_IMPL_SIMPLE(alias);
4956 }
4957
4958 //-----------------------------------------------------------
4959 JSON_SERIALIZED_CLASS(GroupBridgeTargetOutputDetail)
4972 {
4973 IMPLEMENT_JSON_SERIALIZATION()
4974 IMPLEMENT_JSON_DOCUMENTATION(GroupBridgeTargetOutputDetail)
4975
4976 public:
4978 typedef enum
4979 {
4983 bomRaw = 0,
4984
4987 bomMultistream = 1,
4988
4991 bomMixedStream = 2,
4992
4994 bomNone = 3
4995 } BridgingOpMode_t;
4996
4999
5002
5004 {
5005 clear();
5006 }
5007
5008 void clear()
5009 {
5010 mode = BridgingOpMode_t::bomRaw;
5011 mixedStreamTxParams.clear();
5012 }
5013
5014 virtual void initForDocumenting()
5015 {
5016 clear();
5017 }
5018 };
5019
5020 static void to_json(nlohmann::json& j, const GroupBridgeTargetOutputDetail& p)
5021 {
5022 j = nlohmann::json{
5023 TOJSON_IMPL(mode),
5024 TOJSON_IMPL(mixedStreamTxParams)
5025 };
5026 }
5027 static void from_json(const nlohmann::json& j, GroupBridgeTargetOutputDetail& p)
5028 {
5029 p.clear();
5030 FROMJSON_IMPL_SIMPLE(mode);
5031 FROMJSON_IMPL_SIMPLE(mixedStreamTxParams);
5032 }
5033
5034 //-----------------------------------------------------------
5035 JSON_SERIALIZED_CLASS(GroupDefaultAudioPriority)
5048 {
5049 IMPLEMENT_JSON_SERIALIZATION()
5050 IMPLEMENT_JSON_DOCUMENTATION(GroupDefaultAudioPriority)
5051
5052 public:
5054 uint8_t tx;
5055
5057 uint8_t rx;
5058
5060 {
5061 clear();
5062 }
5063
5064 void clear()
5065 {
5066 tx = 0;
5067 rx = 0;
5068 }
5069
5070 virtual void initForDocumenting()
5071 {
5072 clear();
5073 }
5074 };
5075
5076 static void to_json(nlohmann::json& j, const GroupDefaultAudioPriority& p)
5077 {
5078 j = nlohmann::json{
5079 TOJSON_IMPL(tx),
5080 TOJSON_IMPL(rx)
5081 };
5082 }
5083 static void from_json(const nlohmann::json& j, GroupDefaultAudioPriority& p)
5084 {
5085 p.clear();
5086 FROMJSON_IMPL_SIMPLE(tx);
5087 FROMJSON_IMPL_SIMPLE(rx);
5088 }
5089
5090 //-----------------------------------------------------------
5091 JSON_SERIALIZED_CLASS(Group)
5103 {
5104 IMPLEMENT_JSON_SERIALIZATION()
5105 IMPLEMENT_JSON_DOCUMENTATION(Group)
5106
5107 public:
5109 typedef enum
5110 {
5112 gtUnknown = 0,
5113
5115 gtAudio = 1,
5116
5118 gtPresence = 2,
5119
5121 gtRaw = 3
5122 } Type_t;
5123
5125 typedef enum
5126 {
5128 iagpAnonymousAlias = 0,
5129
5131 iagpSsrcInHex = 1
5132 } InboundAliasGenerationPolicy_t;
5133
5136
5139
5142
5149 std::string id;
5150
5152 std::string name;
5153
5155 std::string spokenName;
5156
5158 std::string interfaceName;
5159
5162
5165
5168
5171
5174
5176 std::string cryptoPassword;
5177
5180
5182 std::vector<Rallypoint> rallypoints;
5183
5186
5189
5198
5200 std::string alias;
5201
5204
5206 std::string source;
5207
5214
5217
5220
5223
5225 std::vector<std::string> presenceGroupAffinities;
5226
5229
5232
5234 std::vector<RtpPayloadTypeTranslation> inboundRtpPayloadTypeTranslations;
5235
5238
5241
5243 std::string anonymousAlias;
5244
5247
5250
5253
5256
5259
5262
5265
5267 std::vector<uint16_t> specializerAffinities;
5268
5271
5273 std::vector<Source> ignoreSources;
5274
5276 std::string languageCode;
5277
5279 std::string synVoice;
5280
5283
5286
5289
5292
5295
5298
5299 Group()
5300 {
5301 clear();
5302 }
5303
5304 void clear()
5305 {
5306 type = gtUnknown;
5307 bridgeTargetOutputDetail.clear();
5308 defaultAudioPriority.clear();
5309 id.clear();
5310 name.clear();
5311 spokenName.clear();
5312 interfaceName.clear();
5313 rx.clear();
5314 tx.clear();
5315 txOptions.clear();
5316 txAudio.clear();
5317 presence.clear();
5318 cryptoPassword.clear();
5319
5320 alias.clear();
5321
5322 rallypoints.clear();
5323 rallypointCluster.clear();
5324
5325 audio.clear();
5326 timeline.clear();
5327
5328 blockAdvertising = false;
5329
5330 source.clear();
5331
5332 maxRxSecs = 0;
5333
5334 enableMulticastFailover = false;
5335 multicastFailoverSecs = 10;
5336
5337 rtcpPresenceRx.clear();
5338
5339 presenceGroupAffinities.clear();
5340 disablePacketEvents = false;
5341
5342 rfc4733RtpPayloadId = 0;
5343 inboundRtpPayloadTypeTranslations.clear();
5344 priorityTranslation.clear();
5345
5346 stickyTidHangSecs = 10;
5347 anonymousAlias.clear();
5348 lbCrypto = false;
5349
5350 appTransport.clear();
5351 allowLoopback = false;
5352
5353 rtpProfile.clear();
5354 rangerPackets.clear();
5355
5356 _wasDeserialized_rtpProfile = false;
5357
5358 txImpairment.clear();
5359 rxImpairment.clear();
5360
5361 specializerAffinities.clear();
5362
5363 securityLevel = 0;
5364
5365 ignoreSources.clear();
5366
5367 languageCode.clear();
5368 synVoice.clear();
5369
5370 rxCapture.clear();
5371 txCapture.clear();
5372
5373 blobRtpPayloadType = ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE;
5374 inboundAliasGenerationPolicy = iagpAnonymousAlias;
5375 gateIn.clear();
5376
5377 ignoreAudioTraffic = false;
5378 }
5379 };
5380
5381 static void to_json(nlohmann::json& j, const Group& p)
5382 {
5383 j = nlohmann::json{
5384 TOJSON_IMPL(type),
5385 TOJSON_IMPL(bridgeTargetOutputDetail),
5386 TOJSON_IMPL(defaultAudioPriority),
5387 TOJSON_IMPL(id),
5388 TOJSON_IMPL(name),
5389 TOJSON_IMPL(spokenName),
5390 TOJSON_IMPL(interfaceName),
5391 TOJSON_IMPL(rx),
5392 TOJSON_IMPL(tx),
5393 TOJSON_IMPL(txOptions),
5394 TOJSON_IMPL(txAudio),
5395 TOJSON_IMPL(presence),
5396 TOJSON_IMPL(cryptoPassword),
5397 TOJSON_IMPL(alias),
5398
5399 // See below
5400 //TOJSON_IMPL(rallypoints),
5401 //TOJSON_IMPL(rallypointCluster),
5402
5403 TOJSON_IMPL(alias),
5404 TOJSON_IMPL(audio),
5405 TOJSON_IMPL(timeline),
5406 TOJSON_IMPL(blockAdvertising),
5407 TOJSON_IMPL(source),
5408 TOJSON_IMPL(maxRxSecs),
5409 TOJSON_IMPL(enableMulticastFailover),
5410 TOJSON_IMPL(multicastFailoverSecs),
5411 TOJSON_IMPL(rtcpPresenceRx),
5412 TOJSON_IMPL(presenceGroupAffinities),
5413 TOJSON_IMPL(disablePacketEvents),
5414 TOJSON_IMPL(rfc4733RtpPayloadId),
5415 TOJSON_IMPL(inboundRtpPayloadTypeTranslations),
5416 TOJSON_IMPL(priorityTranslation),
5417 TOJSON_IMPL(stickyTidHangSecs),
5418 TOJSON_IMPL(anonymousAlias),
5419 TOJSON_IMPL(lbCrypto),
5420 TOJSON_IMPL(appTransport),
5421 TOJSON_IMPL(allowLoopback),
5422 TOJSON_IMPL(rangerPackets),
5423
5424 TOJSON_IMPL(txImpairment),
5425 TOJSON_IMPL(rxImpairment),
5426
5427 TOJSON_IMPL(specializerAffinities),
5428
5429 TOJSON_IMPL(securityLevel),
5430
5431 TOJSON_IMPL(ignoreSources),
5432
5433 TOJSON_IMPL(languageCode),
5434 TOJSON_IMPL(synVoice),
5435
5436 TOJSON_IMPL(rxCapture),
5437 TOJSON_IMPL(txCapture),
5438
5439 TOJSON_IMPL(blobRtpPayloadType),
5440
5441 TOJSON_IMPL(inboundAliasGenerationPolicy),
5442
5443 TOJSON_IMPL(gateIn),
5444
5445 TOJSON_IMPL(ignoreAudioTraffic)
5446 };
5447
5448 TOJSON_BASE_IMPL();
5449
5450 // TODO: need a better way to indicate whether rtpProfile is present
5451 if(p._wasDeserialized_rtpProfile || p.isDocumenting())
5452 {
5453 j["rtpProfile"] = p.rtpProfile;
5454 }
5455
5456 if(p.isDocumenting())
5457 {
5458 j["rallypointCluster"] = p.rallypointCluster;
5459 j["rallypoints"] = p.rallypoints;
5460 }
5461 else
5462 {
5463 // rallypointCluster takes precedence if it has elements
5464 if(!p.rallypointCluster.rallypoints.empty())
5465 {
5466 j["rallypointCluster"] = p.rallypointCluster;
5467 }
5468 else if(!p.rallypoints.empty())
5469 {
5470 j["rallypoints"] = p.rallypoints;
5471 }
5472 }
5473 }
5474 static void from_json(const nlohmann::json& j, Group& p)
5475 {
5476 p.clear();
5477 j.at("type").get_to(p.type);
5478 getOptional<GroupBridgeTargetOutputDetail>("bridgeTargetOutputDetail", p.bridgeTargetOutputDetail, j);
5479 j.at("id").get_to(p.id);
5480 getOptional<std::string>("name", p.name, j);
5481 getOptional<std::string>("spokenName", p.spokenName, j);
5482 getOptional<std::string>("interfaceName", p.interfaceName, j);
5483 getOptional<NetworkAddress>("rx", p.rx, j);
5484 getOptional<NetworkAddress>("tx", p.tx, j);
5485 getOptional<NetworkTxOptions>("txOptions", p.txOptions, j);
5486 getOptional<std::string>("cryptoPassword", p.cryptoPassword, j);
5487 getOptional<std::string>("alias", p.alias, j);
5488 getOptional<TxAudio>("txAudio", p.txAudio, j);
5489 getOptional<Presence>("presence", p.presence, j);
5490 getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
5491 getOptional<RallypointCluster>("rallypointCluster", p.rallypointCluster, j);
5492 getOptional<Audio>("audio", p.audio, j);
5493 getOptional<GroupTimeline>("timeline", p.timeline, j);
5494 getOptional<bool>("blockAdvertising", p.blockAdvertising, j, false);
5495 getOptional<std::string>("source", p.source, j);
5496 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
5497 getOptional<bool>("enableMulticastFailover", p.enableMulticastFailover, j, false);
5498 getOptional<int>("multicastFailoverSecs", p.multicastFailoverSecs, j, 10);
5499 getOptional<NetworkAddress>("rtcpPresenceRx", p.rtcpPresenceRx, j);
5500 getOptional<std::vector<std::string>>("presenceGroupAffinities", p.presenceGroupAffinities, j);
5501 getOptional<bool>("disablePacketEvents", p.disablePacketEvents, j, false);
5502 getOptional<int>("rfc4733RtpPayloadId", p.rfc4733RtpPayloadId, j, 0);
5503 getOptional<std::vector<RtpPayloadTypeTranslation>>("inboundRtpPayloadTypeTranslations", p.inboundRtpPayloadTypeTranslations, j);
5504 getOptional<GroupPriorityTranslation>("priorityTranslation", p.priorityTranslation, j);
5505 getOptional<GroupDefaultAudioPriority>("defaultAudioPriority", p.defaultAudioPriority, j);
5506 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
5507 getOptional<std::string>("anonymousAlias", p.anonymousAlias, j);
5508 getOptional<bool>("lbCrypto", p.lbCrypto, j, false);
5509 getOptional<GroupAppTransport>("appTransport", p.appTransport, j);
5510 getOptional<bool>("allowLoopback", p.allowLoopback, j, false);
5511 getOptionalWithIndicator<RtpProfile>("rtpProfile", p.rtpProfile, j, &p._wasDeserialized_rtpProfile);
5512 getOptional<RangerPackets>("rangerPackets", p.rangerPackets, j);
5513 getOptional<TransportImpairment>("txImpairment", p.txImpairment, j);
5514 getOptional<TransportImpairment>("rxImpairment", p.rxImpairment, j);
5515 getOptional<std::vector<uint16_t>>("specializerAffinities", p.specializerAffinities, j);
5516 getOptional<uint32_t>("securityLevel", p.securityLevel, j, 0);
5517 getOptional<std::vector<Source>>("ignoreSources", p.ignoreSources, j);
5518 getOptional<std::string>("languageCode", p.languageCode, j);
5519 getOptional<std::string>("synVoice", p.synVoice, j);
5520
5521 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
5522 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
5523
5524 getOptional<uint16_t>("blobRtpPayloadType", p.blobRtpPayloadType, j, ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE);
5525
5526 getOptional<Group::InboundAliasGenerationPolicy_t>("inboundAliasGenerationPolicy", p.inboundAliasGenerationPolicy, j, Group::InboundAliasGenerationPolicy_t::iagpAnonymousAlias);
5527
5528 getOptional<AudioGate>("gateIn", p.gateIn, j);
5529
5530 getOptional<bool>("ignoreAudioTraffic", p.ignoreAudioTraffic, j, false);
5531
5532 FROMJSON_BASE_IMPL();
5533 }
5534
5535
5536 //-----------------------------------------------------------
5537 JSON_SERIALIZED_CLASS(Mission)
5539 {
5540 IMPLEMENT_JSON_SERIALIZATION()
5541 IMPLEMENT_JSON_DOCUMENTATION(Mission)
5542
5543 public:
5544 std::string id;
5545 std::string name;
5546 std::vector<Group> groups;
5547 std::chrono::system_clock::time_point begins;
5548 std::chrono::system_clock::time_point ends;
5549 std::string certStoreId;
5550 int multicastFailoverPolicy;
5551 Rallypoint rallypoint;
5552
5553 void clear()
5554 {
5555 id.clear();
5556 name.clear();
5557 groups.clear();
5558 certStoreId.clear();
5559 multicastFailoverPolicy = 0;
5560 rallypoint.clear();
5561 }
5562 };
5563
5564 static void to_json(nlohmann::json& j, const Mission& p)
5565 {
5566 j = nlohmann::json{
5567 TOJSON_IMPL(id),
5568 TOJSON_IMPL(name),
5569 TOJSON_IMPL(groups),
5570 TOJSON_IMPL(certStoreId),
5571 TOJSON_IMPL(multicastFailoverPolicy),
5572 TOJSON_IMPL(rallypoint)
5573 };
5574 }
5575
5576 static void from_json(const nlohmann::json& j, Mission& p)
5577 {
5578 p.clear();
5579 j.at("id").get_to(p.id);
5580 j.at("name").get_to(p.name);
5581
5582 // Groups are optional
5583 try
5584 {
5585 j.at("groups").get_to(p.groups);
5586 }
5587 catch(...)
5588 {
5589 p.groups.clear();
5590 }
5591
5592 FROMJSON_IMPL(certStoreId, std::string, EMPTY_STRING);
5593 FROMJSON_IMPL(multicastFailoverPolicy, int, 0);
5594 getOptional<Rallypoint>("rallypoint", p.rallypoint, j);
5595 }
5596
5597 //-----------------------------------------------------------
5598 JSON_SERIALIZED_CLASS(LicenseDescriptor)
5609 {
5610 IMPLEMENT_JSON_SERIALIZATION()
5611 IMPLEMENT_JSON_DOCUMENTATION(LicenseDescriptor)
5612
5613 public:
5619 static const int STATUS_OK = 0;
5620 static const int ERR_NULL_ENTITLEMENT_KEY = -1;
5621 static const int ERR_NULL_LICENSE_KEY = -2;
5622 static const int ERR_INVALID_LICENSE_KEY_LEN = -3;
5623 static const int ERR_LICENSE_KEY_VERIFICATION_FAILURE = -4;
5624 static const int ERR_ACTIVATION_CODE_VERIFICATION_FAILURE = -5;
5625 static const int ERR_INVALID_EXPIRATION_DATE = -6;
5626 static const int ERR_GENERAL_FAILURE = -7;
5627 static const int ERR_NOT_INITIALIZED = -8;
5628 static const int ERR_REQUIRES_ACTIVATION = -9;
5629 static const int ERR_LICENSE_NOT_SUITED_FOR_ACTIVATION = -10;
5637 static const uint8_t LIC_CARGO_FLAG_LIMIT_TO_FEATURES = 0x01;
5648 std::string entitlement;
5649
5656 std::string key;
5657
5659 std::string activationCode;
5660
5662 std::string deviceId;
5663
5665 int type;
5666
5668 time_t expires;
5669
5671 std::string expiresFormatted;
5672
5677 uint32_t flags;
5678
5680 std::string cargo;
5681
5683 uint8_t cargoFlags;
5684
5690
5692 std::string manufacturerId;
5693
5695 {
5696 clear();
5697 }
5698
5699 void clear()
5700 {
5701 entitlement.clear();
5702 key.clear();
5703 activationCode.clear();
5704 type = 0;
5705 expires = 0;
5706 expiresFormatted.clear();
5707 flags = 0;
5708 cargo.clear();
5709 cargoFlags = 0;
5710 deviceId.clear();
5711 status = ERR_NOT_INITIALIZED;
5712 manufacturerId.clear();
5713 }
5714 };
5715
5716 static void to_json(nlohmann::json& j, const LicenseDescriptor& p)
5717 {
5718 j = nlohmann::json{
5719 //TOJSON_IMPL(entitlement),
5720 {"entitlement", "*entitlement*"},
5721 TOJSON_IMPL(key),
5722 TOJSON_IMPL(activationCode),
5723 TOJSON_IMPL(type),
5724 TOJSON_IMPL(expires),
5725 TOJSON_IMPL(expiresFormatted),
5726 TOJSON_IMPL(flags),
5727 TOJSON_IMPL(deviceId),
5728 TOJSON_IMPL(status),
5729 //TOJSON_IMPL(manufacturerId),
5730 {"manufacturerId", "*manufacturerId*"},
5731 TOJSON_IMPL(cargo),
5732 TOJSON_IMPL(cargoFlags)
5733 };
5734 }
5735
5736 static void from_json(const nlohmann::json& j, LicenseDescriptor& p)
5737 {
5738 p.clear();
5739 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
5740 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
5741 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
5742 FROMJSON_IMPL(type, int, 0);
5743 FROMJSON_IMPL(expires, time_t, 0);
5744 FROMJSON_IMPL(expiresFormatted, std::string, EMPTY_STRING);
5745 FROMJSON_IMPL(flags, uint32_t, 0);
5746 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
5747 FROMJSON_IMPL(status, int, LicenseDescriptor::ERR_NOT_INITIALIZED);
5748 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
5749 FROMJSON_IMPL(cargo, std::string, EMPTY_STRING);
5750 FROMJSON_IMPL(cargoFlags, uint8_t, 0);
5751 }
5752
5753
5754 //-----------------------------------------------------------
5755 JSON_SERIALIZED_CLASS(EngineNetworkingRpUdpStreaming)
5768 {
5769 IMPLEMENT_JSON_SERIALIZATION()
5770 IMPLEMENT_JSON_DOCUMENTATION(EngineNetworkingRpUdpStreaming)
5771
5772 public:
5775
5777 int port;
5778
5781
5784
5786 int ttl;
5787
5789 {
5790 clear();
5791 }
5792
5793 void clear()
5794 {
5795 enabled = false;
5796 port = 0;
5797 keepaliveIntervalSecs = 15;
5798 priority = TxPriority_t::priVoice;
5799 ttl = 64;
5800 }
5801
5802 virtual void initForDocumenting()
5803 {
5804 }
5805 };
5806
5807 static void to_json(nlohmann::json& j, const EngineNetworkingRpUdpStreaming& p)
5808 {
5809 j = nlohmann::json{
5810 TOJSON_IMPL(enabled),
5811 TOJSON_IMPL(port),
5812 TOJSON_IMPL(keepaliveIntervalSecs),
5813 TOJSON_IMPL(priority),
5814 TOJSON_IMPL(ttl)
5815 };
5816 }
5817 static void from_json(const nlohmann::json& j, EngineNetworkingRpUdpStreaming& p)
5818 {
5819 p.clear();
5820 getOptional<bool>("enabled", p.enabled, j, false);
5821 getOptional<int>("port", p.port, j, 0);
5822 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
5823 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
5824 getOptional<int>("ttl", p.ttl, j, 64);
5825 }
5826
5827 //-----------------------------------------------------------
5828 JSON_SERIALIZED_CLASS(EnginePolicyNetworking)
5838 {
5839 IMPLEMENT_JSON_SERIALIZATION()
5840 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNetworking)
5841
5842 public:
5844 std::string defaultNic;
5845
5848
5851
5854
5857
5860
5863
5866
5868 {
5869 clear();
5870 }
5871
5872 void clear()
5873 {
5874 defaultNic.clear();
5875 multicastRejoinSecs = 8;
5876 rallypointRtTestIntervalMs = 60000;
5877 logRtpJitterBufferStats = false;
5878 preventMulticastFailover = false;
5879 addressResolutionPolicy = AddressResolutionPolicy_t::arpIpv6ThenIpv4;
5880
5881 rpUdpStreaming.clear();
5882 rtpProfile.clear();
5883 }
5884 };
5885
5886 static void to_json(nlohmann::json& j, const EnginePolicyNetworking& p)
5887 {
5888 j = nlohmann::json{
5889 TOJSON_IMPL(defaultNic),
5890 TOJSON_IMPL(multicastRejoinSecs),
5891
5892 TOJSON_IMPL(rallypointRtTestIntervalMs),
5893 TOJSON_IMPL(logRtpJitterBufferStats),
5894 TOJSON_IMPL(preventMulticastFailover),
5895
5896 TOJSON_IMPL(rpUdpStreaming),
5897 TOJSON_IMPL(rtpProfile),
5898 TOJSON_IMPL(addressResolutionPolicy)
5899 };
5900 }
5901 static void from_json(const nlohmann::json& j, EnginePolicyNetworking& p)
5902 {
5903 p.clear();
5904 FROMJSON_IMPL(defaultNic, std::string, EMPTY_STRING);
5905 FROMJSON_IMPL(multicastRejoinSecs, int, 8);
5906 FROMJSON_IMPL(rallypointRtTestIntervalMs, int, 60000);
5907 FROMJSON_IMPL(logRtpJitterBufferStats, bool, false);
5908 FROMJSON_IMPL(preventMulticastFailover, bool, false);
5909
5910 getOptional<EngineNetworkingRpUdpStreaming>("rpUdpStreaming", p.rpUdpStreaming, j);
5911 getOptional<RtpProfile>("rtpProfile", p.rtpProfile, j);
5912 getOptional<AddressResolutionPolicy_t>("addressResolutionPolicy", p.addressResolutionPolicy, j, AddressResolutionPolicy_t::arpIpv6ThenIpv4);
5913 }
5914
5915 //-----------------------------------------------------------
5916 JSON_SERIALIZED_CLASS(Aec)
5927 {
5928 IMPLEMENT_JSON_SERIALIZATION()
5929 IMPLEMENT_JSON_DOCUMENTATION(Aec)
5930
5931 public:
5937 typedef enum
5938 {
5940 aecmDefault = 0,
5941
5943 aecmLow = 1,
5944
5946 aecmMedium = 2,
5947
5949 aecmHigh = 3,
5950
5952 aecmVeryHigh = 4,
5953
5955 aecmHighest = 5
5956 } Mode_t;
5957
5960
5963
5966
5968 bool cng;
5969
5970 Aec()
5971 {
5972 clear();
5973 }
5974
5975 void clear()
5976 {
5977 enabled = false;
5978 mode = aecmDefault;
5979 speakerTailMs = 60;
5980 cng = true;
5981 }
5982 };
5983
5984 static void to_json(nlohmann::json& j, const Aec& p)
5985 {
5986 j = nlohmann::json{
5987 TOJSON_IMPL(enabled),
5988 TOJSON_IMPL(mode),
5989 TOJSON_IMPL(speakerTailMs),
5990 TOJSON_IMPL(cng)
5991 };
5992 }
5993 static void from_json(const nlohmann::json& j, Aec& p)
5994 {
5995 p.clear();
5996 FROMJSON_IMPL(enabled, bool, false);
5997 FROMJSON_IMPL(mode, Aec::Mode_t, Aec::Mode_t::aecmDefault);
5998 FROMJSON_IMPL(speakerTailMs, int, 60);
5999 FROMJSON_IMPL(cng, bool, true);
6000 }
6001
6002 //-----------------------------------------------------------
6003 JSON_SERIALIZED_CLASS(Vad)
6014 {
6015 IMPLEMENT_JSON_SERIALIZATION()
6016 IMPLEMENT_JSON_DOCUMENTATION(Vad)
6017
6018 public:
6024 typedef enum
6025 {
6027 vamDefault = 0,
6028
6030 vamLowBitRate = 1,
6031
6033 vamAggressive = 2,
6034
6036 vamVeryAggressive = 3
6037 } Mode_t;
6038
6041
6044
6045 Vad()
6046 {
6047 clear();
6048 }
6049
6050 void clear()
6051 {
6052 enabled = false;
6053 mode = vamDefault;
6054 }
6055 };
6056
6057 static void to_json(nlohmann::json& j, const Vad& p)
6058 {
6059 j = nlohmann::json{
6060 TOJSON_IMPL(enabled),
6061 TOJSON_IMPL(mode)
6062 };
6063 }
6064 static void from_json(const nlohmann::json& j, Vad& p)
6065 {
6066 p.clear();
6067 FROMJSON_IMPL(enabled, bool, false);
6068 FROMJSON_IMPL(mode, Vad::Mode_t, Vad::Mode_t::vamDefault);
6069 }
6070
6071 //-----------------------------------------------------------
6072 JSON_SERIALIZED_CLASS(Bridge)
6083 {
6084 IMPLEMENT_JSON_SERIALIZATION()
6085 IMPLEMENT_JSON_DOCUMENTATION(Bridge)
6086
6087 public:
6089 std::string id;
6090
6092 std::string name;
6093
6095 std::vector<std::string> groups;
6096
6101
6102 Bridge()
6103 {
6104 clear();
6105 }
6106
6107 void clear()
6108 {
6109 id.clear();
6110 name.clear();
6111 groups.clear();
6112 enabled = true;
6113 }
6114 };
6115
6116 static void to_json(nlohmann::json& j, const Bridge& p)
6117 {
6118 j = nlohmann::json{
6119 TOJSON_IMPL(id),
6120 TOJSON_IMPL(name),
6121 TOJSON_IMPL(groups),
6122 TOJSON_IMPL(enabled)
6123 };
6124 }
6125 static void from_json(const nlohmann::json& j, Bridge& p)
6126 {
6127 p.clear();
6128 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
6129 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
6130 getOptional<std::vector<std::string>>("groups", p.groups, j);
6131 FROMJSON_IMPL(enabled, bool, true);
6132 }
6133
6134 //-----------------------------------------------------------
6135 JSON_SERIALIZED_CLASS(AndroidAudio)
6146 {
6147 IMPLEMENT_JSON_SERIALIZATION()
6148 IMPLEMENT_JSON_DOCUMENTATION(AndroidAudio)
6149
6150 public:
6151 constexpr static int INVALID_SESSION_ID = -9999;
6152
6154 int api;
6155
6158
6161
6177
6185
6195
6198
6201
6202
6203 AndroidAudio()
6204 {
6205 clear();
6206 }
6207
6208 void clear()
6209 {
6210 api = 0;
6211 sharingMode = 0;
6212 performanceMode = 12;
6213 usage = 2;
6214 contentType = 1;
6215 inputPreset = 7;
6216 sessionId = AndroidAudio::INVALID_SESSION_ID;
6217 engineMode = 0;
6218 }
6219 };
6220
6221 static void to_json(nlohmann::json& j, const AndroidAudio& p)
6222 {
6223 j = nlohmann::json{
6224 TOJSON_IMPL(api),
6225 TOJSON_IMPL(sharingMode),
6226 TOJSON_IMPL(performanceMode),
6227 TOJSON_IMPL(usage),
6228 TOJSON_IMPL(contentType),
6229 TOJSON_IMPL(inputPreset),
6230 TOJSON_IMPL(sessionId),
6231 TOJSON_IMPL(engineMode)
6232 };
6233 }
6234 static void from_json(const nlohmann::json& j, AndroidAudio& p)
6235 {
6236 p.clear();
6237 FROMJSON_IMPL(api, int, 0);
6238 FROMJSON_IMPL(sharingMode, int, 0);
6239 FROMJSON_IMPL(performanceMode, int, 12);
6240 FROMJSON_IMPL(usage, int, 2);
6241 FROMJSON_IMPL(contentType, int, 1);
6242 FROMJSON_IMPL(inputPreset, int, 7);
6243 FROMJSON_IMPL(sessionId, int, AndroidAudio::INVALID_SESSION_ID);
6244 FROMJSON_IMPL(engineMode, int, 0);
6245 }
6246
6247 //-----------------------------------------------------------
6248 JSON_SERIALIZED_CLASS(EnginePolicyAudio)
6259 {
6260 IMPLEMENT_JSON_SERIALIZATION()
6261 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyAudio)
6262
6263 public:
6266
6269
6272
6275
6278
6281
6284
6287
6290
6293
6296
6299
6302
6305
6308
6309
6311 {
6312 clear();
6313 }
6314
6315 void clear()
6316 {
6317 enabled = true;
6318 hardwareEnabled = true;
6319 internalRate = 16000;
6320 internalChannels = 2;
6321 muteTxOnTx = false;
6322 aec.clear();
6323 vad.clear();
6324 android.clear();
6325 inputAgc.clear();
6326 outputAgc.clear();
6327 denoiseInput = false;
6328 denoiseOutput = false;
6329 saveInputPcm = false;
6330 saveOutputPcm = false;
6331 registry.clear();
6332 }
6333 };
6334
6335 static void to_json(nlohmann::json& j, const EnginePolicyAudio& p)
6336 {
6337 j = nlohmann::json{
6338 TOJSON_IMPL(enabled),
6339 TOJSON_IMPL(hardwareEnabled),
6340 TOJSON_IMPL(internalRate),
6341 TOJSON_IMPL(internalChannels),
6342 TOJSON_IMPL(muteTxOnTx),
6343 TOJSON_IMPL(aec),
6344 TOJSON_IMPL(vad),
6345 TOJSON_IMPL(android),
6346 TOJSON_IMPL(inputAgc),
6347 TOJSON_IMPL(outputAgc),
6348 TOJSON_IMPL(denoiseInput),
6349 TOJSON_IMPL(denoiseOutput),
6350 TOJSON_IMPL(saveInputPcm),
6351 TOJSON_IMPL(saveOutputPcm),
6352 TOJSON_IMPL(registry)
6353 };
6354 }
6355 static void from_json(const nlohmann::json& j, EnginePolicyAudio& p)
6356 {
6357 p.clear();
6358 getOptional<bool>("enabled", p.enabled, j, true);
6359 getOptional<bool>("hardwareEnabled", p.hardwareEnabled, j, true);
6360 FROMJSON_IMPL(internalRate, int, 16000);
6361 FROMJSON_IMPL(internalChannels, int, 2);
6362
6363 FROMJSON_IMPL(muteTxOnTx, bool, false);
6364 getOptional<Aec>("aec", p.aec, j);
6365 getOptional<Vad>("vad", p.vad, j);
6366 getOptional<AndroidAudio>("android", p.android, j);
6367 getOptional<Agc>("inputAgc", p.inputAgc, j);
6368 getOptional<Agc>("outputAgc", p.outputAgc, j);
6369 FROMJSON_IMPL(denoiseInput, bool, false);
6370 FROMJSON_IMPL(denoiseOutput, bool, false);
6371 FROMJSON_IMPL(saveInputPcm, bool, false);
6372 FROMJSON_IMPL(saveOutputPcm, bool, false);
6373 getOptional<AudioRegistry>("registry", p.registry, j);
6374 }
6375
6376 //-----------------------------------------------------------
6377 JSON_SERIALIZED_CLASS(SecurityCertificate)
6388 {
6389 IMPLEMENT_JSON_SERIALIZATION()
6390 IMPLEMENT_JSON_DOCUMENTATION(SecurityCertificate)
6391
6392 public:
6393
6399 std::string certificate;
6400
6402 std::string key;
6403
6405 {
6406 clear();
6407 }
6408
6409 void clear()
6410 {
6411 certificate.clear();
6412 key.clear();
6413 }
6414 };
6415
6416 static void to_json(nlohmann::json& j, const SecurityCertificate& p)
6417 {
6418 j = nlohmann::json{
6419 TOJSON_IMPL(certificate),
6420 TOJSON_IMPL(key)
6421 };
6422 }
6423 static void from_json(const nlohmann::json& j, SecurityCertificate& p)
6424 {
6425 p.clear();
6426 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
6427 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
6428 }
6429
6430 // This is where spell checking stops
6431 //-----------------------------------------------------------
6432 JSON_SERIALIZED_CLASS(EnginePolicySecurity)
6433
6434
6444 {
6445 IMPLEMENT_JSON_SERIALIZATION()
6446 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicySecurity)
6447
6448 public:
6449
6461
6469 std::vector<std::string> caCertificates;
6470
6472 {
6473 clear();
6474 }
6475
6476 void clear()
6477 {
6478 certificate.clear();
6479 caCertificates.clear();
6480 }
6481 };
6482
6483 static void to_json(nlohmann::json& j, const EnginePolicySecurity& p)
6484 {
6485 j = nlohmann::json{
6486 TOJSON_IMPL(certificate),
6487 TOJSON_IMPL(caCertificates)
6488 };
6489 }
6490 static void from_json(const nlohmann::json& j, EnginePolicySecurity& p)
6491 {
6492 p.clear();
6493 getOptional("certificate", p.certificate, j);
6494 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
6495 }
6496
6497 //-----------------------------------------------------------
6498 JSON_SERIALIZED_CLASS(EnginePolicyLogging)
6509 {
6510 IMPLEMENT_JSON_SERIALIZATION()
6511 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyLogging)
6512
6513 public:
6514
6531
6534
6536 {
6537 clear();
6538 }
6539
6540 void clear()
6541 {
6542 maxLevel = 4; // ILogger::Level::debug
6543 enableSyslog = false;
6544 }
6545 };
6546
6547 static void to_json(nlohmann::json& j, const EnginePolicyLogging& p)
6548 {
6549 j = nlohmann::json{
6550 TOJSON_IMPL(maxLevel),
6551 TOJSON_IMPL(enableSyslog)
6552 };
6553 }
6554 static void from_json(const nlohmann::json& j, EnginePolicyLogging& p)
6555 {
6556 p.clear();
6557 getOptional("maxLevel", p.maxLevel, j, 4); // ILogger::Level::debug
6558 getOptional("enableSyslog", p.enableSyslog, j);
6559 }
6560
6561
6562 //-----------------------------------------------------------
6563 JSON_SERIALIZED_CLASS(EnginePolicyDatabase)
6565 {
6566 IMPLEMENT_JSON_SERIALIZATION()
6567 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyDatabase)
6568
6569 public:
6570 typedef enum
6571 {
6572 dbtFixedMemory = 0,
6573 dbtPagedMemory = 1,
6574 dbtFixedFile = 2
6575 } DatabaseType_t;
6576
6577 DatabaseType_t type;
6578 std::string fixedFileName;
6579 bool forceMaintenance;
6580 bool reclaimSpace;
6581
6583 {
6584 clear();
6585 }
6586
6587 void clear()
6588 {
6589 type = DatabaseType_t::dbtFixedMemory;
6590 fixedFileName.clear();
6591 forceMaintenance = false;
6592 reclaimSpace = false;
6593 }
6594 };
6595
6596 static void to_json(nlohmann::json& j, const EnginePolicyDatabase& p)
6597 {
6598 j = nlohmann::json{
6599 TOJSON_IMPL(type),
6600 TOJSON_IMPL(fixedFileName),
6601 TOJSON_IMPL(forceMaintenance),
6602 TOJSON_IMPL(reclaimSpace)
6603 };
6604 }
6605 static void from_json(const nlohmann::json& j, EnginePolicyDatabase& p)
6606 {
6607 p.clear();
6608 FROMJSON_IMPL(type, EnginePolicyDatabase::DatabaseType_t, EnginePolicyDatabase::DatabaseType_t::dbtFixedMemory);
6609 FROMJSON_IMPL(fixedFileName, std::string, EMPTY_STRING);
6610 FROMJSON_IMPL(forceMaintenance, bool, false);
6611 FROMJSON_IMPL(reclaimSpace, bool, false);
6612 }
6613
6614
6615 //-----------------------------------------------------------
6616 JSON_SERIALIZED_CLASS(SecureSignature)
6625 {
6626 IMPLEMENT_JSON_SERIALIZATION()
6627 IMPLEMENT_JSON_DOCUMENTATION(SecureSignature)
6628
6629 public:
6630
6632 std::string certificate;
6633
6634 // /** @brief Contains the PEM-formatted text of the certificate's public key */
6635 //std::string publicKey;
6636
6638 std::string signature;
6639
6641 {
6642 clear();
6643 }
6644
6645 void clear()
6646 {
6647 certificate.clear();
6648 //publicKey.clear();
6649 signature.clear();
6650 }
6651 };
6652
6653 static void to_json(nlohmann::json& j, const SecureSignature& p)
6654 {
6655 j = nlohmann::json{
6656 TOJSON_IMPL(certificate),
6657 //TOJSON_IMPL(publicKey),
6658 TOJSON_IMPL(signature)
6659 };
6660 }
6661 static void from_json(const nlohmann::json& j, SecureSignature& p)
6662 {
6663 p.clear();
6664 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
6665 //FROMJSON_IMPL(publicKey, std::string, EMPTY_STRING);
6666 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
6667 }
6668
6669 //-----------------------------------------------------------
6670 JSON_SERIALIZED_CLASS(NamedAudioDevice)
6672 {
6673 IMPLEMENT_JSON_SERIALIZATION()
6674 IMPLEMENT_JSON_DOCUMENTATION(NamedAudioDevice)
6675
6676 public:
6677 std::string name;
6678 std::string manufacturer;
6679 std::string model;
6680 std::string id;
6681 std::string serialNumber;
6682 std::string type;
6683 std::string extra;
6684 bool isDefault;
6685
6687 {
6688 clear();
6689 }
6690
6691 void clear()
6692 {
6693 name.clear();
6694 manufacturer.clear();
6695 model.clear();
6696 id.clear();
6697 serialNumber.clear();
6698 type.clear();
6699 extra.clear();
6700 isDefault = false;
6701 }
6702 };
6703
6704 static void to_json(nlohmann::json& j, const NamedAudioDevice& p)
6705 {
6706 j = nlohmann::json{
6707 TOJSON_IMPL(name),
6708 TOJSON_IMPL(manufacturer),
6709 TOJSON_IMPL(model),
6710 TOJSON_IMPL(id),
6711 TOJSON_IMPL(serialNumber),
6712 TOJSON_IMPL(type),
6713 TOJSON_IMPL(extra),
6714 TOJSON_IMPL(isDefault),
6715 };
6716 }
6717 static void from_json(const nlohmann::json& j, NamedAudioDevice& p)
6718 {
6719 p.clear();
6720 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
6721 getOptional<std::string>("manufacturer", p.manufacturer, j, EMPTY_STRING);
6722 getOptional<std::string>("model", p.model, j, EMPTY_STRING);
6723 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
6724 getOptional<std::string>("serialNumber", p.serialNumber, j, EMPTY_STRING);
6725 getOptional<std::string>("type", p.type, j, EMPTY_STRING);
6726 getOptional<std::string>("extra", p.extra, j, EMPTY_STRING);
6727 getOptional<bool>("isDefault", p.isDefault, j, false);
6728 }
6729
6730
6731 //-----------------------------------------------------------
6732 JSON_SERIALIZED_CLASS(EnginePolicyNamedAudioDevices)
6734 {
6735 IMPLEMENT_JSON_SERIALIZATION()
6736 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNamedAudioDevices)
6737
6738 public:
6739 std::vector<NamedAudioDevice> inputs;
6740 std::vector<NamedAudioDevice> outputs;
6741
6743 {
6744 clear();
6745 }
6746
6747 void clear()
6748 {
6749 inputs.clear();
6750 outputs.clear();
6751 }
6752 };
6753
6754 static void to_json(nlohmann::json& j, const EnginePolicyNamedAudioDevices& p)
6755 {
6756 j = nlohmann::json{
6757 TOJSON_IMPL(inputs),
6758 TOJSON_IMPL(outputs)
6759 };
6760 }
6761 static void from_json(const nlohmann::json& j, EnginePolicyNamedAudioDevices& p)
6762 {
6763 p.clear();
6764 getOptional<std::vector<NamedAudioDevice>>("inputs", p.inputs, j);
6765 getOptional<std::vector<NamedAudioDevice>>("outputs", p.outputs, j);
6766 }
6767
6768 //-----------------------------------------------------------
6769 JSON_SERIALIZED_CLASS(Licensing)
6782 {
6783 IMPLEMENT_JSON_SERIALIZATION()
6784 IMPLEMENT_JSON_DOCUMENTATION(Licensing)
6785
6786 public:
6787
6789 std::string entitlement;
6790
6792 std::string key;
6793
6795 std::string activationCode;
6796
6798 std::string deviceId;
6799
6801 std::string manufacturerId;
6802
6803 Licensing()
6804 {
6805 clear();
6806 }
6807
6808 void clear()
6809 {
6810 entitlement.clear();
6811 key.clear();
6812 activationCode.clear();
6813 deviceId.clear();
6814 manufacturerId.clear();
6815 }
6816 };
6817
6818 static void to_json(nlohmann::json& j, const Licensing& p)
6819 {
6820 j = nlohmann::json{
6821 TOJSON_IMPL(entitlement),
6822 TOJSON_IMPL(key),
6823 TOJSON_IMPL(activationCode),
6824 TOJSON_IMPL(deviceId),
6825 TOJSON_IMPL(manufacturerId)
6826 };
6827 }
6828 static void from_json(const nlohmann::json& j, Licensing& p)
6829 {
6830 p.clear();
6831 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
6832 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
6833 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
6834 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
6835 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
6836 }
6837
6838 //-----------------------------------------------------------
6839 JSON_SERIALIZED_CLASS(DiscoveryMagellan)
6850 {
6851 IMPLEMENT_JSON_SERIALIZATION()
6852 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryMagellan)
6853
6854 public:
6855
6858
6860 std::string interfaceName;
6861
6864
6867
6869 {
6870 clear();
6871 }
6872
6873 void clear()
6874 {
6875 enabled = false;
6876 interfaceName.clear();
6877 security.clear();
6878 tls.clear();
6879 }
6880 };
6881
6882 static void to_json(nlohmann::json& j, const DiscoveryMagellan& p)
6883 {
6884 j = nlohmann::json{
6885 TOJSON_IMPL(enabled),
6886 TOJSON_IMPL(interfaceName),
6887 TOJSON_IMPL(security),
6888 TOJSON_IMPL(tls)
6889 };
6890 }
6891 static void from_json(const nlohmann::json& j, DiscoveryMagellan& p)
6892 {
6893 p.clear();
6894 getOptional("enabled", p.enabled, j, false);
6895 getOptional<Tls>("tls", p.tls, j);
6896 getOptional<SecurityCertificate>("security", p.security, j);
6897 FROMJSON_IMPL(interfaceName, std::string, EMPTY_STRING);
6898 }
6899
6900 //-----------------------------------------------------------
6901 JSON_SERIALIZED_CLASS(DiscoverySsdp)
6912 {
6913 IMPLEMENT_JSON_SERIALIZATION()
6914 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySsdp)
6915
6916 public:
6917
6920
6922 std::string interfaceName;
6923
6926
6928 std::vector<std::string> searchTerms;
6929
6932
6935
6937 {
6938 clear();
6939 }
6940
6941 void clear()
6942 {
6943 enabled = false;
6944 interfaceName.clear();
6945 address.clear();
6946 searchTerms.clear();
6947 ageTimeoutMs = 30000;
6948 advertising.clear();
6949 }
6950 };
6951
6952 static void to_json(nlohmann::json& j, const DiscoverySsdp& p)
6953 {
6954 j = nlohmann::json{
6955 TOJSON_IMPL(enabled),
6956 TOJSON_IMPL(interfaceName),
6957 TOJSON_IMPL(address),
6958 TOJSON_IMPL(searchTerms),
6959 TOJSON_IMPL(ageTimeoutMs),
6960 TOJSON_IMPL(advertising)
6961 };
6962 }
6963 static void from_json(const nlohmann::json& j, DiscoverySsdp& p)
6964 {
6965 p.clear();
6966 getOptional("enabled", p.enabled, j, false);
6967 getOptional<std::string>("interfaceName", p.interfaceName, j);
6968
6969 getOptional<NetworkAddress>("address", p.address, j);
6970 if(p.address.address.empty())
6971 {
6972 p.address.address = "255.255.255.255";
6973 }
6974 if(p.address.port <= 0)
6975 {
6976 p.address.port = 1900;
6977 }
6978
6979 getOptional<std::vector<std::string>>("searchTerms", p.searchTerms, j);
6980 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
6981 getOptional<Advertising>("advertising", p.advertising, j);
6982 }
6983
6984 //-----------------------------------------------------------
6985 JSON_SERIALIZED_CLASS(DiscoverySap)
6996 {
6997 IMPLEMENT_JSON_SERIALIZATION()
6998 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySap)
6999
7000 public:
7003
7005 std::string interfaceName;
7006
7009
7012
7015
7016 DiscoverySap()
7017 {
7018 clear();
7019 }
7020
7021 void clear()
7022 {
7023 enabled = false;
7024 interfaceName.clear();
7025 address.clear();
7026 ageTimeoutMs = 30000;
7027 advertising.clear();
7028 }
7029 };
7030
7031 static void to_json(nlohmann::json& j, const DiscoverySap& p)
7032 {
7033 j = nlohmann::json{
7034 TOJSON_IMPL(enabled),
7035 TOJSON_IMPL(interfaceName),
7036 TOJSON_IMPL(address),
7037 TOJSON_IMPL(ageTimeoutMs),
7038 TOJSON_IMPL(advertising)
7039 };
7040 }
7041 static void from_json(const nlohmann::json& j, DiscoverySap& p)
7042 {
7043 p.clear();
7044 getOptional("enabled", p.enabled, j, false);
7045 getOptional<std::string>("interfaceName", p.interfaceName, j);
7046 getOptional<NetworkAddress>("address", p.address, j);
7047 if(p.address.address.empty())
7048 {
7049 p.address.address = "224.2.127.254";
7050 }
7051 if(p.address.port <= 0)
7052 {
7053 p.address.port = 9875;
7054 }
7055
7056 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7057 getOptional<Advertising>("advertising", p.advertising, j);
7058 }
7059
7060 //-----------------------------------------------------------
7061 JSON_SERIALIZED_CLASS(DiscoveryCistech)
7074 {
7075 IMPLEMENT_JSON_SERIALIZATION()
7076 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryCistech)
7077
7078 public:
7079 bool enabled;
7080 std::string interfaceName;
7081 NetworkAddress address;
7082 int ageTimeoutMs;
7083
7085 {
7086 clear();
7087 }
7088
7089 void clear()
7090 {
7091 enabled = false;
7092 interfaceName.clear();
7093 address.clear();
7094 ageTimeoutMs = 30000;
7095 }
7096 };
7097
7098 static void to_json(nlohmann::json& j, const DiscoveryCistech& p)
7099 {
7100 j = nlohmann::json{
7101 TOJSON_IMPL(enabled),
7102 TOJSON_IMPL(interfaceName),
7103 TOJSON_IMPL(address),
7104 TOJSON_IMPL(ageTimeoutMs)
7105 };
7106 }
7107 static void from_json(const nlohmann::json& j, DiscoveryCistech& p)
7108 {
7109 p.clear();
7110 getOptional("enabled", p.enabled, j, false);
7111 getOptional<std::string>("interfaceName", p.interfaceName, j);
7112 getOptional<NetworkAddress>("address", p.address, j);
7113 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7114 }
7115
7116
7117 //-----------------------------------------------------------
7118 JSON_SERIALIZED_CLASS(DiscoveryTrellisware)
7129 {
7130 IMPLEMENT_JSON_SERIALIZATION()
7131 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryTrellisware)
7132
7133 public:
7134
7137
7140
7142 {
7143 clear();
7144 }
7145
7146 void clear()
7147 {
7148 enabled = false;
7149 security.clear();
7150 }
7151 };
7152
7153 static void to_json(nlohmann::json& j, const DiscoveryTrellisware& p)
7154 {
7155 j = nlohmann::json{
7156 TOJSON_IMPL(enabled),
7157 TOJSON_IMPL(security)
7158 };
7159 }
7160 static void from_json(const nlohmann::json& j, DiscoveryTrellisware& p)
7161 {
7162 p.clear();
7163 getOptional("enabled", p.enabled, j, false);
7164 getOptional<SecurityCertificate>("security", p.security, j);
7165 }
7166
7167 //-----------------------------------------------------------
7168 JSON_SERIALIZED_CLASS(DiscoveryConfiguration)
7179 {
7180 IMPLEMENT_JSON_SERIALIZATION()
7181 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryConfiguration)
7182
7183 public:
7186
7189
7192
7195
7198
7200 {
7201 clear();
7202 }
7203
7204 void clear()
7205 {
7206 magellan.clear();
7207 ssdp.clear();
7208 sap.clear();
7209 cistech.clear();
7210 }
7211 };
7212
7213 static void to_json(nlohmann::json& j, const DiscoveryConfiguration& p)
7214 {
7215 j = nlohmann::json{
7216 TOJSON_IMPL(magellan),
7217 TOJSON_IMPL(ssdp),
7218 TOJSON_IMPL(sap),
7219 TOJSON_IMPL(cistech),
7220 TOJSON_IMPL(trellisware)
7221 };
7222 }
7223 static void from_json(const nlohmann::json& j, DiscoveryConfiguration& p)
7224 {
7225 p.clear();
7226 getOptional<DiscoveryMagellan>("magellan", p.magellan, j);
7227 getOptional<DiscoverySsdp>("ssdp", p.ssdp, j);
7228 getOptional<DiscoverySap>("sap", p.sap, j);
7229 getOptional<DiscoveryCistech>("cistech", p.cistech, j);
7230 getOptional<DiscoveryTrellisware>("trellisware", p.trellisware, j);
7231 }
7232
7233
7234 //-----------------------------------------------------------
7235 JSON_SERIALIZED_CLASS(EnginePolicyInternals)
7248 {
7249 IMPLEMENT_JSON_SERIALIZATION()
7250 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyInternals)
7251
7252 public:
7255
7258
7261
7262 int maxRxSecs;
7263
7264 int logTaskQueueStatsIntervalMs;
7265
7266 bool enableLazySpeakerClosure;
7267
7270
7273
7276
7279
7282
7285
7288
7291
7294
7296 {
7297 clear();
7298 }
7299
7300 void clear()
7301 {
7302 watchdog.clear();
7303 housekeeperIntervalMs = 1000;
7304 logTaskQueueStatsIntervalMs = 0;
7305 maxTxSecs = 30;
7306 maxRxSecs = 0;
7307 enableLazySpeakerClosure = false;
7308 rpClusterStrategy = RallypointCluster::ConnectionStrategy_t::csRoundRobin;
7309 rpClusterRolloverSecs = 10;
7310 rtpExpirationCheckIntervalMs = 250;
7311 rpConnectionTimeoutSecs = 0;
7312 rpTransactionTimeoutMs = 0;
7313 stickyTidHangSecs = 10;
7314 uriStreamingIntervalMs = 60;
7315 delayedMicrophoneClosureSecs = 15;
7316 tuning.clear();
7317 }
7318 };
7319
7320 static void to_json(nlohmann::json& j, const EnginePolicyInternals& p)
7321 {
7322 j = nlohmann::json{
7323 TOJSON_IMPL(watchdog),
7324 TOJSON_IMPL(housekeeperIntervalMs),
7325 TOJSON_IMPL(logTaskQueueStatsIntervalMs),
7326 TOJSON_IMPL(maxTxSecs),
7327 TOJSON_IMPL(maxRxSecs),
7328 TOJSON_IMPL(enableLazySpeakerClosure),
7329 TOJSON_IMPL(rpClusterStrategy),
7330 TOJSON_IMPL(rpClusterRolloverSecs),
7331 TOJSON_IMPL(rtpExpirationCheckIntervalMs),
7332 TOJSON_IMPL(rpConnectionTimeoutSecs),
7333 TOJSON_IMPL(rpTransactionTimeoutMs),
7334 TOJSON_IMPL(stickyTidHangSecs),
7335 TOJSON_IMPL(uriStreamingIntervalMs),
7336 TOJSON_IMPL(delayedMicrophoneClosureSecs),
7337 TOJSON_IMPL(tuning)
7338 };
7339 }
7340 static void from_json(const nlohmann::json& j, EnginePolicyInternals& p)
7341 {
7342 p.clear();
7343 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
7344 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
7345 getOptional<int>("logTaskQueueStatsIntervalMs", p.logTaskQueueStatsIntervalMs, j, 0);
7346 getOptional<int>("maxTxSecs", p.maxTxSecs, j, 30);
7347 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
7348 getOptional<bool>("enableLazySpeakerClosure", p.enableLazySpeakerClosure, j, false);
7349 getOptional<RallypointCluster::ConnectionStrategy_t>("rpClusterStrategy", p.rpClusterStrategy, j, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
7350 getOptional<int>("rpClusterRolloverSecs", p.rpClusterRolloverSecs, j, 10);
7351 getOptional<int>("rtpExpirationCheckIntervalMs", p.rtpExpirationCheckIntervalMs, j, 250);
7352 getOptional<int>("rpConnectionTimeoutSecs", p.rpConnectionTimeoutSecs, j, 0);
7353 getOptional<int>("rpTransactionTimeoutMs", p.rpTransactionTimeoutMs, j, 0);
7354 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
7355 getOptional<int>("uriStreamingIntervalMs", p.uriStreamingIntervalMs, j, 60);
7356 getOptional<int>("delayedMicrophoneClosureSecs", p.delayedMicrophoneClosureSecs, j, 15);
7357 getOptional<TuningSettings>("tuning", p.tuning, j);
7358 }
7359
7360 //-----------------------------------------------------------
7361 JSON_SERIALIZED_CLASS(EnginePolicyTimelines)
7374 {
7375 IMPLEMENT_JSON_SERIALIZATION()
7376 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyTimelines)
7377
7378 public:
7379
7386
7388 std::string storageRoot;
7389
7392
7395
7398
7401
7404
7407
7410
7419
7422
7425
7428
7430 {
7431 clear();
7432 }
7433
7434 void clear()
7435 {
7436 enabled = true;
7437 storageRoot.clear();
7438 maxStorageMb = 1024; // 1 Gigabyte
7439 maxMemMb = maxStorageMb;
7440 maxAudioEventMemMb = maxMemMb;
7441 maxDiskMb = maxStorageMb;
7442 maxEventAgeSecs = (86400 * 30); // 30 days
7443 groomingIntervalSecs = (60 * 30); // 30 minutes
7444 maxEvents = 1000;
7445 autosaveIntervalSecs = 5;
7446 security.clear();
7447 disableSigningAndVerification = false;
7448 ephemeral = false;
7449 }
7450 };
7451
7452 static void to_json(nlohmann::json& j, const EnginePolicyTimelines& p)
7453 {
7454 j = nlohmann::json{
7455 TOJSON_IMPL(enabled),
7456 TOJSON_IMPL(storageRoot),
7457 TOJSON_IMPL(maxMemMb),
7458 TOJSON_IMPL(maxAudioEventMemMb),
7459 TOJSON_IMPL(maxDiskMb),
7460 TOJSON_IMPL(maxEventAgeSecs),
7461 TOJSON_IMPL(maxEvents),
7462 TOJSON_IMPL(groomingIntervalSecs),
7463 TOJSON_IMPL(autosaveIntervalSecs),
7464 TOJSON_IMPL(security),
7465 TOJSON_IMPL(disableSigningAndVerification),
7466 TOJSON_IMPL(ephemeral)
7467 };
7468 }
7469 static void from_json(const nlohmann::json& j, EnginePolicyTimelines& p)
7470 {
7471 p.clear();
7472 getOptional<bool>("enabled", p.enabled, j, true);
7473 getOptional<std::string>("storageRoot", p.storageRoot, j, EMPTY_STRING);
7474
7475 getOptional<int>("maxStorageMb", p.maxStorageMb, j, 1024);
7476 getOptional<int>("maxMemMb", p.maxMemMb, j, p.maxStorageMb);
7477 getOptional<int>("maxAudioEventMemMb", p.maxAudioEventMemMb, j, p.maxMemMb);
7478 getOptional<int>("maxDiskMb", p.maxDiskMb, j, p.maxStorageMb);
7479 getOptional<long>("maxEventAgeSecs", p.maxEventAgeSecs, j, (86400 * 30));
7480 getOptional<long>("groomingIntervalSecs", p.groomingIntervalSecs, j, (60 * 30));
7481 getOptional<long>("autosaveIntervalSecs", p.autosaveIntervalSecs, j, 5);
7482 getOptional<int>("maxEvents", p.maxEvents, j, 1000);
7483 getOptional<SecurityCertificate>("security", p.security, j);
7484 getOptional<bool>("disableSigningAndVerification", p.disableSigningAndVerification, j, false);
7485 getOptional<bool>("ephemeral", p.ephemeral, j, false);
7486 }
7487
7488
7489 //-----------------------------------------------------------
7490 JSON_SERIALIZED_CLASS(RtpMapEntry)
7501 {
7502 IMPLEMENT_JSON_SERIALIZATION()
7503 IMPLEMENT_JSON_DOCUMENTATION(RtpMapEntry)
7504
7505 public:
7507 std::string name;
7508
7511
7514
7515 RtpMapEntry()
7516 {
7517 clear();
7518 }
7519
7520 void clear()
7521 {
7522 name.clear();
7523 engageType = -1;
7524 rtpPayloadType = -1;
7525 }
7526 };
7527
7528 static void to_json(nlohmann::json& j, const RtpMapEntry& p)
7529 {
7530 j = nlohmann::json{
7531 TOJSON_IMPL(name),
7532 TOJSON_IMPL(engageType),
7533 TOJSON_IMPL(rtpPayloadType)
7534 };
7535 }
7536 static void from_json(const nlohmann::json& j, RtpMapEntry& p)
7537 {
7538 p.clear();
7539 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7540 getOptional<int>("engageType", p.engageType, j, -1);
7541 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
7542 }
7543
7544 //-----------------------------------------------------------
7545 JSON_SERIALIZED_CLASS(ExternalModule)
7556 {
7557 IMPLEMENT_JSON_SERIALIZATION()
7558 IMPLEMENT_JSON_DOCUMENTATION(ExternalModule)
7559
7560 public:
7562 std::string name;
7563
7565 std::string file;
7566
7568 nlohmann::json configuration;
7569
7571 {
7572 clear();
7573 }
7574
7575 void clear()
7576 {
7577 name.clear();
7578 file.clear();
7579 configuration.clear();
7580 }
7581 };
7582
7583 static void to_json(nlohmann::json& j, const ExternalModule& p)
7584 {
7585 j = nlohmann::json{
7586 TOJSON_IMPL(name),
7587 TOJSON_IMPL(file)
7588 };
7589
7590 if(!p.configuration.empty())
7591 {
7592 j["configuration"] = p.configuration;
7593 }
7594 }
7595 static void from_json(const nlohmann::json& j, ExternalModule& p)
7596 {
7597 p.clear();
7598 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7599 getOptional<std::string>("file", p.file, j, EMPTY_STRING);
7600
7601 try
7602 {
7603 p.configuration = j.at("configuration");
7604 }
7605 catch(...)
7606 {
7607 p.configuration.clear();
7608 }
7609 }
7610
7611
7612 //-----------------------------------------------------------
7613 JSON_SERIALIZED_CLASS(ExternalCodecDescriptor)
7624 {
7625 IMPLEMENT_JSON_SERIALIZATION()
7626 IMPLEMENT_JSON_DOCUMENTATION(ExternalCodecDescriptor)
7627
7628 public:
7631
7634
7637
7640
7642 {
7643 clear();
7644 }
7645
7646 void clear()
7647 {
7648 rtpPayloadType = -1;
7649 samplingRate = -1;
7650 channels = -1;
7651 rtpTsMultiplier = 0;
7652 }
7653 };
7654
7655 static void to_json(nlohmann::json& j, const ExternalCodecDescriptor& p)
7656 {
7657 j = nlohmann::json{
7658 TOJSON_IMPL(rtpPayloadType),
7659 TOJSON_IMPL(samplingRate),
7660 TOJSON_IMPL(channels),
7661 TOJSON_IMPL(rtpTsMultiplier)
7662 };
7663 }
7664 static void from_json(const nlohmann::json& j, ExternalCodecDescriptor& p)
7665 {
7666 p.clear();
7667
7668 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
7669 getOptional<int>("samplingRate", p.samplingRate, j, -1);
7670 getOptional<int>("channels", p.channels, j, -1);
7671 getOptional<int>("rtpTsMultiplier", p.rtpTsMultiplier, j, -1);
7672 }
7673
7674 //-----------------------------------------------------------
7675 JSON_SERIALIZED_CLASS(EngineStatusReportConfiguration)
7686 {
7687 IMPLEMENT_JSON_SERIALIZATION()
7688 IMPLEMENT_JSON_DOCUMENTATION(EngineStatusReportConfiguration)
7689
7690 public:
7692 std::string fileName;
7693
7696
7699
7701 std::string runCmd;
7702
7705
7708
7710 {
7711 clear();
7712 }
7713
7714 void clear()
7715 {
7716 fileName.clear();
7717 intervalSecs = 60;
7718 enabled = false;
7719 includeMemoryDetail = false;
7720 includeTaskQueueDetail = false;
7721 runCmd.clear();
7722 }
7723 };
7724
7725 static void to_json(nlohmann::json& j, const EngineStatusReportConfiguration& p)
7726 {
7727 j = nlohmann::json{
7728 TOJSON_IMPL(fileName),
7729 TOJSON_IMPL(intervalSecs),
7730 TOJSON_IMPL(enabled),
7731 TOJSON_IMPL(includeMemoryDetail),
7732 TOJSON_IMPL(includeTaskQueueDetail),
7733 TOJSON_IMPL(runCmd)
7734 };
7735 }
7736 static void from_json(const nlohmann::json& j, EngineStatusReportConfiguration& p)
7737 {
7738 p.clear();
7739 getOptional<std::string>("fileName", p.fileName, j);
7740 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
7741 getOptional<bool>("enabled", p.enabled, j, false);
7742 getOptional<std::string>("runCmd", p.runCmd, j);
7743 getOptional<bool>("includeMemoryDetail", p.includeMemoryDetail, j, false);
7744 getOptional<bool>("includeTaskQueueDetail", p.includeTaskQueueDetail, j, false);
7745 }
7746
7747 //-----------------------------------------------------------
7748 JSON_SERIALIZED_CLASS(EnginePolicy)
7761 {
7762 IMPLEMENT_JSON_SERIALIZATION()
7763 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicy)
7764
7765 public:
7766
7768 std::string dataDirectory;
7769
7772
7775
7778
7781
7784
7787
7790
7793
7796
7799
7802
7804 std::vector<ExternalModule> externalCodecs;
7805
7807 std::vector<RtpMapEntry> rtpMap;
7808
7811
7812 EnginePolicy()
7813 {
7814 clear();
7815 }
7816
7817 void clear()
7818 {
7819 dataDirectory.clear();
7820 licensing.clear();
7821 security.clear();
7822 networking.clear();
7823 audio.clear();
7824 discovery.clear();
7825 logging.clear();
7826 internals.clear();
7827 timelines.clear();
7828 database.clear();
7829 featureset.clear();
7830 namedAudioDevices.clear();
7831 externalCodecs.clear();
7832 rtpMap.clear();
7833 statusReport.clear();
7834 }
7835 };
7836
7837 static void to_json(nlohmann::json& j, const EnginePolicy& p)
7838 {
7839 j = nlohmann::json{
7840 TOJSON_IMPL(dataDirectory),
7841 TOJSON_IMPL(licensing),
7842 TOJSON_IMPL(security),
7843 TOJSON_IMPL(networking),
7844 TOJSON_IMPL(audio),
7845 TOJSON_IMPL(discovery),
7846 TOJSON_IMPL(logging),
7847 TOJSON_IMPL(internals),
7848 TOJSON_IMPL(timelines),
7849 TOJSON_IMPL(database),
7850 TOJSON_IMPL(featureset),
7851 TOJSON_IMPL(namedAudioDevices),
7852 TOJSON_IMPL(externalCodecs),
7853 TOJSON_IMPL(rtpMap),
7854 TOJSON_IMPL(statusReport)
7855 };
7856 }
7857 static void from_json(const nlohmann::json& j, EnginePolicy& p)
7858 {
7859 p.clear();
7860 FROMJSON_IMPL_SIMPLE(dataDirectory);
7861 FROMJSON_IMPL_SIMPLE(licensing);
7862 FROMJSON_IMPL_SIMPLE(security);
7863 FROMJSON_IMPL_SIMPLE(networking);
7864 FROMJSON_IMPL_SIMPLE(audio);
7865 FROMJSON_IMPL_SIMPLE(discovery);
7866 FROMJSON_IMPL_SIMPLE(logging);
7867 FROMJSON_IMPL_SIMPLE(internals);
7868 FROMJSON_IMPL_SIMPLE(timelines);
7869 FROMJSON_IMPL_SIMPLE(database);
7870 FROMJSON_IMPL_SIMPLE(featureset);
7871 FROMJSON_IMPL_SIMPLE(namedAudioDevices);
7872 FROMJSON_IMPL_SIMPLE(externalCodecs);
7873 FROMJSON_IMPL_SIMPLE(rtpMap);
7874 FROMJSON_IMPL_SIMPLE(statusReport);
7875 }
7876
7877
7878 //-----------------------------------------------------------
7879 JSON_SERIALIZED_CLASS(TalkgroupAsset)
7890 {
7891 IMPLEMENT_JSON_SERIALIZATION()
7892 IMPLEMENT_JSON_DOCUMENTATION(TalkgroupAsset)
7893
7894 public:
7895
7897 std::string nodeId;
7898
7901
7903 {
7904 clear();
7905 }
7906
7907 void clear()
7908 {
7909 nodeId.clear();
7910 group.clear();
7911 }
7912 };
7913
7914 static void to_json(nlohmann::json& j, const TalkgroupAsset& p)
7915 {
7916 j = nlohmann::json{
7917 TOJSON_IMPL(nodeId),
7918 TOJSON_IMPL(group)
7919 };
7920 }
7921 static void from_json(const nlohmann::json& j, TalkgroupAsset& p)
7922 {
7923 p.clear();
7924 getOptional<std::string>("nodeId", p.nodeId, j);
7925 getOptional<Group>("group", p.group, j);
7926 }
7927
7928 //-----------------------------------------------------------
7929 JSON_SERIALIZED_CLASS(EngageDiscoveredGroup)
7938 {
7939 IMPLEMENT_JSON_SERIALIZATION()
7940 IMPLEMENT_JSON_DOCUMENTATION(EngageDiscoveredGroup)
7941
7942 public:
7944 std::string id;
7945
7947 int type;
7948
7951
7954
7956 {
7957 clear();
7958 }
7959
7960 void clear()
7961 {
7962 id.clear();
7963 type = 0;
7964 rx.clear();
7965 tx.clear();
7966 }
7967 };
7968
7969 static void to_json(nlohmann::json& j, const EngageDiscoveredGroup& p)
7970 {
7971 j = nlohmann::json{
7972 TOJSON_IMPL(id),
7973 TOJSON_IMPL(type),
7974 TOJSON_IMPL(rx),
7975 TOJSON_IMPL(tx)
7976 };
7977 }
7978 static void from_json(const nlohmann::json& j, EngageDiscoveredGroup& p)
7979 {
7980 p.clear();
7981 getOptional<std::string>("id", p.id, j);
7982 getOptional<int>("type", p.type, j, 0);
7983 getOptional<NetworkAddress>("rx", p.rx, j);
7984 getOptional<NetworkAddress>("tx", p.tx, j);
7985 }
7986
7987 //-----------------------------------------------------------
7988 JSON_SERIALIZED_CLASS(RallypointPeer)
7999 {
8000 IMPLEMENT_JSON_SERIALIZATION()
8001 IMPLEMENT_JSON_DOCUMENTATION(RallypointPeer)
8002
8003 public:
8004 typedef enum
8005 {
8007 olpUseRpConfiguration = 0,
8008
8010 olpIsMeshLeaf = 1,
8011
8013 olpNotMeshLeaf = 2
8014 } OutboundLeafPolicy_t;
8015
8017 std::string id;
8018
8021
8024
8027
8030
8033
8034 OutboundLeafPolicy_t outboundLeafPolicy;
8035
8038
8040 std::string path;
8041
8044
8046 {
8047 clear();
8048 }
8049
8050 void clear()
8051 {
8052 id.clear();
8053 enabled = true;
8054 host.clear();
8055 certificate.clear();
8056 connectionTimeoutSecs = 0;
8057 forceIsMeshLeaf = false;
8058 outboundLeafPolicy = OutboundLeafPolicy_t::olpUseRpConfiguration;
8059 protocol = Rallypoint::RpProtocol_t::rppTlsTcp;
8060 path.clear();
8061 additionalProtocols.clear();
8062 }
8063 };
8064
8065 static void to_json(nlohmann::json& j, const RallypointPeer& p)
8066 {
8067 j = nlohmann::json{
8068 TOJSON_IMPL(id),
8069 TOJSON_IMPL(enabled),
8070 TOJSON_IMPL(host),
8071 TOJSON_IMPL(certificate),
8072 TOJSON_IMPL(connectionTimeoutSecs),
8073 TOJSON_IMPL(forceIsMeshLeaf),
8074 TOJSON_IMPL(outboundLeafPolicy),
8075 TOJSON_IMPL(protocol),
8076 TOJSON_IMPL(path),
8077 TOJSON_IMPL(additionalProtocols)
8078 };
8079 }
8080 static void from_json(const nlohmann::json& j, RallypointPeer& p)
8081 {
8082 p.clear();
8083 j.at("id").get_to(p.id);
8084 getOptional<bool>("enabled", p.enabled, j, true);
8085 getOptional<NetworkAddress>("host", p.host, j);
8086 getOptional<SecurityCertificate>("certificate", p.certificate, j);
8087 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
8088 getOptional<bool>("forceIsMeshLeaf", p.forceIsMeshLeaf, j, false);
8089 getOptional<RallypointPeer::OutboundLeafPolicy_t>("outboundLeafPolicy", p.outboundLeafPolicy, j, RallypointPeer::OutboundLeafPolicy_t::olpUseRpConfiguration);
8090 getOptional<Rallypoint::RpProtocol_t>("protocol", p.protocol, j, Rallypoint::RpProtocol_t::rppTlsTcp);
8091 getOptional<std::string>("path", p.path, j);
8092 getOptional<std::string>("additionalProtocols", p.additionalProtocols, j);
8093 }
8094
8095 //-----------------------------------------------------------
8096 JSON_SERIALIZED_CLASS(RallypointServerLimits)
8107 {
8108 IMPLEMENT_JSON_SERIALIZATION()
8109 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLimits)
8110
8111 public:
8113 uint32_t maxClients;
8114
8116 uint32_t maxPeers;
8117
8120
8123
8126
8129
8132
8135
8138
8141
8144
8147
8150
8153
8156
8158 {
8159 clear();
8160 }
8161
8162 void clear()
8163 {
8164 maxClients = 0;
8165 maxPeers = 0;
8166 maxMulticastReflectors = 0;
8167 maxRegisteredStreams = 0;
8168 maxStreamPaths = 0;
8169 maxRxPacketsPerSec = 0;
8170 maxTxPacketsPerSec = 0;
8171 maxRxBytesPerSec = 0;
8172 maxTxBytesPerSec = 0;
8173 maxQOpsPerSec = 0;
8174 maxInboundBacklog = 64;
8175 lowPriorityQueueThreshold = 64;
8176 normalPriorityQueueThreshold = 256;
8177 denyNewConnectionCpuThreshold = 75;
8178 warnAtCpuThreshold = 65;
8179 }
8180 };
8181
8182 static void to_json(nlohmann::json& j, const RallypointServerLimits& p)
8183 {
8184 j = nlohmann::json{
8185 TOJSON_IMPL(maxClients),
8186 TOJSON_IMPL(maxPeers),
8187 TOJSON_IMPL(maxMulticastReflectors),
8188 TOJSON_IMPL(maxRegisteredStreams),
8189 TOJSON_IMPL(maxStreamPaths),
8190 TOJSON_IMPL(maxRxPacketsPerSec),
8191 TOJSON_IMPL(maxTxPacketsPerSec),
8192 TOJSON_IMPL(maxRxBytesPerSec),
8193 TOJSON_IMPL(maxTxBytesPerSec),
8194 TOJSON_IMPL(maxQOpsPerSec),
8195 TOJSON_IMPL(maxInboundBacklog),
8196 TOJSON_IMPL(lowPriorityQueueThreshold),
8197 TOJSON_IMPL(normalPriorityQueueThreshold),
8198 TOJSON_IMPL(denyNewConnectionCpuThreshold),
8199 TOJSON_IMPL(warnAtCpuThreshold)
8200 };
8201 }
8202 static void from_json(const nlohmann::json& j, RallypointServerLimits& p)
8203 {
8204 p.clear();
8205 getOptional<uint32_t>("maxClients", p.maxClients, j, 0);
8206 getOptional<uint32_t>("maxPeers", p.maxPeers, j, 0);
8207 getOptional<uint32_t>("maxMulticastReflectors", p.maxMulticastReflectors, j, 0);
8208 getOptional<uint32_t>("maxRegisteredStreams", p.maxRegisteredStreams, j, 0);
8209 getOptional<uint32_t>("maxStreamPaths", p.maxStreamPaths, j, 0);
8210 getOptional<uint32_t>("maxRxPacketsPerSec", p.maxRxPacketsPerSec, j, 0);
8211 getOptional<uint32_t>("maxTxPacketsPerSec", p.maxTxPacketsPerSec, j, 0);
8212 getOptional<uint32_t>("maxRxBytesPerSec", p.maxRxBytesPerSec, j, 0);
8213 getOptional<uint32_t>("maxTxBytesPerSec", p.maxTxBytesPerSec, j, 0);
8214 getOptional<uint32_t>("maxQOpsPerSec", p.maxQOpsPerSec, j, 0);
8215 getOptional<uint32_t>("maxInboundBacklog", p.maxInboundBacklog, j, 64);
8216 getOptional<uint32_t>("lowPriorityQueueThreshold", p.lowPriorityQueueThreshold, j, 64);
8217 getOptional<uint32_t>("normalPriorityQueueThreshold", p.normalPriorityQueueThreshold, j, 256);
8218 getOptional<uint32_t>("denyNewConnectionCpuThreshold", p.denyNewConnectionCpuThreshold, j, 75);
8219 getOptional<uint32_t>("warnAtCpuThreshold", p.warnAtCpuThreshold, j, 65);
8220 }
8221
8222 //-----------------------------------------------------------
8223 JSON_SERIALIZED_CLASS(RallypointServerStatusReportConfiguration)
8234 {
8235 IMPLEMENT_JSON_SERIALIZATION()
8236 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerStatusReportConfiguration)
8237
8238 public:
8240 std::string fileName;
8241
8244
8247
8250
8253
8256
8258 std::string runCmd;
8259
8261 {
8262 clear();
8263 }
8264
8265 void clear()
8266 {
8267 fileName.clear();
8268 intervalSecs = 60;
8269 enabled = false;
8270 includeLinks = false;
8271 includePeerLinkDetails = false;
8272 includeClientLinkDetails = false;
8273 runCmd.clear();
8274 }
8275 };
8276
8277 static void to_json(nlohmann::json& j, const RallypointServerStatusReportConfiguration& p)
8278 {
8279 j = nlohmann::json{
8280 TOJSON_IMPL(fileName),
8281 TOJSON_IMPL(intervalSecs),
8282 TOJSON_IMPL(enabled),
8283 TOJSON_IMPL(includeLinks),
8284 TOJSON_IMPL(includePeerLinkDetails),
8285 TOJSON_IMPL(includeClientLinkDetails),
8286 TOJSON_IMPL(runCmd)
8287 };
8288 }
8289 static void from_json(const nlohmann::json& j, RallypointServerStatusReportConfiguration& p)
8290 {
8291 p.clear();
8292 getOptional<std::string>("fileName", p.fileName, j);
8293 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8294 getOptional<bool>("enabled", p.enabled, j, false);
8295 getOptional<bool>("includeLinks", p.includeLinks, j, false);
8296 getOptional<bool>("includePeerLinkDetails", p.includePeerLinkDetails, j, false);
8297 getOptional<bool>("includeClientLinkDetails", p.includeClientLinkDetails, j, false);
8298 getOptional<std::string>("runCmd", p.runCmd, j);
8299 }
8300
8301 //-----------------------------------------------------------
8302 JSON_SERIALIZED_CLASS(RallypointServerLinkGraph)
8304 {
8305 IMPLEMENT_JSON_SERIALIZATION()
8306 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLinkGraph)
8307
8308 public:
8310 std::string fileName;
8311
8314
8317
8320
8325
8327 std::string coreRpStyling;
8328
8330 std::string leafRpStyling;
8331
8333 std::string clientStyling;
8334
8336 std::string runCmd;
8337
8339 {
8340 clear();
8341 }
8342
8343 void clear()
8344 {
8345 fileName.clear();
8346 minRefreshSecs = 5;
8347 enabled = false;
8348 includeDigraphEnclosure = true;
8349 includeClients = false;
8350 coreRpStyling = "[shape=hexagon color=firebrick style=filled]";
8351 leafRpStyling = "[shape=box color=gray style=filled]";
8352 clientStyling.clear();
8353 runCmd.clear();
8354 }
8355 };
8356
8357 static void to_json(nlohmann::json& j, const RallypointServerLinkGraph& p)
8358 {
8359 j = nlohmann::json{
8360 TOJSON_IMPL(fileName),
8361 TOJSON_IMPL(minRefreshSecs),
8362 TOJSON_IMPL(enabled),
8363 TOJSON_IMPL(includeDigraphEnclosure),
8364 TOJSON_IMPL(includeClients),
8365 TOJSON_IMPL(coreRpStyling),
8366 TOJSON_IMPL(leafRpStyling),
8367 TOJSON_IMPL(clientStyling),
8368 TOJSON_IMPL(runCmd)
8369 };
8370 }
8371 static void from_json(const nlohmann::json& j, RallypointServerLinkGraph& p)
8372 {
8373 p.clear();
8374 getOptional<std::string>("fileName", p.fileName, j);
8375 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
8376 getOptional<bool>("enabled", p.enabled, j, false);
8377 getOptional<bool>("includeDigraphEnclosure", p.includeDigraphEnclosure, j, true);
8378 getOptional<bool>("includeClients", p.includeClients, j, false);
8379 getOptional<std::string>("coreRpStyling", p.coreRpStyling, j, "[shape=hexagon color=firebrick style=filled]");
8380 getOptional<std::string>("leafRpStyling", p.leafRpStyling, j, "[shape=box color=gray style=filled]");
8381 getOptional<std::string>("clientStyling", p.clientStyling, j);
8382 getOptional<std::string>("runCmd", p.runCmd, j);
8383 }
8384
8385
8386 //-----------------------------------------------------------
8387 JSON_SERIALIZED_CLASS(RallypointServerStreamStatsExport)
8396 {
8397 IMPLEMENT_JSON_SERIALIZATION()
8398 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerStreamStatsExport)
8399
8400 public:
8402 typedef enum
8403 {
8405 fmtCsv = 0,
8406
8408 fmtJson = 1
8409 } ExportFormat_t;
8410
8412 std::string fileName;
8413
8416
8419
8422
8424 std::string runCmd;
8425
8428
8429
8431 {
8432 clear();
8433 }
8434
8435 void clear()
8436 {
8437 fileName.clear();
8438 intervalSecs = 60;
8439 enabled = false;
8440 resetCountersAfterExport = false;
8441 runCmd.clear();
8442 format = fmtJson;
8443 }
8444 };
8445
8446 static void to_json(nlohmann::json& j, const RallypointServerStreamStatsExport& p)
8447 {
8448 j = nlohmann::json{
8449 TOJSON_IMPL(fileName),
8450 TOJSON_IMPL(intervalSecs),
8451 TOJSON_IMPL(enabled),
8452 TOJSON_IMPL(resetCountersAfterExport),
8453 TOJSON_IMPL(runCmd),
8454 TOJSON_IMPL(format)
8455 };
8456 }
8457 static void from_json(const nlohmann::json& j, RallypointServerStreamStatsExport& p)
8458 {
8459 p.clear();
8460 getOptional<std::string>("fileName", p.fileName, j);
8461 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8462 getOptional<bool>("enabled", p.enabled, j, false);
8463 getOptional<bool>("resetCountersAfterExport", p.resetCountersAfterExport, j, false);
8464 getOptional<std::string>("runCmd", p.runCmd, j);
8465 getOptional<RallypointServerStreamStatsExport::ExportFormat_t>("format", p.format, j, RallypointServerStreamStatsExport::ExportFormat_t::fmtCsv);
8466 }
8467
8468 //-----------------------------------------------------------
8469 JSON_SERIALIZED_CLASS(RallypointServerRouteMap)
8471 {
8472 IMPLEMENT_JSON_SERIALIZATION()
8473 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerRouteMap)
8474
8475 public:
8477 std::string fileName;
8478
8481
8484
8486 std::string runCmd;
8487
8489 {
8490 clear();
8491 }
8492
8493 void clear()
8494 {
8495 fileName.clear();
8496 minRefreshSecs = 5;
8497 enabled = false;
8498 }
8499 };
8500
8501 static void to_json(nlohmann::json& j, const RallypointServerRouteMap& p)
8502 {
8503 j = nlohmann::json{
8504 TOJSON_IMPL(fileName),
8505 TOJSON_IMPL(minRefreshSecs),
8506 TOJSON_IMPL(enabled),
8507 TOJSON_IMPL(runCmd)
8508 };
8509 }
8510 static void from_json(const nlohmann::json& j, RallypointServerRouteMap& p)
8511 {
8512 p.clear();
8513 getOptional<std::string>("fileName", p.fileName, j);
8514 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
8515 getOptional<bool>("enabled", p.enabled, j, false);
8516 getOptional<std::string>("runCmd", p.runCmd, j);
8517 }
8518
8519
8520 //-----------------------------------------------------------
8521 JSON_SERIALIZED_CLASS(ExternalHealthCheckResponder)
8532 {
8533 IMPLEMENT_JSON_SERIALIZATION()
8534 IMPLEMENT_JSON_DOCUMENTATION(ExternalHealthCheckResponder)
8535
8536 public:
8537
8540
8543
8545 {
8546 clear();
8547 }
8548
8549 void clear()
8550 {
8551 listenPort = 0;
8552 immediateClose = true;
8553 }
8554 };
8555
8556 static void to_json(nlohmann::json& j, const ExternalHealthCheckResponder& p)
8557 {
8558 j = nlohmann::json{
8559 TOJSON_IMPL(listenPort),
8560 TOJSON_IMPL(immediateClose)
8561 };
8562 }
8563 static void from_json(const nlohmann::json& j, ExternalHealthCheckResponder& p)
8564 {
8565 p.clear();
8566 getOptional<int>("listenPort", p.listenPort, j, 0);
8567 getOptional<bool>("immediateClose", p.immediateClose, j, true);
8568 }
8569
8570
8571 //-----------------------------------------------------------
8572 JSON_SERIALIZED_CLASS(PeeringConfiguration)
8581 {
8582 IMPLEMENT_JSON_SERIALIZATION()
8583 IMPLEMENT_JSON_DOCUMENTATION(PeeringConfiguration)
8584
8585 public:
8586
8588 std::string id;
8589
8592
8594 std::string comments;
8595
8597 std::vector<RallypointPeer> peers;
8598
8600 {
8601 clear();
8602 }
8603
8604 void clear()
8605 {
8606 id.clear();
8607 version = 0;
8608 comments.clear();
8609 }
8610 };
8611
8612 static void to_json(nlohmann::json& j, const PeeringConfiguration& p)
8613 {
8614 j = nlohmann::json{
8615 TOJSON_IMPL(id),
8616 TOJSON_IMPL(version),
8617 TOJSON_IMPL(comments),
8618 TOJSON_IMPL(peers)
8619 };
8620 }
8621 static void from_json(const nlohmann::json& j, PeeringConfiguration& p)
8622 {
8623 p.clear();
8624 getOptional<std::string>("id", p.id, j);
8625 getOptional<int>("version", p.version, j, 0);
8626 getOptional<std::string>("comments", p.comments, j);
8627 getOptional<std::vector<RallypointPeer>>("peers", p.peers, j);
8628 }
8629
8630 //-----------------------------------------------------------
8631 JSON_SERIALIZED_CLASS(IgmpSnooping)
8640 {
8641 IMPLEMENT_JSON_SERIALIZATION()
8642 IMPLEMENT_JSON_DOCUMENTATION(IgmpSnooping)
8643
8644 public:
8645
8648
8651
8654
8655
8656 IgmpSnooping()
8657 {
8658 clear();
8659 }
8660
8661 void clear()
8662 {
8663 enabled = false;
8664 queryIntervalMs = 125000;
8665 subscriptionTimeoutMs = 0;
8666 }
8667 };
8668
8669 static void to_json(nlohmann::json& j, const IgmpSnooping& p)
8670 {
8671 j = nlohmann::json{
8672 TOJSON_IMPL(enabled),
8673 TOJSON_IMPL(queryIntervalMs),
8674 TOJSON_IMPL(subscriptionTimeoutMs)
8675 };
8676 }
8677 static void from_json(const nlohmann::json& j, IgmpSnooping& p)
8678 {
8679 p.clear();
8680 getOptional<bool>("enabled", p.enabled, j);
8681 getOptional<int>("queryIntervalMs", p.queryIntervalMs, j, 125000);
8682 getOptional<int>("subscriptionTimeoutMs", p.subscriptionTimeoutMs, j, 0);
8683 }
8684
8685
8686 //-----------------------------------------------------------
8687 JSON_SERIALIZED_CLASS(RallypointReflector)
8695 {
8696 IMPLEMENT_JSON_SERIALIZATION()
8697 IMPLEMENT_JSON_DOCUMENTATION(RallypointReflector)
8698
8699 public:
8701 typedef enum
8702 {
8704 drNone = 0,
8705
8707 drRxOnly = 1,
8708
8710 drTxOnly = 2
8711 } DirectionRestriction_t;
8712
8716 std::string id;
8717
8720
8723
8726
8728 std::vector<NetworkAddress> additionalTx;
8729
8732
8734 {
8735 clear();
8736 }
8737
8738 void clear()
8739 {
8740 id.clear();
8741 rx.clear();
8742 tx.clear();
8743 multicastInterfaceName.clear();
8744 additionalTx.clear();
8745 directionRestriction = drNone;
8746 }
8747 };
8748
8749 static void to_json(nlohmann::json& j, const RallypointReflector& p)
8750 {
8751 j = nlohmann::json{
8752 TOJSON_IMPL(id),
8753 TOJSON_IMPL(rx),
8754 TOJSON_IMPL(tx),
8755 TOJSON_IMPL(multicastInterfaceName),
8756 TOJSON_IMPL(additionalTx),
8757 TOJSON_IMPL(directionRestriction)
8758 };
8759 }
8760 static void from_json(const nlohmann::json& j, RallypointReflector& p)
8761 {
8762 p.clear();
8763 j.at("id").get_to(p.id);
8764 j.at("rx").get_to(p.rx);
8765 j.at("tx").get_to(p.tx);
8766 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
8767 getOptional<std::vector<NetworkAddress>>("additionalTx", p.additionalTx, j);
8768 getOptional<RallypointReflector::DirectionRestriction_t>("directionRestriction", p.directionRestriction, j, RallypointReflector::DirectionRestriction_t::drNone);
8769 }
8770
8771
8772 //-----------------------------------------------------------
8773 JSON_SERIALIZED_CLASS(RallypointUdpStreamingIpvX)
8781 {
8782 IMPLEMENT_JSON_SERIALIZATION()
8783 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreamingIpvX)
8784
8785 public:
8788
8791
8793 {
8794 clear();
8795 }
8796
8797 void clear()
8798 {
8799 enabled = true;
8800 external.clear();
8801 }
8802 };
8803
8804 static void to_json(nlohmann::json& j, const RallypointUdpStreamingIpvX& p)
8805 {
8806 j = nlohmann::json{
8807 TOJSON_IMPL(enabled),
8808 TOJSON_IMPL(external)
8809 };
8810 }
8811 static void from_json(const nlohmann::json& j, RallypointUdpStreamingIpvX& p)
8812 {
8813 p.clear();
8814 getOptional<bool>("enabled", p.enabled, j, true);
8815 getOptional<NetworkAddress>("external", p.external, j);
8816 }
8817
8818 //-----------------------------------------------------------
8819 JSON_SERIALIZED_CLASS(RallypointUdpStreaming)
8827 {
8828 IMPLEMENT_JSON_SERIALIZATION()
8829 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreaming)
8830
8831 public:
8833 typedef enum
8834 {
8836 ctUnknown = 0,
8837
8839 ctSharedKeyAes256FullIv = 1,
8840
8842 ctSharedKeyAes256IdxIv = 2,
8843
8845 ctSharedKeyChaCha20FullIv = 3,
8846
8848 ctSharedKeyChaCha20IdxIv = 4
8849 } CryptoType_t;
8850
8853
8856
8859
8862
8865
8868
8871
8873 int ttl;
8874
8875
8877 {
8878 clear();
8879 }
8880
8881 void clear()
8882 {
8883 enabled = true;
8884 cryptoType = CryptoType_t::ctSharedKeyAes256FullIv;
8885 listenPort = 7444;
8886 ipv4.clear();
8887 ipv6.clear();
8888 keepaliveIntervalSecs = 15;
8889 priority = TxPriority_t::priVoice;
8890 ttl = 64;
8891 }
8892 };
8893
8894 static void to_json(nlohmann::json& j, const RallypointUdpStreaming& p)
8895 {
8896 j = nlohmann::json{
8897 TOJSON_IMPL(enabled),
8898 TOJSON_IMPL(cryptoType),
8899 TOJSON_IMPL(listenPort),
8900 TOJSON_IMPL(keepaliveIntervalSecs),
8901 TOJSON_IMPL(ipv4),
8902 TOJSON_IMPL(ipv6),
8903 TOJSON_IMPL(priority),
8904 TOJSON_IMPL(ttl)
8905 };
8906 }
8907 static void from_json(const nlohmann::json& j, RallypointUdpStreaming& p)
8908 {
8909 p.clear();
8910 getOptional<bool>("enabled", p.enabled, j, true);
8911 getOptional<RallypointUdpStreaming::CryptoType_t>("cryptoType", p.cryptoType, j, RallypointUdpStreaming::CryptoType_t::ctSharedKeyAes256FullIv);
8912 getOptional<int>("listenPort", p.listenPort, j, 7444);
8913 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
8914 getOptional<RallypointUdpStreamingIpvX>("ipv4", p.ipv4, j);
8915 getOptional<RallypointUdpStreamingIpvX>("ipv6", p.ipv6, j);
8916 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
8917 getOptional<int>("ttl", p.ttl, j, 64);
8918 }
8919
8920 //-----------------------------------------------------------
8921 JSON_SERIALIZED_CLASS(RallypointRpRtTimingBehavior)
8929 {
8930 IMPLEMENT_JSON_SERIALIZATION()
8931 IMPLEMENT_JSON_DOCUMENTATION(RallypointRpRtTimingBehavior)
8932
8933 public:
8935 typedef enum
8936 {
8939
8942
8945
8948
8950 btDrop = 99
8951 } BehaviorType_t;
8952
8955
8957 uint32_t atOrAboveMs;
8958
8960 std::string runCmd;
8961
8963 {
8964 clear();
8965 }
8966
8967 void clear()
8968 {
8969 behavior = btNone;
8970 atOrAboveMs = 0;
8971 runCmd.clear();
8972 }
8973 };
8974
8975 static void to_json(nlohmann::json& j, const RallypointRpRtTimingBehavior& p)
8976 {
8977 j = nlohmann::json{
8978 TOJSON_IMPL(behavior),
8979 TOJSON_IMPL(atOrAboveMs),
8980 TOJSON_IMPL(runCmd)
8981 };
8982 }
8983 static void from_json(const nlohmann::json& j, RallypointRpRtTimingBehavior& p)
8984 {
8985 p.clear();
8986 getOptional<RallypointRpRtTimingBehavior::BehaviorType_t>("behavior", p.behavior, j, RallypointRpRtTimingBehavior::BehaviorType_t::btNone);
8987 getOptional<uint32_t>("atOrAboveMs", p.atOrAboveMs, j, 0);
8988 getOptional<std::string>("runCmd", p.runCmd, j);
8989 }
8990
8991
8992 //-----------------------------------------------------------
8993 JSON_SERIALIZED_CLASS(RallypointWebsocketSettings)
9001 {
9002 IMPLEMENT_JSON_SERIALIZATION()
9003 IMPLEMENT_JSON_DOCUMENTATION(RallypointWebsocketSettings)
9004
9005 public:
9008
9011
9014
9017
9020
9022 {
9023 clear();
9024 }
9025
9026 void clear()
9027 {
9028 enabled = false;
9029 listenPort = 8443;
9030 certificate.clear();
9031 requireClientCertificate = false;
9032 requireTls = true;
9033 }
9034 };
9035
9036 static void to_json(nlohmann::json& j, const RallypointWebsocketSettings& p)
9037 {
9038 j = nlohmann::json{
9039 TOJSON_IMPL(enabled),
9040 TOJSON_IMPL(listenPort),
9041 TOJSON_IMPL(certificate),
9042 TOJSON_IMPL(requireClientCertificate),
9043 TOJSON_IMPL(requireTls)
9044 };
9045 }
9046 static void from_json(const nlohmann::json& j, RallypointWebsocketSettings& p)
9047 {
9048 p.clear();
9049 getOptional<bool>("enabled", p.enabled, j, false);
9050 getOptional<int>("listenPort", p.listenPort, j, 8443);
9051 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9052 getOptional<bool>("requireClientCertificate", p.requireClientCertificate, j, false);
9053 getOptional<bool>("requireTls", p.requireTls, j, true);
9054 }
9055
9056
9057
9058 //-----------------------------------------------------------
9059 JSON_SERIALIZED_CLASS(RallypointAdvertisingSettings)
9067 {
9068 IMPLEMENT_JSON_SERIALIZATION()
9069 IMPLEMENT_JSON_DOCUMENTATION(RallypointAdvertisingSettings)
9070
9071 public:
9074
9076 std::string hostName;
9077
9079 std::string serviceName;
9080
9082 std::string interfaceName;
9083
9085 int port;
9086
9088 int ttl;
9089
9091 {
9092 clear();
9093 }
9094
9095 void clear()
9096 {
9097 enabled = false;
9098 hostName.clear();
9099 serviceName = "_rallypoint._tcp.local.";
9100 interfaceName.clear();
9101 port = 0;
9102 ttl = 60;
9103 }
9104 };
9105
9106 static void to_json(nlohmann::json& j, const RallypointAdvertisingSettings& p)
9107 {
9108 j = nlohmann::json{
9109 TOJSON_IMPL(enabled),
9110 TOJSON_IMPL(hostName),
9111 TOJSON_IMPL(serviceName),
9112 TOJSON_IMPL(interfaceName),
9113 TOJSON_IMPL(port),
9114 TOJSON_IMPL(ttl)
9115 };
9116 }
9117 static void from_json(const nlohmann::json& j, RallypointAdvertisingSettings& p)
9118 {
9119 p.clear();
9120 getOptional<bool>("enabled", p.enabled, j, false);
9121 getOptional<std::string>("hostName", p.hostName, j);
9122 getOptional<std::string>("serviceName", p.serviceName, j, "_rallypoint._tcp.local.");
9123 getOptional<std::string>("interfaceName", p.interfaceName, j);
9124
9125 getOptional<int>("port", p.port, j, 0);
9126 getOptional<int>("ttl", p.ttl, j, 60);
9127 }
9128
9129
9130
9131
9132 //-----------------------------------------------------------
9133 JSON_SERIALIZED_CLASS(NamedIdentity)
9141 {
9142 IMPLEMENT_JSON_SERIALIZATION()
9143 IMPLEMENT_JSON_DOCUMENTATION(NamedIdentity)
9144
9145 public:
9147 std::string name;
9148
9151
9153 {
9154 clear();
9155 }
9156
9157 void clear()
9158 {
9159 name.clear();
9160 certificate.clear();
9161 }
9162 };
9163
9164 static void to_json(nlohmann::json& j, const NamedIdentity& p)
9165 {
9166 j = nlohmann::json{
9167 TOJSON_IMPL(name),
9168 TOJSON_IMPL(certificate)
9169 };
9170 }
9171 static void from_json(const nlohmann::json& j, NamedIdentity& p)
9172 {
9173 p.clear();
9174 getOptional<std::string>("name", p.name, j);
9175 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9176 }
9177
9178 //-----------------------------------------------------------
9179 JSON_SERIALIZED_CLASS(RallypointExtendedGroupRestriction)
9187 {
9188 IMPLEMENT_JSON_SERIALIZATION()
9189 IMPLEMENT_JSON_DOCUMENTATION(RallypointExtendedGroupRestriction)
9190
9191 public:
9193 std::string id;
9194
9196 std::vector<StringRestrictionList> restrictions;
9197
9199 {
9200 clear();
9201 }
9202
9203 void clear()
9204 {
9205 id.clear();
9206 restrictions.clear();
9207 }
9208 };
9209
9210 static void to_json(nlohmann::json& j, const RallypointExtendedGroupRestriction& p)
9211 {
9212 j = nlohmann::json{
9213 TOJSON_IMPL(id),
9214 TOJSON_IMPL(restrictions)
9215 };
9216 }
9217 static void from_json(const nlohmann::json& j, RallypointExtendedGroupRestriction& p)
9218 {
9219 p.clear();
9220 getOptional<std::string>("id", p.id, j);
9221 getOptional<std::vector<StringRestrictionList>>("restrictions", p.restrictions, j);
9222 }
9223
9224
9225 //-----------------------------------------------------------
9226 JSON_SERIALIZED_CLASS(RallypointServer)
9236 {
9237 IMPLEMENT_JSON_SERIALIZATION()
9238 IMPLEMENT_JSON_DOCUMENTATION(RallypointServer)
9239
9240 public:
9241 typedef enum
9242 {
9243 sptDefault = 0,
9244 sptCertificate = 1,
9245 sptCertPublicKey = 2,
9246 sptCertSubject = 3,
9247 sptCertIssuer = 4,
9248 sptCertFingerprint = 5,
9249 sptCertSerial = 6,
9250 sptSubjectC = 7,
9251 sptSubjectST = 8,
9252 sptSubjectL = 9,
9253 sptSubjectO = 10,
9254 sptSubjectOU = 11,
9255 sptSubjectCN = 12,
9256 sptIssuerC = 13,
9257 sptIssuerST = 14,
9258 sptIssuerL = 15,
9259 sptIssuerO = 16,
9260 sptIssuerOU = 17,
9261 sptIssuerCN = 18
9262 } StreamIdPrivacyType_t;
9263
9265 StreamIdPrivacyType_t streamIdPrivacyType;
9266
9269
9272
9274 std::string id;
9275
9278
9281
9283 std::string interfaceName;
9284
9287
9290
9293
9296
9299
9302
9305
9308
9311
9314
9317
9320
9323
9326
9329
9332
9334 PeeringConfiguration peeringConfiguration; // NOTE: This is NOT serialized
9335
9338
9341
9344
9347
9349 std::vector<RallypointReflector> staticReflectors;
9350
9353
9356
9359
9362
9365
9368
9370 std::vector<RallypointExtendedGroupRestriction> extendedGroupRestrictions;
9371
9374
9377
9380
9383
9385 uint32_t sysFlags;
9386
9389
9392
9395
9398
9401
9404
9407
9410
9412 std::vector<RallypointRpRtTimingBehavior> peerRtBehaviors;
9413
9416
9419
9422
9425
9428
9430 std::string domainName;
9431
9433 std::vector<std::string> allowedDomains;
9434
9436 std::vector<std::string> blockedDomains;
9437
9439 std::vector<std::string> extraDomains;
9440
9443
9445 std::vector<NamedIdentity> additionalIdentities;
9446
9448 {
9449 clear();
9450 }
9451
9452 void clear()
9453 {
9454 fipsCrypto.clear();
9455 watchdog.clear();
9456 id.clear();
9457 listenPort = 7443;
9458 interfaceName.clear();
9459 certificate.clear();
9460 allowMulticastForwarding = false;
9461 peeringConfiguration.clear();
9462 peeringConfigurationFileName.clear();
9463 peeringConfigurationFileCommand.clear();
9464 peeringConfigurationFileCheckSecs = 60;
9465 ioPools = -1;
9466 statusReport.clear();
9467 limits.clear();
9468 linkGraph.clear();
9469 externalHealthCheckResponder.clear();
9470 allowPeerForwarding = false;
9471 multicastInterfaceName.clear();
9472 tls.clear();
9473 discovery.clear();
9474 forwardDiscoveredGroups = false;
9475 forwardMulticastAddressing = false;
9476 isMeshLeaf = false;
9477 disableMessageSigning = false;
9478 multicastRestrictions.clear();
9479 igmpSnooping.clear();
9480 staticReflectors.clear();
9481 tcpTxOptions.clear();
9482 multicastTxOptions.clear();
9483 certStoreFileName.clear();
9484 certStorePasswordHex.clear();
9485 groupRestrictions.clear();
9486 configurationCheckSignalName = "rts.7b392d1.${id}";
9487 licensing.clear();
9488 featureset.clear();
9489 udpStreaming.clear();
9490 sysFlags = 0;
9491 normalTaskQueueBias = 0;
9492 enableLeafReflectionReverseSubscription = false;
9493 disableLoopDetection = false;
9494 maxSecurityLevel = 0;
9495 routeMap.clear();
9496 streamStatsExport.clear();
9497 maxOutboundPeerConnectionIntervalDeltaSecs = 15;
9498 peerRtTestIntervalMs = 60000;
9499 peerRtBehaviors.clear();
9500 websocket.clear();
9501 nsm.clear();
9502 advertising.clear();
9503 extendedGroupRestrictions.clear();
9504 groupRestrictionAccessPolicyType = GroupRestrictionAccessPolicyType_t::graptPermissive;
9505 ipFamily = IpFamilyType_t::ifIp4;
9506 rxCapture.clear();
9507 txCapture.clear();
9508 domainName.clear();
9509 allowedDomains.clear();
9510 blockedDomains.clear();
9511 extraDomains.clear();
9512 tuning.clear();
9513 additionalIdentities.clear();
9514 streamIdPrivacyType = StreamIdPrivacyType_t::sptDefault;
9515 }
9516 };
9517
9518 static void to_json(nlohmann::json& j, const RallypointServer& p)
9519 {
9520 j = nlohmann::json{
9521 TOJSON_IMPL(fipsCrypto),
9522 TOJSON_IMPL(watchdog),
9523 TOJSON_IMPL(id),
9524 TOJSON_IMPL(listenPort),
9525 TOJSON_IMPL(interfaceName),
9526 TOJSON_IMPL(certificate),
9527 TOJSON_IMPL(allowMulticastForwarding),
9528 // TOJSON_IMPL(peeringConfiguration), // NOTE: Not serialized!
9529 TOJSON_IMPL(peeringConfigurationFileName),
9530 TOJSON_IMPL(peeringConfigurationFileCommand),
9531 TOJSON_IMPL(peeringConfigurationFileCheckSecs),
9532 TOJSON_IMPL(ioPools),
9533 TOJSON_IMPL(statusReport),
9534 TOJSON_IMPL(limits),
9535 TOJSON_IMPL(linkGraph),
9536 TOJSON_IMPL(externalHealthCheckResponder),
9537 TOJSON_IMPL(allowPeerForwarding),
9538 TOJSON_IMPL(multicastInterfaceName),
9539 TOJSON_IMPL(tls),
9540 TOJSON_IMPL(discovery),
9541 TOJSON_IMPL(forwardDiscoveredGroups),
9542 TOJSON_IMPL(forwardMulticastAddressing),
9543 TOJSON_IMPL(isMeshLeaf),
9544 TOJSON_IMPL(disableMessageSigning),
9545 TOJSON_IMPL(multicastRestrictions),
9546 TOJSON_IMPL(igmpSnooping),
9547 TOJSON_IMPL(staticReflectors),
9548 TOJSON_IMPL(tcpTxOptions),
9549 TOJSON_IMPL(multicastTxOptions),
9550 TOJSON_IMPL(certStoreFileName),
9551 TOJSON_IMPL(certStorePasswordHex),
9552 TOJSON_IMPL(groupRestrictions),
9553 TOJSON_IMPL(configurationCheckSignalName),
9554 TOJSON_IMPL(featureset),
9555 TOJSON_IMPL(licensing),
9556 TOJSON_IMPL(udpStreaming),
9557 TOJSON_IMPL(sysFlags),
9558 TOJSON_IMPL(normalTaskQueueBias),
9559 TOJSON_IMPL(enableLeafReflectionReverseSubscription),
9560 TOJSON_IMPL(disableLoopDetection),
9561 TOJSON_IMPL(maxSecurityLevel),
9562 TOJSON_IMPL(routeMap),
9563 TOJSON_IMPL(streamStatsExport),
9564 TOJSON_IMPL(maxOutboundPeerConnectionIntervalDeltaSecs),
9565 TOJSON_IMPL(peerRtTestIntervalMs),
9566 TOJSON_IMPL(peerRtBehaviors),
9567 TOJSON_IMPL(websocket),
9568 TOJSON_IMPL(nsm),
9569 TOJSON_IMPL(advertising),
9570 TOJSON_IMPL(extendedGroupRestrictions),
9571 TOJSON_IMPL(groupRestrictionAccessPolicyType),
9572 TOJSON_IMPL(ipFamily),
9573 TOJSON_IMPL(rxCapture),
9574 TOJSON_IMPL(txCapture),
9575 TOJSON_IMPL(domainName),
9576 TOJSON_IMPL(allowedDomains),
9577 TOJSON_IMPL(blockedDomains),
9578 TOJSON_IMPL(extraDomains),
9579 TOJSON_IMPL(tuning),
9580 TOJSON_IMPL(additionalIdentities),
9581 TOJSON_IMPL(streamIdPrivacyType)
9582 };
9583 }
9584 static void from_json(const nlohmann::json& j, RallypointServer& p)
9585 {
9586 p.clear();
9587 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
9588 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
9589 getOptional<std::string>("id", p.id, j);
9590 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9591 getOptional<std::string>("interfaceName", p.interfaceName, j);
9592 getOptional<int>("listenPort", p.listenPort, j, 7443);
9593 getOptional<bool>("allowMulticastForwarding", p.allowMulticastForwarding, j, false);
9594 //getOptional<PeeringConfiguration>("peeringConfiguration", p.peeringConfiguration, j); // NOTE: Not serialized!
9595 getOptional<std::string>("peeringConfigurationFileName", p.peeringConfigurationFileName, j);
9596 getOptional<std::string>("peeringConfigurationFileCommand", p.peeringConfigurationFileCommand, j);
9597 getOptional<int>("peeringConfigurationFileCheckSecs", p.peeringConfigurationFileCheckSecs, j, 60);
9598 getOptional<int>("ioPools", p.ioPools, j, -1);
9599 getOptional<RallypointServerStatusReportConfiguration>("statusReport", p.statusReport, j);
9600 getOptional<RallypointServerLimits>("limits", p.limits, j);
9601 getOptional<RallypointServerLinkGraph>("linkGraph", p.linkGraph, j);
9602 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
9603 getOptional<bool>("allowPeerForwarding", p.allowPeerForwarding, j, false);
9604 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
9605 getOptional<Tls>("tls", p.tls, j);
9606 getOptional<DiscoveryConfiguration>("discovery", p.discovery, j);
9607 getOptional<bool>("forwardDiscoveredGroups", p.forwardDiscoveredGroups, j, false);
9608 getOptional<bool>("forwardMulticastAddressing", p.forwardMulticastAddressing, j, false);
9609 getOptional<bool>("isMeshLeaf", p.isMeshLeaf, j, false);
9610 getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
9611 getOptional<NetworkAddressRestrictionList>("multicastRestrictions", p.multicastRestrictions, j);
9612 getOptional<IgmpSnooping>("igmpSnooping", p.igmpSnooping, j);
9613 getOptional<std::vector<RallypointReflector>>("staticReflectors", p.staticReflectors, j);
9614 getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
9615 getOptional<NetworkTxOptions>("multicastTxOptions", p.multicastTxOptions, j);
9616 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
9617 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
9618 getOptional<StringRestrictionList>("groupRestrictions", p.groupRestrictions, j);
9619 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.7b392d1.${id}");
9620 getOptional<Licensing>("licensing", p.licensing, j);
9621 getOptional<Featureset>("featureset", p.featureset, j);
9622 getOptional<RallypointUdpStreaming>("udpStreaming", p.udpStreaming, j);
9623 getOptional<uint32_t>("sysFlags", p.sysFlags, j, 0);
9624 getOptional<uint32_t>("normalTaskQueueBias", p.normalTaskQueueBias, j, 0);
9625 getOptional<bool>("enableLeafReflectionReverseSubscription", p.enableLeafReflectionReverseSubscription, j, false);
9626 getOptional<bool>("disableLoopDetection", p.disableLoopDetection, j, false);
9627 getOptional<uint32_t>("maxSecurityLevel", p.maxSecurityLevel, j, 0);
9628 getOptional<RallypointServerRouteMap>("routeMap", p.routeMap, j);
9629 getOptional<RallypointServerStreamStatsExport>("streamStatsExport", p.streamStatsExport, j);
9630 getOptional<uint32_t>("maxOutboundPeerConnectionIntervalDeltaSecs", p.maxOutboundPeerConnectionIntervalDeltaSecs, j, 15);
9631 getOptional<int>("peerRtTestIntervalMs", p.peerRtTestIntervalMs, j, 60000);
9632 getOptional<std::vector<RallypointRpRtTimingBehavior>>("peerRtBehaviors", p.peerRtBehaviors, j);
9633 getOptional<RallypointWebsocketSettings>("websocket", p.websocket, j);
9634 getOptional<NsmConfiguration>("nsm", p.nsm, j);
9635 getOptional<RallypointAdvertisingSettings>("advertising", p.advertising, j);
9636 getOptional<std::vector<RallypointExtendedGroupRestriction>>("extendedGroupRestrictions", p.extendedGroupRestrictions, j);
9637 getOptional<GroupRestrictionAccessPolicyType_t>("groupRestrictionAccessPolicyType", p.groupRestrictionAccessPolicyType, j, GroupRestrictionAccessPolicyType_t::graptPermissive);
9638 getOptional<IpFamilyType_t>("ipFamily", p.ipFamily, j, IpFamilyType_t::ifIp4);
9639 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
9640 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
9641 getOptional<std::string>("domainName", p.domainName, j);
9642 getOptional<std::vector<std::string>>("allowedDomains", p.allowedDomains, j);
9643 getOptional<std::vector<std::string>>("blockedDomains", p.blockedDomains, j);
9644 getOptional<std::vector<std::string>>("extraDomains", p.extraDomains, j);
9645 getOptional<TuningSettings>("tuning", p.tuning, j);
9646 getOptional<std::vector<NamedIdentity>>("additionalIdentities", p.additionalIdentities, j);
9647 getOptional<RallypointServer::StreamIdPrivacyType_t>("streamIdPrivacyType", p.streamIdPrivacyType, j, RallypointServer::StreamIdPrivacyType_t::sptDefault);
9648 }
9649
9650 //-----------------------------------------------------------
9651 JSON_SERIALIZED_CLASS(PlatformDiscoveredService)
9662 {
9663 IMPLEMENT_JSON_SERIALIZATION()
9664 IMPLEMENT_JSON_DOCUMENTATION(PlatformDiscoveredService)
9665
9666 public:
9667
9669 std::string id;
9670
9672 std::string type;
9673
9675 std::string name;
9676
9679
9681 std::string uri;
9682
9685
9687 {
9688 clear();
9689 }
9690
9691 void clear()
9692 {
9693 id.clear();
9694 type.clear();
9695 name.clear();
9696 address.clear();
9697 uri.clear();
9698 configurationVersion = 0;
9699 }
9700 };
9701
9702 static void to_json(nlohmann::json& j, const PlatformDiscoveredService& p)
9703 {
9704 j = nlohmann::json{
9705 TOJSON_IMPL(id),
9706 TOJSON_IMPL(type),
9707 TOJSON_IMPL(name),
9708 TOJSON_IMPL(address),
9709 TOJSON_IMPL(uri),
9710 TOJSON_IMPL(configurationVersion)
9711 };
9712 }
9713 static void from_json(const nlohmann::json& j, PlatformDiscoveredService& p)
9714 {
9715 p.clear();
9716 getOptional<std::string>("id", p.id, j);
9717 getOptional<std::string>("type", p.type, j);
9718 getOptional<std::string>("name", p.name, j);
9719 getOptional<NetworkAddress>("address", p.address, j);
9720 getOptional<std::string>("uri", p.uri, j);
9721 getOptional<uint32_t>("configurationVersion", p.configurationVersion, j, 0);
9722 }
9723
9724
9725 //-----------------------------------------------------------
9727 {
9728 public:
9729 typedef enum
9730 {
9731 etUndefined = 0,
9732 etAudio = 1,
9733 etLocation = 2,
9734 etUser = 3
9735 } EventType_t;
9736
9737 typedef enum
9738 {
9739 dNone = 0,
9740 dInbound = 1,
9741 dOutbound = 2,
9742 dBoth = 3,
9743 dUndefined = 4,
9744 } Direction_t;
9745 };
9746
9747
9748 //-----------------------------------------------------------
9749 JSON_SERIALIZED_CLASS(TimelineQueryParameters)
9760 {
9761 IMPLEMENT_JSON_SERIALIZATION()
9762 IMPLEMENT_JSON_DOCUMENTATION(TimelineQueryParameters)
9763
9764 public:
9765
9768
9771
9774
9777
9780
9783
9786
9788 std::string onlyAlias;
9789
9791 std::string onlyNodeId;
9792
9795
9797 std::string sql;
9798
9800 {
9801 clear();
9802 }
9803
9804 void clear()
9805 {
9806 maxCount = 50;
9807 mostRecentFirst = true;
9808 startedOnOrAfter = 0;
9809 endedOnOrBefore = 0;
9810 onlyDirection = 0;
9811 onlyType = 0;
9812 onlyCommitted = true;
9813 onlyAlias.clear();
9814 onlyNodeId.clear();
9815 sql.clear();
9816 onlyTxId = 0;
9817 }
9818 };
9819
9820 static void to_json(nlohmann::json& j, const TimelineQueryParameters& p)
9821 {
9822 j = nlohmann::json{
9823 TOJSON_IMPL(maxCount),
9824 TOJSON_IMPL(mostRecentFirst),
9825 TOJSON_IMPL(startedOnOrAfter),
9826 TOJSON_IMPL(endedOnOrBefore),
9827 TOJSON_IMPL(onlyDirection),
9828 TOJSON_IMPL(onlyType),
9829 TOJSON_IMPL(onlyCommitted),
9830 TOJSON_IMPL(onlyAlias),
9831 TOJSON_IMPL(onlyNodeId),
9832 TOJSON_IMPL(onlyTxId),
9833 TOJSON_IMPL(sql)
9834 };
9835 }
9836 static void from_json(const nlohmann::json& j, TimelineQueryParameters& p)
9837 {
9838 p.clear();
9839 getOptional<long>("maxCount", p.maxCount, j, 50);
9840 getOptional<bool>("mostRecentFirst", p.mostRecentFirst, j, false);
9841 getOptional<uint64_t>("startedOnOrAfter", p.startedOnOrAfter, j, 0);
9842 getOptional<uint64_t>("endedOnOrBefore", p.endedOnOrBefore, j, 0);
9843 getOptional<int>("onlyDirection", p.onlyDirection, j, 0);
9844 getOptional<int>("onlyType", p.onlyType, j, 0);
9845 getOptional<bool>("onlyCommitted", p.onlyCommitted, j, true);
9846 getOptional<std::string>("onlyAlias", p.onlyAlias, j, EMPTY_STRING);
9847 getOptional<std::string>("onlyNodeId", p.onlyNodeId, j, EMPTY_STRING);
9848 getOptional<int>("onlyTxId", p.onlyTxId, j, 0);
9849 getOptional<std::string>("sql", p.sql, j, EMPTY_STRING);
9850 }
9851
9852 //-----------------------------------------------------------
9853 JSON_SERIALIZED_CLASS(CertStoreCertificate)
9861 {
9862 IMPLEMENT_JSON_SERIALIZATION()
9863 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificate)
9864
9865 public:
9867 std::string id;
9868
9870 std::string certificatePem;
9871
9873 std::string privateKeyPem;
9874
9877
9879 std::string tags;
9880
9882 {
9883 clear();
9884 }
9885
9886 void clear()
9887 {
9888 id.clear();
9889 certificatePem.clear();
9890 privateKeyPem.clear();
9891 internalData = nullptr;
9892 tags.clear();
9893 }
9894 };
9895
9896 static void to_json(nlohmann::json& j, const CertStoreCertificate& p)
9897 {
9898 j = nlohmann::json{
9899 TOJSON_IMPL(id),
9900 TOJSON_IMPL(certificatePem),
9901 TOJSON_IMPL(privateKeyPem),
9902 TOJSON_IMPL(tags)
9903 };
9904 }
9905 static void from_json(const nlohmann::json& j, CertStoreCertificate& p)
9906 {
9907 p.clear();
9908 j.at("id").get_to(p.id);
9909 j.at("certificatePem").get_to(p.certificatePem);
9910 getOptional<std::string>("privateKeyPem", p.privateKeyPem, j, EMPTY_STRING);
9911 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
9912 }
9913
9914 //-----------------------------------------------------------
9915 JSON_SERIALIZED_CLASS(CertStore)
9923 {
9924 IMPLEMENT_JSON_SERIALIZATION()
9925 IMPLEMENT_JSON_DOCUMENTATION(CertStore)
9926
9927 public:
9929 std::string id;
9930
9932 std::vector<CertStoreCertificate> certificates;
9933
9935 std::vector<KvPair> kvp;
9936
9937 CertStore()
9938 {
9939 clear();
9940 }
9941
9942 void clear()
9943 {
9944 id.clear();
9945 certificates.clear();
9946 kvp.clear();
9947 }
9948 };
9949
9950 static void to_json(nlohmann::json& j, const CertStore& p)
9951 {
9952 j = nlohmann::json{
9953 TOJSON_IMPL(id),
9954 TOJSON_IMPL(certificates),
9955 TOJSON_IMPL(kvp)
9956 };
9957 }
9958 static void from_json(const nlohmann::json& j, CertStore& p)
9959 {
9960 p.clear();
9961 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
9962 getOptional<std::vector<CertStoreCertificate>>("certificates", p.certificates, j);
9963 getOptional<std::vector<KvPair>>("kvp", p.kvp, j);
9964 }
9965
9966 //-----------------------------------------------------------
9967 JSON_SERIALIZED_CLASS(CertStoreCertificateElement)
9975 {
9976 IMPLEMENT_JSON_SERIALIZATION()
9977 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificateElement)
9978
9979 public:
9981 std::string id;
9982
9985
9987 std::string certificatePem;
9988
9990 std::string tags;
9991
9993 {
9994 clear();
9995 }
9996
9997 void clear()
9998 {
9999 id.clear();
10000 hasPrivateKey = false;
10001 tags.clear();
10002 }
10003 };
10004
10005 static void to_json(nlohmann::json& j, const CertStoreCertificateElement& p)
10006 {
10007 j = nlohmann::json{
10008 TOJSON_IMPL(id),
10009 TOJSON_IMPL(hasPrivateKey),
10010 TOJSON_IMPL(tags)
10011 };
10012
10013 if(!p.certificatePem.empty())
10014 {
10015 j["certificatePem"] = p.certificatePem;
10016 }
10017 }
10018 static void from_json(const nlohmann::json& j, CertStoreCertificateElement& p)
10019 {
10020 p.clear();
10021 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10022 getOptional<bool>("hasPrivateKey", p.hasPrivateKey, j, false);
10023 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
10024 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
10025 }
10026
10027 //-----------------------------------------------------------
10028 JSON_SERIALIZED_CLASS(CertStoreDescriptor)
10036 {
10037 IMPLEMENT_JSON_SERIALIZATION()
10038 IMPLEMENT_JSON_DOCUMENTATION(CertStoreDescriptor)
10039
10040 public:
10042 std::string id;
10043
10045 std::string fileName;
10046
10049
10052
10054 std::vector<CertStoreCertificateElement> certificates;
10055
10057 std::vector<KvPair> kvp;
10058
10060 {
10061 clear();
10062 }
10063
10064 void clear()
10065 {
10066 id.clear();
10067 fileName.clear();
10068 version = 0;
10069 flags = 0;
10070 certificates.clear();
10071 kvp.clear();
10072 }
10073 };
10074
10075 static void to_json(nlohmann::json& j, const CertStoreDescriptor& p)
10076 {
10077 j = nlohmann::json{
10078 TOJSON_IMPL(id),
10079 TOJSON_IMPL(fileName),
10080 TOJSON_IMPL(version),
10081 TOJSON_IMPL(flags),
10082 TOJSON_IMPL(certificates),
10083 TOJSON_IMPL(kvp)
10084 };
10085 }
10086 static void from_json(const nlohmann::json& j, CertStoreDescriptor& p)
10087 {
10088 p.clear();
10089 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10090 getOptional<std::string>("fileName", p.fileName, j, EMPTY_STRING);
10091 getOptional<int>("version", p.version, j, 0);
10092 getOptional<int>("flags", p.flags, j, 0);
10093 getOptional<std::vector<CertStoreCertificateElement>>("certificates", p.certificates, j);
10094 getOptional<std::vector<KvPair>>("kvp", p.kvp, j);
10095 }
10096
10097 //-----------------------------------------------------------
10098 JSON_SERIALIZED_CLASS(CertificateSubjectElement)
10106 {
10107 IMPLEMENT_JSON_SERIALIZATION()
10108 IMPLEMENT_JSON_DOCUMENTATION(CertificateSubjectElement)
10109
10110 public:
10112 std::string name;
10113
10115 std::string value;
10116
10118 {
10119 clear();
10120 }
10121
10122 void clear()
10123 {
10124 name.clear();
10125 value.clear();
10126 }
10127 };
10128
10129 static void to_json(nlohmann::json& j, const CertificateSubjectElement& p)
10130 {
10131 j = nlohmann::json{
10132 TOJSON_IMPL(name),
10133 TOJSON_IMPL(value)
10134 };
10135 }
10136 static void from_json(const nlohmann::json& j, CertificateSubjectElement& p)
10137 {
10138 p.clear();
10139 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
10140 getOptional<std::string>("value", p.value, j, EMPTY_STRING);
10141 }
10142
10143
10144 //-----------------------------------------------------------
10145 JSON_SERIALIZED_CLASS(CertificateDescriptor)
10153 {
10154 IMPLEMENT_JSON_SERIALIZATION()
10155 IMPLEMENT_JSON_DOCUMENTATION(CertificateDescriptor)
10156
10157 public:
10159 std::string subject;
10160
10162 std::string issuer;
10163
10166
10169
10171 std::string notBefore;
10172
10174 std::string notAfter;
10175
10177 std::string serial;
10178
10180 std::string fingerprint;
10181
10183 std::vector<CertificateSubjectElement> subjectElements;
10184
10186 std::vector<CertificateSubjectElement> issuerElements;
10187
10189 std::string certificatePem;
10190
10192 std::string publicKeyPem;
10193
10195 {
10196 clear();
10197 }
10198
10199 void clear()
10200 {
10201 subject.clear();
10202 issuer.clear();
10203 selfSigned = false;
10204 version = 0;
10205 notBefore.clear();
10206 notAfter.clear();
10207 serial.clear();
10208 fingerprint.clear();
10209 subjectElements.clear();
10210 issuerElements.clear();
10211 certificatePem.clear();
10212 publicKeyPem.clear();
10213 }
10214 };
10215
10216 static void to_json(nlohmann::json& j, const CertificateDescriptor& p)
10217 {
10218 j = nlohmann::json{
10219 TOJSON_IMPL(subject),
10220 TOJSON_IMPL(issuer),
10221 TOJSON_IMPL(selfSigned),
10222 TOJSON_IMPL(version),
10223 TOJSON_IMPL(notBefore),
10224 TOJSON_IMPL(notAfter),
10225 TOJSON_IMPL(serial),
10226 TOJSON_IMPL(fingerprint),
10227 TOJSON_IMPL(subjectElements),
10228 TOJSON_IMPL(issuerElements),
10229 TOJSON_IMPL(certificatePem),
10230 TOJSON_IMPL(publicKeyPem)
10231 };
10232 }
10233 static void from_json(const nlohmann::json& j, CertificateDescriptor& p)
10234 {
10235 p.clear();
10236 getOptional<std::string>("subject", p.subject, j, EMPTY_STRING);
10237 getOptional<std::string>("issuer", p.issuer, j, EMPTY_STRING);
10238 getOptional<bool>("selfSigned", p.selfSigned, j, false);
10239 getOptional<int>("version", p.version, j, 0);
10240 getOptional<std::string>("notBefore", p.notBefore, j, EMPTY_STRING);
10241 getOptional<std::string>("notAfter", p.notAfter, j, EMPTY_STRING);
10242 getOptional<std::string>("serial", p.serial, j, EMPTY_STRING);
10243 getOptional<std::string>("fingerprint", p.fingerprint, j, EMPTY_STRING);
10244 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
10245 getOptional<std::string>("publicKeyPem", p.publicKeyPem, j, EMPTY_STRING);
10246 getOptional<std::vector<CertificateSubjectElement>>("subjectElements", p.subjectElements, j);
10247 getOptional<std::vector<CertificateSubjectElement>>("issuerElements", p.issuerElements, j);
10248 }
10249
10250
10251 //-----------------------------------------------------------
10252 JSON_SERIALIZED_CLASS(RiffDescriptor)
10263 {
10264 IMPLEMENT_JSON_SERIALIZATION()
10265 IMPLEMENT_JSON_DOCUMENTATION(RiffDescriptor)
10266
10267 public:
10269 std::string file;
10270
10273
10276
10279
10281 std::string meta;
10282
10284 std::string certPem;
10285
10288
10290 std::string signature;
10291
10293 {
10294 clear();
10295 }
10296
10297 void clear()
10298 {
10299 file.clear();
10300 verified = false;
10301 channels = 0;
10302 sampleCount = 0;
10303 meta.clear();
10304 certPem.clear();
10305 certDescriptor.clear();
10306 signature.clear();
10307 }
10308 };
10309
10310 static void to_json(nlohmann::json& j, const RiffDescriptor& p)
10311 {
10312 j = nlohmann::json{
10313 TOJSON_IMPL(file),
10314 TOJSON_IMPL(verified),
10315 TOJSON_IMPL(channels),
10316 TOJSON_IMPL(sampleCount),
10317 TOJSON_IMPL(meta),
10318 TOJSON_IMPL(certPem),
10319 TOJSON_IMPL(certDescriptor),
10320 TOJSON_IMPL(signature)
10321 };
10322 }
10323
10324 static void from_json(const nlohmann::json& j, RiffDescriptor& p)
10325 {
10326 p.clear();
10327 FROMJSON_IMPL(file, std::string, EMPTY_STRING);
10328 FROMJSON_IMPL(verified, bool, false);
10329 FROMJSON_IMPL(channels, int, 0);
10330 FROMJSON_IMPL(sampleCount, int, 0);
10331 FROMJSON_IMPL(meta, std::string, EMPTY_STRING);
10332 FROMJSON_IMPL(certPem, std::string, EMPTY_STRING);
10333 getOptional<CertificateDescriptor>("certDescriptor", p.certDescriptor, j);
10334 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
10335 }
10336
10337
10338 //-----------------------------------------------------------
10339 JSON_SERIALIZED_CLASS(BridgeCreationDetail)
10347 {
10348 IMPLEMENT_JSON_SERIALIZATION()
10349 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(BridgeCreationDetail)
10350 IMPLEMENT_JSON_DOCUMENTATION(BridgeCreationDetail)
10351
10352 public:
10354 typedef enum
10355 {
10357 csUndefined = 0,
10358
10360 csOk = 1,
10361
10363 csNoJson = -1,
10364
10366 csAlreadyExists = -3,
10367
10369 csInvalidConfiguration = -4,
10370
10372 csInvalidJson = -5,
10373
10375 csInsufficientGroups = -6,
10376
10378 csTooManyGroups = -7,
10379
10381 csDuplicateGroup = -8,
10382
10384 csLocalLoopDetected = -9,
10385 } CreationStatus_t;
10386
10388 std::string id;
10389
10392
10394 {
10395 clear();
10396 }
10397
10398 void clear()
10399 {
10400 id.clear();
10401 status = csUndefined;
10402 }
10403 };
10404
10405 static void to_json(nlohmann::json& j, const BridgeCreationDetail& p)
10406 {
10407 j = nlohmann::json{
10408 TOJSON_IMPL(id),
10409 TOJSON_IMPL(status)
10410 };
10411 }
10412 static void from_json(const nlohmann::json& j, BridgeCreationDetail& p)
10413 {
10414 p.clear();
10415 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10416 getOptional<BridgeCreationDetail::CreationStatus_t>("status", p.status, j, BridgeCreationDetail::CreationStatus_t::csUndefined);
10417 }
10418 //-----------------------------------------------------------
10419 JSON_SERIALIZED_CLASS(GroupConnectionDetail)
10427 {
10428 IMPLEMENT_JSON_SERIALIZATION()
10429 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupConnectionDetail)
10430 IMPLEMENT_JSON_DOCUMENTATION(GroupConnectionDetail)
10431
10432 public:
10434 typedef enum
10435 {
10437 ctUndefined = 0,
10438
10440 ctDirectDatagram = 1,
10441
10443 ctRallypoint = 2
10444 } ConnectionType_t;
10445
10447 std::string id;
10448
10451
10453 std::string peer;
10454
10457
10459 std::string reason;
10460
10462 {
10463 clear();
10464 }
10465
10466 void clear()
10467 {
10468 id.clear();
10469 connectionType = ctUndefined;
10470 peer.clear();
10471 asFailover = false;
10472 reason.clear();
10473 }
10474 };
10475
10476 static void to_json(nlohmann::json& j, const GroupConnectionDetail& p)
10477 {
10478 j = nlohmann::json{
10479 TOJSON_IMPL(id),
10480 TOJSON_IMPL(connectionType),
10481 TOJSON_IMPL(peer),
10482 TOJSON_IMPL(asFailover),
10483 TOJSON_IMPL(reason)
10484 };
10485
10486 if(p.asFailover)
10487 {
10488 j["asFailover"] = p.asFailover;
10489 }
10490 }
10491 static void from_json(const nlohmann::json& j, GroupConnectionDetail& p)
10492 {
10493 p.clear();
10494 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10495 getOptional<GroupConnectionDetail::ConnectionType_t>("connectionType", p.connectionType, j, GroupConnectionDetail::ConnectionType_t::ctUndefined);
10496 getOptional<std::string>("peer", p.peer, j, EMPTY_STRING);
10497 getOptional<bool>("asFailover", p.asFailover, j, false);
10498 getOptional<std::string>("reason", p.reason, j, EMPTY_STRING);
10499 }
10500
10501 //-----------------------------------------------------------
10502 JSON_SERIALIZED_CLASS(GroupTxDetail)
10510 {
10511 IMPLEMENT_JSON_SERIALIZATION()
10512 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupTxDetail)
10513 IMPLEMENT_JSON_DOCUMENTATION(GroupTxDetail)
10514
10515 public:
10517 typedef enum
10518 {
10520 txsUndefined = 0,
10521
10523 txsTxStarted = 1,
10524
10526 txsTxEnded = 2,
10527
10529 txsNotAnAudioGroup = -1,
10530
10532 txsNotJoined = -2,
10533
10535 txsNotConnected = -3,
10536
10538 txsAlreadyTransmitting = -4,
10539
10541 txsInvalidParams = -5,
10542
10544 txsPriorityTooLow = -6,
10545
10547 txsRxActiveOnNonFdx = -7,
10548
10550 txsCannotSubscribeToInput = -8,
10551
10553 txsInvalidId = -9,
10554
10556 txsTxEndedWithFailure = -10,
10557
10559 txsBridgedButNotMultistream = -11,
10560
10562 txsAutoEndedDueToNonMultistreamBridge = -12,
10563
10565 txsReBeginWithoutPriorBegin = -13
10566 } TxStatus_t;
10567
10569 std::string id;
10570
10573
10576
10579
10582
10584 uint32_t txId;
10585
10587 {
10588 clear();
10589 }
10590
10591 void clear()
10592 {
10593 id.clear();
10594 status = txsUndefined;
10595 localPriority = 0;
10596 remotePriority = 0;
10597 nonFdxMsHangRemaining = 0;
10598 txId = 0;
10599 }
10600 };
10601
10602 static void to_json(nlohmann::json& j, const GroupTxDetail& p)
10603 {
10604 j = nlohmann::json{
10605 TOJSON_IMPL(id),
10606 TOJSON_IMPL(status),
10607 TOJSON_IMPL(localPriority),
10608 TOJSON_IMPL(txId)
10609 };
10610
10611 // Include remote priority if status is related to that
10612 if(p.status == GroupTxDetail::TxStatus_t::txsPriorityTooLow)
10613 {
10614 j["remotePriority"] = p.remotePriority;
10615 }
10616 else if(p.status == GroupTxDetail::TxStatus_t::txsRxActiveOnNonFdx)
10617 {
10618 j["nonFdxMsHangRemaining"] = p.nonFdxMsHangRemaining;
10619 }
10620 }
10621 static void from_json(const nlohmann::json& j, GroupTxDetail& p)
10622 {
10623 p.clear();
10624 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10625 getOptional<GroupTxDetail::TxStatus_t>("status", p.status, j, GroupTxDetail::TxStatus_t::txsUndefined);
10626 getOptional<int>("localPriority", p.localPriority, j, 0);
10627 getOptional<int>("remotePriority", p.remotePriority, j, 0);
10628 getOptional<long>("nonFdxMsHangRemaining", p.nonFdxMsHangRemaining, j, 0);
10629 getOptional<uint32_t>("txId", p.txId, j, 0);
10630 }
10631
10632 //-----------------------------------------------------------
10633 JSON_SERIALIZED_CLASS(GroupCreationDetail)
10641 {
10642 IMPLEMENT_JSON_SERIALIZATION()
10643 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupCreationDetail)
10644 IMPLEMENT_JSON_DOCUMENTATION(GroupCreationDetail)
10645
10646 public:
10648 typedef enum
10649 {
10651 csUndefined = 0,
10652
10654 csOk = 1,
10655
10657 csNoJson = -1,
10658
10660 csConflictingRpListAndCluster = -2,
10661
10663 csAlreadyExists = -3,
10664
10666 csInvalidConfiguration = -4,
10667
10669 csInvalidJson = -5,
10670
10672 csCryptoFailure = -6,
10673
10675 csAudioInputFailure = -7,
10676
10678 csAudioOutputFailure = -8,
10679
10681 csUnsupportedAudioEncoder = -9,
10682
10684 csNoLicense = -10,
10685
10687 csInvalidTransport = -11,
10688
10690 csAudioInputDeviceNotFound = -12,
10691
10693 csAudioOutputDeviceNotFound = -13
10694 } CreationStatus_t;
10695
10697 std::string id;
10698
10701
10703 {
10704 clear();
10705 }
10706
10707 void clear()
10708 {
10709 id.clear();
10710 status = csUndefined;
10711 }
10712 };
10713
10714 static void to_json(nlohmann::json& j, const GroupCreationDetail& p)
10715 {
10716 j = nlohmann::json{
10717 TOJSON_IMPL(id),
10718 TOJSON_IMPL(status)
10719 };
10720 }
10721 static void from_json(const nlohmann::json& j, GroupCreationDetail& p)
10722 {
10723 p.clear();
10724 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10725 getOptional<GroupCreationDetail::CreationStatus_t>("status", p.status, j, GroupCreationDetail::CreationStatus_t::csUndefined);
10726 }
10727
10728
10729 //-----------------------------------------------------------
10730 JSON_SERIALIZED_CLASS(GroupReconfigurationDetail)
10738 {
10739 IMPLEMENT_JSON_SERIALIZATION()
10740 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupReconfigurationDetail)
10741 IMPLEMENT_JSON_DOCUMENTATION(GroupReconfigurationDetail)
10742
10743 public:
10745 typedef enum
10746 {
10748 rsUndefined = 0,
10749
10751 rsOk = 1,
10752
10754 rsNoJson = -1,
10755
10757 rsInvalidConfiguration = -2,
10758
10760 rsInvalidJson = -3,
10761
10763 rsAudioInputFailure = -4,
10764
10766 rsAudioOutputFailure = -5,
10767
10769 rsDoesNotExist = -6,
10770
10772 rsAudioInputInUse = -7,
10773
10775 rsAudioDisabledForGroup = -8,
10776
10778 rsGroupIsNotAudio = -9
10779 } ReconfigurationStatus_t;
10780
10782 std::string id;
10783
10786
10788 {
10789 clear();
10790 }
10791
10792 void clear()
10793 {
10794 id.clear();
10795 status = rsUndefined;
10796 }
10797 };
10798
10799 static void to_json(nlohmann::json& j, const GroupReconfigurationDetail& p)
10800 {
10801 j = nlohmann::json{
10802 TOJSON_IMPL(id),
10803 TOJSON_IMPL(status)
10804 };
10805 }
10806 static void from_json(const nlohmann::json& j, GroupReconfigurationDetail& p)
10807 {
10808 p.clear();
10809 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10810 getOptional<GroupReconfigurationDetail::ReconfigurationStatus_t>("status", p.status, j, GroupReconfigurationDetail::ReconfigurationStatus_t::rsUndefined);
10811 }
10812
10813
10814 //-----------------------------------------------------------
10815 JSON_SERIALIZED_CLASS(GroupHealthReport)
10823 {
10824 IMPLEMENT_JSON_SERIALIZATION()
10825 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupHealthReport)
10826 IMPLEMENT_JSON_DOCUMENTATION(GroupHealthReport)
10827
10828 public:
10829 std::string id;
10830 uint64_t lastErrorTs;
10831 uint64_t decryptionErrors;
10832 uint64_t encryptionErrors;
10833 uint64_t unsupportDecoderErrors;
10834 uint64_t decoderFailures;
10835 uint64_t decoderStartFailures;
10836 uint64_t inboundRtpPacketAllocationFailures;
10837 uint64_t inboundRtpPacketLoadFailures;
10838 uint64_t latePacketsDiscarded;
10839 uint64_t jitterBufferInsertionFailures;
10840 uint64_t presenceDeserializationFailures;
10841 uint64_t notRtpErrors;
10842 uint64_t generalErrors;
10843 uint64_t inboundRtpProcessorAllocationFailures;
10844
10846 {
10847 clear();
10848 }
10849
10850 void clear()
10851 {
10852 id.clear();
10853 lastErrorTs = 0;
10854 decryptionErrors = 0;
10855 encryptionErrors = 0;
10856 unsupportDecoderErrors = 0;
10857 decoderFailures = 0;
10858 decoderStartFailures = 0;
10859 inboundRtpPacketAllocationFailures = 0;
10860 inboundRtpPacketLoadFailures = 0;
10861 latePacketsDiscarded = 0;
10862 jitterBufferInsertionFailures = 0;
10863 presenceDeserializationFailures = 0;
10864 notRtpErrors = 0;
10865 generalErrors = 0;
10866 inboundRtpProcessorAllocationFailures = 0;
10867 }
10868 };
10869
10870 static void to_json(nlohmann::json& j, const GroupHealthReport& p)
10871 {
10872 j = nlohmann::json{
10873 TOJSON_IMPL(id),
10874 TOJSON_IMPL(lastErrorTs),
10875 TOJSON_IMPL(decryptionErrors),
10876 TOJSON_IMPL(encryptionErrors),
10877 TOJSON_IMPL(unsupportDecoderErrors),
10878 TOJSON_IMPL(decoderFailures),
10879 TOJSON_IMPL(decoderStartFailures),
10880 TOJSON_IMPL(inboundRtpPacketAllocationFailures),
10881 TOJSON_IMPL(inboundRtpPacketLoadFailures),
10882 TOJSON_IMPL(latePacketsDiscarded),
10883 TOJSON_IMPL(jitterBufferInsertionFailures),
10884 TOJSON_IMPL(presenceDeserializationFailures),
10885 TOJSON_IMPL(notRtpErrors),
10886 TOJSON_IMPL(generalErrors),
10887 TOJSON_IMPL(inboundRtpProcessorAllocationFailures)
10888 };
10889 }
10890 static void from_json(const nlohmann::json& j, GroupHealthReport& p)
10891 {
10892 p.clear();
10893 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10894 getOptional<uint64_t>("lastErrorTs", p.lastErrorTs, j, 0);
10895 getOptional<uint64_t>("decryptionErrors", p.decryptionErrors, j, 0);
10896 getOptional<uint64_t>("encryptionErrors", p.encryptionErrors, j, 0);
10897 getOptional<uint64_t>("unsupportDecoderErrors", p.unsupportDecoderErrors, j, 0);
10898 getOptional<uint64_t>("decoderFailures", p.decoderFailures, j, 0);
10899 getOptional<uint64_t>("decoderStartFailures", p.decoderStartFailures, j, 0);
10900 getOptional<uint64_t>("inboundRtpPacketAllocationFailures", p.inboundRtpPacketAllocationFailures, j, 0);
10901 getOptional<uint64_t>("inboundRtpPacketLoadFailures", p.inboundRtpPacketLoadFailures, j, 0);
10902 getOptional<uint64_t>("latePacketsDiscarded", p.latePacketsDiscarded, j, 0);
10903 getOptional<uint64_t>("jitterBufferInsertionFailures", p.jitterBufferInsertionFailures, j, 0);
10904 getOptional<uint64_t>("presenceDeserializationFailures", p.presenceDeserializationFailures, j, 0);
10905 getOptional<uint64_t>("notRtpErrors", p.notRtpErrors, j, 0);
10906 getOptional<uint64_t>("generalErrors", p.generalErrors, j, 0);
10907 getOptional<uint64_t>("inboundRtpProcessorAllocationFailures", p.inboundRtpProcessorAllocationFailures, j, 0);
10908 }
10909
10910 //-----------------------------------------------------------
10911 JSON_SERIALIZED_CLASS(InboundProcessorStats)
10919 {
10920 IMPLEMENT_JSON_SERIALIZATION()
10921 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(InboundProcessorStats)
10922 IMPLEMENT_JSON_DOCUMENTATION(InboundProcessorStats)
10923
10924 public:
10925 uint32_t ssrc;
10926 double jitter;
10927 uint64_t minRtpSamplesInQueue;
10928 uint64_t maxRtpSamplesInQueue;
10929 uint64_t totalSamplesTrimmed;
10930 uint64_t underruns;
10931 uint64_t overruns;
10932 uint64_t samplesInQueue;
10933 uint64_t totalPacketsReceived;
10934 uint64_t totalPacketsLost;
10935 uint64_t totalPacketsDiscarded;
10936
10938 {
10939 clear();
10940 }
10941
10942 void clear()
10943 {
10944 ssrc = 0;
10945 jitter = 0.0;
10946 minRtpSamplesInQueue = 0;
10947 maxRtpSamplesInQueue = 0;
10948 totalSamplesTrimmed = 0;
10949 underruns = 0;
10950 overruns = 0;
10951 samplesInQueue = 0;
10952 totalPacketsReceived = 0;
10953 totalPacketsLost = 0;
10954 totalPacketsDiscarded = 0;
10955 }
10956 };
10957
10958 static void to_json(nlohmann::json& j, const InboundProcessorStats& p)
10959 {
10960 j = nlohmann::json{
10961 TOJSON_IMPL(ssrc),
10962 TOJSON_IMPL(jitter),
10963 TOJSON_IMPL(minRtpSamplesInQueue),
10964 TOJSON_IMPL(maxRtpSamplesInQueue),
10965 TOJSON_IMPL(totalSamplesTrimmed),
10966 TOJSON_IMPL(underruns),
10967 TOJSON_IMPL(overruns),
10968 TOJSON_IMPL(samplesInQueue),
10969 TOJSON_IMPL(totalPacketsReceived),
10970 TOJSON_IMPL(totalPacketsLost),
10971 TOJSON_IMPL(totalPacketsDiscarded)
10972 };
10973 }
10974 static void from_json(const nlohmann::json& j, InboundProcessorStats& p)
10975 {
10976 p.clear();
10977 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
10978 getOptional<double>("jitter", p.jitter, j, 0.0);
10979 getOptional<uint64_t>("minRtpSamplesInQueue", p.minRtpSamplesInQueue, j, 0);
10980 getOptional<uint64_t>("maxRtpSamplesInQueue", p.maxRtpSamplesInQueue, j, 0);
10981 getOptional<uint64_t>("totalSamplesTrimmed", p.totalSamplesTrimmed, j, 0);
10982 getOptional<uint64_t>("underruns", p.underruns, j, 0);
10983 getOptional<uint64_t>("overruns", p.overruns, j, 0);
10984 getOptional<uint64_t>("samplesInQueue", p.samplesInQueue, j, 0);
10985 getOptional<uint64_t>("totalPacketsReceived", p.totalPacketsReceived, j, 0);
10986 getOptional<uint64_t>("totalPacketsLost", p.totalPacketsLost, j, 0);
10987 getOptional<uint64_t>("totalPacketsDiscarded", p.totalPacketsDiscarded, j, 0);
10988 }
10989
10990 //-----------------------------------------------------------
10991 JSON_SERIALIZED_CLASS(TrafficCounter)
10999 {
11000 IMPLEMENT_JSON_SERIALIZATION()
11001 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(TrafficCounter)
11002 IMPLEMENT_JSON_DOCUMENTATION(TrafficCounter)
11003
11004 public:
11005 uint64_t packets;
11006 uint64_t bytes;
11007 uint64_t errors;
11008
11010 {
11011 clear();
11012 }
11013
11014 void clear()
11015 {
11016 packets = 0;
11017 bytes = 0;
11018 errors = 0;
11019 }
11020 };
11021
11022 static void to_json(nlohmann::json& j, const TrafficCounter& p)
11023 {
11024 j = nlohmann::json{
11025 TOJSON_IMPL(packets),
11026 TOJSON_IMPL(bytes),
11027 TOJSON_IMPL(errors)
11028 };
11029 }
11030 static void from_json(const nlohmann::json& j, TrafficCounter& p)
11031 {
11032 p.clear();
11033 getOptional<uint64_t>("packets", p.packets, j, 0);
11034 getOptional<uint64_t>("bytes", p.bytes, j, 0);
11035 getOptional<uint64_t>("errors", p.errors, j, 0);
11036 }
11037
11038 //-----------------------------------------------------------
11039 JSON_SERIALIZED_CLASS(GroupStats)
11047 {
11048 IMPLEMENT_JSON_SERIALIZATION()
11049 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupStats)
11050 IMPLEMENT_JSON_DOCUMENTATION(GroupStats)
11051
11052 public:
11053 std::string id;
11054 //std::vector<InboundProcessorStats> rtpInbounds;
11055 TrafficCounter rxTraffic;
11056 TrafficCounter txTraffic;
11057
11058 GroupStats()
11059 {
11060 clear();
11061 }
11062
11063 void clear()
11064 {
11065 id.clear();
11066 //rtpInbounds.clear();
11067 rxTraffic.clear();
11068 txTraffic.clear();
11069 }
11070 };
11071
11072 static void to_json(nlohmann::json& j, const GroupStats& p)
11073 {
11074 j = nlohmann::json{
11075 TOJSON_IMPL(id),
11076 //TOJSON_IMPL(rtpInbounds),
11077 TOJSON_IMPL(rxTraffic),
11078 TOJSON_IMPL(txTraffic)
11079 };
11080 }
11081 static void from_json(const nlohmann::json& j, GroupStats& p)
11082 {
11083 p.clear();
11084 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11085 //getOptional<std::vector<InboundProcessorStats>>("rtpInbounds", p.rtpInbounds, j);
11086 getOptional<TrafficCounter>("rxTraffic", p.rxTraffic, j);
11087 getOptional<TrafficCounter>("txTraffic", p.txTraffic, j);
11088 }
11089
11090 //-----------------------------------------------------------
11091 JSON_SERIALIZED_CLASS(RallypointConnectionDetail)
11099 {
11100 IMPLEMENT_JSON_SERIALIZATION()
11101 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(RallypointConnectionDetail)
11102 IMPLEMENT_JSON_DOCUMENTATION(RallypointConnectionDetail)
11103
11104 public:
11106 std::string internalId;
11107
11109 std::string host;
11110
11112 int port;
11113
11116
11119
11121 {
11122 clear();
11123 }
11124
11125 void clear()
11126 {
11127 internalId.clear();
11128 host.clear();
11129 port = 0;
11130 msToNextConnectionAttempt = 0;
11131 serverProcessingMs = -1.0f;
11132 }
11133 };
11134
11135 static void to_json(nlohmann::json& j, const RallypointConnectionDetail& p)
11136 {
11137 j = nlohmann::json{
11138 TOJSON_IMPL(internalId),
11139 TOJSON_IMPL(host),
11140 TOJSON_IMPL(port)
11141 };
11142
11143 if(p.msToNextConnectionAttempt > 0)
11144 {
11145 j["msToNextConnectionAttempt"] = p.msToNextConnectionAttempt;
11146 }
11147
11148 if(p.serverProcessingMs >= 0.0)
11149 {
11150 j["serverProcessingMs"] = p.serverProcessingMs;
11151 }
11152 }
11153 static void from_json(const nlohmann::json& j, RallypointConnectionDetail& p)
11154 {
11155 p.clear();
11156 getOptional<std::string>("internalId", p.internalId, j, EMPTY_STRING);
11157 getOptional<std::string>("host", p.host, j, EMPTY_STRING);
11158 getOptional<int>("port", p.port, j, 0);
11159 getOptional<uint64_t>("msToNextConnectionAttempt", p.msToNextConnectionAttempt, j, 0);
11160 getOptional<float>("serverProcessingMs", p.serverProcessingMs, j, -1.0);
11161 }
11162
11163 //-----------------------------------------------------------
11164 JSON_SERIALIZED_CLASS(TranslationSession)
11175 {
11176 IMPLEMENT_JSON_SERIALIZATION()
11177 IMPLEMENT_JSON_DOCUMENTATION(TranslationSession)
11178
11179 public:
11181 std::string id;
11182
11184 std::string name;
11185
11187 std::vector<std::string> groups;
11188
11191
11193 {
11194 clear();
11195 }
11196
11197 void clear()
11198 {
11199 id.clear();
11200 name.clear();
11201 groups.clear();
11202 enabled = true;
11203 }
11204 };
11205
11206 static void to_json(nlohmann::json& j, const TranslationSession& p)
11207 {
11208 j = nlohmann::json{
11209 TOJSON_IMPL(id),
11210 TOJSON_IMPL(name),
11211 TOJSON_IMPL(groups),
11212 TOJSON_IMPL(enabled)
11213 };
11214 }
11215 static void from_json(const nlohmann::json& j, TranslationSession& p)
11216 {
11217 p.clear();
11218 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
11219 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
11220 getOptional<std::vector<std::string>>("groups", p.groups, j);
11221 FROMJSON_IMPL(enabled, bool, true);
11222 }
11223
11224 //-----------------------------------------------------------
11225 JSON_SERIALIZED_CLASS(TranslationConfiguration)
11236 {
11237 IMPLEMENT_JSON_SERIALIZATION()
11238 IMPLEMENT_JSON_DOCUMENTATION(TranslationConfiguration)
11239
11240 public:
11242 std::vector<TranslationSession> sessions;
11243
11245 std::vector<Group> groups;
11246
11248 {
11249 clear();
11250 }
11251
11252 void clear()
11253 {
11254 sessions.clear();
11255 groups.clear();
11256 }
11257 };
11258
11259 static void to_json(nlohmann::json& j, const TranslationConfiguration& p)
11260 {
11261 j = nlohmann::json{
11262 TOJSON_IMPL(sessions),
11263 TOJSON_IMPL(groups)
11264 };
11265 }
11266 static void from_json(const nlohmann::json& j, TranslationConfiguration& p)
11267 {
11268 p.clear();
11269 getOptional<std::vector<TranslationSession>>("sessions", p.sessions, j);
11270 getOptional<std::vector<Group>>("groups", p.groups, j);
11271 }
11272
11273 //-----------------------------------------------------------
11274 JSON_SERIALIZED_CLASS(LingoServerStatusReportConfiguration)
11285 {
11286 IMPLEMENT_JSON_SERIALIZATION()
11287 IMPLEMENT_JSON_DOCUMENTATION(LingoServerStatusReportConfiguration)
11288
11289 public:
11291 std::string fileName;
11292
11295
11298
11300 std::string runCmd;
11301
11304
11307
11310
11312 {
11313 clear();
11314 }
11315
11316 void clear()
11317 {
11318 fileName.clear();
11319 intervalSecs = 60;
11320 enabled = false;
11321 includeGroupDetail = false;
11322 includeSessionDetail = false;
11323 includeSessionGroupDetail = false;
11324 runCmd.clear();
11325 }
11326 };
11327
11328 static void to_json(nlohmann::json& j, const LingoServerStatusReportConfiguration& p)
11329 {
11330 j = nlohmann::json{
11331 TOJSON_IMPL(fileName),
11332 TOJSON_IMPL(intervalSecs),
11333 TOJSON_IMPL(enabled),
11334 TOJSON_IMPL(includeGroupDetail),
11335 TOJSON_IMPL(includeSessionDetail),
11336 TOJSON_IMPL(includeSessionGroupDetail),
11337 TOJSON_IMPL(runCmd)
11338 };
11339 }
11340 static void from_json(const nlohmann::json& j, LingoServerStatusReportConfiguration& p)
11341 {
11342 p.clear();
11343 getOptional<std::string>("fileName", p.fileName, j);
11344 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
11345 getOptional<bool>("enabled", p.enabled, j, false);
11346 getOptional<std::string>("runCmd", p.runCmd, j);
11347 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
11348 getOptional<bool>("includeSessionDetail", p.includeSessionDetail, j, false);
11349 getOptional<bool>("includeSessionGroupDetail", p.includeSessionGroupDetail, j, false);
11350 }
11351
11352 //-----------------------------------------------------------
11353 JSON_SERIALIZED_CLASS(LingoServerInternals)
11366 {
11367 IMPLEMENT_JSON_SERIALIZATION()
11368 IMPLEMENT_JSON_DOCUMENTATION(LingoServerInternals)
11369
11370 public:
11373
11376
11379
11381 {
11382 clear();
11383 }
11384
11385 void clear()
11386 {
11387 watchdog.clear();
11388 tuning.clear();
11389 housekeeperIntervalMs = 1000;
11390 }
11391 };
11392
11393 static void to_json(nlohmann::json& j, const LingoServerInternals& p)
11394 {
11395 j = nlohmann::json{
11396 TOJSON_IMPL(watchdog),
11397 TOJSON_IMPL(housekeeperIntervalMs),
11398 TOJSON_IMPL(tuning)
11399 };
11400 }
11401 static void from_json(const nlohmann::json& j, LingoServerInternals& p)
11402 {
11403 p.clear();
11404 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
11405 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
11406 getOptional<TuningSettings>("tuning", p.tuning, j);
11407 }
11408
11409 //-----------------------------------------------------------
11410 JSON_SERIALIZED_CLASS(LingoServerConfiguration)
11420 {
11421 IMPLEMENT_JSON_SERIALIZATION()
11422 IMPLEMENT_JSON_DOCUMENTATION(LingoServerConfiguration)
11423
11424 public:
11426 std::string id;
11427
11430
11433
11436
11439
11442
11445
11448
11451
11454
11457
11460
11463
11466
11469
11471 {
11472 clear();
11473 }
11474
11475 void clear()
11476 {
11477 id.clear();
11478 serviceConfigurationFileCheckSecs = 60;
11479 lingoConfigurationFileName.clear();
11480 lingoConfigurationFileCommand.clear();
11481 lingoConfigurationFileCheckSecs = 60;
11482 statusReport.clear();
11483 externalHealthCheckResponder.clear();
11484 internals.clear();
11485 certStoreFileName.clear();
11486 certStorePasswordHex.clear();
11487 enginePolicy.clear();
11488 configurationCheckSignalName = "rts.22f4ec3.${id}";
11489 fipsCrypto.clear();
11490 proxy.clear();
11491 nsm.clear();
11492 }
11493 };
11494
11495 static void to_json(nlohmann::json& j, const LingoServerConfiguration& p)
11496 {
11497 j = nlohmann::json{
11498 TOJSON_IMPL(id),
11499 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
11500 TOJSON_IMPL(lingoConfigurationFileName),
11501 TOJSON_IMPL(lingoConfigurationFileCommand),
11502 TOJSON_IMPL(lingoConfigurationFileCheckSecs),
11503 TOJSON_IMPL(statusReport),
11504 TOJSON_IMPL(externalHealthCheckResponder),
11505 TOJSON_IMPL(internals),
11506 TOJSON_IMPL(certStoreFileName),
11507 TOJSON_IMPL(certStorePasswordHex),
11508 TOJSON_IMPL(enginePolicy),
11509 TOJSON_IMPL(configurationCheckSignalName),
11510 TOJSON_IMPL(fipsCrypto),
11511 TOJSON_IMPL(proxy),
11512 TOJSON_IMPL(nsm)
11513 };
11514 }
11515 static void from_json(const nlohmann::json& j, LingoServerConfiguration& p)
11516 {
11517 p.clear();
11518 getOptional<std::string>("id", p.id, j);
11519 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
11520 getOptional<std::string>("lingoConfigurationFileName", p.lingoConfigurationFileName, j);
11521 getOptional<std::string>("lingoConfigurationFileCommand", p.lingoConfigurationFileCommand, j);
11522 getOptional<int>("lingoConfigurationFileCheckSecs", p.lingoConfigurationFileCheckSecs, j, 60);
11523 getOptional<LingoServerStatusReportConfiguration>("statusReport", p.statusReport, j);
11524 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
11525 getOptional<LingoServerInternals>("internals", p.internals, j);
11526 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
11527 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
11528 j.at("enginePolicy").get_to(p.enginePolicy);
11529 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.22f4ec3.${id}");
11530 getOptional<FipsCryptoSettings>("fipsCrypo", p.fipsCrypto, j);
11531 getOptional<NetworkAddress>("proxy", p.proxy, j);
11532 getOptional<NsmConfiguration>("nsm", p.nsm, j);
11533 }
11534
11535
11536 //-----------------------------------------------------------
11537 JSON_SERIALIZED_CLASS(VoiceToVoiceSession)
11548 {
11549 IMPLEMENT_JSON_SERIALIZATION()
11550 IMPLEMENT_JSON_DOCUMENTATION(VoiceToVoiceSession)
11551
11552 public:
11554 std::string id;
11555
11557 std::string name;
11558
11560 std::vector<std::string> groups;
11561
11564
11566 {
11567 clear();
11568 }
11569
11570 void clear()
11571 {
11572 id.clear();
11573 name.clear();
11574 groups.clear();
11575 enabled = true;
11576 }
11577 };
11578
11579 static void to_json(nlohmann::json& j, const VoiceToVoiceSession& p)
11580 {
11581 j = nlohmann::json{
11582 TOJSON_IMPL(id),
11583 TOJSON_IMPL(name),
11584 TOJSON_IMPL(groups),
11585 TOJSON_IMPL(enabled)
11586 };
11587 }
11588 static void from_json(const nlohmann::json& j, VoiceToVoiceSession& p)
11589 {
11590 p.clear();
11591 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
11592 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
11593 getOptional<std::vector<std::string>>("groups", p.groups, j);
11594 FROMJSON_IMPL(enabled, bool, true);
11595 }
11596
11597 //-----------------------------------------------------------
11598 JSON_SERIALIZED_CLASS(LingoConfiguration)
11609 {
11610 IMPLEMENT_JSON_SERIALIZATION()
11611 IMPLEMENT_JSON_DOCUMENTATION(LingoConfiguration)
11612
11613 public:
11615 std::vector<VoiceToVoiceSession> voiceToVoiceSessions;
11616
11618 std::vector<Group> groups;
11619
11621 {
11622 clear();
11623 }
11624
11625 void clear()
11626 {
11627 voiceToVoiceSessions.clear();
11628 groups.clear();
11629 }
11630 };
11631
11632 static void to_json(nlohmann::json& j, const LingoConfiguration& p)
11633 {
11634 j = nlohmann::json{
11635 TOJSON_IMPL(voiceToVoiceSessions),
11636 TOJSON_IMPL(groups)
11637 };
11638 }
11639 static void from_json(const nlohmann::json& j, LingoConfiguration& p)
11640 {
11641 p.clear();
11642 getOptional<std::vector<VoiceToVoiceSession>>("voiceToVoiceSessions", p.voiceToVoiceSessions, j);
11643 getOptional<std::vector<Group>>("groups", p.groups, j);
11644 }
11645
11646 //-----------------------------------------------------------
11647 JSON_SERIALIZED_CLASS(BridgingConfiguration)
11658 {
11659 IMPLEMENT_JSON_SERIALIZATION()
11660 IMPLEMENT_JSON_DOCUMENTATION(BridgingConfiguration)
11661
11662 public:
11664 std::vector<Bridge> bridges;
11665
11667 std::vector<Group> groups;
11668
11670 {
11671 clear();
11672 }
11673
11674 void clear()
11675 {
11676 bridges.clear();
11677 groups.clear();
11678 }
11679 };
11680
11681 static void to_json(nlohmann::json& j, const BridgingConfiguration& p)
11682 {
11683 j = nlohmann::json{
11684 TOJSON_IMPL(bridges),
11685 TOJSON_IMPL(groups)
11686 };
11687 }
11688 static void from_json(const nlohmann::json& j, BridgingConfiguration& p)
11689 {
11690 p.clear();
11691 getOptional<std::vector<Bridge>>("bridges", p.bridges, j);
11692 getOptional<std::vector<Group>>("groups", p.groups, j);
11693 }
11694
11695 //-----------------------------------------------------------
11696 JSON_SERIALIZED_CLASS(BridgingServerStatusReportConfiguration)
11707 {
11708 IMPLEMENT_JSON_SERIALIZATION()
11709 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerStatusReportConfiguration)
11710
11711 public:
11713 std::string fileName;
11714
11717
11720
11722 std::string runCmd;
11723
11726
11729
11732
11734 {
11735 clear();
11736 }
11737
11738 void clear()
11739 {
11740 fileName.clear();
11741 intervalSecs = 60;
11742 enabled = false;
11743 includeGroupDetail = false;
11744 includeBridgeDetail = false;
11745 includeBridgeGroupDetail = false;
11746 runCmd.clear();
11747 }
11748 };
11749
11750 static void to_json(nlohmann::json& j, const BridgingServerStatusReportConfiguration& p)
11751 {
11752 j = nlohmann::json{
11753 TOJSON_IMPL(fileName),
11754 TOJSON_IMPL(intervalSecs),
11755 TOJSON_IMPL(enabled),
11756 TOJSON_IMPL(includeGroupDetail),
11757 TOJSON_IMPL(includeBridgeDetail),
11758 TOJSON_IMPL(includeBridgeGroupDetail),
11759 TOJSON_IMPL(runCmd)
11760 };
11761 }
11762 static void from_json(const nlohmann::json& j, BridgingServerStatusReportConfiguration& p)
11763 {
11764 p.clear();
11765 getOptional<std::string>("fileName", p.fileName, j);
11766 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
11767 getOptional<bool>("enabled", p.enabled, j, false);
11768 getOptional<std::string>("runCmd", p.runCmd, j);
11769 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
11770 getOptional<bool>("includeBridgeDetail", p.includeBridgeDetail, j, false);
11771 getOptional<bool>("includeBridgeGroupDetail", p.includeBridgeGroupDetail, j, false);
11772 }
11773
11774 //-----------------------------------------------------------
11775 JSON_SERIALIZED_CLASS(BridgingServerInternals)
11788 {
11789 IMPLEMENT_JSON_SERIALIZATION()
11790 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerInternals)
11791
11792 public:
11795
11798
11801
11803 {
11804 clear();
11805 }
11806
11807 void clear()
11808 {
11809 watchdog.clear();
11810 tuning.clear();
11811 housekeeperIntervalMs = 1000;
11812 }
11813 };
11814
11815 static void to_json(nlohmann::json& j, const BridgingServerInternals& p)
11816 {
11817 j = nlohmann::json{
11818 TOJSON_IMPL(watchdog),
11819 TOJSON_IMPL(housekeeperIntervalMs),
11820 TOJSON_IMPL(tuning)
11821 };
11822 }
11823 static void from_json(const nlohmann::json& j, BridgingServerInternals& p)
11824 {
11825 p.clear();
11826 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
11827 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
11828 getOptional<TuningSettings>("tuning", p.tuning, j);
11829 }
11830
11831 //-----------------------------------------------------------
11832 JSON_SERIALIZED_CLASS(BridgingServerConfiguration)
11842 {
11843 IMPLEMENT_JSON_SERIALIZATION()
11844 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerConfiguration)
11845
11846 public:
11853 typedef enum
11854 {
11856 omRaw = 0,
11857
11860 omMultistream = 1,
11861
11864 omMixedStream = 2,
11865
11867 omADictatedByGroup = 3,
11868 } OpMode_t;
11869
11871 std::string id;
11872
11875
11878
11881
11884
11887
11890
11893
11896
11899
11902
11905
11908
11911
11914
11916 {
11917 clear();
11918 }
11919
11920 void clear()
11921 {
11922 id.clear();
11923 mode = omRaw;
11924 serviceConfigurationFileCheckSecs = 60;
11925 bridgingConfigurationFileName.clear();
11926 bridgingConfigurationFileCommand.clear();
11927 bridgingConfigurationFileCheckSecs = 60;
11928 statusReport.clear();
11929 externalHealthCheckResponder.clear();
11930 internals.clear();
11931 certStoreFileName.clear();
11932 certStorePasswordHex.clear();
11933 enginePolicy.clear();
11934 configurationCheckSignalName = "rts.6cc0651.${id}";
11935 fipsCrypto.clear();
11936 nsm.clear();
11937 }
11938 };
11939
11940 static void to_json(nlohmann::json& j, const BridgingServerConfiguration& p)
11941 {
11942 j = nlohmann::json{
11943 TOJSON_IMPL(id),
11944 TOJSON_IMPL(mode),
11945 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
11946 TOJSON_IMPL(bridgingConfigurationFileName),
11947 TOJSON_IMPL(bridgingConfigurationFileCommand),
11948 TOJSON_IMPL(bridgingConfigurationFileCheckSecs),
11949 TOJSON_IMPL(statusReport),
11950 TOJSON_IMPL(externalHealthCheckResponder),
11951 TOJSON_IMPL(internals),
11952 TOJSON_IMPL(certStoreFileName),
11953 TOJSON_IMPL(certStorePasswordHex),
11954 TOJSON_IMPL(enginePolicy),
11955 TOJSON_IMPL(configurationCheckSignalName),
11956 TOJSON_IMPL(fipsCrypto),
11957 TOJSON_IMPL(nsm)
11958 };
11959 }
11960 static void from_json(const nlohmann::json& j, BridgingServerConfiguration& p)
11961 {
11962 p.clear();
11963 getOptional<std::string>("id", p.id, j);
11964 getOptional<BridgingServerConfiguration::OpMode_t>("mode", p.mode, j, BridgingServerConfiguration::OpMode_t::omRaw);
11965 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
11966 getOptional<std::string>("bridgingConfigurationFileName", p.bridgingConfigurationFileName, j);
11967 getOptional<std::string>("bridgingConfigurationFileCommand", p.bridgingConfigurationFileCommand, j);
11968 getOptional<int>("bridgingConfigurationFileCheckSecs", p.bridgingConfigurationFileCheckSecs, j, 60);
11969 getOptional<BridgingServerStatusReportConfiguration>("statusReport", p.statusReport, j);
11970 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
11971 getOptional<BridgingServerInternals>("internals", p.internals, j);
11972 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
11973 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
11974 j.at("enginePolicy").get_to(p.enginePolicy);
11975 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.6cc0651.${id}");
11976 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
11977 getOptional<NsmConfiguration>("nsm", p.nsm, j);
11978 }
11979
11980
11981 //-----------------------------------------------------------
11982 JSON_SERIALIZED_CLASS(EarGroupsConfiguration)
11993 {
11994 IMPLEMENT_JSON_SERIALIZATION()
11995 IMPLEMENT_JSON_DOCUMENTATION(EarGroupsConfiguration)
11996
11997 public:
11999 std::vector<Group> groups;
12000
12002 {
12003 clear();
12004 }
12005
12006 void clear()
12007 {
12008 groups.clear();
12009 }
12010 };
12011
12012 static void to_json(nlohmann::json& j, const EarGroupsConfiguration& p)
12013 {
12014 j = nlohmann::json{
12015 TOJSON_IMPL(groups)
12016 };
12017 }
12018 static void from_json(const nlohmann::json& j, EarGroupsConfiguration& p)
12019 {
12020 p.clear();
12021 getOptional<std::vector<Group>>("groups", p.groups, j);
12022 }
12023
12024 //-----------------------------------------------------------
12025 JSON_SERIALIZED_CLASS(EarServerStatusReportConfiguration)
12036 {
12037 IMPLEMENT_JSON_SERIALIZATION()
12038 IMPLEMENT_JSON_DOCUMENTATION(EarServerStatusReportConfiguration)
12039
12040 public:
12042 std::string fileName;
12043
12046
12049
12051 std::string runCmd;
12052
12055
12057 {
12058 clear();
12059 }
12060
12061 void clear()
12062 {
12063 fileName.clear();
12064 intervalSecs = 60;
12065 enabled = false;
12066 includeGroupDetail = false;
12067 runCmd.clear();
12068 }
12069 };
12070
12071 static void to_json(nlohmann::json& j, const EarServerStatusReportConfiguration& p)
12072 {
12073 j = nlohmann::json{
12074 TOJSON_IMPL(fileName),
12075 TOJSON_IMPL(intervalSecs),
12076 TOJSON_IMPL(enabled),
12077 TOJSON_IMPL(includeGroupDetail),
12078 TOJSON_IMPL(runCmd)
12079 };
12080 }
12081 static void from_json(const nlohmann::json& j, EarServerStatusReportConfiguration& p)
12082 {
12083 p.clear();
12084 getOptional<std::string>("fileName", p.fileName, j);
12085 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
12086 getOptional<bool>("enabled", p.enabled, j, false);
12087 getOptional<std::string>("runCmd", p.runCmd, j);
12088 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
12089 }
12090
12091 //-----------------------------------------------------------
12092 JSON_SERIALIZED_CLASS(EarServerInternals)
12105 {
12106 IMPLEMENT_JSON_SERIALIZATION()
12107 IMPLEMENT_JSON_DOCUMENTATION(EarServerInternals)
12108
12109 public:
12112
12115
12118
12120 {
12121 clear();
12122 }
12123
12124 void clear()
12125 {
12126 watchdog.clear();
12127 tuning.clear();
12128 housekeeperIntervalMs = 1000;
12129 }
12130 };
12131
12132 static void to_json(nlohmann::json& j, const EarServerInternals& p)
12133 {
12134 j = nlohmann::json{
12135 TOJSON_IMPL(watchdog),
12136 TOJSON_IMPL(housekeeperIntervalMs),
12137 TOJSON_IMPL(tuning)
12138 };
12139 }
12140 static void from_json(const nlohmann::json& j, EarServerInternals& p)
12141 {
12142 p.clear();
12143 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
12144 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
12145 getOptional<TuningSettings>("tuning", p.tuning, j);
12146 }
12147
12148 //-----------------------------------------------------------
12149 JSON_SERIALIZED_CLASS(EarServerConfiguration)
12159 {
12160 IMPLEMENT_JSON_SERIALIZATION()
12161 IMPLEMENT_JSON_DOCUMENTATION(EarServerConfiguration)
12162
12163 public:
12164
12166 std::string id;
12167
12170
12173
12176
12179
12182
12185
12188
12191
12194
12197
12200
12203
12206
12208 {
12209 clear();
12210 }
12211
12212 void clear()
12213 {
12214 id.clear();
12215 serviceConfigurationFileCheckSecs = 60;
12216 groupsConfigurationFileName.clear();
12217 groupsConfigurationFileCommand.clear();
12218 groupsConfigurationFileCheckSecs = 60;
12219 statusReport.clear();
12220 externalHealthCheckResponder.clear();
12221 internals.clear();
12222 certStoreFileName.clear();
12223 certStorePasswordHex.clear();
12224 enginePolicy.clear();
12225 configurationCheckSignalName = "rts.9a164fa.${id}";
12226 fipsCrypto.clear();
12227 nsm.clear();
12228 }
12229 };
12230
12231 static void to_json(nlohmann::json& j, const EarServerConfiguration& p)
12232 {
12233 j = nlohmann::json{
12234 TOJSON_IMPL(id),
12235 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
12236 TOJSON_IMPL(groupsConfigurationFileName),
12237 TOJSON_IMPL(groupsConfigurationFileCommand),
12238 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
12239 TOJSON_IMPL(statusReport),
12240 TOJSON_IMPL(externalHealthCheckResponder),
12241 TOJSON_IMPL(internals),
12242 TOJSON_IMPL(certStoreFileName),
12243 TOJSON_IMPL(certStorePasswordHex),
12244 TOJSON_IMPL(enginePolicy),
12245 TOJSON_IMPL(configurationCheckSignalName),
12246 TOJSON_IMPL(fipsCrypto),
12247 TOJSON_IMPL(nsm)
12248 };
12249 }
12250 static void from_json(const nlohmann::json& j, EarServerConfiguration& p)
12251 {
12252 p.clear();
12253 getOptional<std::string>("id", p.id, j);
12254 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
12255 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
12256 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
12257 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
12258 getOptional<EarServerStatusReportConfiguration>("statusReport", p.statusReport, j);
12259 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
12260 getOptional<EarServerInternals>("internals", p.internals, j);
12261 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
12262 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
12263 j.at("enginePolicy").get_to(p.enginePolicy);
12264 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
12265 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
12266 getOptional<NsmConfiguration>("nsm", p.nsm, j);
12267 }
12268
12269//-----------------------------------------------------------
12270 JSON_SERIALIZED_CLASS(EngageSemGroupsConfiguration)
12281 {
12282 IMPLEMENT_JSON_SERIALIZATION()
12283 IMPLEMENT_JSON_DOCUMENTATION(EngageSemGroupsConfiguration)
12284
12285 public:
12287 std::vector<Group> groups;
12288
12290 {
12291 clear();
12292 }
12293
12294 void clear()
12295 {
12296 groups.clear();
12297 }
12298 };
12299
12300 static void to_json(nlohmann::json& j, const EngageSemGroupsConfiguration& p)
12301 {
12302 j = nlohmann::json{
12303 TOJSON_IMPL(groups)
12304 };
12305 }
12306 static void from_json(const nlohmann::json& j, EngageSemGroupsConfiguration& p)
12307 {
12308 p.clear();
12309 getOptional<std::vector<Group>>("groups", p.groups, j);
12310 }
12311
12312 //-----------------------------------------------------------
12313 JSON_SERIALIZED_CLASS(EngageSemServerStatusReportConfiguration)
12324 {
12325 IMPLEMENT_JSON_SERIALIZATION()
12326 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerStatusReportConfiguration)
12327
12328 public:
12330 std::string fileName;
12331
12334
12337
12339 std::string runCmd;
12340
12343
12345 {
12346 clear();
12347 }
12348
12349 void clear()
12350 {
12351 fileName.clear();
12352 intervalSecs = 60;
12353 enabled = false;
12354 includeGroupDetail = false;
12355 runCmd.clear();
12356 }
12357 };
12358
12359 static void to_json(nlohmann::json& j, const EngageSemServerStatusReportConfiguration& p)
12360 {
12361 j = nlohmann::json{
12362 TOJSON_IMPL(fileName),
12363 TOJSON_IMPL(intervalSecs),
12364 TOJSON_IMPL(enabled),
12365 TOJSON_IMPL(includeGroupDetail),
12366 TOJSON_IMPL(runCmd)
12367 };
12368 }
12369 static void from_json(const nlohmann::json& j, EngageSemServerStatusReportConfiguration& p)
12370 {
12371 p.clear();
12372 getOptional<std::string>("fileName", p.fileName, j);
12373 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
12374 getOptional<bool>("enabled", p.enabled, j, false);
12375 getOptional<std::string>("runCmd", p.runCmd, j);
12376 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
12377 }
12378
12379 //-----------------------------------------------------------
12380 JSON_SERIALIZED_CLASS(EngageSemServerInternals)
12393 {
12394 IMPLEMENT_JSON_SERIALIZATION()
12395 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerInternals)
12396
12397 public:
12400
12403
12406
12408 {
12409 clear();
12410 }
12411
12412 void clear()
12413 {
12414 watchdog.clear();
12415 tuning.clear();
12416 housekeeperIntervalMs = 1000;
12417 }
12418 };
12419
12420 static void to_json(nlohmann::json& j, const EngageSemServerInternals& p)
12421 {
12422 j = nlohmann::json{
12423 TOJSON_IMPL(watchdog),
12424 TOJSON_IMPL(housekeeperIntervalMs),
12425 TOJSON_IMPL(tuning)
12426 };
12427 }
12428 static void from_json(const nlohmann::json& j, EngageSemServerInternals& p)
12429 {
12430 p.clear();
12431 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
12432 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
12433 getOptional<TuningSettings>("tuning", p.tuning, j);
12434 }
12435
12436 //-----------------------------------------------------------
12437 JSON_SERIALIZED_CLASS(EngageSemServerConfiguration)
12447 {
12448 IMPLEMENT_JSON_SERIALIZATION()
12449 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerConfiguration)
12450
12451 public:
12452
12454 std::string id;
12455
12458
12461
12464
12467
12470
12473
12476
12479
12482
12485
12488
12491
12494
12495 int maxQueueLen;
12496 int minQueuingMs;
12497 int maxQueuingMs;
12498 int minPriority;
12499 int maxPriority;
12500
12502 {
12503 clear();
12504 }
12505
12506 void clear()
12507 {
12508 id.clear();
12509 serviceConfigurationFileCheckSecs = 60;
12510 groupsConfigurationFileName.clear();
12511 groupsConfigurationFileCommand.clear();
12512 groupsConfigurationFileCheckSecs = 60;
12513 statusReport.clear();
12514 externalHealthCheckResponder.clear();
12515 internals.clear();
12516 certStoreFileName.clear();
12517 certStorePasswordHex.clear();
12518 enginePolicy.clear();
12519 configurationCheckSignalName = "rts.9a164fa.${id}";
12520 fipsCrypto.clear();
12521 nsm.clear();
12522
12523 maxQueueLen = 64;
12524 minQueuingMs = 0;
12525 maxQueuingMs = 15000;
12526 minPriority = 0;
12527 maxPriority = 255;
12528 }
12529 };
12530
12531 static void to_json(nlohmann::json& j, const EngageSemServerConfiguration& p)
12532 {
12533 j = nlohmann::json{
12534 TOJSON_IMPL(id),
12535 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
12536 TOJSON_IMPL(groupsConfigurationFileName),
12537 TOJSON_IMPL(groupsConfigurationFileCommand),
12538 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
12539 TOJSON_IMPL(statusReport),
12540 TOJSON_IMPL(externalHealthCheckResponder),
12541 TOJSON_IMPL(internals),
12542 TOJSON_IMPL(certStoreFileName),
12543 TOJSON_IMPL(certStorePasswordHex),
12544 TOJSON_IMPL(enginePolicy),
12545 TOJSON_IMPL(configurationCheckSignalName),
12546 TOJSON_IMPL(fipsCrypto),
12547 TOJSON_IMPL(nsm),
12548 TOJSON_IMPL(maxQueueLen),
12549 TOJSON_IMPL(minQueuingMs),
12550 TOJSON_IMPL(maxQueuingMs),
12551 TOJSON_IMPL(minPriority),
12552 TOJSON_IMPL(maxPriority)
12553 };
12554 }
12555 static void from_json(const nlohmann::json& j, EngageSemServerConfiguration& p)
12556 {
12557 p.clear();
12558 getOptional<std::string>("id", p.id, j);
12559 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
12560 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
12561 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
12562 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
12563 getOptional<EngageSemServerStatusReportConfiguration>("statusReport", p.statusReport, j);
12564 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
12565 getOptional<EngageSemServerInternals>("internals", p.internals, j);
12566 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
12567 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
12568 j.at("enginePolicy").get_to(p.enginePolicy);
12569 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
12570 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
12571 getOptional<NsmConfiguration>("nsm", p.nsm, j);
12572 getOptional<int>("maxQueueLen", p.maxQueueLen, j, 64);
12573 getOptional<int>("minQueuingMs", p.minQueuingMs, j, 0);
12574 getOptional<int>("maxQueuingMs", p.maxQueuingMs, j, 15000);
12575 getOptional<int>("minPriority", p.minPriority, j, 0);
12576 getOptional<int>("maxPriority", p.maxPriority, j, 255);
12577 }
12578
12579 //-----------------------------------------------------------
12580 JSON_SERIALIZED_CLASS(EngateGroup)
12590 class EngateGroup : public Group
12591 {
12592 IMPLEMENT_JSON_SERIALIZATION()
12593 IMPLEMENT_JSON_DOCUMENTATION(EngateGroup)
12594
12595 public:
12596 bool useVad;
12597 uint32_t inputHangMs;
12598 uint32_t inputActivationPowerThreshold;
12599 uint32_t inputDeactivationPowerThreshold;
12600
12601 EngateGroup()
12602 {
12603 clear();
12604 }
12605
12606 void clear()
12607 {
12608 Group::clear();
12609 useVad = false;
12610 inputHangMs = 750;
12611 inputActivationPowerThreshold = 700;
12612 inputDeactivationPowerThreshold = 125;
12613 }
12614 };
12615
12616 static void to_json(nlohmann::json& j, const EngateGroup& p)
12617 {
12618 nlohmann::json g;
12619 to_json(g, static_cast<const Group&>(p));
12620
12621 j = nlohmann::json{
12622 TOJSON_IMPL(useVad),
12623 TOJSON_IMPL(inputHangMs),
12624 TOJSON_IMPL(inputActivationPowerThreshold),
12625 TOJSON_IMPL(inputDeactivationPowerThreshold)
12626 };
12627 }
12628 static void from_json(const nlohmann::json& j, EngateGroup& p)
12629 {
12630 p.clear();
12631 from_json(j, static_cast<Group&>(p));
12632 getOptional<uint32_t>("inputHangMs", p.inputHangMs, j, 750);
12633 getOptional<uint32_t>("inputActivationPowerThreshold", p.inputActivationPowerThreshold, j, 700);
12634 getOptional<uint32_t>("inputDeactivationPowerThreshold", p.inputDeactivationPowerThreshold, j, 125);
12635 }
12636
12637 //-----------------------------------------------------------
12638 JSON_SERIALIZED_CLASS(EngateGroupsConfiguration)
12649 {
12650 IMPLEMENT_JSON_SERIALIZATION()
12651 IMPLEMENT_JSON_DOCUMENTATION(EngateGroupsConfiguration)
12652
12653 public:
12655 std::vector<EngateGroup> groups;
12656
12658 {
12659 clear();
12660 }
12661
12662 void clear()
12663 {
12664 groups.clear();
12665 }
12666 };
12667
12668 static void to_json(nlohmann::json& j, const EngateGroupsConfiguration& p)
12669 {
12670 j = nlohmann::json{
12671 TOJSON_IMPL(groups)
12672 };
12673 }
12674 static void from_json(const nlohmann::json& j, EngateGroupsConfiguration& p)
12675 {
12676 p.clear();
12677 getOptional<std::vector<EngateGroup>>("groups", p.groups, j);
12678 }
12679
12680 //-----------------------------------------------------------
12681 JSON_SERIALIZED_CLASS(EngateServerStatusReportConfiguration)
12692 {
12693 IMPLEMENT_JSON_SERIALIZATION()
12694 IMPLEMENT_JSON_DOCUMENTATION(EngateServerStatusReportConfiguration)
12695
12696 public:
12698 std::string fileName;
12699
12702
12705
12707 std::string runCmd;
12708
12711
12713 {
12714 clear();
12715 }
12716
12717 void clear()
12718 {
12719 fileName.clear();
12720 intervalSecs = 60;
12721 enabled = false;
12722 includeGroupDetail = false;
12723 runCmd.clear();
12724 }
12725 };
12726
12727 static void to_json(nlohmann::json& j, const EngateServerStatusReportConfiguration& p)
12728 {
12729 j = nlohmann::json{
12730 TOJSON_IMPL(fileName),
12731 TOJSON_IMPL(intervalSecs),
12732 TOJSON_IMPL(enabled),
12733 TOJSON_IMPL(includeGroupDetail),
12734 TOJSON_IMPL(runCmd)
12735 };
12736 }
12737 static void from_json(const nlohmann::json& j, EngateServerStatusReportConfiguration& p)
12738 {
12739 p.clear();
12740 getOptional<std::string>("fileName", p.fileName, j);
12741 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
12742 getOptional<bool>("enabled", p.enabled, j, false);
12743 getOptional<std::string>("runCmd", p.runCmd, j);
12744 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
12745 }
12746
12747 //-----------------------------------------------------------
12748 JSON_SERIALIZED_CLASS(EngateServerInternals)
12761 {
12762 IMPLEMENT_JSON_SERIALIZATION()
12763 IMPLEMENT_JSON_DOCUMENTATION(EngateServerInternals)
12764
12765 public:
12768
12771
12774
12776 {
12777 clear();
12778 }
12779
12780 void clear()
12781 {
12782 watchdog.clear();
12783 tuning.clear();
12784 housekeeperIntervalMs = 1000;
12785 }
12786 };
12787
12788 static void to_json(nlohmann::json& j, const EngateServerInternals& p)
12789 {
12790 j = nlohmann::json{
12791 TOJSON_IMPL(watchdog),
12792 TOJSON_IMPL(housekeeperIntervalMs),
12793 TOJSON_IMPL(tuning)
12794 };
12795 }
12796 static void from_json(const nlohmann::json& j, EngateServerInternals& p)
12797 {
12798 p.clear();
12799 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
12800 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
12801 getOptional<TuningSettings>("tuning", p.tuning, j);
12802 }
12803
12804 //-----------------------------------------------------------
12805 JSON_SERIALIZED_CLASS(EngateServerConfiguration)
12815 {
12816 IMPLEMENT_JSON_SERIALIZATION()
12817 IMPLEMENT_JSON_DOCUMENTATION(EngateServerConfiguration)
12818
12819 public:
12820
12822 std::string id;
12823
12826
12829
12832
12835
12838
12841
12844
12847
12850
12853
12856
12859
12862
12864 {
12865 clear();
12866 }
12867
12868 void clear()
12869 {
12870 id.clear();
12871 serviceConfigurationFileCheckSecs = 60;
12872 groupsConfigurationFileName.clear();
12873 groupsConfigurationFileCommand.clear();
12874 groupsConfigurationFileCheckSecs = 60;
12875 statusReport.clear();
12876 externalHealthCheckResponder.clear();
12877 internals.clear();
12878 certStoreFileName.clear();
12879 certStorePasswordHex.clear();
12880 enginePolicy.clear();
12881 configurationCheckSignalName = "rts.9a164fa.${id}";
12882 fipsCrypto.clear();
12883 nsm.clear();
12884 }
12885 };
12886
12887 static void to_json(nlohmann::json& j, const EngateServerConfiguration& p)
12888 {
12889 j = nlohmann::json{
12890 TOJSON_IMPL(id),
12891 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
12892 TOJSON_IMPL(groupsConfigurationFileName),
12893 TOJSON_IMPL(groupsConfigurationFileCommand),
12894 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
12895 TOJSON_IMPL(statusReport),
12896 TOJSON_IMPL(externalHealthCheckResponder),
12897 TOJSON_IMPL(internals),
12898 TOJSON_IMPL(certStoreFileName),
12899 TOJSON_IMPL(certStorePasswordHex),
12900 TOJSON_IMPL(enginePolicy),
12901 TOJSON_IMPL(configurationCheckSignalName),
12902 TOJSON_IMPL(fipsCrypto),
12903 TOJSON_IMPL(nsm)
12904 };
12905 }
12906 static void from_json(const nlohmann::json& j, EngateServerConfiguration& p)
12907 {
12908 p.clear();
12909 getOptional<std::string>("id", p.id, j);
12910 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
12911 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
12912 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
12913 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
12914 getOptional<EngateServerStatusReportConfiguration>("statusReport", p.statusReport, j);
12915 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
12916 getOptional<EngateServerInternals>("internals", p.internals, j);
12917 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
12918 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
12919 j.at("enginePolicy").get_to(p.enginePolicy);
12920 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
12921 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
12922 getOptional<NsmConfiguration>("nsm", p.nsm, j);
12923 }
12924
12925 //-----------------------------------------------------------
12926 static inline void dumpExampleConfigurations(const char *path)
12927 {
12928 WatchdogSettings::document();
12929 FileRecordingRequest::document();
12930 Feature::document();
12931 Featureset::document();
12932 Agc::document();
12933 RtpPayloadTypeTranslation::document();
12934 NetworkInterfaceDevice::document();
12935 ListOfNetworkInterfaceDevice::document();
12936 RtpHeader::document();
12937 BlobInfo::document();
12938 TxAudioUri::document();
12939 AdvancedTxParams::document();
12940 Identity::document();
12941 Location::document();
12942 Power::document();
12943 Connectivity::document();
12944 PresenceDescriptorGroupItem::document();
12945 PresenceDescriptor::document();
12946 NetworkTxOptions::document();
12947 TcpNetworkTxOptions::document();
12948 NetworkAddress::document();
12949 NetworkAddressRxTx::document();
12950 NetworkAddressRestrictionList::document();
12951 StringRestrictionList::document();
12952 Rallypoint::document();
12953 RallypointCluster::document();
12954 NetworkDeviceDescriptor::document();
12955 TxAudio::document();
12956 AudioDeviceDescriptor::document();
12957 ListOfAudioDeviceDescriptor::document();
12958 Audio::document();
12959 TalkerInformation::document();
12960 GroupTalkers::document();
12961 Presence::document();
12962 Advertising::document();
12963 GroupPriorityTranslation::document();
12964 GroupTimeline::document();
12965 GroupAppTransport::document();
12966 RtpProfile::document();
12967 Group::document();
12968 Mission::document();
12969 LicenseDescriptor::document();
12970 EngineNetworkingRpUdpStreaming::document();
12971 EnginePolicyNetworking::document();
12972 Aec::document();
12973 Vad::document();
12974 Bridge::document();
12975 AndroidAudio::document();
12976 EnginePolicyAudio::document();
12977 SecurityCertificate::document();
12978 EnginePolicySecurity::document();
12979 EnginePolicyLogging::document();
12980 EnginePolicyDatabase::document();
12981 NamedAudioDevice::document();
12982 EnginePolicyNamedAudioDevices::document();
12983 Licensing::document();
12984 DiscoveryMagellan::document();
12985 DiscoverySsdp::document();
12986 DiscoverySap::document();
12987 DiscoveryCistech::document();
12988 DiscoveryTrellisware::document();
12989 DiscoveryConfiguration::document();
12990 EnginePolicyInternals::document();
12991 EnginePolicyTimelines::document();
12992 RtpMapEntry::document();
12993 ExternalModule::document();
12994 ExternalCodecDescriptor::document();
12995 EnginePolicy::document();
12996 TalkgroupAsset::document();
12997 EngageDiscoveredGroup::document();
12998 RallypointPeer::document();
12999 RallypointServerLimits::document();
13000 RallypointServerStatusReportConfiguration::document();
13001 RallypointServerLinkGraph::document();
13002 ExternalHealthCheckResponder::document();
13003 Tls::document();
13004 PeeringConfiguration::document();
13005 IgmpSnooping::document();
13006 RallypointReflector::document();
13007 RallypointUdpStreaming::document();
13008 RallypointServer::document();
13009 PlatformDiscoveredService::document();
13010 TimelineQueryParameters::document();
13011 CertStoreCertificate::document();
13012 CertStore::document();
13013 CertStoreCertificateElement::document();
13014 CertStoreDescriptor::document();
13015 CertificateDescriptor::document();
13016 BridgeCreationDetail::document();
13017 GroupConnectionDetail::document();
13018 GroupTxDetail::document();
13019 GroupCreationDetail::document();
13020 GroupReconfigurationDetail::document();
13021 GroupHealthReport::document();
13022 InboundProcessorStats::document();
13023 TrafficCounter::document();
13024 GroupStats::document();
13025 RallypointConnectionDetail::document();
13026 BridgingConfiguration::document();
13027 BridgingServerStatusReportConfiguration::document();
13028 BridgingServerInternals::document();
13029 BridgingServerConfiguration::document();
13030 EarGroupsConfiguration::document();
13031 EarServerStatusReportConfiguration::document();
13032 EarServerInternals::document();
13033 EarServerConfiguration::document();
13034 RangerPackets::document();
13035 TransportImpairment::document();
13036
13037 EngageSemGroupsConfiguration::document();
13038 EngageSemServerStatusReportConfiguration::document();
13039 EngageSemServerInternals::document();
13040 EngageSemServerConfiguration::document();
13041 }
13042}
13043
13044#ifndef WIN32
13045 #pragma GCC diagnostic pop
13046#endif
13047
13048#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 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.
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
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...
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.
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....
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...