Engage Engine API  1.256.9096
Real-time tactical communications engine API
Loading...
Searching...
No Matches
ConfigurationObjects.h
Go to the documentation of this file.
1//
2// Copyright (c) 2019 Rally Tactical Systems, Inc.
3// All rights reserved.
4//
5
20#ifndef ConfigurationObjects_h
21#define ConfigurationObjects_h
22
23#include "Platform.h"
24#include "EngageConstants.h"
25
26#include <iostream>
27#include <cstddef>
28#include <cstdint>
29#include <chrono>
30#include <vector>
31#include <string>
32
33#include <nlohmann/json.hpp>
34
35#ifndef WIN32
36 #pragma GCC diagnostic push
37 #pragma GCC diagnostic ignored "-Wunused-function"
38#endif
39
40#if !defined(ENGAGE_IGNORE_COMPILER_UNUSED_WARNING)
41 #if defined(__GNUC__)
42 #define ENGAGE_IGNORE_COMPILER_UNUSED_WARNING __attribute__((unused))
43 #else
44 #define ENGAGE_IGNORE_COMPILER_UNUSED_WARNING
45 #endif
46#endif // ENGAGE_IGNORE_COMPILER_UNUSED_WARNING
47
48// We'll use a different namespace depending on whether we're building the RTS core code
49// or if this is being included in an app-land project.
50#if defined(RTS_CORE_BUILD)
51namespace ConfigurationObjects
52#else
53namespace AppConfigurationObjects
54#endif
55{
56 static const char *ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT = "_attached";
57
58 //-----------------------------------------------------------
59 #pragma pack(push, 1)
60 typedef struct _DataSeriesHeader_t
61 {
76 uint8_t t;
77
81 uint32_t ts;
82
95 uint8_t it;
96
105 uint8_t im;
106
110 uint8_t vt;
111
115 uint8_t ss;
117
118 typedef struct _DataElementUint8_t
119 {
120 uint8_t ofs;
121 uint8_t val;
123
125 {
126 uint8_t ofs;
127 uint16_t val;
129
131 {
132 uint8_t ofs;
133 uint32_t val;
135
137 {
138 uint8_t ofs;
139 uint64_t val;
141 #pragma pack(pop)
142
143 typedef enum
144 {
145 invalid = 0,
146 uint8 = 1,
147 uint16 = 2,
148 uint32 = 3,
149 uint64 = 4
150 } DataSeriesValueType_t;
151
157 typedef enum
158 {
159 unknown = 0,
160 heartRate = 1,
161 skinTemp = 2,
162 coreTemp = 3,
163 hydration = 4,
164 bloodOxygenation = 5,
165 fatigueLevel = 6,
166 taskEffectiveness = 7
167 } HumanBiometricsTypes_t;
168
169 //-----------------------------------------------------------
170
171 static FILE *_internalFileOpener(const char *fn, const char *mode)
172 {
173 FILE *fp = nullptr;
174
175 #ifndef WIN32
176 fp = fopen(fn, mode);
177 #else
178 if(fopen_s(&fp, fn, mode) != 0)
179 {
180 fp = nullptr;
181 }
182 #endif
183
184 return fp;
185 }
186
187 #define JSON_SERIALIZED_CLASS(_cn) \
188 class _cn; \
189 static void to_json(nlohmann::json& j, const _cn& p); \
190 static void from_json(const nlohmann::json& j, _cn& p);
191
192 #define IMPLEMENT_JSON_DOCUMENTATION(_cn) \
193 public: \
194 static void document(const char *path = nullptr) \
195 { \
196 _cn example; \
197 example.initForDocumenting(); \
198 std::string theJson = example.serialize(3); \
199 std::cout << "------------------------------------------------" << std::endl \
200 << #_cn << std::endl \
201 << theJson << std::endl \
202 << "------------------------------------------------" << std::endl; \
203 \
204 if(path != nullptr && path[0] != 0) \
205 { \
206 std::string fn = path; \
207 fn.append("/"); \
208 fn.append(#_cn); \
209 fn.append(".json"); \
210 \
211 FILE *fp = _internalFileOpener(fn.c_str(), "wt");\
212 \
213 if(fp != nullptr) \
214 { \
215 fputs(theJson.c_str(), fp); \
216 fclose(fp); \
217 } \
218 else \
219 { \
220 std::cout << "ERROR: Cannot write to " << fn << std::endl; \
221 } \
222 } \
223 } \
224 static const char *className() \
225 { \
226 return #_cn; \
227 }
228
229 #define IMPLEMENT_JSON_SERIALIZATION() \
230 public: \
231 bool deserialize(const char *s) \
232 { \
233 try \
234 { \
235 if(s != nullptr && s[0] != 0) \
236 { \
237 from_json(nlohmann::json::parse(s), *this); \
238 } \
239 else \
240 { \
241 return false; \
242 } \
243 } \
244 catch(...) \
245 { \
246 return false; \
247 } \
248 return true; \
249 } \
250 \
251 std::string serialize(const int indent = -1) \
252 { \
253 try \
254 { \
255 nlohmann::json j; \
256 to_json(j, *this); \
257 return j.dump(indent); \
258 } \
259 catch(...) \
260 { \
261 return std::string("{}"); \
262 } \
263 }
264
265 #define IMPLEMENT_WRAPPED_JSON_SERIALIZATION(_cn) \
266 public: \
267 std::string serializeWrapped(const int indent = -1) \
268 { \
269 try \
270 { \
271 nlohmann::json j; \
272 to_json(j, *this); \
273 \
274 std::string rc; \
275 char firstChar[2]; \
276 firstChar[0] = #_cn[0]; \
277 firstChar[1] = 0; \
278 firstChar[0] = tolower(firstChar[0]); \
279 rc.assign("{\""); \
280 rc.append(firstChar); \
281 rc.append((#_cn) + 1); \
282 rc.append("\":"); \
283 rc.append(j.dump(indent)); \
284 rc.append("}"); \
285 \
286 return rc; \
287 } \
288 catch(...) \
289 { \
290 return std::string("{}"); \
291 } \
292 }
293
294 #define TOJSON_IMPL(__var) \
295 {#__var, p.__var}
296
297 #define FROMJSON_IMPL_SIMPLE(__var) \
298 getOptional(#__var, p.__var, j)
299
300 #define FROMJSON_IMPL(__var, __type, __default) \
301 getOptional<__type>(#__var, p.__var, j, __default)
302
303 #define TOJSON_BASE_IMPL() \
304 to_json(j, (ConfigurationObjectBase&)p)
305
306 #define FROMJSON_BASE_IMPL() \
307 from_json(j, (ConfigurationObjectBase&)p);
308
309
310 //-----------------------------------------------------------
311 static std::string EMPTY_STRING;
312
313 template<class T>
314 static void getOptional(const char *name, T& v, const nlohmann::json& j, T def)
315 {
316 try
317 {
318 if(j.contains(name))
319 {
320 j.at(name).get_to(v);
321 }
322 else
323 {
324 v = def;
325 }
326 }
327 catch(...)
328 {
329 v = def;
330 }
331 }
332
333 template<class T>
334 static void getOptional(const char *name, T& v, const nlohmann::json& j)
335 {
336 try
337 {
338 if(j.contains(name))
339 {
340 j.at(name).get_to(v);
341 }
342 }
343 catch(...)
344 {
345 }
346 }
347
348 template<class T>
349 static void getOptionalWithIndicator(const char *name, T& v, const nlohmann::json& j, T def, bool *wasFound)
350 {
351 try
352 {
353 if(j.contains(name))
354 {
355 j.at(name).get_to(v);
356 *wasFound = true;
357 }
358 else
359 {
360 v = def;
361 *wasFound = false;
362 }
363 }
364 catch(...)
365 {
366 v = def;
367 *wasFound = false;
368 }
369 }
370
371 template<class T>
372 static void getOptionalWithIndicator(const char *name, T& v, const nlohmann::json& j, bool *wasFound)
373 {
374 try
375 {
376 if(j.contains(name))
377 {
378 j.at(name).get_to(v);
379 *wasFound = true;
380 }
381 else
382 {
383 *wasFound = false;
384 }
385 }
386 catch(...)
387 {
388 *wasFound = false;
389 }
390 }
391
393 {
394 public:
396 {
397 _documenting = false;
398 }
399
401 {
402 }
403
404 virtual void initForDocumenting()
405 {
406 _documenting = true;
407 }
408
409 virtual std::string toString()
410 {
411 return std::string("");
412 }
413
414 inline virtual bool isDocumenting() const
415 {
416 return _documenting;
417 }
418
419 nlohmann::json _attached;
420
421 protected:
422 bool _documenting;
423 };
424
425 static void to_json(nlohmann::json& j, const ConfigurationObjectBase& p)
426 {
427 try
428 {
429 if(p._attached != nullptr)
430 {
431 j[ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT] = p._attached;
432 }
433 }
434 catch(...)
435 {
436 }
437 }
438 static void from_json(const nlohmann::json& j, ConfigurationObjectBase& p)
439 {
440 try
441 {
442 if(j.contains(ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT))
443 {
444 p._attached = j.at(ENGAGE_CONFIGURATION_OBJECT_ATTACHED_OBJECT);
445 }
446 }
447 catch(...)
448 {
449 }
450 }
451
452 //-----------------------------------------------------------
453 JSON_SERIALIZED_CLASS(KvPair)
461 {
462 IMPLEMENT_JSON_SERIALIZATION()
463 IMPLEMENT_JSON_DOCUMENTATION(KvPair)
464
465 public:
467 std::string key;
468
470 std::string value;
471
472 KvPair()
473 {
474 clear();
475 }
476
477 void clear()
478 {
479 key.clear();
480 value.clear();
481 }
482 };
483
484 static void to_json(nlohmann::json& j, const KvPair& p)
485 {
486 j = nlohmann::json{
487 TOJSON_IMPL(key),
488 TOJSON_IMPL(value)
489 };
490 }
491 static void from_json(const nlohmann::json& j, KvPair& p)
492 {
493 p.clear();
494 getOptional<std::string>("key", p.key, j, EMPTY_STRING);
495 getOptional<std::string>("tags", p.value, j, EMPTY_STRING);
496 }
497
498 //-----------------------------------------------------------
499 JSON_SERIALIZED_CLASS(TuningSettings)
501 {
502 IMPLEMENT_JSON_SERIALIZATION()
503 IMPLEMENT_JSON_DOCUMENTATION(TuningSettings)
504
505 public:
508
511
514
515
518
521
524
525
528
531
534
537
539 {
540 clear();
541 }
542
543 void clear()
544 {
545 maxPooledRtpMb = 0;
546 maxPooledRtpObjects = 0;
547 maxActiveRtpObjects = 0;
548
549 maxPooledBlobMb = 0;
550 maxPooledBlobObjects = 0;
551 maxActiveBlobObjects = 0;
552
553 maxPooledBufferMb = 0;
554 maxPooledBufferObjects = 0;
555 maxActiveBufferObjects = 0;
556
557 maxActiveRtpProcessors = 0;
558 }
559
560 virtual void initForDocumenting()
561 {
562 clear();
563 }
564 };
565
566 static void to_json(nlohmann::json& j, const TuningSettings& p)
567 {
568 j = nlohmann::json{
569 TOJSON_IMPL(maxPooledRtpMb),
570 TOJSON_IMPL(maxPooledRtpObjects),
571 TOJSON_IMPL(maxActiveRtpObjects),
572
573 TOJSON_IMPL(maxPooledBlobMb),
574 TOJSON_IMPL(maxPooledBlobObjects),
575 TOJSON_IMPL(maxActiveBlobObjects),
576
577 TOJSON_IMPL(maxPooledBufferMb),
578 TOJSON_IMPL(maxPooledBufferObjects),
579 TOJSON_IMPL(maxActiveBufferObjects),
580
581 TOJSON_IMPL(maxActiveRtpProcessors)
582 };
583 }
584 static void from_json(const nlohmann::json& j, TuningSettings& p)
585 {
586 p.clear();
587 FROMJSON_IMPL(maxPooledRtpMb, uint32_t, 0);
588 FROMJSON_IMPL(maxPooledRtpObjects, uint32_t, 0);
589 FROMJSON_IMPL(maxActiveRtpObjects, uint32_t, 0);
590
591 FROMJSON_IMPL(maxPooledBlobMb, uint32_t, 0);
592 FROMJSON_IMPL(maxPooledBlobObjects, uint32_t, 0);
593 FROMJSON_IMPL(maxActiveBlobObjects, uint32_t, 0);
594
595 FROMJSON_IMPL(maxPooledBufferMb, uint32_t, 0);
596 FROMJSON_IMPL(maxPooledBufferObjects, uint32_t, 0);
597 FROMJSON_IMPL(maxActiveBufferObjects, uint32_t, 0);
598
599 FROMJSON_IMPL(maxActiveRtpProcessors, uint32_t, 0);
600 }
601
602
603 //-----------------------------------------------------------
604 JSON_SERIALIZED_CLASS(FipsCryptoSettings)
606 {
607 IMPLEMENT_JSON_SERIALIZATION()
608 IMPLEMENT_JSON_DOCUMENTATION(FipsCryptoSettings)
609
610 public:
613
615 std::string path;
616
618 bool debug;
619
621 std::string curves;
622
624 std::string ciphers;
625
627 {
628 clear();
629 }
630
631 void clear()
632 {
633 enabled = false;
634 path.clear();
635 debug = false;
636 curves.clear();
637 ciphers.clear();
638 }
639
640 virtual void initForDocumenting()
641 {
642 clear();
643 }
644 };
645
646 static void to_json(nlohmann::json& j, const FipsCryptoSettings& p)
647 {
648 j = nlohmann::json{
649 TOJSON_IMPL(enabled),
650 TOJSON_IMPL(path),
651 TOJSON_IMPL(debug),
652 TOJSON_IMPL(curves),
653 TOJSON_IMPL(ciphers)
654 };
655 }
656 static void from_json(const nlohmann::json& j, FipsCryptoSettings& p)
657 {
658 p.clear();
659 FROMJSON_IMPL_SIMPLE(enabled);
660 FROMJSON_IMPL_SIMPLE(path);
661 FROMJSON_IMPL_SIMPLE(debug);
662 FROMJSON_IMPL_SIMPLE(curves);
663 FROMJSON_IMPL_SIMPLE(ciphers);
664 }
665
666
667 //-----------------------------------------------------------
668 JSON_SERIALIZED_CLASS(WatchdogSettings)
670 {
671 IMPLEMENT_JSON_SERIALIZATION()
672 IMPLEMENT_JSON_DOCUMENTATION(WatchdogSettings)
673
674 public:
677
680
683
686
689
691 {
692 clear();
693 }
694
695 void clear()
696 {
697 enabled = true;
698 intervalMs = 5000;
699 hangDetectionMs = 2000;
700 abortOnHang = true;
701 slowExecutionThresholdMs = 100;
702 }
703
704 virtual void initForDocumenting()
705 {
706 clear();
707 }
708 };
709
710 static void to_json(nlohmann::json& j, const WatchdogSettings& p)
711 {
712 j = nlohmann::json{
713 TOJSON_IMPL(enabled),
714 TOJSON_IMPL(intervalMs),
715 TOJSON_IMPL(hangDetectionMs),
716 TOJSON_IMPL(abortOnHang),
717 TOJSON_IMPL(slowExecutionThresholdMs)
718 };
719 }
720 static void from_json(const nlohmann::json& j, WatchdogSettings& p)
721 {
722 p.clear();
723 getOptional<bool>("enabled", p.enabled, j, true);
724 getOptional<int>("intervalMs", p.intervalMs, j, 5000);
725 getOptional<int>("hangDetectionMs", p.hangDetectionMs, j, 2000);
726 getOptional<bool>("abortOnHang", p.abortOnHang, j, true);
727 getOptional<int>("slowExecutionThresholdMs", p.slowExecutionThresholdMs, j, 100);
728 }
729
730
731 //-----------------------------------------------------------
732 JSON_SERIALIZED_CLASS(FileRecordingRequest)
734 {
735 IMPLEMENT_JSON_SERIALIZATION()
736 IMPLEMENT_JSON_DOCUMENTATION(FileRecordingRequest)
737
738 public:
739 std::string id;
740 std::string fileName;
741 uint32_t maxMs;
742
744 {
745 clear();
746 }
747
748 void clear()
749 {
750 id.clear();
751 fileName.clear();
752 maxMs = 60000;
753 }
754
755 virtual void initForDocumenting()
756 {
757 clear();
758 id = "1-2-3-4-5-6-7-8-9";
759 fileName = "/tmp/test.wav";
760 maxMs = 10000;
761 }
762 };
763
764 static void to_json(nlohmann::json& j, const FileRecordingRequest& p)
765 {
766 j = nlohmann::json{
767 TOJSON_IMPL(id),
768 TOJSON_IMPL(fileName),
769 TOJSON_IMPL(maxMs)
770 };
771 }
772 static void from_json(const nlohmann::json& j, FileRecordingRequest& p)
773 {
774 p.clear();
775 j.at("id").get_to(p.id);
776 j.at("fileName").get_to(p.fileName);
777 getOptional<uint32_t>("maxMs", p.maxMs, j, 60000);
778 }
779
780
781 //-----------------------------------------------------------
782 JSON_SERIALIZED_CLASS(Feature)
784 {
785 IMPLEMENT_JSON_SERIALIZATION()
786 IMPLEMENT_JSON_DOCUMENTATION(Feature)
787
788 public:
789 std::string id;
790 std::string name;
791 std::string description;
792 std::string comments;
793 int count;
794 int used; // NOTE: Ignored during deserialization!
795
796 Feature()
797 {
798 clear();
799 }
800
801 void clear()
802 {
803 id.clear();
804 name.clear();
805 description.clear();
806 comments.clear();
807 count = 0;
808 used = 0;
809 }
810
811 virtual void initForDocumenting()
812 {
813 clear();
814 id = "{af9540d1-3e86-4fa6-8b80-e26daecb61ab}";
815 name = "A sample feature";
816 description = "This is an example of a feature";
817 comments = "These are comments for this feature";
818 count = 42;
819 used = 16;
820 }
821 };
822
823 static void to_json(nlohmann::json& j, const Feature& p)
824 {
825 j = nlohmann::json{
826 TOJSON_IMPL(id),
827 TOJSON_IMPL(name),
828 TOJSON_IMPL(description),
829 TOJSON_IMPL(comments),
830 TOJSON_IMPL(count),
831 TOJSON_IMPL(used)
832 };
833 }
834 static void from_json(const nlohmann::json& j, Feature& p)
835 {
836 p.clear();
837 j.at("id").get_to(p.id);
838 getOptional("name", p.name, j);
839 getOptional("description", p.description, j);
840 getOptional("comments", p.comments, j);
841 getOptional("count", p.count, j, 0);
842
843 // NOTE: Not deserialized!
844 //getOptional("used", p.used, j, 0);
845 }
846
847
848 //-----------------------------------------------------------
849 JSON_SERIALIZED_CLASS(Featureset)
851 {
852 IMPLEMENT_JSON_SERIALIZATION()
853 IMPLEMENT_JSON_DOCUMENTATION(Featureset)
854
855 public:
856 std::string signature;
857 bool lockToDeviceId;
858 std::vector<Feature> features;
859
860 Featureset()
861 {
862 clear();
863 }
864
865 void clear()
866 {
867 signature.clear();
868 lockToDeviceId = false;
869 features.clear();
870 }
871
872 virtual void initForDocumenting()
873 {
874 clear();
875 signature = "c39df3f36c6444e686e47e70fc45cf91e6ed2d8de62d4a1e89f507d567ff48aaabb1a70e54b44377b46fc4a1a2e319e5b77e4abffc444db98f8eb55d709aad5f";
876 lockToDeviceId = false;
877 }
878 };
879
880 static void to_json(nlohmann::json& j, const Featureset& p)
881 {
882 j = nlohmann::json{
883 TOJSON_IMPL(signature),
884 TOJSON_IMPL(lockToDeviceId),
885 TOJSON_IMPL(features)
886 };
887 }
888 static void from_json(const nlohmann::json& j, Featureset& p)
889 {
890 p.clear();
891 getOptional("signature", p.signature, j);
892 getOptional<bool>("lockToDeviceId", p.lockToDeviceId, j, false);
893 getOptional<std::vector<Feature>>("features", p.features, j);
894 }
895
896
897 //-----------------------------------------------------------
898 JSON_SERIALIZED_CLASS(Agc)
908 {
909 IMPLEMENT_JSON_SERIALIZATION()
910 IMPLEMENT_JSON_DOCUMENTATION(Agc)
911
912 public:
915
918
921
924
927
930
931 Agc()
932 {
933 clear();
934 }
935
936 void clear()
937 {
938 enabled = false;
939 minLevel = 0;
940 maxLevel = 255;
941 compressionGainDb = 25;
942 enableLimiter = false;
943 targetLevelDb = 3;
944 }
945 };
946
947 static void to_json(nlohmann::json& j, const Agc& p)
948 {
949 j = nlohmann::json{
950 TOJSON_IMPL(enabled),
951 TOJSON_IMPL(minLevel),
952 TOJSON_IMPL(maxLevel),
953 TOJSON_IMPL(compressionGainDb),
954 TOJSON_IMPL(enableLimiter),
955 TOJSON_IMPL(targetLevelDb)
956 };
957 }
958 static void from_json(const nlohmann::json& j, Agc& p)
959 {
960 p.clear();
961 getOptional<bool>("enabled", p.enabled, j, false);
962 getOptional<int>("minLevel", p.minLevel, j, 0);
963 getOptional<int>("maxLevel", p.maxLevel, j, 255);
964 getOptional<int>("compressionGainDb", p.compressionGainDb, j, 25);
965 getOptional<bool>("enableLimiter", p.enableLimiter, j, false);
966 getOptional<int>("targetLevelDb", p.targetLevelDb, j, 3);
967 }
968
969
970 //-----------------------------------------------------------
971 JSON_SERIALIZED_CLASS(RtpPayloadTypeTranslation)
981 {
982 IMPLEMENT_JSON_SERIALIZATION()
983 IMPLEMENT_JSON_DOCUMENTATION(RtpPayloadTypeTranslation)
984
985 public:
987 uint16_t external;
988
990 uint16_t engage;
991
993 {
994 clear();
995 }
996
997 void clear()
998 {
999 external = 0;
1000 engage = 0;
1001 }
1002
1003 bool matches(const RtpPayloadTypeTranslation& other)
1004 {
1005 return ( (external == other.external) && (engage == other.engage) );
1006 }
1007 };
1008
1009 static void to_json(nlohmann::json& j, const RtpPayloadTypeTranslation& p)
1010 {
1011 j = nlohmann::json{
1012 TOJSON_IMPL(external),
1013 TOJSON_IMPL(engage)
1014 };
1015 }
1016 static void from_json(const nlohmann::json& j, RtpPayloadTypeTranslation& p)
1017 {
1018 p.clear();
1019 getOptional<uint16_t>("external", p.external, j);
1020 getOptional<uint16_t>("engage", p.engage, j);
1021 }
1022
1023 //-----------------------------------------------------------
1024 JSON_SERIALIZED_CLASS(NetworkInterfaceDevice)
1026 {
1027 IMPLEMENT_JSON_SERIALIZATION()
1028 IMPLEMENT_JSON_DOCUMENTATION(NetworkInterfaceDevice)
1029
1030 public:
1031 std::string name;
1032 std::string friendlyName;
1033 std::string description;
1034 int family;
1035 std::string address;
1036 bool available;
1037 bool isLoopback;
1038 bool supportsMulticast;
1039 std::string hardwareAddress;
1040
1042 {
1043 clear();
1044 }
1045
1046 void clear()
1047 {
1048 name.clear();
1049 friendlyName.clear();
1050 description.clear();
1051 family = -1;
1052 address.clear();
1053 available = false;
1054 isLoopback = false;
1055 supportsMulticast = false;
1056 hardwareAddress.clear();
1057 }
1058
1059 virtual void initForDocumenting()
1060 {
1061 clear();
1062 name = "en0";
1063 friendlyName = "Wi-Fi";
1064 description = "A wi-fi adapter";
1065 family = 1;
1066 address = "127.0.0.1";
1067 available = true;
1068 isLoopback = true;
1069 supportsMulticast = false;
1070 hardwareAddress = "DE:AD:BE:EF:01:02:03";
1071 }
1072 };
1073
1074 static void to_json(nlohmann::json& j, const NetworkInterfaceDevice& p)
1075 {
1076 j = nlohmann::json{
1077 TOJSON_IMPL(name),
1078 TOJSON_IMPL(friendlyName),
1079 TOJSON_IMPL(description),
1080 TOJSON_IMPL(family),
1081 TOJSON_IMPL(address),
1082 TOJSON_IMPL(available),
1083 TOJSON_IMPL(isLoopback),
1084 TOJSON_IMPL(supportsMulticast),
1085 TOJSON_IMPL(hardwareAddress)
1086 };
1087 }
1088 static void from_json(const nlohmann::json& j, NetworkInterfaceDevice& p)
1089 {
1090 p.clear();
1091 getOptional("name", p.name, j);
1092 getOptional("friendlyName", p.friendlyName, j);
1093 getOptional("description", p.description, j);
1094 getOptional("family", p.family, j, -1);
1095 getOptional("address", p.address, j);
1096 getOptional("available", p.available, j, false);
1097 getOptional("isLoopback", p.isLoopback, j, false);
1098 getOptional("supportsMulticast", p.supportsMulticast, j, false);
1099 getOptional("hardwareAddress", p.hardwareAddress, j);
1100 }
1101
1102 //-----------------------------------------------------------
1103 JSON_SERIALIZED_CLASS(ListOfNetworkInterfaceDevice)
1105 {
1106 IMPLEMENT_JSON_SERIALIZATION()
1107 IMPLEMENT_JSON_DOCUMENTATION(ListOfNetworkInterfaceDevice)
1108
1109 public:
1110 std::vector<NetworkInterfaceDevice> list;
1111
1113 {
1114 clear();
1115 }
1116
1117 void clear()
1118 {
1119 list.clear();
1120 }
1121 };
1122
1123 static void to_json(nlohmann::json& j, const ListOfNetworkInterfaceDevice& p)
1124 {
1125 j = nlohmann::json{
1126 TOJSON_IMPL(list)
1127 };
1128 }
1129 static void from_json(const nlohmann::json& j, ListOfNetworkInterfaceDevice& p)
1130 {
1131 p.clear();
1132 getOptional<std::vector<NetworkInterfaceDevice>>("list", p.list, j);
1133 }
1134
1135
1136 //-----------------------------------------------------------
1137 JSON_SERIALIZED_CLASS(RtpHeader)
1147 {
1148 IMPLEMENT_JSON_SERIALIZATION()
1149 IMPLEMENT_JSON_DOCUMENTATION(RtpHeader)
1150
1151 public:
1152
1154 int pt;
1155
1158
1160 uint16_t seq;
1161
1163 uint32_t ssrc;
1164
1166 uint32_t ts;
1167
1168 RtpHeader()
1169 {
1170 clear();
1171 }
1172
1173 void clear()
1174 {
1175 pt = -1;
1176 marker = false;
1177 seq = 0;
1178 ssrc = 0;
1179 ts = 0;
1180 }
1181
1182 virtual void initForDocumenting()
1183 {
1184 clear();
1185 pt = 0;
1186 marker = false;
1187 seq = 123;
1188 ssrc = 12345678;
1189 ts = 87654321;
1190 }
1191 };
1192
1193 static void to_json(nlohmann::json& j, const RtpHeader& p)
1194 {
1195 if(p.pt != -1)
1196 {
1197 j = nlohmann::json{
1198 TOJSON_IMPL(pt),
1199 TOJSON_IMPL(marker),
1200 TOJSON_IMPL(seq),
1201 TOJSON_IMPL(ssrc),
1202 TOJSON_IMPL(ts)
1203 };
1204 }
1205 }
1206 static void from_json(const nlohmann::json& j, RtpHeader& p)
1207 {
1208 p.clear();
1209 getOptional<int>("pt", p.pt, j, -1);
1210 getOptional<bool>("marker", p.marker, j, false);
1211 getOptional<uint16_t>("seq", p.seq, j, 0);
1212 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
1213 getOptional<uint32_t>("ts", p.ts, j, 0);
1214 }
1215
1216 //-----------------------------------------------------------
1217 JSON_SERIALIZED_CLASS(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
3442 /* CVSD */
3444 ctCvsd = 60
3445 } TxCodec_t;
3446
3449
3452
3454 std::string encoderName;
3455
3458
3461
3463 bool fdx;
3464
3472
3479
3486
3489
3492
3495
3500
3502 uint32_t internalKey;
3503
3506
3509
3511 bool dtx;
3512
3515
3516 TxAudio()
3517 {
3518 clear();
3519 }
3520
3521 void clear()
3522 {
3523 enabled = true;
3524 encoder = TxAudio::TxCodec_t::ctUnknown;
3525 encoderName.clear();
3526 framingMs = 60;
3527 blockCount = 0;
3528 fdx = false;
3529 noHdrExt = false;
3530 maxTxSecs = 0;
3531 extensionSendInterval = 10;
3532 initialHeaderBurst = 5;
3533 trailingHeaderBurst = 5;
3534 startTxNotifications = 5;
3535 customRtpPayloadType = -1;
3536 internalKey = 0;
3537 resetRtpOnTx = true;
3538 enableSmoothing = true;
3539 dtx = false;
3540 smoothedHangTimeMs = 0;
3541 }
3542 };
3543
3544 static void to_json(nlohmann::json& j, const TxAudio& p)
3545 {
3546 j = nlohmann::json{
3547 TOJSON_IMPL(enabled),
3548 TOJSON_IMPL(encoder),
3549 TOJSON_IMPL(encoderName),
3550 TOJSON_IMPL(framingMs),
3551 TOJSON_IMPL(blockCount),
3552 TOJSON_IMPL(fdx),
3553 TOJSON_IMPL(noHdrExt),
3554 TOJSON_IMPL(maxTxSecs),
3555 TOJSON_IMPL(extensionSendInterval),
3556 TOJSON_IMPL(initialHeaderBurst),
3557 TOJSON_IMPL(trailingHeaderBurst),
3558 TOJSON_IMPL(startTxNotifications),
3559 TOJSON_IMPL(customRtpPayloadType),
3560 TOJSON_IMPL(resetRtpOnTx),
3561 TOJSON_IMPL(enableSmoothing),
3562 TOJSON_IMPL(dtx),
3563 TOJSON_IMPL(smoothedHangTimeMs)
3564 };
3565
3566 // internalKey is not serialized
3567 }
3568 static void from_json(const nlohmann::json& j, TxAudio& p)
3569 {
3570 p.clear();
3571 getOptional<bool>("enabled", p.enabled, j, true);
3572 getOptional<TxAudio::TxCodec_t>("encoder", p.encoder, j, TxAudio::TxCodec_t::ctOpus8000);
3573 getOptional<std::string>("encoderName", p.encoderName, j, EMPTY_STRING);
3574 getOptional("framingMs", p.framingMs, j, 60);
3575 getOptional("blockCount", p.blockCount, j, 0);
3576 getOptional("fdx", p.fdx, j, false);
3577 getOptional("noHdrExt", p.noHdrExt, j, false);
3578 getOptional("maxTxSecs", p.maxTxSecs, j, 0);
3579 getOptional("extensionSendInterval", p.extensionSendInterval, j, 10);
3580 getOptional("initialHeaderBurst", p.initialHeaderBurst, j, 5);
3581 getOptional("trailingHeaderBurst", p.trailingHeaderBurst, j, 5);
3582 getOptional("startTxNotifications", p.startTxNotifications, j, 5);
3583 getOptional("customRtpPayloadType", p.customRtpPayloadType, j, -1);
3584 getOptional("resetRtpOnTx", p.resetRtpOnTx, j, true);
3585 getOptional("enableSmoothing", p.enableSmoothing, j, true);
3586 getOptional("dtx", p.dtx, j, false);
3587 getOptional("smoothedHangTimeMs", p.smoothedHangTimeMs, j, 0);
3588
3589 // internalKey is not serialized
3590 }
3591
3592 //-----------------------------------------------------------
3593 JSON_SERIALIZED_CLASS(AudioRegistryDevice)
3604 {
3605 IMPLEMENT_JSON_SERIALIZATION()
3606 IMPLEMENT_JSON_DOCUMENTATION(AudioRegistryDevice)
3607
3608 public:
3610 std::string hardwareId;
3611
3614
3616 std::string name;
3617
3619 std::string manufacturer;
3620
3622 std::string model;
3623
3625 std::string serialNumber;
3626
3627
3629 std::string type;
3630
3632 std::string extra;
3633
3635 {
3636 clear();
3637 }
3638
3639 void clear()
3640 {
3641 hardwareId.clear();
3642 isDefault = false;
3643 name.clear();
3644 manufacturer.clear();
3645 model.clear();
3646 serialNumber.clear();
3647 type.clear();
3648 extra.clear();
3649 }
3650
3651 virtual std::string toString()
3652 {
3653 char buff[2048];
3654
3655 snprintf(buff, sizeof(buff), "hardwareId=%s, isDefault=%d, name=%s, manufacturer=%s, model=%s, serialNumber=%s, type=%s, extra=%s",
3656 hardwareId.c_str(),
3657 (int)isDefault,
3658 name.c_str(),
3659 manufacturer.c_str(),
3660 model.c_str(),
3661 serialNumber.c_str(),
3662 type.c_str(),
3663 extra.c_str());
3664
3665 return std::string(buff);
3666 }
3667 };
3668
3669 static void to_json(nlohmann::json& j, const AudioRegistryDevice& p)
3670 {
3671 j = nlohmann::json{
3672 TOJSON_IMPL(hardwareId),
3673 TOJSON_IMPL(isDefault),
3674 TOJSON_IMPL(name),
3675 TOJSON_IMPL(manufacturer),
3676 TOJSON_IMPL(model),
3677 TOJSON_IMPL(serialNumber),
3678 TOJSON_IMPL(type),
3679 TOJSON_IMPL(extra)
3680 };
3681 }
3682 static void from_json(const nlohmann::json& j, AudioRegistryDevice& p)
3683 {
3684 p.clear();
3685 getOptional<std::string>("hardwareId", p.hardwareId, j, EMPTY_STRING);
3686 getOptional<bool>("isDefault", p.isDefault, j, false);
3687 getOptional("name", p.name, j);
3688 getOptional("manufacturer", p.manufacturer, j);
3689 getOptional("model", p.model, j);
3690 getOptional("serialNumber", p.serialNumber, j);
3691 getOptional("type", p.type, j);
3692 getOptional("extra", p.extra, j);
3693 }
3694
3695
3696 //-----------------------------------------------------------
3697 JSON_SERIALIZED_CLASS(AudioRegistry)
3708 {
3709 IMPLEMENT_JSON_SERIALIZATION()
3710 IMPLEMENT_JSON_DOCUMENTATION(AudioRegistry)
3711
3712 public:
3714 std::vector<AudioRegistryDevice> inputs;
3715
3717 std::vector<AudioRegistryDevice> outputs;
3718
3720 {
3721 clear();
3722 }
3723
3724 void clear()
3725 {
3726 inputs.clear();
3727 outputs.clear();
3728 }
3729
3730 virtual std::string toString()
3731 {
3732 return std::string("");
3733 }
3734 };
3735
3736 static void to_json(nlohmann::json& j, const AudioRegistry& p)
3737 {
3738 j = nlohmann::json{
3739 TOJSON_IMPL(inputs),
3740 TOJSON_IMPL(outputs)
3741 };
3742 }
3743 static void from_json(const nlohmann::json& j, AudioRegistry& p)
3744 {
3745 p.clear();
3746 getOptional<std::vector<AudioRegistryDevice>>("inputs", p.inputs, j);
3747 getOptional<std::vector<AudioRegistryDevice>>("outputs", p.outputs, j);
3748 }
3749
3750 //-----------------------------------------------------------
3751 JSON_SERIALIZED_CLASS(AudioDeviceDescriptor)
3762 {
3763 IMPLEMENT_JSON_SERIALIZATION()
3764 IMPLEMENT_JSON_DOCUMENTATION(AudioDeviceDescriptor)
3765
3766 public:
3767
3769 typedef enum
3770 {
3772 dirUnknown = 0,
3773
3776
3779
3781 dirBoth
3782 } Direction_t;
3783
3789
3797
3805
3808
3816
3819
3821 std::string name;
3822
3824 std::string manufacturer;
3825
3827 std::string model;
3828
3830 std::string hardwareId;
3831
3833 std::string serialNumber;
3834
3837
3839 std::string type;
3840
3842 std::string extra;
3843
3846
3848 {
3849 clear();
3850 }
3851
3852 void clear()
3853 {
3854 deviceId = 0;
3855 samplingRate = 0;
3856 channels = 0;
3857 direction = dirUnknown;
3858 boostPercentage = 0;
3859 isAdad = false;
3860 isDefault = false;
3861
3862 name.clear();
3863 manufacturer.clear();
3864 model.clear();
3865 hardwareId.clear();
3866 serialNumber.clear();
3867 type.clear();
3868 extra.clear();
3869 isPresent = false;
3870 }
3871
3872 virtual std::string toString()
3873 {
3874 char buff[2048];
3875
3876 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",
3877 deviceId,
3878 samplingRate,
3879 channels,
3880 (int)direction,
3881 boostPercentage,
3882 (int)isAdad,
3883 name.c_str(),
3884 manufacturer.c_str(),
3885 model.c_str(),
3886 hardwareId.c_str(),
3887 serialNumber.c_str(),
3888 (int)isDefault,
3889 type.c_str(),
3890 (int)isPresent,
3891 extra.c_str());
3892
3893 return std::string(buff);
3894 }
3895 };
3896
3897 static void to_json(nlohmann::json& j, const AudioDeviceDescriptor& p)
3898 {
3899 j = nlohmann::json{
3900 TOJSON_IMPL(deviceId),
3901 TOJSON_IMPL(samplingRate),
3902 TOJSON_IMPL(channels),
3903 TOJSON_IMPL(direction),
3904 TOJSON_IMPL(boostPercentage),
3905 TOJSON_IMPL(isAdad),
3906 TOJSON_IMPL(name),
3907 TOJSON_IMPL(manufacturer),
3908 TOJSON_IMPL(model),
3909 TOJSON_IMPL(hardwareId),
3910 TOJSON_IMPL(serialNumber),
3911 TOJSON_IMPL(isDefault),
3912 TOJSON_IMPL(type),
3913 TOJSON_IMPL(extra),
3914 TOJSON_IMPL(isPresent)
3915 };
3916 }
3917 static void from_json(const nlohmann::json& j, AudioDeviceDescriptor& p)
3918 {
3919 p.clear();
3920 getOptional<int>("deviceId", p.deviceId, j, 0);
3921 getOptional<int>("samplingRate", p.samplingRate, j, 0);
3922 getOptional<int>("channels", p.channels, j, 0);
3923 getOptional<AudioDeviceDescriptor::Direction_t>("direction", p.direction, j,
3924 AudioDeviceDescriptor::Direction_t::dirUnknown);
3925 getOptional<int>("boostPercentage", p.boostPercentage, j, 0);
3926
3927 getOptional<bool>("isAdad", p.isAdad, j, false);
3928 getOptional("name", p.name, j);
3929 getOptional("manufacturer", p.manufacturer, j);
3930 getOptional("model", p.model, j);
3931 getOptional("hardwareId", p.hardwareId, j);
3932 getOptional("serialNumber", p.serialNumber, j);
3933 getOptional("isDefault", p.isDefault, j);
3934 getOptional("type", p.type, j);
3935 getOptional("extra", p.extra, j);
3936 getOptional<bool>("isPresent", p.isPresent, j, false);
3937 }
3938
3939 //-----------------------------------------------------------
3940 JSON_SERIALIZED_CLASS(ListOfAudioDeviceDescriptor)
3942 {
3943 IMPLEMENT_JSON_SERIALIZATION()
3944 IMPLEMENT_JSON_DOCUMENTATION(ListOfAudioDeviceDescriptor)
3945
3946 public:
3947 std::vector<AudioDeviceDescriptor> list;
3948
3950 {
3951 clear();
3952 }
3953
3954 void clear()
3955 {
3956 list.clear();
3957 }
3958 };
3959
3960 static void to_json(nlohmann::json& j, const ListOfAudioDeviceDescriptor& p)
3961 {
3962 j = nlohmann::json{
3963 TOJSON_IMPL(list)
3964 };
3965 }
3966 static void from_json(const nlohmann::json& j, ListOfAudioDeviceDescriptor& p)
3967 {
3968 p.clear();
3969 getOptional<std::vector<AudioDeviceDescriptor>>("list", p.list, j);
3970 }
3971
3972 //-----------------------------------------------------------
3973 JSON_SERIALIZED_CLASS(Audio)
3982 {
3983 IMPLEMENT_JSON_SERIALIZATION()
3984 IMPLEMENT_JSON_DOCUMENTATION(Audio)
3985
3986 public:
3989
3992
3994 std::string inputHardwareId;
3995
3998
4001
4003 std::string outputHardwareId;
4004
4007
4010
4013
4016
4017 Audio()
4018 {
4019 clear();
4020 }
4021
4022 void clear()
4023 {
4024 enabled = true;
4025 inputId = 0;
4026 inputHardwareId.clear();
4027 inputGain = 0;
4028 outputId = 0;
4029 outputHardwareId.clear();
4030 outputGain = 0;
4031 outputLevelLeft = 100;
4032 outputLevelRight = 100;
4033 outputMuted = false;
4034 }
4035 };
4036
4037 static void to_json(nlohmann::json& j, const Audio& p)
4038 {
4039 j = nlohmann::json{
4040 TOJSON_IMPL(enabled),
4041 TOJSON_IMPL(inputId),
4042 TOJSON_IMPL(inputHardwareId),
4043 TOJSON_IMPL(inputGain),
4044 TOJSON_IMPL(outputId),
4045 TOJSON_IMPL(outputHardwareId),
4046 TOJSON_IMPL(outputLevelLeft),
4047 TOJSON_IMPL(outputLevelRight),
4048 TOJSON_IMPL(outputMuted)
4049 };
4050 }
4051 static void from_json(const nlohmann::json& j, Audio& p)
4052 {
4053 p.clear();
4054 getOptional<bool>("enabled", p.enabled, j, true);
4055 getOptional<int>("inputId", p.inputId, j, 0);
4056 getOptional<std::string>("inputHardwareId", p.inputHardwareId, j, EMPTY_STRING);
4057 getOptional<int>("inputGain", p.inputGain, j, 0);
4058 getOptional<int>("outputId", p.outputId, j, 0);
4059 getOptional<std::string>("outputHardwareId", p.outputHardwareId, j, EMPTY_STRING);
4060 getOptional<int>("outputGain", p.outputGain, j, 0);
4061 getOptional<int>("outputLevelLeft", p.outputLevelLeft, j, 100);
4062 getOptional<int>("outputLevelRight", p.outputLevelRight, j, 100);
4063 getOptional<bool>("outputMuted", p.outputMuted, j, false);
4064 }
4065
4066 //-----------------------------------------------------------
4067 JSON_SERIALIZED_CLASS(TalkerInformation)
4078 {
4079 IMPLEMENT_JSON_SERIALIZATION()
4080 IMPLEMENT_JSON_DOCUMENTATION(TalkerInformation)
4081
4082 public:
4086 typedef enum
4087 {
4089 matNone = 0,
4090
4092 matAnonymous = 1,
4093
4095 matSsrcGenerated = 2
4096 } ManufacturedAliasType_t;
4097
4099 std::string alias;
4100
4102 std::string nodeId;
4103
4105 uint16_t rxFlags;
4106
4109
4111 uint32_t txId;
4112
4115
4118
4121
4123 uint32_t ssrc;
4124
4127
4129 {
4130 clear();
4131 }
4132
4133 void clear()
4134 {
4135 alias.clear();
4136 nodeId.clear();
4137 rxFlags = 0;
4138 txPriority = 0;
4139 txId = 0;
4140 duplicateCount = 0;
4141 aliasSpecializer = 0;
4142 rxMuted = false;
4143 manufacturedAliasType = ManufacturedAliasType_t::matNone;
4144 ssrc = 0;
4145 }
4146 };
4147
4148 static void to_json(nlohmann::json& j, const TalkerInformation& p)
4149 {
4150 j = nlohmann::json{
4151 TOJSON_IMPL(alias),
4152 TOJSON_IMPL(nodeId),
4153 TOJSON_IMPL(rxFlags),
4154 TOJSON_IMPL(txPriority),
4155 TOJSON_IMPL(txId),
4156 TOJSON_IMPL(duplicateCount),
4157 TOJSON_IMPL(aliasSpecializer),
4158 TOJSON_IMPL(rxMuted),
4159 TOJSON_IMPL(manufacturedAliasType),
4160 TOJSON_IMPL(ssrc)
4161 };
4162 }
4163 static void from_json(const nlohmann::json& j, TalkerInformation& p)
4164 {
4165 p.clear();
4166 getOptional<std::string>("alias", p.alias, j, EMPTY_STRING);
4167 getOptional<std::string>("nodeId", p.nodeId, j, EMPTY_STRING);
4168 getOptional<uint16_t>("rxFlags", p.rxFlags, j, 0);
4169 getOptional<int>("txPriority", p.txPriority, j, 0);
4170 getOptional<uint32_t>("txId", p.txId, j, 0);
4171 getOptional<int>("duplicateCount", p.duplicateCount, j, 0);
4172 getOptional<uint16_t>("aliasSpecializer", p.aliasSpecializer, j, 0);
4173 getOptional<bool>("rxMuted", p.rxMuted, j, false);
4174 getOptional<TalkerInformation::ManufacturedAliasType_t>("manufacturedAliasType", p.manufacturedAliasType, j, TalkerInformation::ManufacturedAliasType_t::matNone);
4175 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
4176 }
4177
4178 //-----------------------------------------------------------
4179 JSON_SERIALIZED_CLASS(GroupTalkers)
4192 {
4193 IMPLEMENT_JSON_SERIALIZATION()
4194 IMPLEMENT_JSON_DOCUMENTATION(GroupTalkers)
4195
4196 public:
4198 std::vector<TalkerInformation> list;
4199
4200 GroupTalkers()
4201 {
4202 clear();
4203 }
4204
4205 void clear()
4206 {
4207 list.clear();
4208 }
4209 };
4210
4211 static void to_json(nlohmann::json& j, const GroupTalkers& p)
4212 {
4213 j = nlohmann::json{
4214 TOJSON_IMPL(list)
4215 };
4216 }
4217 static void from_json(const nlohmann::json& j, GroupTalkers& p)
4218 {
4219 p.clear();
4220 getOptional<std::vector<TalkerInformation>>("list", p.list, j);
4221 }
4222
4223 //-----------------------------------------------------------
4224 JSON_SERIALIZED_CLASS(Presence)
4235 {
4236 IMPLEMENT_JSON_SERIALIZATION()
4237 IMPLEMENT_JSON_DOCUMENTATION(Presence)
4238
4239 public:
4243 typedef enum
4244 {
4246 pfUnknown = 0,
4247
4249 pfEngage = 1,
4250
4257 pfCot = 2
4258 } Format_t;
4259
4262
4265
4268
4271
4274
4275 Presence()
4276 {
4277 clear();
4278 }
4279
4280 void clear()
4281 {
4282 format = pfUnknown;
4283 intervalSecs = 30;
4284 listenOnly = false;
4285 minIntervalSecs = 5;
4286 reduceImmediacy = false;
4287 }
4288 };
4289
4290 static void to_json(nlohmann::json& j, const Presence& p)
4291 {
4292 j = nlohmann::json{
4293 TOJSON_IMPL(format),
4294 TOJSON_IMPL(intervalSecs),
4295 TOJSON_IMPL(listenOnly),
4296 TOJSON_IMPL(minIntervalSecs),
4297 TOJSON_IMPL(reduceImmediacy)
4298 };
4299 }
4300 static void from_json(const nlohmann::json& j, Presence& p)
4301 {
4302 p.clear();
4303 getOptional<Presence::Format_t>("format", p.format, j, Presence::Format_t::pfEngage);
4304 getOptional<int>("intervalSecs", p.intervalSecs, j, 30);
4305 getOptional<bool>("listenOnly", p.listenOnly, j, false);
4306 getOptional<int>("minIntervalSecs", p.minIntervalSecs, j, 5);
4307 getOptional<bool>("reduceImmediacy", p.reduceImmediacy, j, false);
4308 }
4309
4310
4311 //-----------------------------------------------------------
4312 JSON_SERIALIZED_CLASS(Advertising)
4323 {
4324 IMPLEMENT_JSON_SERIALIZATION()
4325 IMPLEMENT_JSON_DOCUMENTATION(Advertising)
4326
4327 public:
4330
4333
4336
4337 Advertising()
4338 {
4339 clear();
4340 }
4341
4342 void clear()
4343 {
4344 enabled = false;
4345 intervalMs = 20000;
4346 alwaysAdvertise = false;
4347 }
4348 };
4349
4350 static void to_json(nlohmann::json& j, const Advertising& p)
4351 {
4352 j = nlohmann::json{
4353 TOJSON_IMPL(enabled),
4354 TOJSON_IMPL(intervalMs),
4355 TOJSON_IMPL(alwaysAdvertise)
4356 };
4357 }
4358 static void from_json(const nlohmann::json& j, Advertising& p)
4359 {
4360 p.clear();
4361 getOptional("enabled", p.enabled, j, false);
4362 getOptional<int>("intervalMs", p.intervalMs, j, 20000);
4363 getOptional<bool>("alwaysAdvertise", p.alwaysAdvertise, j, false);
4364 }
4365
4366 //-----------------------------------------------------------
4367 JSON_SERIALIZED_CLASS(GroupPriorityTranslation)
4378 {
4379 IMPLEMENT_JSON_SERIALIZATION()
4380 IMPLEMENT_JSON_DOCUMENTATION(GroupPriorityTranslation)
4381
4382 public:
4385
4388
4391
4393 {
4394 clear();
4395 }
4396
4397 void clear()
4398 {
4399 rx.clear();
4400 tx.clear();
4401 priority = 0;
4402 }
4403 };
4404
4405 static void to_json(nlohmann::json& j, const GroupPriorityTranslation& p)
4406 {
4407 j = nlohmann::json{
4408 TOJSON_IMPL(rx),
4409 TOJSON_IMPL(tx),
4410 TOJSON_IMPL(priority)
4411 };
4412 }
4413 static void from_json(const nlohmann::json& j, GroupPriorityTranslation& p)
4414 {
4415 p.clear();
4416 j.at("rx").get_to(p.rx);
4417 j.at("tx").get_to(p.tx);
4418 FROMJSON_IMPL(priority, int, 0);
4419 }
4420
4421 //-----------------------------------------------------------
4422 JSON_SERIALIZED_CLASS(GroupTimeline)
4435 {
4436 IMPLEMENT_JSON_SERIALIZATION()
4437 IMPLEMENT_JSON_DOCUMENTATION(GroupTimeline)
4438
4439 public:
4442
4445 bool recordAudio;
4446
4448 {
4449 clear();
4450 }
4451
4452 void clear()
4453 {
4454 enabled = true;
4455 maxAudioTimeMs = 30000;
4456 recordAudio = true;
4457 }
4458 };
4459
4460 static void to_json(nlohmann::json& j, const GroupTimeline& p)
4461 {
4462 j = nlohmann::json{
4463 TOJSON_IMPL(enabled),
4464 TOJSON_IMPL(maxAudioTimeMs),
4465 TOJSON_IMPL(recordAudio)
4466 };
4467 }
4468 static void from_json(const nlohmann::json& j, GroupTimeline& p)
4469 {
4470 p.clear();
4471 getOptional("enabled", p.enabled, j, true);
4472 getOptional<int>("maxAudioTimeMs", p.maxAudioTimeMs, j, 30000);
4473 getOptional("recordAudio", p.recordAudio, j, true);
4474 }
4475
4483 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_INTERNAL = "com.rallytac.engage.internal";
4485 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_CORE = "com.rallytac.magellan.core";
4487 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_CISTECH = "com.rallytac.engage.magellan.cistech";
4489 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_TRELLISWARE = "com.rallytac.engage.magellan.trellisware";
4491 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_SILVUS = "com.rallytac.engage.magellan.silvus";
4493 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_PERSISTENT = "com.rallytac.engage.magellan.persistent";
4495 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_DOMO = "com.rallytac.engage.magellan.domo";
4497 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_KENWOOD = "com.rallytac.engage.magellan.kenwood";
4499 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_TAIT = "com.rallytac.engage.magellan.tait";
4501 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_VOCALITY = "com.rallytac.engage.magellan.vocality";
4522
4547
4563 //-----------------------------------------------------------
4564 JSON_SERIALIZED_CLASS(GroupAppTransport)
4575 {
4576 IMPLEMENT_JSON_SERIALIZATION()
4577 IMPLEMENT_JSON_DOCUMENTATION(GroupAppTransport)
4578
4579 public:
4582
4584 std::string id;
4585
4587 {
4588 clear();
4589 }
4590
4591 void clear()
4592 {
4593 enabled = false;
4594 id.clear();
4595 }
4596 };
4597
4598 static void to_json(nlohmann::json& j, const GroupAppTransport& p)
4599 {
4600 j = nlohmann::json{
4601 TOJSON_IMPL(enabled),
4602 TOJSON_IMPL(id)
4603 };
4604 }
4605 static void from_json(const nlohmann::json& j, GroupAppTransport& p)
4606 {
4607 p.clear();
4608 getOptional<bool>("enabled", p.enabled, j, false);
4609 getOptional<std::string>("id", p.id, j);
4610 }
4611
4612 //-----------------------------------------------------------
4613 JSON_SERIALIZED_CLASS(RtpProfile)
4624 {
4625 IMPLEMENT_JSON_SERIALIZATION()
4626 IMPLEMENT_JSON_DOCUMENTATION(RtpProfile)
4627
4628 public:
4634 typedef enum
4635 {
4637 jmStandard = 0,
4638
4640 jmLowLatency = 1,
4641
4643 jmReleaseOnTxEnd = 2
4644 } JitterMode_t;
4645
4648
4651
4654
4657
4660
4663
4666
4669
4672
4675
4678
4681
4684
4687
4690
4693
4697
4698 RtpProfile()
4699 {
4700 clear();
4701 }
4702
4703 void clear()
4704 {
4705 mode = jmStandard;
4706 jitterMaxMs = 10000;
4707 jitterMinMs = 100;
4708 jitterMaxFactor = 8;
4709 jitterTrimPercentage = 10;
4710 jitterUnderrunReductionThresholdMs = 1500;
4711 jitterUnderrunReductionAger = 100;
4712 latePacketSequenceRange = 5;
4713 latePacketTimestampRangeMs = 2000;
4714 inboundProcessorInactivityMs = 500;
4715 jitterForceTrimAtMs = 0;
4716 rtcpPresenceTimeoutMs = 45000;
4717 jitterMaxExceededClipPerc = 10;
4718 jitterMaxExceededClipHangMs = 1500;
4719 zombieLifetimeMs = 15000;
4720 jitterMaxTrimMs = 250;
4721 signalledInboundProcessorInactivityMs = (inboundProcessorInactivityMs * 4);
4722 }
4723 };
4724
4725 static void to_json(nlohmann::json& j, const RtpProfile& p)
4726 {
4727 j = nlohmann::json{
4728 TOJSON_IMPL(mode),
4729 TOJSON_IMPL(jitterMaxMs),
4730 TOJSON_IMPL(inboundProcessorInactivityMs),
4731 TOJSON_IMPL(jitterMinMs),
4732 TOJSON_IMPL(jitterMaxFactor),
4733 TOJSON_IMPL(jitterTrimPercentage),
4734 TOJSON_IMPL(jitterUnderrunReductionThresholdMs),
4735 TOJSON_IMPL(jitterUnderrunReductionAger),
4736 TOJSON_IMPL(latePacketSequenceRange),
4737 TOJSON_IMPL(latePacketTimestampRangeMs),
4738 TOJSON_IMPL(inboundProcessorInactivityMs),
4739 TOJSON_IMPL(jitterForceTrimAtMs),
4740 TOJSON_IMPL(jitterMaxExceededClipPerc),
4741 TOJSON_IMPL(jitterMaxExceededClipHangMs),
4742 TOJSON_IMPL(zombieLifetimeMs),
4743 TOJSON_IMPL(jitterMaxTrimMs),
4744 TOJSON_IMPL(signalledInboundProcessorInactivityMs)
4745 };
4746 }
4747 static void from_json(const nlohmann::json& j, RtpProfile& p)
4748 {
4749 p.clear();
4750 FROMJSON_IMPL(mode, RtpProfile::JitterMode_t, RtpProfile::JitterMode_t::jmStandard);
4751 FROMJSON_IMPL(jitterMaxMs, int, 10000);
4752 FROMJSON_IMPL(jitterMinMs, int, 20);
4753 FROMJSON_IMPL(jitterMaxFactor, int, 8);
4754 FROMJSON_IMPL(jitterTrimPercentage, int, 10);
4755 FROMJSON_IMPL(jitterUnderrunReductionThresholdMs, int, 1500);
4756 FROMJSON_IMPL(jitterUnderrunReductionAger, int, 100);
4757 FROMJSON_IMPL(latePacketSequenceRange, int, 5);
4758 FROMJSON_IMPL(latePacketTimestampRangeMs, int, 2000);
4759 FROMJSON_IMPL(inboundProcessorInactivityMs, int, 500);
4760 FROMJSON_IMPL(jitterForceTrimAtMs, int, 0);
4761 FROMJSON_IMPL(rtcpPresenceTimeoutMs, int, 45000);
4762 FROMJSON_IMPL(jitterMaxExceededClipPerc, int, 10);
4763 FROMJSON_IMPL(jitterMaxExceededClipHangMs, int, 1500);
4764 FROMJSON_IMPL(zombieLifetimeMs, int, 15000);
4765 FROMJSON_IMPL(jitterMaxTrimMs, int, 250);
4766 FROMJSON_IMPL(signalledInboundProcessorInactivityMs, int, (p.inboundProcessorInactivityMs * 4));
4767 }
4768
4769 //-----------------------------------------------------------
4770 JSON_SERIALIZED_CLASS(Tls)
4781 {
4782 IMPLEMENT_JSON_SERIALIZATION()
4783 IMPLEMENT_JSON_DOCUMENTATION(Tls)
4784
4785 public:
4786
4789
4792
4794 std::vector<std::string> caCertificates;
4795
4798
4801
4803 std::vector<std::string> crlSerials;
4804
4805 Tls()
4806 {
4807 clear();
4808 }
4809
4810 void clear()
4811 {
4812 verifyPeers = true;
4813 allowSelfSignedCertificates = false;
4814 caCertificates.clear();
4815 subjectRestrictions.clear();
4816 issuerRestrictions.clear();
4817 crlSerials.clear();
4818 }
4819 };
4820
4821 static void to_json(nlohmann::json& j, const Tls& p)
4822 {
4823 j = nlohmann::json{
4824 TOJSON_IMPL(verifyPeers),
4825 TOJSON_IMPL(allowSelfSignedCertificates),
4826 TOJSON_IMPL(caCertificates),
4827 TOJSON_IMPL(subjectRestrictions),
4828 TOJSON_IMPL(issuerRestrictions),
4829 TOJSON_IMPL(crlSerials)
4830 };
4831 }
4832 static void from_json(const nlohmann::json& j, Tls& p)
4833 {
4834 p.clear();
4835 getOptional<bool>("verifyPeers", p.verifyPeers, j, true);
4836 getOptional<bool>("allowSelfSignedCertificates", p.allowSelfSignedCertificates, j, false);
4837 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
4838 getOptional<StringRestrictionList>("subjectRestrictions", p.subjectRestrictions, j);
4839 getOptional<StringRestrictionList>("issuerRestrictions", p.issuerRestrictions, j);
4840 getOptional<std::vector<std::string>>("crlSerials", p.crlSerials, j);
4841 }
4842
4843 //-----------------------------------------------------------
4844 JSON_SERIALIZED_CLASS(RangerPackets)
4857 {
4858 IMPLEMENT_JSON_SERIALIZATION()
4859 IMPLEMENT_JSON_DOCUMENTATION(RangerPackets)
4860
4861 public:
4864
4867
4869 {
4870 clear();
4871 }
4872
4873 void clear()
4874 {
4875 hangTimerSecs = -1;
4876 count = 5;
4877 }
4878
4879 virtual void initForDocumenting()
4880 {
4881 }
4882 };
4883
4884 static void to_json(nlohmann::json& j, const RangerPackets& p)
4885 {
4886 j = nlohmann::json{
4887 TOJSON_IMPL(hangTimerSecs),
4888 TOJSON_IMPL(count)
4889 };
4890 }
4891 static void from_json(const nlohmann::json& j, RangerPackets& p)
4892 {
4893 p.clear();
4894 getOptional<int>("hangTimerSecs", p.hangTimerSecs, j, 11);
4895 getOptional<int>("count", p.count, j, 5);
4896 }
4897
4898 //-----------------------------------------------------------
4899 JSON_SERIALIZED_CLASS(Source)
4912 {
4913 IMPLEMENT_JSON_SERIALIZATION()
4914 IMPLEMENT_JSON_DOCUMENTATION(Source)
4915
4916 public:
4918 std::string nodeId;
4919
4920 /* NOTE: Not serialized ! */
4921 uint8_t _internal_binary_nodeId[ENGAGE_MAX_NODE_ID_SIZE];
4922
4924 std::string alias;
4925
4926 /* NOTE: Not serialized ! */
4927 uint8_t _internal_binary_alias[ENGAGE_MAX_ALIAS_SIZE];
4928
4929 Source()
4930 {
4931 clear();
4932 }
4933
4934 void clear()
4935 {
4936 nodeId.clear();
4937 memset(_internal_binary_nodeId, 0, sizeof(_internal_binary_nodeId));
4938
4939 alias.clear();
4940 memset(_internal_binary_alias, 0, sizeof(_internal_binary_alias));
4941 }
4942
4943 virtual void initForDocumenting()
4944 {
4945 }
4946 };
4947
4948 static void to_json(nlohmann::json& j, const Source& p)
4949 {
4950 j = nlohmann::json{
4951 TOJSON_IMPL(nodeId),
4952 TOJSON_IMPL(alias)
4953 };
4954 }
4955 static void from_json(const nlohmann::json& j, Source& p)
4956 {
4957 p.clear();
4958 FROMJSON_IMPL_SIMPLE(nodeId);
4959 FROMJSON_IMPL_SIMPLE(alias);
4960 }
4961
4962 //-----------------------------------------------------------
4963 JSON_SERIALIZED_CLASS(GroupBridgeTargetOutputDetail)
4976 {
4977 IMPLEMENT_JSON_SERIALIZATION()
4978 IMPLEMENT_JSON_DOCUMENTATION(GroupBridgeTargetOutputDetail)
4979
4980 public:
4982 typedef enum
4983 {
4987 bomRaw = 0,
4988
4991 bomMultistream = 1,
4992
4995 bomMixedStream = 2,
4996
4998 bomNone = 3
4999 } BridgingOpMode_t;
5000
5003
5006
5008 {
5009 clear();
5010 }
5011
5012 void clear()
5013 {
5014 mode = BridgingOpMode_t::bomRaw;
5015 mixedStreamTxParams.clear();
5016 }
5017
5018 virtual void initForDocumenting()
5019 {
5020 clear();
5021 }
5022 };
5023
5024 static void to_json(nlohmann::json& j, const GroupBridgeTargetOutputDetail& p)
5025 {
5026 j = nlohmann::json{
5027 TOJSON_IMPL(mode),
5028 TOJSON_IMPL(mixedStreamTxParams)
5029 };
5030 }
5031 static void from_json(const nlohmann::json& j, GroupBridgeTargetOutputDetail& p)
5032 {
5033 p.clear();
5034 FROMJSON_IMPL_SIMPLE(mode);
5035 FROMJSON_IMPL_SIMPLE(mixedStreamTxParams);
5036 }
5037
5038 //-----------------------------------------------------------
5039 JSON_SERIALIZED_CLASS(GroupDefaultAudioPriority)
5052 {
5053 IMPLEMENT_JSON_SERIALIZATION()
5054 IMPLEMENT_JSON_DOCUMENTATION(GroupDefaultAudioPriority)
5055
5056 public:
5058 uint8_t tx;
5059
5061 uint8_t rx;
5062
5064 {
5065 clear();
5066 }
5067
5068 void clear()
5069 {
5070 tx = 0;
5071 rx = 0;
5072 }
5073
5074 virtual void initForDocumenting()
5075 {
5076 clear();
5077 }
5078 };
5079
5080 static void to_json(nlohmann::json& j, const GroupDefaultAudioPriority& p)
5081 {
5082 j = nlohmann::json{
5083 TOJSON_IMPL(tx),
5084 TOJSON_IMPL(rx)
5085 };
5086 }
5087 static void from_json(const nlohmann::json& j, GroupDefaultAudioPriority& p)
5088 {
5089 p.clear();
5090 FROMJSON_IMPL_SIMPLE(tx);
5091 FROMJSON_IMPL_SIMPLE(rx);
5092 }
5093
5094 //-----------------------------------------------------------
5095 JSON_SERIALIZED_CLASS(Group)
5107 {
5108 IMPLEMENT_JSON_SERIALIZATION()
5109 IMPLEMENT_JSON_DOCUMENTATION(Group)
5110
5111 public:
5113 typedef enum
5114 {
5116 gtUnknown = 0,
5117
5119 gtAudio = 1,
5120
5122 gtPresence = 2,
5123
5125 gtRaw = 3
5126 } Type_t;
5127
5129 typedef enum
5130 {
5132 iagpAnonymousAlias = 0,
5133
5135 iagpSsrcInHex = 1
5136 } InboundAliasGenerationPolicy_t;
5137
5140
5143
5146
5153 std::string id;
5154
5156 std::string name;
5157
5159 std::string spokenName;
5160
5162 std::string interfaceName;
5163
5166
5169
5172
5175
5178
5180 std::string cryptoPassword;
5181
5184
5186 std::vector<Rallypoint> rallypoints;
5187
5190
5193
5202
5204 std::string alias;
5205
5208
5210 std::string source;
5211
5218
5221
5224
5227
5229 std::vector<std::string> presenceGroupAffinities;
5230
5233
5236
5238 std::vector<RtpPayloadTypeTranslation> inboundRtpPayloadTypeTranslations;
5239
5242
5245
5247 std::string anonymousAlias;
5248
5251
5254
5257
5260
5263
5266
5269
5271 std::vector<uint16_t> specializerAffinities;
5272
5275
5277 std::vector<Source> ignoreSources;
5278
5280 std::string languageCode;
5281
5283 std::string synVoice;
5284
5287
5290
5293
5296
5299
5302
5303 Group()
5304 {
5305 clear();
5306 }
5307
5308 void clear()
5309 {
5310 type = gtUnknown;
5311 bridgeTargetOutputDetail.clear();
5312 defaultAudioPriority.clear();
5313 id.clear();
5314 name.clear();
5315 spokenName.clear();
5316 interfaceName.clear();
5317 rx.clear();
5318 tx.clear();
5319 txOptions.clear();
5320 txAudio.clear();
5321 presence.clear();
5322 cryptoPassword.clear();
5323
5324 alias.clear();
5325
5326 rallypoints.clear();
5327 rallypointCluster.clear();
5328
5329 audio.clear();
5330 timeline.clear();
5331
5332 blockAdvertising = false;
5333
5334 source.clear();
5335
5336 maxRxSecs = 0;
5337
5338 enableMulticastFailover = false;
5339 multicastFailoverSecs = 10;
5340
5341 rtcpPresenceRx.clear();
5342
5343 presenceGroupAffinities.clear();
5344 disablePacketEvents = false;
5345
5346 rfc4733RtpPayloadId = 0;
5347 inboundRtpPayloadTypeTranslations.clear();
5348 priorityTranslation.clear();
5349
5350 stickyTidHangSecs = 10;
5351 anonymousAlias.clear();
5352 lbCrypto = false;
5353
5354 appTransport.clear();
5355 allowLoopback = false;
5356
5357 rtpProfile.clear();
5358 rangerPackets.clear();
5359
5360 _wasDeserialized_rtpProfile = false;
5361
5362 txImpairment.clear();
5363 rxImpairment.clear();
5364
5365 specializerAffinities.clear();
5366
5367 securityLevel = 0;
5368
5369 ignoreSources.clear();
5370
5371 languageCode.clear();
5372 synVoice.clear();
5373
5374 rxCapture.clear();
5375 txCapture.clear();
5376
5377 blobRtpPayloadType = ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE;
5378 inboundAliasGenerationPolicy = iagpAnonymousAlias;
5379 gateIn.clear();
5380
5381 ignoreAudioTraffic = false;
5382 }
5383 };
5384
5385 static void to_json(nlohmann::json& j, const Group& p)
5386 {
5387 j = nlohmann::json{
5388 TOJSON_IMPL(type),
5389 TOJSON_IMPL(bridgeTargetOutputDetail),
5390 TOJSON_IMPL(defaultAudioPriority),
5391 TOJSON_IMPL(id),
5392 TOJSON_IMPL(name),
5393 TOJSON_IMPL(spokenName),
5394 TOJSON_IMPL(interfaceName),
5395 TOJSON_IMPL(rx),
5396 TOJSON_IMPL(tx),
5397 TOJSON_IMPL(txOptions),
5398 TOJSON_IMPL(txAudio),
5399 TOJSON_IMPL(presence),
5400 TOJSON_IMPL(cryptoPassword),
5401 TOJSON_IMPL(alias),
5402
5403 // See below
5404 //TOJSON_IMPL(rallypoints),
5405 //TOJSON_IMPL(rallypointCluster),
5406
5407 TOJSON_IMPL(alias),
5408 TOJSON_IMPL(audio),
5409 TOJSON_IMPL(timeline),
5410 TOJSON_IMPL(blockAdvertising),
5411 TOJSON_IMPL(source),
5412 TOJSON_IMPL(maxRxSecs),
5413 TOJSON_IMPL(enableMulticastFailover),
5414 TOJSON_IMPL(multicastFailoverSecs),
5415 TOJSON_IMPL(rtcpPresenceRx),
5416 TOJSON_IMPL(presenceGroupAffinities),
5417 TOJSON_IMPL(disablePacketEvents),
5418 TOJSON_IMPL(rfc4733RtpPayloadId),
5419 TOJSON_IMPL(inboundRtpPayloadTypeTranslations),
5420 TOJSON_IMPL(priorityTranslation),
5421 TOJSON_IMPL(stickyTidHangSecs),
5422 TOJSON_IMPL(anonymousAlias),
5423 TOJSON_IMPL(lbCrypto),
5424 TOJSON_IMPL(appTransport),
5425 TOJSON_IMPL(allowLoopback),
5426 TOJSON_IMPL(rangerPackets),
5427
5428 TOJSON_IMPL(txImpairment),
5429 TOJSON_IMPL(rxImpairment),
5430
5431 TOJSON_IMPL(specializerAffinities),
5432
5433 TOJSON_IMPL(securityLevel),
5434
5435 TOJSON_IMPL(ignoreSources),
5436
5437 TOJSON_IMPL(languageCode),
5438 TOJSON_IMPL(synVoice),
5439
5440 TOJSON_IMPL(rxCapture),
5441 TOJSON_IMPL(txCapture),
5442
5443 TOJSON_IMPL(blobRtpPayloadType),
5444
5445 TOJSON_IMPL(inboundAliasGenerationPolicy),
5446
5447 TOJSON_IMPL(gateIn),
5448
5449 TOJSON_IMPL(ignoreAudioTraffic)
5450 };
5451
5452 TOJSON_BASE_IMPL();
5453
5454 // TODO: need a better way to indicate whether rtpProfile is present
5455 if(p._wasDeserialized_rtpProfile || p.isDocumenting())
5456 {
5457 j["rtpProfile"] = p.rtpProfile;
5458 }
5459
5460 if(p.isDocumenting())
5461 {
5462 j["rallypointCluster"] = p.rallypointCluster;
5463 j["rallypoints"] = p.rallypoints;
5464 }
5465 else
5466 {
5467 // rallypointCluster takes precedence if it has elements
5468 if(!p.rallypointCluster.rallypoints.empty())
5469 {
5470 j["rallypointCluster"] = p.rallypointCluster;
5471 }
5472 else if(!p.rallypoints.empty())
5473 {
5474 j["rallypoints"] = p.rallypoints;
5475 }
5476 }
5477 }
5478 static void from_json(const nlohmann::json& j, Group& p)
5479 {
5480 p.clear();
5481 j.at("type").get_to(p.type);
5482 getOptional<GroupBridgeTargetOutputDetail>("bridgeTargetOutputDetail", p.bridgeTargetOutputDetail, j);
5483 j.at("id").get_to(p.id);
5484 getOptional<std::string>("name", p.name, j);
5485 getOptional<std::string>("spokenName", p.spokenName, j);
5486 getOptional<std::string>("interfaceName", p.interfaceName, j);
5487 getOptional<NetworkAddress>("rx", p.rx, j);
5488 getOptional<NetworkAddress>("tx", p.tx, j);
5489 getOptional<NetworkTxOptions>("txOptions", p.txOptions, j);
5490 getOptional<std::string>("cryptoPassword", p.cryptoPassword, j);
5491 getOptional<std::string>("alias", p.alias, j);
5492 getOptional<TxAudio>("txAudio", p.txAudio, j);
5493 getOptional<Presence>("presence", p.presence, j);
5494 getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
5495 getOptional<RallypointCluster>("rallypointCluster", p.rallypointCluster, j);
5496 getOptional<Audio>("audio", p.audio, j);
5497 getOptional<GroupTimeline>("timeline", p.timeline, j);
5498 getOptional<bool>("blockAdvertising", p.blockAdvertising, j, false);
5499 getOptional<std::string>("source", p.source, j);
5500 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
5501 getOptional<bool>("enableMulticastFailover", p.enableMulticastFailover, j, false);
5502 getOptional<int>("multicastFailoverSecs", p.multicastFailoverSecs, j, 10);
5503 getOptional<NetworkAddress>("rtcpPresenceRx", p.rtcpPresenceRx, j);
5504 getOptional<std::vector<std::string>>("presenceGroupAffinities", p.presenceGroupAffinities, j);
5505 getOptional<bool>("disablePacketEvents", p.disablePacketEvents, j, false);
5506 getOptional<int>("rfc4733RtpPayloadId", p.rfc4733RtpPayloadId, j, 0);
5507 getOptional<std::vector<RtpPayloadTypeTranslation>>("inboundRtpPayloadTypeTranslations", p.inboundRtpPayloadTypeTranslations, j);
5508 getOptional<GroupPriorityTranslation>("priorityTranslation", p.priorityTranslation, j);
5509 getOptional<GroupDefaultAudioPriority>("defaultAudioPriority", p.defaultAudioPriority, j);
5510 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
5511 getOptional<std::string>("anonymousAlias", p.anonymousAlias, j);
5512 getOptional<bool>("lbCrypto", p.lbCrypto, j, false);
5513 getOptional<GroupAppTransport>("appTransport", p.appTransport, j);
5514 getOptional<bool>("allowLoopback", p.allowLoopback, j, false);
5515 getOptionalWithIndicator<RtpProfile>("rtpProfile", p.rtpProfile, j, &p._wasDeserialized_rtpProfile);
5516 getOptional<RangerPackets>("rangerPackets", p.rangerPackets, j);
5517 getOptional<TransportImpairment>("txImpairment", p.txImpairment, j);
5518 getOptional<TransportImpairment>("rxImpairment", p.rxImpairment, j);
5519 getOptional<std::vector<uint16_t>>("specializerAffinities", p.specializerAffinities, j);
5520 getOptional<uint32_t>("securityLevel", p.securityLevel, j, 0);
5521 getOptional<std::vector<Source>>("ignoreSources", p.ignoreSources, j);
5522 getOptional<std::string>("languageCode", p.languageCode, j);
5523 getOptional<std::string>("synVoice", p.synVoice, j);
5524
5525 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
5526 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
5527
5528 getOptional<uint16_t>("blobRtpPayloadType", p.blobRtpPayloadType, j, ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE);
5529
5530 getOptional<Group::InboundAliasGenerationPolicy_t>("inboundAliasGenerationPolicy", p.inboundAliasGenerationPolicy, j, Group::InboundAliasGenerationPolicy_t::iagpAnonymousAlias);
5531
5532 getOptional<AudioGate>("gateIn", p.gateIn, j);
5533
5534 getOptional<bool>("ignoreAudioTraffic", p.ignoreAudioTraffic, j, false);
5535
5536 FROMJSON_BASE_IMPL();
5537 }
5538
5539
5540 //-----------------------------------------------------------
5541 JSON_SERIALIZED_CLASS(Mission)
5543 {
5544 IMPLEMENT_JSON_SERIALIZATION()
5545 IMPLEMENT_JSON_DOCUMENTATION(Mission)
5546
5547 public:
5548 std::string id;
5549 std::string name;
5550 std::vector<Group> groups;
5551 std::chrono::system_clock::time_point begins;
5552 std::chrono::system_clock::time_point ends;
5553 std::string certStoreId;
5554 int multicastFailoverPolicy;
5555 Rallypoint rallypoint;
5556
5557 void clear()
5558 {
5559 id.clear();
5560 name.clear();
5561 groups.clear();
5562 certStoreId.clear();
5563 multicastFailoverPolicy = 0;
5564 rallypoint.clear();
5565 }
5566 };
5567
5568 static void to_json(nlohmann::json& j, const Mission& p)
5569 {
5570 j = nlohmann::json{
5571 TOJSON_IMPL(id),
5572 TOJSON_IMPL(name),
5573 TOJSON_IMPL(groups),
5574 TOJSON_IMPL(certStoreId),
5575 TOJSON_IMPL(multicastFailoverPolicy),
5576 TOJSON_IMPL(rallypoint)
5577 };
5578 }
5579
5580 static void from_json(const nlohmann::json& j, Mission& p)
5581 {
5582 p.clear();
5583 j.at("id").get_to(p.id);
5584 j.at("name").get_to(p.name);
5585
5586 // Groups are optional
5587 try
5588 {
5589 j.at("groups").get_to(p.groups);
5590 }
5591 catch(...)
5592 {
5593 p.groups.clear();
5594 }
5595
5596 FROMJSON_IMPL(certStoreId, std::string, EMPTY_STRING);
5597 FROMJSON_IMPL(multicastFailoverPolicy, int, 0);
5598 getOptional<Rallypoint>("rallypoint", p.rallypoint, j);
5599 }
5600
5601 //-----------------------------------------------------------
5602 JSON_SERIALIZED_CLASS(LicenseDescriptor)
5613 {
5614 IMPLEMENT_JSON_SERIALIZATION()
5615 IMPLEMENT_JSON_DOCUMENTATION(LicenseDescriptor)
5616
5617 public:
5623 static const int STATUS_OK = 0;
5624 static const int ERR_NULL_ENTITLEMENT_KEY = -1;
5625 static const int ERR_NULL_LICENSE_KEY = -2;
5626 static const int ERR_INVALID_LICENSE_KEY_LEN = -3;
5627 static const int ERR_LICENSE_KEY_VERIFICATION_FAILURE = -4;
5628 static const int ERR_ACTIVATION_CODE_VERIFICATION_FAILURE = -5;
5629 static const int ERR_INVALID_EXPIRATION_DATE = -6;
5630 static const int ERR_GENERAL_FAILURE = -7;
5631 static const int ERR_NOT_INITIALIZED = -8;
5632 static const int ERR_REQUIRES_ACTIVATION = -9;
5633 static const int ERR_LICENSE_NOT_SUITED_FOR_ACTIVATION = -10;
5641 static const uint8_t LIC_CARGO_FLAG_LIMIT_TO_FEATURES = 0x01;
5652 std::string entitlement;
5653
5660 std::string key;
5661
5663 std::string activationCode;
5664
5666 std::string deviceId;
5667
5669 int type;
5670
5672 time_t expires;
5673
5675 std::string expiresFormatted;
5676
5681 uint32_t flags;
5682
5684 std::string cargo;
5685
5687 uint8_t cargoFlags;
5688
5694
5696 std::string manufacturerId;
5697
5699 std::string activationHmac;
5700
5702 {
5703 clear();
5704 }
5705
5706 void clear()
5707 {
5708 entitlement.clear();
5709 key.clear();
5710 activationCode.clear();
5711 type = 0;
5712 expires = 0;
5713 expiresFormatted.clear();
5714 flags = 0;
5715 cargo.clear();
5716 cargoFlags = 0;
5717 deviceId.clear();
5718 status = ERR_NOT_INITIALIZED;
5719 manufacturerId.clear();
5720 activationHmac.clear();
5721 }
5722 };
5723
5724 static void to_json(nlohmann::json& j, const LicenseDescriptor& p)
5725 {
5726 j = nlohmann::json{
5727 //TOJSON_IMPL(entitlement),
5728 {"entitlement", "*entitlement*"},
5729 TOJSON_IMPL(key),
5730 TOJSON_IMPL(activationCode),
5731 TOJSON_IMPL(type),
5732 TOJSON_IMPL(expires),
5733 TOJSON_IMPL(expiresFormatted),
5734 TOJSON_IMPL(flags),
5735 TOJSON_IMPL(deviceId),
5736 TOJSON_IMPL(status),
5737 //TOJSON_IMPL(manufacturerId),
5738 {"manufacturerId", "*manufacturerId*"},
5739 TOJSON_IMPL(cargo),
5740 TOJSON_IMPL(cargoFlags),
5741 TOJSON_IMPL(activationHmac)
5742 };
5743 }
5744
5745 static void from_json(const nlohmann::json& j, LicenseDescriptor& p)
5746 {
5747 p.clear();
5748 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
5749 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
5750 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
5751 FROMJSON_IMPL(type, int, 0);
5752 FROMJSON_IMPL(expires, time_t, 0);
5753 FROMJSON_IMPL(expiresFormatted, std::string, EMPTY_STRING);
5754 FROMJSON_IMPL(flags, uint32_t, 0);
5755 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
5756 FROMJSON_IMPL(status, int, LicenseDescriptor::ERR_NOT_INITIALIZED);
5757 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
5758 FROMJSON_IMPL(cargo, std::string, EMPTY_STRING);
5759 FROMJSON_IMPL(cargoFlags, uint8_t, 0);
5760 FROMJSON_IMPL(activationHmac, std::string, EMPTY_STRING);
5761 }
5762
5763
5764 //-----------------------------------------------------------
5765 JSON_SERIALIZED_CLASS(EngineNetworkingRpUdpStreaming)
5778 {
5779 IMPLEMENT_JSON_SERIALIZATION()
5780 IMPLEMENT_JSON_DOCUMENTATION(EngineNetworkingRpUdpStreaming)
5781
5782 public:
5785
5787 int port;
5788
5791
5794
5796 int ttl;
5797
5799 {
5800 clear();
5801 }
5802
5803 void clear()
5804 {
5805 enabled = false;
5806 port = 0;
5807 keepaliveIntervalSecs = 15;
5808 priority = TxPriority_t::priVoice;
5809 ttl = 64;
5810 }
5811
5812 virtual void initForDocumenting()
5813 {
5814 }
5815 };
5816
5817 static void to_json(nlohmann::json& j, const EngineNetworkingRpUdpStreaming& p)
5818 {
5819 j = nlohmann::json{
5820 TOJSON_IMPL(enabled),
5821 TOJSON_IMPL(port),
5822 TOJSON_IMPL(keepaliveIntervalSecs),
5823 TOJSON_IMPL(priority),
5824 TOJSON_IMPL(ttl)
5825 };
5826 }
5827 static void from_json(const nlohmann::json& j, EngineNetworkingRpUdpStreaming& p)
5828 {
5829 p.clear();
5830 getOptional<bool>("enabled", p.enabled, j, false);
5831 getOptional<int>("port", p.port, j, 0);
5832 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
5833 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
5834 getOptional<int>("ttl", p.ttl, j, 64);
5835 }
5836
5837 //-----------------------------------------------------------
5838 JSON_SERIALIZED_CLASS(EnginePolicyNetworking)
5848 {
5849 IMPLEMENT_JSON_SERIALIZATION()
5850 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNetworking)
5851
5852 public:
5854 std::string defaultNic;
5855
5858
5861
5864
5867
5870
5873
5876
5878 {
5879 clear();
5880 }
5881
5882 void clear()
5883 {
5884 defaultNic.clear();
5885 multicastRejoinSecs = 8;
5886 rallypointRtTestIntervalMs = 60000;
5887 logRtpJitterBufferStats = false;
5888 preventMulticastFailover = false;
5889 addressResolutionPolicy = AddressResolutionPolicy_t::arpIpv6ThenIpv4;
5890
5891 rpUdpStreaming.clear();
5892 rtpProfile.clear();
5893 }
5894 };
5895
5896 static void to_json(nlohmann::json& j, const EnginePolicyNetworking& p)
5897 {
5898 j = nlohmann::json{
5899 TOJSON_IMPL(defaultNic),
5900 TOJSON_IMPL(multicastRejoinSecs),
5901
5902 TOJSON_IMPL(rallypointRtTestIntervalMs),
5903 TOJSON_IMPL(logRtpJitterBufferStats),
5904 TOJSON_IMPL(preventMulticastFailover),
5905
5906 TOJSON_IMPL(rpUdpStreaming),
5907 TOJSON_IMPL(rtpProfile),
5908 TOJSON_IMPL(addressResolutionPolicy)
5909 };
5910 }
5911 static void from_json(const nlohmann::json& j, EnginePolicyNetworking& p)
5912 {
5913 p.clear();
5914 FROMJSON_IMPL(defaultNic, std::string, EMPTY_STRING);
5915 FROMJSON_IMPL(multicastRejoinSecs, int, 8);
5916 FROMJSON_IMPL(rallypointRtTestIntervalMs, int, 60000);
5917 FROMJSON_IMPL(logRtpJitterBufferStats, bool, false);
5918 FROMJSON_IMPL(preventMulticastFailover, bool, false);
5919
5920 getOptional<EngineNetworkingRpUdpStreaming>("rpUdpStreaming", p.rpUdpStreaming, j);
5921 getOptional<RtpProfile>("rtpProfile", p.rtpProfile, j);
5922 getOptional<AddressResolutionPolicy_t>("addressResolutionPolicy", p.addressResolutionPolicy, j, AddressResolutionPolicy_t::arpIpv6ThenIpv4);
5923 }
5924
5925 //-----------------------------------------------------------
5926 JSON_SERIALIZED_CLASS(Aec)
5937 {
5938 IMPLEMENT_JSON_SERIALIZATION()
5939 IMPLEMENT_JSON_DOCUMENTATION(Aec)
5940
5941 public:
5947 typedef enum
5948 {
5950 aecmDefault = 0,
5951
5953 aecmLow = 1,
5954
5956 aecmMedium = 2,
5957
5959 aecmHigh = 3,
5960
5962 aecmVeryHigh = 4,
5963
5965 aecmHighest = 5
5966 } Mode_t;
5967
5970
5973
5976
5978 bool cng;
5979
5980 Aec()
5981 {
5982 clear();
5983 }
5984
5985 void clear()
5986 {
5987 enabled = false;
5988 mode = aecmDefault;
5989 speakerTailMs = 60;
5990 cng = true;
5991 }
5992 };
5993
5994 static void to_json(nlohmann::json& j, const Aec& p)
5995 {
5996 j = nlohmann::json{
5997 TOJSON_IMPL(enabled),
5998 TOJSON_IMPL(mode),
5999 TOJSON_IMPL(speakerTailMs),
6000 TOJSON_IMPL(cng)
6001 };
6002 }
6003 static void from_json(const nlohmann::json& j, Aec& p)
6004 {
6005 p.clear();
6006 FROMJSON_IMPL(enabled, bool, false);
6007 FROMJSON_IMPL(mode, Aec::Mode_t, Aec::Mode_t::aecmDefault);
6008 FROMJSON_IMPL(speakerTailMs, int, 60);
6009 FROMJSON_IMPL(cng, bool, true);
6010 }
6011
6012 //-----------------------------------------------------------
6013 JSON_SERIALIZED_CLASS(Vad)
6024 {
6025 IMPLEMENT_JSON_SERIALIZATION()
6026 IMPLEMENT_JSON_DOCUMENTATION(Vad)
6027
6028 public:
6034 typedef enum
6035 {
6037 vamDefault = 0,
6038
6040 vamLowBitRate = 1,
6041
6043 vamAggressive = 2,
6044
6046 vamVeryAggressive = 3
6047 } Mode_t;
6048
6051
6054
6055 Vad()
6056 {
6057 clear();
6058 }
6059
6060 void clear()
6061 {
6062 enabled = false;
6063 mode = vamDefault;
6064 }
6065 };
6066
6067 static void to_json(nlohmann::json& j, const Vad& p)
6068 {
6069 j = nlohmann::json{
6070 TOJSON_IMPL(enabled),
6071 TOJSON_IMPL(mode)
6072 };
6073 }
6074 static void from_json(const nlohmann::json& j, Vad& p)
6075 {
6076 p.clear();
6077 FROMJSON_IMPL(enabled, bool, false);
6078 FROMJSON_IMPL(mode, Vad::Mode_t, Vad::Mode_t::vamDefault);
6079 }
6080
6081 //-----------------------------------------------------------
6082 JSON_SERIALIZED_CLASS(Bridge)
6093 {
6094 IMPLEMENT_JSON_SERIALIZATION()
6095 IMPLEMENT_JSON_DOCUMENTATION(Bridge)
6096
6097 public:
6099 std::string id;
6100
6102 std::string name;
6103
6105 std::vector<std::string> groups;
6106
6111
6112 Bridge()
6113 {
6114 clear();
6115 }
6116
6117 void clear()
6118 {
6119 id.clear();
6120 name.clear();
6121 groups.clear();
6122 enabled = true;
6123 }
6124 };
6125
6126 static void to_json(nlohmann::json& j, const Bridge& p)
6127 {
6128 j = nlohmann::json{
6129 TOJSON_IMPL(id),
6130 TOJSON_IMPL(name),
6131 TOJSON_IMPL(groups),
6132 TOJSON_IMPL(enabled)
6133 };
6134 }
6135 static void from_json(const nlohmann::json& j, Bridge& p)
6136 {
6137 p.clear();
6138 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
6139 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
6140 getOptional<std::vector<std::string>>("groups", p.groups, j);
6141 FROMJSON_IMPL(enabled, bool, true);
6142 }
6143
6144 //-----------------------------------------------------------
6145 JSON_SERIALIZED_CLASS(AndroidAudio)
6156 {
6157 IMPLEMENT_JSON_SERIALIZATION()
6158 IMPLEMENT_JSON_DOCUMENTATION(AndroidAudio)
6159
6160 public:
6161 constexpr static int INVALID_SESSION_ID = -9999;
6162
6164 int api;
6165
6168
6171
6187
6195
6205
6208
6211
6212
6213 AndroidAudio()
6214 {
6215 clear();
6216 }
6217
6218 void clear()
6219 {
6220 api = 0;
6221 sharingMode = 0;
6222 performanceMode = 12;
6223 usage = 2;
6224 contentType = 1;
6225 inputPreset = 7;
6226 sessionId = AndroidAudio::INVALID_SESSION_ID;
6227 engineMode = 0;
6228 }
6229 };
6230
6231 static void to_json(nlohmann::json& j, const AndroidAudio& p)
6232 {
6233 j = nlohmann::json{
6234 TOJSON_IMPL(api),
6235 TOJSON_IMPL(sharingMode),
6236 TOJSON_IMPL(performanceMode),
6237 TOJSON_IMPL(usage),
6238 TOJSON_IMPL(contentType),
6239 TOJSON_IMPL(inputPreset),
6240 TOJSON_IMPL(sessionId),
6241 TOJSON_IMPL(engineMode)
6242 };
6243 }
6244 static void from_json(const nlohmann::json& j, AndroidAudio& p)
6245 {
6246 p.clear();
6247 FROMJSON_IMPL(api, int, 0);
6248 FROMJSON_IMPL(sharingMode, int, 0);
6249 FROMJSON_IMPL(performanceMode, int, 12);
6250 FROMJSON_IMPL(usage, int, 2);
6251 FROMJSON_IMPL(contentType, int, 1);
6252 FROMJSON_IMPL(inputPreset, int, 7);
6253 FROMJSON_IMPL(sessionId, int, AndroidAudio::INVALID_SESSION_ID);
6254 FROMJSON_IMPL(engineMode, int, 0);
6255 }
6256
6257 //-----------------------------------------------------------
6258 JSON_SERIALIZED_CLASS(EnginePolicyAudio)
6269 {
6270 IMPLEMENT_JSON_SERIALIZATION()
6271 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyAudio)
6272
6273 public:
6276
6279
6282
6285
6288
6291
6294
6297
6300
6303
6306
6309
6312
6315
6318
6319
6321 {
6322 clear();
6323 }
6324
6325 void clear()
6326 {
6327 enabled = true;
6328 hardwareEnabled = true;
6329 internalRate = 16000;
6330 internalChannels = 2;
6331 muteTxOnTx = false;
6332 aec.clear();
6333 vad.clear();
6334 android.clear();
6335 inputAgc.clear();
6336 outputAgc.clear();
6337 denoiseInput = false;
6338 denoiseOutput = false;
6339 saveInputPcm = false;
6340 saveOutputPcm = false;
6341 registry.clear();
6342 }
6343 };
6344
6345 static void to_json(nlohmann::json& j, const EnginePolicyAudio& p)
6346 {
6347 j = nlohmann::json{
6348 TOJSON_IMPL(enabled),
6349 TOJSON_IMPL(hardwareEnabled),
6350 TOJSON_IMPL(internalRate),
6351 TOJSON_IMPL(internalChannels),
6352 TOJSON_IMPL(muteTxOnTx),
6353 TOJSON_IMPL(aec),
6354 TOJSON_IMPL(vad),
6355 TOJSON_IMPL(android),
6356 TOJSON_IMPL(inputAgc),
6357 TOJSON_IMPL(outputAgc),
6358 TOJSON_IMPL(denoiseInput),
6359 TOJSON_IMPL(denoiseOutput),
6360 TOJSON_IMPL(saveInputPcm),
6361 TOJSON_IMPL(saveOutputPcm),
6362 TOJSON_IMPL(registry)
6363 };
6364 }
6365 static void from_json(const nlohmann::json& j, EnginePolicyAudio& p)
6366 {
6367 p.clear();
6368 getOptional<bool>("enabled", p.enabled, j, true);
6369 getOptional<bool>("hardwareEnabled", p.hardwareEnabled, j, true);
6370 FROMJSON_IMPL(internalRate, int, 16000);
6371 FROMJSON_IMPL(internalChannels, int, 2);
6372
6373 FROMJSON_IMPL(muteTxOnTx, bool, false);
6374 getOptional<Aec>("aec", p.aec, j);
6375 getOptional<Vad>("vad", p.vad, j);
6376 getOptional<AndroidAudio>("android", p.android, j);
6377 getOptional<Agc>("inputAgc", p.inputAgc, j);
6378 getOptional<Agc>("outputAgc", p.outputAgc, j);
6379 FROMJSON_IMPL(denoiseInput, bool, false);
6380 FROMJSON_IMPL(denoiseOutput, bool, false);
6381 FROMJSON_IMPL(saveInputPcm, bool, false);
6382 FROMJSON_IMPL(saveOutputPcm, bool, false);
6383 getOptional<AudioRegistry>("registry", p.registry, j);
6384 }
6385
6386 //-----------------------------------------------------------
6387 JSON_SERIALIZED_CLASS(SecurityCertificate)
6398 {
6399 IMPLEMENT_JSON_SERIALIZATION()
6400 IMPLEMENT_JSON_DOCUMENTATION(SecurityCertificate)
6401
6402 public:
6403
6409 std::string certificate;
6410
6412 std::string key;
6413
6415 {
6416 clear();
6417 }
6418
6419 void clear()
6420 {
6421 certificate.clear();
6422 key.clear();
6423 }
6424 };
6425
6426 static void to_json(nlohmann::json& j, const SecurityCertificate& p)
6427 {
6428 j = nlohmann::json{
6429 TOJSON_IMPL(certificate),
6430 TOJSON_IMPL(key)
6431 };
6432 }
6433 static void from_json(const nlohmann::json& j, SecurityCertificate& p)
6434 {
6435 p.clear();
6436 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
6437 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
6438 }
6439
6440 // This is where spell checking stops
6441 //-----------------------------------------------------------
6442 JSON_SERIALIZED_CLASS(EnginePolicySecurity)
6443
6444
6454 {
6455 IMPLEMENT_JSON_SERIALIZATION()
6456 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicySecurity)
6457
6458 public:
6459
6471
6479 std::vector<std::string> caCertificates;
6480
6482 {
6483 clear();
6484 }
6485
6486 void clear()
6487 {
6488 certificate.clear();
6489 caCertificates.clear();
6490 }
6491 };
6492
6493 static void to_json(nlohmann::json& j, const EnginePolicySecurity& p)
6494 {
6495 j = nlohmann::json{
6496 TOJSON_IMPL(certificate),
6497 TOJSON_IMPL(caCertificates)
6498 };
6499 }
6500 static void from_json(const nlohmann::json& j, EnginePolicySecurity& p)
6501 {
6502 p.clear();
6503 getOptional("certificate", p.certificate, j);
6504 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
6505 }
6506
6507 //-----------------------------------------------------------
6508 JSON_SERIALIZED_CLASS(EnginePolicyLogging)
6519 {
6520 IMPLEMENT_JSON_SERIALIZATION()
6521 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyLogging)
6522
6523 public:
6524
6541
6544
6546 {
6547 clear();
6548 }
6549
6550 void clear()
6551 {
6552 maxLevel = 4; // ILogger::Level::debug
6553 enableSyslog = false;
6554 }
6555 };
6556
6557 static void to_json(nlohmann::json& j, const EnginePolicyLogging& p)
6558 {
6559 j = nlohmann::json{
6560 TOJSON_IMPL(maxLevel),
6561 TOJSON_IMPL(enableSyslog)
6562 };
6563 }
6564 static void from_json(const nlohmann::json& j, EnginePolicyLogging& p)
6565 {
6566 p.clear();
6567 getOptional("maxLevel", p.maxLevel, j, 4); // ILogger::Level::debug
6568 getOptional("enableSyslog", p.enableSyslog, j);
6569 }
6570
6571
6572 //-----------------------------------------------------------
6573 JSON_SERIALIZED_CLASS(EnginePolicyDatabase)
6575 {
6576 IMPLEMENT_JSON_SERIALIZATION()
6577 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyDatabase)
6578
6579 public:
6580 typedef enum
6581 {
6582 dbtFixedMemory = 0,
6583 dbtPagedMemory = 1,
6584 dbtFixedFile = 2
6585 } DatabaseType_t;
6586
6587 DatabaseType_t type;
6588 std::string fixedFileName;
6589 bool forceMaintenance;
6590 bool reclaimSpace;
6591
6593 {
6594 clear();
6595 }
6596
6597 void clear()
6598 {
6599 type = DatabaseType_t::dbtFixedMemory;
6600 fixedFileName.clear();
6601 forceMaintenance = false;
6602 reclaimSpace = false;
6603 }
6604 };
6605
6606 static void to_json(nlohmann::json& j, const EnginePolicyDatabase& p)
6607 {
6608 j = nlohmann::json{
6609 TOJSON_IMPL(type),
6610 TOJSON_IMPL(fixedFileName),
6611 TOJSON_IMPL(forceMaintenance),
6612 TOJSON_IMPL(reclaimSpace)
6613 };
6614 }
6615 static void from_json(const nlohmann::json& j, EnginePolicyDatabase& p)
6616 {
6617 p.clear();
6618 FROMJSON_IMPL(type, EnginePolicyDatabase::DatabaseType_t, EnginePolicyDatabase::DatabaseType_t::dbtFixedMemory);
6619 FROMJSON_IMPL(fixedFileName, std::string, EMPTY_STRING);
6620 FROMJSON_IMPL(forceMaintenance, bool, false);
6621 FROMJSON_IMPL(reclaimSpace, bool, false);
6622 }
6623
6624
6625 //-----------------------------------------------------------
6626 JSON_SERIALIZED_CLASS(SecureSignature)
6635 {
6636 IMPLEMENT_JSON_SERIALIZATION()
6637 IMPLEMENT_JSON_DOCUMENTATION(SecureSignature)
6638
6639 public:
6640
6642 std::string certificate;
6643
6644 // /** @brief Contains the PEM-formatted text of the certificate's public key */
6645 //std::string publicKey;
6646
6648 std::string signature;
6649
6651 {
6652 clear();
6653 }
6654
6655 void clear()
6656 {
6657 certificate.clear();
6658 //publicKey.clear();
6659 signature.clear();
6660 }
6661 };
6662
6663 static void to_json(nlohmann::json& j, const SecureSignature& p)
6664 {
6665 j = nlohmann::json{
6666 TOJSON_IMPL(certificate),
6667 //TOJSON_IMPL(publicKey),
6668 TOJSON_IMPL(signature)
6669 };
6670 }
6671 static void from_json(const nlohmann::json& j, SecureSignature& p)
6672 {
6673 p.clear();
6674 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
6675 //FROMJSON_IMPL(publicKey, std::string, EMPTY_STRING);
6676 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
6677 }
6678
6679 //-----------------------------------------------------------
6680 JSON_SERIALIZED_CLASS(NamedAudioDevice)
6682 {
6683 IMPLEMENT_JSON_SERIALIZATION()
6684 IMPLEMENT_JSON_DOCUMENTATION(NamedAudioDevice)
6685
6686 public:
6687 std::string name;
6688 std::string manufacturer;
6689 std::string model;
6690 std::string id;
6691 std::string serialNumber;
6692 std::string type;
6693 std::string extra;
6694 bool isDefault;
6695
6697 {
6698 clear();
6699 }
6700
6701 void clear()
6702 {
6703 name.clear();
6704 manufacturer.clear();
6705 model.clear();
6706 id.clear();
6707 serialNumber.clear();
6708 type.clear();
6709 extra.clear();
6710 isDefault = false;
6711 }
6712 };
6713
6714 static void to_json(nlohmann::json& j, const NamedAudioDevice& p)
6715 {
6716 j = nlohmann::json{
6717 TOJSON_IMPL(name),
6718 TOJSON_IMPL(manufacturer),
6719 TOJSON_IMPL(model),
6720 TOJSON_IMPL(id),
6721 TOJSON_IMPL(serialNumber),
6722 TOJSON_IMPL(type),
6723 TOJSON_IMPL(extra),
6724 TOJSON_IMPL(isDefault),
6725 };
6726 }
6727 static void from_json(const nlohmann::json& j, NamedAudioDevice& p)
6728 {
6729 p.clear();
6730 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
6731 getOptional<std::string>("manufacturer", p.manufacturer, j, EMPTY_STRING);
6732 getOptional<std::string>("model", p.model, j, EMPTY_STRING);
6733 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
6734 getOptional<std::string>("serialNumber", p.serialNumber, j, EMPTY_STRING);
6735 getOptional<std::string>("type", p.type, j, EMPTY_STRING);
6736 getOptional<std::string>("extra", p.extra, j, EMPTY_STRING);
6737 getOptional<bool>("isDefault", p.isDefault, j, false);
6738 }
6739
6740
6741 //-----------------------------------------------------------
6742 JSON_SERIALIZED_CLASS(EnginePolicyNamedAudioDevices)
6744 {
6745 IMPLEMENT_JSON_SERIALIZATION()
6746 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNamedAudioDevices)
6747
6748 public:
6749 std::vector<NamedAudioDevice> inputs;
6750 std::vector<NamedAudioDevice> outputs;
6751
6753 {
6754 clear();
6755 }
6756
6757 void clear()
6758 {
6759 inputs.clear();
6760 outputs.clear();
6761 }
6762 };
6763
6764 static void to_json(nlohmann::json& j, const EnginePolicyNamedAudioDevices& p)
6765 {
6766 j = nlohmann::json{
6767 TOJSON_IMPL(inputs),
6768 TOJSON_IMPL(outputs)
6769 };
6770 }
6771 static void from_json(const nlohmann::json& j, EnginePolicyNamedAudioDevices& p)
6772 {
6773 p.clear();
6774 getOptional<std::vector<NamedAudioDevice>>("inputs", p.inputs, j);
6775 getOptional<std::vector<NamedAudioDevice>>("outputs", p.outputs, j);
6776 }
6777
6778 //-----------------------------------------------------------
6779 JSON_SERIALIZED_CLASS(Licensing)
6792 {
6793 IMPLEMENT_JSON_SERIALIZATION()
6794 IMPLEMENT_JSON_DOCUMENTATION(Licensing)
6795
6796 public:
6797
6799 std::string entitlement;
6800
6802 std::string key;
6803
6805 std::string activationCode;
6806
6808 std::string deviceId;
6809
6811 std::string manufacturerId;
6812
6813 Licensing()
6814 {
6815 clear();
6816 }
6817
6818 void clear()
6819 {
6820 entitlement.clear();
6821 key.clear();
6822 activationCode.clear();
6823 deviceId.clear();
6824 manufacturerId.clear();
6825 }
6826 };
6827
6828 static void to_json(nlohmann::json& j, const Licensing& p)
6829 {
6830 j = nlohmann::json{
6831 TOJSON_IMPL(entitlement),
6832 TOJSON_IMPL(key),
6833 TOJSON_IMPL(activationCode),
6834 TOJSON_IMPL(deviceId),
6835 TOJSON_IMPL(manufacturerId)
6836 };
6837 }
6838 static void from_json(const nlohmann::json& j, Licensing& p)
6839 {
6840 p.clear();
6841 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
6842 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
6843 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
6844 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
6845 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
6846 }
6847
6848 //-----------------------------------------------------------
6849 JSON_SERIALIZED_CLASS(DiscoveryMagellan)
6860 {
6861 IMPLEMENT_JSON_SERIALIZATION()
6862 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryMagellan)
6863
6864 public:
6865
6868
6870 std::string interfaceName;
6871
6874
6877
6879 {
6880 clear();
6881 }
6882
6883 void clear()
6884 {
6885 enabled = false;
6886 interfaceName.clear();
6887 security.clear();
6888 tls.clear();
6889 }
6890 };
6891
6892 static void to_json(nlohmann::json& j, const DiscoveryMagellan& p)
6893 {
6894 j = nlohmann::json{
6895 TOJSON_IMPL(enabled),
6896 TOJSON_IMPL(interfaceName),
6897 TOJSON_IMPL(security),
6898 TOJSON_IMPL(tls)
6899 };
6900 }
6901 static void from_json(const nlohmann::json& j, DiscoveryMagellan& p)
6902 {
6903 p.clear();
6904 getOptional("enabled", p.enabled, j, false);
6905 getOptional<Tls>("tls", p.tls, j);
6906 getOptional<SecurityCertificate>("security", p.security, j);
6907 FROMJSON_IMPL(interfaceName, std::string, EMPTY_STRING);
6908 }
6909
6910 //-----------------------------------------------------------
6911 JSON_SERIALIZED_CLASS(DiscoverySsdp)
6922 {
6923 IMPLEMENT_JSON_SERIALIZATION()
6924 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySsdp)
6925
6926 public:
6927
6930
6932 std::string interfaceName;
6933
6936
6938 std::vector<std::string> searchTerms;
6939
6942
6945
6947 {
6948 clear();
6949 }
6950
6951 void clear()
6952 {
6953 enabled = false;
6954 interfaceName.clear();
6955 address.clear();
6956 searchTerms.clear();
6957 ageTimeoutMs = 30000;
6958 advertising.clear();
6959 }
6960 };
6961
6962 static void to_json(nlohmann::json& j, const DiscoverySsdp& p)
6963 {
6964 j = nlohmann::json{
6965 TOJSON_IMPL(enabled),
6966 TOJSON_IMPL(interfaceName),
6967 TOJSON_IMPL(address),
6968 TOJSON_IMPL(searchTerms),
6969 TOJSON_IMPL(ageTimeoutMs),
6970 TOJSON_IMPL(advertising)
6971 };
6972 }
6973 static void from_json(const nlohmann::json& j, DiscoverySsdp& p)
6974 {
6975 p.clear();
6976 getOptional("enabled", p.enabled, j, false);
6977 getOptional<std::string>("interfaceName", p.interfaceName, j);
6978
6979 getOptional<NetworkAddress>("address", p.address, j);
6980 if(p.address.address.empty())
6981 {
6982 p.address.address = "255.255.255.255";
6983 }
6984 if(p.address.port <= 0)
6985 {
6986 p.address.port = 1900;
6987 }
6988
6989 getOptional<std::vector<std::string>>("searchTerms", p.searchTerms, j);
6990 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
6991 getOptional<Advertising>("advertising", p.advertising, j);
6992 }
6993
6994 //-----------------------------------------------------------
6995 JSON_SERIALIZED_CLASS(DiscoverySap)
7006 {
7007 IMPLEMENT_JSON_SERIALIZATION()
7008 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySap)
7009
7010 public:
7013
7015 std::string interfaceName;
7016
7019
7022
7025
7026 DiscoverySap()
7027 {
7028 clear();
7029 }
7030
7031 void clear()
7032 {
7033 enabled = false;
7034 interfaceName.clear();
7035 address.clear();
7036 ageTimeoutMs = 30000;
7037 advertising.clear();
7038 }
7039 };
7040
7041 static void to_json(nlohmann::json& j, const DiscoverySap& p)
7042 {
7043 j = nlohmann::json{
7044 TOJSON_IMPL(enabled),
7045 TOJSON_IMPL(interfaceName),
7046 TOJSON_IMPL(address),
7047 TOJSON_IMPL(ageTimeoutMs),
7048 TOJSON_IMPL(advertising)
7049 };
7050 }
7051 static void from_json(const nlohmann::json& j, DiscoverySap& p)
7052 {
7053 p.clear();
7054 getOptional("enabled", p.enabled, j, false);
7055 getOptional<std::string>("interfaceName", p.interfaceName, j);
7056 getOptional<NetworkAddress>("address", p.address, j);
7057 if(p.address.address.empty())
7058 {
7059 p.address.address = "224.2.127.254";
7060 }
7061 if(p.address.port <= 0)
7062 {
7063 p.address.port = 9875;
7064 }
7065
7066 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7067 getOptional<Advertising>("advertising", p.advertising, j);
7068 }
7069
7070 //-----------------------------------------------------------
7071 JSON_SERIALIZED_CLASS(DiscoveryCistech)
7084 {
7085 IMPLEMENT_JSON_SERIALIZATION()
7086 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryCistech)
7087
7088 public:
7089 bool enabled;
7090 std::string interfaceName;
7091 NetworkAddress address;
7092 int ageTimeoutMs;
7093
7095 {
7096 clear();
7097 }
7098
7099 void clear()
7100 {
7101 enabled = false;
7102 interfaceName.clear();
7103 address.clear();
7104 ageTimeoutMs = 30000;
7105 }
7106 };
7107
7108 static void to_json(nlohmann::json& j, const DiscoveryCistech& p)
7109 {
7110 j = nlohmann::json{
7111 TOJSON_IMPL(enabled),
7112 TOJSON_IMPL(interfaceName),
7113 TOJSON_IMPL(address),
7114 TOJSON_IMPL(ageTimeoutMs)
7115 };
7116 }
7117 static void from_json(const nlohmann::json& j, DiscoveryCistech& p)
7118 {
7119 p.clear();
7120 getOptional("enabled", p.enabled, j, false);
7121 getOptional<std::string>("interfaceName", p.interfaceName, j);
7122 getOptional<NetworkAddress>("address", p.address, j);
7123 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
7124 }
7125
7126
7127 //-----------------------------------------------------------
7128 JSON_SERIALIZED_CLASS(DiscoveryTrellisware)
7139 {
7140 IMPLEMENT_JSON_SERIALIZATION()
7141 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryTrellisware)
7142
7143 public:
7144
7147
7150
7152 {
7153 clear();
7154 }
7155
7156 void clear()
7157 {
7158 enabled = false;
7159 security.clear();
7160 }
7161 };
7162
7163 static void to_json(nlohmann::json& j, const DiscoveryTrellisware& p)
7164 {
7165 j = nlohmann::json{
7166 TOJSON_IMPL(enabled),
7167 TOJSON_IMPL(security)
7168 };
7169 }
7170 static void from_json(const nlohmann::json& j, DiscoveryTrellisware& p)
7171 {
7172 p.clear();
7173 getOptional("enabled", p.enabled, j, false);
7174 getOptional<SecurityCertificate>("security", p.security, j);
7175 }
7176
7177 //-----------------------------------------------------------
7178 JSON_SERIALIZED_CLASS(DiscoveryConfiguration)
7189 {
7190 IMPLEMENT_JSON_SERIALIZATION()
7191 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryConfiguration)
7192
7193 public:
7196
7199
7202
7205
7208
7210 {
7211 clear();
7212 }
7213
7214 void clear()
7215 {
7216 magellan.clear();
7217 ssdp.clear();
7218 sap.clear();
7219 cistech.clear();
7220 }
7221 };
7222
7223 static void to_json(nlohmann::json& j, const DiscoveryConfiguration& p)
7224 {
7225 j = nlohmann::json{
7226 TOJSON_IMPL(magellan),
7227 TOJSON_IMPL(ssdp),
7228 TOJSON_IMPL(sap),
7229 TOJSON_IMPL(cistech),
7230 TOJSON_IMPL(trellisware)
7231 };
7232 }
7233 static void from_json(const nlohmann::json& j, DiscoveryConfiguration& p)
7234 {
7235 p.clear();
7236 getOptional<DiscoveryMagellan>("magellan", p.magellan, j);
7237 getOptional<DiscoverySsdp>("ssdp", p.ssdp, j);
7238 getOptional<DiscoverySap>("sap", p.sap, j);
7239 getOptional<DiscoveryCistech>("cistech", p.cistech, j);
7240 getOptional<DiscoveryTrellisware>("trellisware", p.trellisware, j);
7241 }
7242
7243
7244 //-----------------------------------------------------------
7245 JSON_SERIALIZED_CLASS(EnginePolicyInternals)
7258 {
7259 IMPLEMENT_JSON_SERIALIZATION()
7260 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyInternals)
7261
7262 public:
7265
7268
7271
7272 int maxRxSecs;
7273
7274 int logTaskQueueStatsIntervalMs;
7275
7276 bool enableLazySpeakerClosure;
7277
7280
7283
7286
7289
7292
7295
7298
7301
7304
7306 {
7307 clear();
7308 }
7309
7310 void clear()
7311 {
7312 watchdog.clear();
7313 housekeeperIntervalMs = 1000;
7314 logTaskQueueStatsIntervalMs = 0;
7315 maxTxSecs = 30;
7316 maxRxSecs = 0;
7317 enableLazySpeakerClosure = false;
7318 rpClusterStrategy = RallypointCluster::ConnectionStrategy_t::csRoundRobin;
7319 rpClusterRolloverSecs = 10;
7320 rtpExpirationCheckIntervalMs = 250;
7321 rpConnectionTimeoutSecs = 0;
7322 rpTransactionTimeoutMs = 0;
7323 stickyTidHangSecs = 10;
7324 uriStreamingIntervalMs = 60;
7325 delayedMicrophoneClosureSecs = 15;
7326 tuning.clear();
7327 }
7328 };
7329
7330 static void to_json(nlohmann::json& j, const EnginePolicyInternals& p)
7331 {
7332 j = nlohmann::json{
7333 TOJSON_IMPL(watchdog),
7334 TOJSON_IMPL(housekeeperIntervalMs),
7335 TOJSON_IMPL(logTaskQueueStatsIntervalMs),
7336 TOJSON_IMPL(maxTxSecs),
7337 TOJSON_IMPL(maxRxSecs),
7338 TOJSON_IMPL(enableLazySpeakerClosure),
7339 TOJSON_IMPL(rpClusterStrategy),
7340 TOJSON_IMPL(rpClusterRolloverSecs),
7341 TOJSON_IMPL(rtpExpirationCheckIntervalMs),
7342 TOJSON_IMPL(rpConnectionTimeoutSecs),
7343 TOJSON_IMPL(rpTransactionTimeoutMs),
7344 TOJSON_IMPL(stickyTidHangSecs),
7345 TOJSON_IMPL(uriStreamingIntervalMs),
7346 TOJSON_IMPL(delayedMicrophoneClosureSecs),
7347 TOJSON_IMPL(tuning)
7348 };
7349 }
7350 static void from_json(const nlohmann::json& j, EnginePolicyInternals& p)
7351 {
7352 p.clear();
7353 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
7354 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
7355 getOptional<int>("logTaskQueueStatsIntervalMs", p.logTaskQueueStatsIntervalMs, j, 0);
7356 getOptional<int>("maxTxSecs", p.maxTxSecs, j, 30);
7357 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
7358 getOptional<bool>("enableLazySpeakerClosure", p.enableLazySpeakerClosure, j, false);
7359 getOptional<RallypointCluster::ConnectionStrategy_t>("rpClusterStrategy", p.rpClusterStrategy, j, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
7360 getOptional<int>("rpClusterRolloverSecs", p.rpClusterRolloverSecs, j, 10);
7361 getOptional<int>("rtpExpirationCheckIntervalMs", p.rtpExpirationCheckIntervalMs, j, 250);
7362 getOptional<int>("rpConnectionTimeoutSecs", p.rpConnectionTimeoutSecs, j, 0);
7363 getOptional<int>("rpTransactionTimeoutMs", p.rpTransactionTimeoutMs, j, 0);
7364 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
7365 getOptional<int>("uriStreamingIntervalMs", p.uriStreamingIntervalMs, j, 60);
7366 getOptional<int>("delayedMicrophoneClosureSecs", p.delayedMicrophoneClosureSecs, j, 15);
7367 getOptional<TuningSettings>("tuning", p.tuning, j);
7368 }
7369
7370 //-----------------------------------------------------------
7371 JSON_SERIALIZED_CLASS(EnginePolicyTimelines)
7384 {
7385 IMPLEMENT_JSON_SERIALIZATION()
7386 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyTimelines)
7387
7388 public:
7389
7396
7398 std::string storageRoot;
7399
7402
7405
7408
7411
7414
7417
7420
7429
7432
7435
7438
7440 {
7441 clear();
7442 }
7443
7444 void clear()
7445 {
7446 enabled = true;
7447 storageRoot.clear();
7448 maxStorageMb = 1024; // 1 Gigabyte
7449 maxMemMb = maxStorageMb;
7450 maxAudioEventMemMb = maxMemMb;
7451 maxDiskMb = maxStorageMb;
7452 maxEventAgeSecs = (86400 * 30); // 30 days
7453 groomingIntervalSecs = (60 * 30); // 30 minutes
7454 maxEvents = 1000;
7455 autosaveIntervalSecs = 5;
7456 security.clear();
7457 disableSigningAndVerification = false;
7458 ephemeral = false;
7459 }
7460 };
7461
7462 static void to_json(nlohmann::json& j, const EnginePolicyTimelines& p)
7463 {
7464 j = nlohmann::json{
7465 TOJSON_IMPL(enabled),
7466 TOJSON_IMPL(storageRoot),
7467 TOJSON_IMPL(maxMemMb),
7468 TOJSON_IMPL(maxAudioEventMemMb),
7469 TOJSON_IMPL(maxDiskMb),
7470 TOJSON_IMPL(maxEventAgeSecs),
7471 TOJSON_IMPL(maxEvents),
7472 TOJSON_IMPL(groomingIntervalSecs),
7473 TOJSON_IMPL(autosaveIntervalSecs),
7474 TOJSON_IMPL(security),
7475 TOJSON_IMPL(disableSigningAndVerification),
7476 TOJSON_IMPL(ephemeral)
7477 };
7478 }
7479 static void from_json(const nlohmann::json& j, EnginePolicyTimelines& p)
7480 {
7481 p.clear();
7482 getOptional<bool>("enabled", p.enabled, j, true);
7483 getOptional<std::string>("storageRoot", p.storageRoot, j, EMPTY_STRING);
7484
7485 getOptional<int>("maxStorageMb", p.maxStorageMb, j, 1024);
7486 getOptional<int>("maxMemMb", p.maxMemMb, j, p.maxStorageMb);
7487 getOptional<int>("maxAudioEventMemMb", p.maxAudioEventMemMb, j, p.maxMemMb);
7488 getOptional<int>("maxDiskMb", p.maxDiskMb, j, p.maxStorageMb);
7489 getOptional<long>("maxEventAgeSecs", p.maxEventAgeSecs, j, (86400 * 30));
7490 getOptional<long>("groomingIntervalSecs", p.groomingIntervalSecs, j, (60 * 30));
7491 getOptional<long>("autosaveIntervalSecs", p.autosaveIntervalSecs, j, 5);
7492 getOptional<int>("maxEvents", p.maxEvents, j, 1000);
7493 getOptional<SecurityCertificate>("security", p.security, j);
7494 getOptional<bool>("disableSigningAndVerification", p.disableSigningAndVerification, j, false);
7495 getOptional<bool>("ephemeral", p.ephemeral, j, false);
7496 }
7497
7498
7499 //-----------------------------------------------------------
7500 JSON_SERIALIZED_CLASS(RtpMapEntry)
7511 {
7512 IMPLEMENT_JSON_SERIALIZATION()
7513 IMPLEMENT_JSON_DOCUMENTATION(RtpMapEntry)
7514
7515 public:
7517 std::string name;
7518
7521
7524
7525 RtpMapEntry()
7526 {
7527 clear();
7528 }
7529
7530 void clear()
7531 {
7532 name.clear();
7533 engageType = -1;
7534 rtpPayloadType = -1;
7535 }
7536 };
7537
7538 static void to_json(nlohmann::json& j, const RtpMapEntry& p)
7539 {
7540 j = nlohmann::json{
7541 TOJSON_IMPL(name),
7542 TOJSON_IMPL(engageType),
7543 TOJSON_IMPL(rtpPayloadType)
7544 };
7545 }
7546 static void from_json(const nlohmann::json& j, RtpMapEntry& p)
7547 {
7548 p.clear();
7549 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7550 getOptional<int>("engageType", p.engageType, j, -1);
7551 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
7552 }
7553
7554 //-----------------------------------------------------------
7555 JSON_SERIALIZED_CLASS(ExternalModule)
7566 {
7567 IMPLEMENT_JSON_SERIALIZATION()
7568 IMPLEMENT_JSON_DOCUMENTATION(ExternalModule)
7569
7570 public:
7572 std::string name;
7573
7575 std::string file;
7576
7578 nlohmann::json configuration;
7579
7581 {
7582 clear();
7583 }
7584
7585 void clear()
7586 {
7587 name.clear();
7588 file.clear();
7589 configuration.clear();
7590 }
7591 };
7592
7593 static void to_json(nlohmann::json& j, const ExternalModule& p)
7594 {
7595 j = nlohmann::json{
7596 TOJSON_IMPL(name),
7597 TOJSON_IMPL(file)
7598 };
7599
7600 if(!p.configuration.empty())
7601 {
7602 j["configuration"] = p.configuration;
7603 }
7604 }
7605 static void from_json(const nlohmann::json& j, ExternalModule& p)
7606 {
7607 p.clear();
7608 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7609 getOptional<std::string>("file", p.file, j, EMPTY_STRING);
7610
7611 try
7612 {
7613 p.configuration = j.at("configuration");
7614 }
7615 catch(...)
7616 {
7617 p.configuration.clear();
7618 }
7619 }
7620
7621
7622 //-----------------------------------------------------------
7623 JSON_SERIALIZED_CLASS(ExternalCodecDescriptor)
7634 {
7635 IMPLEMENT_JSON_SERIALIZATION()
7636 IMPLEMENT_JSON_DOCUMENTATION(ExternalCodecDescriptor)
7637
7638 public:
7641
7644
7647
7650
7652 {
7653 clear();
7654 }
7655
7656 void clear()
7657 {
7658 rtpPayloadType = -1;
7659 samplingRate = -1;
7660 channels = -1;
7661 rtpTsMultiplier = 0;
7662 }
7663 };
7664
7665 static void to_json(nlohmann::json& j, const ExternalCodecDescriptor& p)
7666 {
7667 j = nlohmann::json{
7668 TOJSON_IMPL(rtpPayloadType),
7669 TOJSON_IMPL(samplingRate),
7670 TOJSON_IMPL(channels),
7671 TOJSON_IMPL(rtpTsMultiplier)
7672 };
7673 }
7674 static void from_json(const nlohmann::json& j, ExternalCodecDescriptor& p)
7675 {
7676 p.clear();
7677
7678 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
7679 getOptional<int>("samplingRate", p.samplingRate, j, -1);
7680 getOptional<int>("channels", p.channels, j, -1);
7681 getOptional<int>("rtpTsMultiplier", p.rtpTsMultiplier, j, -1);
7682 }
7683
7684 //-----------------------------------------------------------
7685 JSON_SERIALIZED_CLASS(EngineStatusReportConfiguration)
7696 {
7697 IMPLEMENT_JSON_SERIALIZATION()
7698 IMPLEMENT_JSON_DOCUMENTATION(EngineStatusReportConfiguration)
7699
7700 public:
7702 std::string fileName;
7703
7706
7709
7711 std::string runCmd;
7712
7715
7718
7720 {
7721 clear();
7722 }
7723
7724 void clear()
7725 {
7726 fileName.clear();
7727 intervalSecs = 60;
7728 enabled = false;
7729 includeMemoryDetail = false;
7730 includeTaskQueueDetail = false;
7731 runCmd.clear();
7732 }
7733 };
7734
7735 static void to_json(nlohmann::json& j, const EngineStatusReportConfiguration& p)
7736 {
7737 j = nlohmann::json{
7738 TOJSON_IMPL(fileName),
7739 TOJSON_IMPL(intervalSecs),
7740 TOJSON_IMPL(enabled),
7741 TOJSON_IMPL(includeMemoryDetail),
7742 TOJSON_IMPL(includeTaskQueueDetail),
7743 TOJSON_IMPL(runCmd)
7744 };
7745 }
7746 static void from_json(const nlohmann::json& j, EngineStatusReportConfiguration& p)
7747 {
7748 p.clear();
7749 getOptional<std::string>("fileName", p.fileName, j);
7750 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
7751 getOptional<bool>("enabled", p.enabled, j, false);
7752 getOptional<std::string>("runCmd", p.runCmd, j);
7753 getOptional<bool>("includeMemoryDetail", p.includeMemoryDetail, j, false);
7754 getOptional<bool>("includeTaskQueueDetail", p.includeTaskQueueDetail, j, false);
7755 }
7756
7757 //-----------------------------------------------------------
7758 JSON_SERIALIZED_CLASS(EnginePolicy)
7771 {
7772 IMPLEMENT_JSON_SERIALIZATION()
7773 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicy)
7774
7775 public:
7776
7778 std::string dataDirectory;
7779
7782
7785
7788
7791
7794
7797
7800
7803
7806
7809
7812
7814 std::vector<ExternalModule> externalCodecs;
7815
7817 std::vector<RtpMapEntry> rtpMap;
7818
7821
7822 EnginePolicy()
7823 {
7824 clear();
7825 }
7826
7827 void clear()
7828 {
7829 dataDirectory.clear();
7830 licensing.clear();
7831 security.clear();
7832 networking.clear();
7833 audio.clear();
7834 discovery.clear();
7835 logging.clear();
7836 internals.clear();
7837 timelines.clear();
7838 database.clear();
7839 featureset.clear();
7840 namedAudioDevices.clear();
7841 externalCodecs.clear();
7842 rtpMap.clear();
7843 statusReport.clear();
7844 }
7845 };
7846
7847 static void to_json(nlohmann::json& j, const EnginePolicy& p)
7848 {
7849 j = nlohmann::json{
7850 TOJSON_IMPL(dataDirectory),
7851 TOJSON_IMPL(licensing),
7852 TOJSON_IMPL(security),
7853 TOJSON_IMPL(networking),
7854 TOJSON_IMPL(audio),
7855 TOJSON_IMPL(discovery),
7856 TOJSON_IMPL(logging),
7857 TOJSON_IMPL(internals),
7858 TOJSON_IMPL(timelines),
7859 TOJSON_IMPL(database),
7860 TOJSON_IMPL(featureset),
7861 TOJSON_IMPL(namedAudioDevices),
7862 TOJSON_IMPL(externalCodecs),
7863 TOJSON_IMPL(rtpMap),
7864 TOJSON_IMPL(statusReport)
7865 };
7866 }
7867 static void from_json(const nlohmann::json& j, EnginePolicy& p)
7868 {
7869 p.clear();
7870 FROMJSON_IMPL_SIMPLE(dataDirectory);
7871 FROMJSON_IMPL_SIMPLE(licensing);
7872 FROMJSON_IMPL_SIMPLE(security);
7873 FROMJSON_IMPL_SIMPLE(networking);
7874 FROMJSON_IMPL_SIMPLE(audio);
7875 FROMJSON_IMPL_SIMPLE(discovery);
7876 FROMJSON_IMPL_SIMPLE(logging);
7877 FROMJSON_IMPL_SIMPLE(internals);
7878 FROMJSON_IMPL_SIMPLE(timelines);
7879 FROMJSON_IMPL_SIMPLE(database);
7880 FROMJSON_IMPL_SIMPLE(featureset);
7881 FROMJSON_IMPL_SIMPLE(namedAudioDevices);
7882 FROMJSON_IMPL_SIMPLE(externalCodecs);
7883 FROMJSON_IMPL_SIMPLE(rtpMap);
7884 FROMJSON_IMPL_SIMPLE(statusReport);
7885 }
7886
7887
7888 //-----------------------------------------------------------
7889 JSON_SERIALIZED_CLASS(TalkgroupAsset)
7900 {
7901 IMPLEMENT_JSON_SERIALIZATION()
7902 IMPLEMENT_JSON_DOCUMENTATION(TalkgroupAsset)
7903
7904 public:
7905
7907 std::string nodeId;
7908
7911
7913 {
7914 clear();
7915 }
7916
7917 void clear()
7918 {
7919 nodeId.clear();
7920 group.clear();
7921 }
7922 };
7923
7924 static void to_json(nlohmann::json& j, const TalkgroupAsset& p)
7925 {
7926 j = nlohmann::json{
7927 TOJSON_IMPL(nodeId),
7928 TOJSON_IMPL(group)
7929 };
7930 }
7931 static void from_json(const nlohmann::json& j, TalkgroupAsset& p)
7932 {
7933 p.clear();
7934 getOptional<std::string>("nodeId", p.nodeId, j);
7935 getOptional<Group>("group", p.group, j);
7936 }
7937
7938 //-----------------------------------------------------------
7939 JSON_SERIALIZED_CLASS(EngageDiscoveredGroup)
7948 {
7949 IMPLEMENT_JSON_SERIALIZATION()
7950 IMPLEMENT_JSON_DOCUMENTATION(EngageDiscoveredGroup)
7951
7952 public:
7954 std::string id;
7955
7957 int type;
7958
7961
7964
7966 {
7967 clear();
7968 }
7969
7970 void clear()
7971 {
7972 id.clear();
7973 type = 0;
7974 rx.clear();
7975 tx.clear();
7976 }
7977 };
7978
7979 static void to_json(nlohmann::json& j, const EngageDiscoveredGroup& p)
7980 {
7981 j = nlohmann::json{
7982 TOJSON_IMPL(id),
7983 TOJSON_IMPL(type),
7984 TOJSON_IMPL(rx),
7985 TOJSON_IMPL(tx)
7986 };
7987 }
7988 static void from_json(const nlohmann::json& j, EngageDiscoveredGroup& p)
7989 {
7990 p.clear();
7991 getOptional<std::string>("id", p.id, j);
7992 getOptional<int>("type", p.type, j, 0);
7993 getOptional<NetworkAddress>("rx", p.rx, j);
7994 getOptional<NetworkAddress>("tx", p.tx, j);
7995 }
7996
7997 //-----------------------------------------------------------
7998 JSON_SERIALIZED_CLASS(RallypointPeer)
8009 {
8010 IMPLEMENT_JSON_SERIALIZATION()
8011 IMPLEMENT_JSON_DOCUMENTATION(RallypointPeer)
8012
8013 public:
8014 typedef enum
8015 {
8017 olpUseRpConfiguration = 0,
8018
8020 olpIsMeshLeaf = 1,
8021
8023 olpNotMeshLeaf = 2
8024 } OutboundLeafPolicy_t;
8025
8027 std::string id;
8028
8031
8034
8037
8040
8043
8044 OutboundLeafPolicy_t outboundLeafPolicy;
8045
8048
8050 std::string path;
8051
8054
8056 {
8057 clear();
8058 }
8059
8060 void clear()
8061 {
8062 id.clear();
8063 enabled = true;
8064 host.clear();
8065 certificate.clear();
8066 connectionTimeoutSecs = 0;
8067 forceIsMeshLeaf = false;
8068 outboundLeafPolicy = OutboundLeafPolicy_t::olpUseRpConfiguration;
8069 protocol = Rallypoint::RpProtocol_t::rppTlsTcp;
8070 path.clear();
8071 additionalProtocols.clear();
8072 }
8073 };
8074
8075 static void to_json(nlohmann::json& j, const RallypointPeer& p)
8076 {
8077 j = nlohmann::json{
8078 TOJSON_IMPL(id),
8079 TOJSON_IMPL(enabled),
8080 TOJSON_IMPL(host),
8081 TOJSON_IMPL(certificate),
8082 TOJSON_IMPL(connectionTimeoutSecs),
8083 TOJSON_IMPL(forceIsMeshLeaf),
8084 TOJSON_IMPL(outboundLeafPolicy),
8085 TOJSON_IMPL(protocol),
8086 TOJSON_IMPL(path),
8087 TOJSON_IMPL(additionalProtocols)
8088 };
8089 }
8090 static void from_json(const nlohmann::json& j, RallypointPeer& p)
8091 {
8092 p.clear();
8093 j.at("id").get_to(p.id);
8094 getOptional<bool>("enabled", p.enabled, j, true);
8095 getOptional<NetworkAddress>("host", p.host, j);
8096 getOptional<SecurityCertificate>("certificate", p.certificate, j);
8097 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
8098 getOptional<bool>("forceIsMeshLeaf", p.forceIsMeshLeaf, j, false);
8099 getOptional<RallypointPeer::OutboundLeafPolicy_t>("outboundLeafPolicy", p.outboundLeafPolicy, j, RallypointPeer::OutboundLeafPolicy_t::olpUseRpConfiguration);
8100 getOptional<Rallypoint::RpProtocol_t>("protocol", p.protocol, j, Rallypoint::RpProtocol_t::rppTlsTcp);
8101 getOptional<std::string>("path", p.path, j);
8102 getOptional<std::string>("additionalProtocols", p.additionalProtocols, j);
8103 }
8104
8105 //-----------------------------------------------------------
8106 JSON_SERIALIZED_CLASS(RallypointServerLimits)
8117 {
8118 IMPLEMENT_JSON_SERIALIZATION()
8119 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLimits)
8120
8121 public:
8123 uint32_t maxClients;
8124
8126 uint32_t maxPeers;
8127
8130
8133
8136
8139
8142
8145
8148
8151
8154
8157
8160
8163
8166
8168 {
8169 clear();
8170 }
8171
8172 void clear()
8173 {
8174 maxClients = 0;
8175 maxPeers = 0;
8176 maxMulticastReflectors = 0;
8177 maxRegisteredStreams = 0;
8178 maxStreamPaths = 0;
8179 maxRxPacketsPerSec = 0;
8180 maxTxPacketsPerSec = 0;
8181 maxRxBytesPerSec = 0;
8182 maxTxBytesPerSec = 0;
8183 maxQOpsPerSec = 0;
8184 maxInboundBacklog = 64;
8185 lowPriorityQueueThreshold = 64;
8186 normalPriorityQueueThreshold = 256;
8187 denyNewConnectionCpuThreshold = 75;
8188 warnAtCpuThreshold = 65;
8189 }
8190 };
8191
8192 static void to_json(nlohmann::json& j, const RallypointServerLimits& p)
8193 {
8194 j = nlohmann::json{
8195 TOJSON_IMPL(maxClients),
8196 TOJSON_IMPL(maxPeers),
8197 TOJSON_IMPL(maxMulticastReflectors),
8198 TOJSON_IMPL(maxRegisteredStreams),
8199 TOJSON_IMPL(maxStreamPaths),
8200 TOJSON_IMPL(maxRxPacketsPerSec),
8201 TOJSON_IMPL(maxTxPacketsPerSec),
8202 TOJSON_IMPL(maxRxBytesPerSec),
8203 TOJSON_IMPL(maxTxBytesPerSec),
8204 TOJSON_IMPL(maxQOpsPerSec),
8205 TOJSON_IMPL(maxInboundBacklog),
8206 TOJSON_IMPL(lowPriorityQueueThreshold),
8207 TOJSON_IMPL(normalPriorityQueueThreshold),
8208 TOJSON_IMPL(denyNewConnectionCpuThreshold),
8209 TOJSON_IMPL(warnAtCpuThreshold)
8210 };
8211 }
8212 static void from_json(const nlohmann::json& j, RallypointServerLimits& p)
8213 {
8214 p.clear();
8215 getOptional<uint32_t>("maxClients", p.maxClients, j, 0);
8216 getOptional<uint32_t>("maxPeers", p.maxPeers, j, 0);
8217 getOptional<uint32_t>("maxMulticastReflectors", p.maxMulticastReflectors, j, 0);
8218 getOptional<uint32_t>("maxRegisteredStreams", p.maxRegisteredStreams, j, 0);
8219 getOptional<uint32_t>("maxStreamPaths", p.maxStreamPaths, j, 0);
8220 getOptional<uint32_t>("maxRxPacketsPerSec", p.maxRxPacketsPerSec, j, 0);
8221 getOptional<uint32_t>("maxTxPacketsPerSec", p.maxTxPacketsPerSec, j, 0);
8222 getOptional<uint32_t>("maxRxBytesPerSec", p.maxRxBytesPerSec, j, 0);
8223 getOptional<uint32_t>("maxTxBytesPerSec", p.maxTxBytesPerSec, j, 0);
8224 getOptional<uint32_t>("maxQOpsPerSec", p.maxQOpsPerSec, j, 0);
8225 getOptional<uint32_t>("maxInboundBacklog", p.maxInboundBacklog, j, 64);
8226 getOptional<uint32_t>("lowPriorityQueueThreshold", p.lowPriorityQueueThreshold, j, 64);
8227 getOptional<uint32_t>("normalPriorityQueueThreshold", p.normalPriorityQueueThreshold, j, 256);
8228 getOptional<uint32_t>("denyNewConnectionCpuThreshold", p.denyNewConnectionCpuThreshold, j, 75);
8229 getOptional<uint32_t>("warnAtCpuThreshold", p.warnAtCpuThreshold, j, 65);
8230 }
8231
8232 //-----------------------------------------------------------
8233 JSON_SERIALIZED_CLASS(RallypointServerStatusReportConfiguration)
8244 {
8245 IMPLEMENT_JSON_SERIALIZATION()
8246 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerStatusReportConfiguration)
8247
8248 public:
8250 std::string fileName;
8251
8254
8257
8260
8263
8266
8268 std::string runCmd;
8269
8271 {
8272 clear();
8273 }
8274
8275 void clear()
8276 {
8277 fileName.clear();
8278 intervalSecs = 60;
8279 enabled = false;
8280 includeLinks = false;
8281 includePeerLinkDetails = false;
8282 includeClientLinkDetails = false;
8283 runCmd.clear();
8284 }
8285 };
8286
8287 static void to_json(nlohmann::json& j, const RallypointServerStatusReportConfiguration& p)
8288 {
8289 j = nlohmann::json{
8290 TOJSON_IMPL(fileName),
8291 TOJSON_IMPL(intervalSecs),
8292 TOJSON_IMPL(enabled),
8293 TOJSON_IMPL(includeLinks),
8294 TOJSON_IMPL(includePeerLinkDetails),
8295 TOJSON_IMPL(includeClientLinkDetails),
8296 TOJSON_IMPL(runCmd)
8297 };
8298 }
8299 static void from_json(const nlohmann::json& j, RallypointServerStatusReportConfiguration& p)
8300 {
8301 p.clear();
8302 getOptional<std::string>("fileName", p.fileName, j);
8303 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8304 getOptional<bool>("enabled", p.enabled, j, false);
8305 getOptional<bool>("includeLinks", p.includeLinks, j, false);
8306 getOptional<bool>("includePeerLinkDetails", p.includePeerLinkDetails, j, false);
8307 getOptional<bool>("includeClientLinkDetails", p.includeClientLinkDetails, j, false);
8308 getOptional<std::string>("runCmd", p.runCmd, j);
8309 }
8310
8311 //-----------------------------------------------------------
8312 JSON_SERIALIZED_CLASS(RallypointServerLinkGraph)
8314 {
8315 IMPLEMENT_JSON_SERIALIZATION()
8316 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLinkGraph)
8317
8318 public:
8320 std::string fileName;
8321
8324
8327
8330
8335
8337 std::string coreRpStyling;
8338
8340 std::string leafRpStyling;
8341
8343 std::string clientStyling;
8344
8346 std::string runCmd;
8347
8349 {
8350 clear();
8351 }
8352
8353 void clear()
8354 {
8355 fileName.clear();
8356 minRefreshSecs = 5;
8357 enabled = false;
8358 includeDigraphEnclosure = true;
8359 includeClients = false;
8360 coreRpStyling = "[shape=hexagon color=firebrick style=filled]";
8361 leafRpStyling = "[shape=box color=gray style=filled]";
8362 clientStyling.clear();
8363 runCmd.clear();
8364 }
8365 };
8366
8367 static void to_json(nlohmann::json& j, const RallypointServerLinkGraph& p)
8368 {
8369 j = nlohmann::json{
8370 TOJSON_IMPL(fileName),
8371 TOJSON_IMPL(minRefreshSecs),
8372 TOJSON_IMPL(enabled),
8373 TOJSON_IMPL(includeDigraphEnclosure),
8374 TOJSON_IMPL(includeClients),
8375 TOJSON_IMPL(coreRpStyling),
8376 TOJSON_IMPL(leafRpStyling),
8377 TOJSON_IMPL(clientStyling),
8378 TOJSON_IMPL(runCmd)
8379 };
8380 }
8381 static void from_json(const nlohmann::json& j, RallypointServerLinkGraph& p)
8382 {
8383 p.clear();
8384 getOptional<std::string>("fileName", p.fileName, j);
8385 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
8386 getOptional<bool>("enabled", p.enabled, j, false);
8387 getOptional<bool>("includeDigraphEnclosure", p.includeDigraphEnclosure, j, true);
8388 getOptional<bool>("includeClients", p.includeClients, j, false);
8389 getOptional<std::string>("coreRpStyling", p.coreRpStyling, j, "[shape=hexagon color=firebrick style=filled]");
8390 getOptional<std::string>("leafRpStyling", p.leafRpStyling, j, "[shape=box color=gray style=filled]");
8391 getOptional<std::string>("clientStyling", p.clientStyling, j);
8392 getOptional<std::string>("runCmd", p.runCmd, j);
8393 }
8394
8395
8396 //-----------------------------------------------------------
8397 JSON_SERIALIZED_CLASS(RallypointServerStreamStatsExport)
8406 {
8407 IMPLEMENT_JSON_SERIALIZATION()
8408 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerStreamStatsExport)
8409
8410 public:
8412 typedef enum
8413 {
8415 fmtCsv = 0,
8416
8418 fmtJson = 1
8419 } ExportFormat_t;
8420
8422 std::string fileName;
8423
8426
8429
8432
8434 std::string runCmd;
8435
8438
8439
8441 {
8442 clear();
8443 }
8444
8445 void clear()
8446 {
8447 fileName.clear();
8448 intervalSecs = 60;
8449 enabled = false;
8450 resetCountersAfterExport = false;
8451 runCmd.clear();
8452 format = fmtJson;
8453 }
8454 };
8455
8456 static void to_json(nlohmann::json& j, const RallypointServerStreamStatsExport& p)
8457 {
8458 j = nlohmann::json{
8459 TOJSON_IMPL(fileName),
8460 TOJSON_IMPL(intervalSecs),
8461 TOJSON_IMPL(enabled),
8462 TOJSON_IMPL(resetCountersAfterExport),
8463 TOJSON_IMPL(runCmd),
8464 TOJSON_IMPL(format)
8465 };
8466 }
8467 static void from_json(const nlohmann::json& j, RallypointServerStreamStatsExport& p)
8468 {
8469 p.clear();
8470 getOptional<std::string>("fileName", p.fileName, j);
8471 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
8472 getOptional<bool>("enabled", p.enabled, j, false);
8473 getOptional<bool>("resetCountersAfterExport", p.resetCountersAfterExport, j, false);
8474 getOptional<std::string>("runCmd", p.runCmd, j);
8475 getOptional<RallypointServerStreamStatsExport::ExportFormat_t>("format", p.format, j, RallypointServerStreamStatsExport::ExportFormat_t::fmtCsv);
8476 }
8477
8478 //-----------------------------------------------------------
8479 JSON_SERIALIZED_CLASS(RallypointServerRouteMap)
8481 {
8482 IMPLEMENT_JSON_SERIALIZATION()
8483 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerRouteMap)
8484
8485 public:
8487 std::string fileName;
8488
8491
8494
8496 std::string runCmd;
8497
8499 {
8500 clear();
8501 }
8502
8503 void clear()
8504 {
8505 fileName.clear();
8506 minRefreshSecs = 5;
8507 enabled = false;
8508 }
8509 };
8510
8511 static void to_json(nlohmann::json& j, const RallypointServerRouteMap& p)
8512 {
8513 j = nlohmann::json{
8514 TOJSON_IMPL(fileName),
8515 TOJSON_IMPL(minRefreshSecs),
8516 TOJSON_IMPL(enabled),
8517 TOJSON_IMPL(runCmd)
8518 };
8519 }
8520 static void from_json(const nlohmann::json& j, RallypointServerRouteMap& p)
8521 {
8522 p.clear();
8523 getOptional<std::string>("fileName", p.fileName, j);
8524 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
8525 getOptional<bool>("enabled", p.enabled, j, false);
8526 getOptional<std::string>("runCmd", p.runCmd, j);
8527 }
8528
8529
8530 //-----------------------------------------------------------
8531 JSON_SERIALIZED_CLASS(ExternalHealthCheckResponder)
8542 {
8543 IMPLEMENT_JSON_SERIALIZATION()
8544 IMPLEMENT_JSON_DOCUMENTATION(ExternalHealthCheckResponder)
8545
8546 public:
8547
8550
8553
8555 {
8556 clear();
8557 }
8558
8559 void clear()
8560 {
8561 listenPort = 0;
8562 immediateClose = true;
8563 }
8564 };
8565
8566 static void to_json(nlohmann::json& j, const ExternalHealthCheckResponder& p)
8567 {
8568 j = nlohmann::json{
8569 TOJSON_IMPL(listenPort),
8570 TOJSON_IMPL(immediateClose)
8571 };
8572 }
8573 static void from_json(const nlohmann::json& j, ExternalHealthCheckResponder& p)
8574 {
8575 p.clear();
8576 getOptional<int>("listenPort", p.listenPort, j, 0);
8577 getOptional<bool>("immediateClose", p.immediateClose, j, true);
8578 }
8579
8580
8581 //-----------------------------------------------------------
8582 JSON_SERIALIZED_CLASS(PeeringConfiguration)
8591 {
8592 IMPLEMENT_JSON_SERIALIZATION()
8593 IMPLEMENT_JSON_DOCUMENTATION(PeeringConfiguration)
8594
8595 public:
8596
8598 std::string id;
8599
8602
8604 std::string comments;
8605
8607 std::vector<RallypointPeer> peers;
8608
8610 {
8611 clear();
8612 }
8613
8614 void clear()
8615 {
8616 id.clear();
8617 version = 0;
8618 comments.clear();
8619 }
8620 };
8621
8622 static void to_json(nlohmann::json& j, const PeeringConfiguration& p)
8623 {
8624 j = nlohmann::json{
8625 TOJSON_IMPL(id),
8626 TOJSON_IMPL(version),
8627 TOJSON_IMPL(comments),
8628 TOJSON_IMPL(peers)
8629 };
8630 }
8631 static void from_json(const nlohmann::json& j, PeeringConfiguration& p)
8632 {
8633 p.clear();
8634 getOptional<std::string>("id", p.id, j);
8635 getOptional<int>("version", p.version, j, 0);
8636 getOptional<std::string>("comments", p.comments, j);
8637 getOptional<std::vector<RallypointPeer>>("peers", p.peers, j);
8638 }
8639
8640 //-----------------------------------------------------------
8641 JSON_SERIALIZED_CLASS(IgmpSnooping)
8650 {
8651 IMPLEMENT_JSON_SERIALIZATION()
8652 IMPLEMENT_JSON_DOCUMENTATION(IgmpSnooping)
8653
8654 public:
8655
8658
8661
8664
8665
8666 IgmpSnooping()
8667 {
8668 clear();
8669 }
8670
8671 void clear()
8672 {
8673 enabled = false;
8674 queryIntervalMs = 125000;
8675 subscriptionTimeoutMs = 0;
8676 }
8677 };
8678
8679 static void to_json(nlohmann::json& j, const IgmpSnooping& p)
8680 {
8681 j = nlohmann::json{
8682 TOJSON_IMPL(enabled),
8683 TOJSON_IMPL(queryIntervalMs),
8684 TOJSON_IMPL(subscriptionTimeoutMs)
8685 };
8686 }
8687 static void from_json(const nlohmann::json& j, IgmpSnooping& p)
8688 {
8689 p.clear();
8690 getOptional<bool>("enabled", p.enabled, j);
8691 getOptional<int>("queryIntervalMs", p.queryIntervalMs, j, 125000);
8692 getOptional<int>("subscriptionTimeoutMs", p.subscriptionTimeoutMs, j, 0);
8693 }
8694
8695
8696 //-----------------------------------------------------------
8697 JSON_SERIALIZED_CLASS(RallypointReflector)
8705 {
8706 IMPLEMENT_JSON_SERIALIZATION()
8707 IMPLEMENT_JSON_DOCUMENTATION(RallypointReflector)
8708
8709 public:
8711 typedef enum
8712 {
8714 drNone = 0,
8715
8717 drRxOnly = 1,
8718
8720 drTxOnly = 2
8721 } DirectionRestriction_t;
8722
8726 std::string id;
8727
8730
8733
8736
8738 std::vector<NetworkAddress> additionalTx;
8739
8742
8744 {
8745 clear();
8746 }
8747
8748 void clear()
8749 {
8750 id.clear();
8751 rx.clear();
8752 tx.clear();
8753 multicastInterfaceName.clear();
8754 additionalTx.clear();
8755 directionRestriction = drNone;
8756 }
8757 };
8758
8759 static void to_json(nlohmann::json& j, const RallypointReflector& p)
8760 {
8761 j = nlohmann::json{
8762 TOJSON_IMPL(id),
8763 TOJSON_IMPL(rx),
8764 TOJSON_IMPL(tx),
8765 TOJSON_IMPL(multicastInterfaceName),
8766 TOJSON_IMPL(additionalTx),
8767 TOJSON_IMPL(directionRestriction)
8768 };
8769 }
8770 static void from_json(const nlohmann::json& j, RallypointReflector& p)
8771 {
8772 p.clear();
8773 j.at("id").get_to(p.id);
8774 j.at("rx").get_to(p.rx);
8775 j.at("tx").get_to(p.tx);
8776 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
8777 getOptional<std::vector<NetworkAddress>>("additionalTx", p.additionalTx, j);
8778 getOptional<RallypointReflector::DirectionRestriction_t>("directionRestriction", p.directionRestriction, j, RallypointReflector::DirectionRestriction_t::drNone);
8779 }
8780
8781
8782 //-----------------------------------------------------------
8783 JSON_SERIALIZED_CLASS(RallypointUdpStreamingIpvX)
8791 {
8792 IMPLEMENT_JSON_SERIALIZATION()
8793 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreamingIpvX)
8794
8795 public:
8798
8801
8803 {
8804 clear();
8805 }
8806
8807 void clear()
8808 {
8809 enabled = true;
8810 external.clear();
8811 }
8812 };
8813
8814 static void to_json(nlohmann::json& j, const RallypointUdpStreamingIpvX& p)
8815 {
8816 j = nlohmann::json{
8817 TOJSON_IMPL(enabled),
8818 TOJSON_IMPL(external)
8819 };
8820 }
8821 static void from_json(const nlohmann::json& j, RallypointUdpStreamingIpvX& p)
8822 {
8823 p.clear();
8824 getOptional<bool>("enabled", p.enabled, j, true);
8825 getOptional<NetworkAddress>("external", p.external, j);
8826 }
8827
8828 //-----------------------------------------------------------
8829 JSON_SERIALIZED_CLASS(RallypointUdpStreaming)
8837 {
8838 IMPLEMENT_JSON_SERIALIZATION()
8839 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreaming)
8840
8841 public:
8843 typedef enum
8844 {
8846 ctUnknown = 0,
8847
8849 ctSharedKeyAes256FullIv = 1,
8850
8852 ctSharedKeyAes256IdxIv = 2,
8853
8855 ctSharedKeyChaCha20FullIv = 3,
8856
8858 ctSharedKeyChaCha20IdxIv = 4
8859 } CryptoType_t;
8860
8863
8866
8869
8872
8875
8878
8881
8883 int ttl;
8884
8885
8887 {
8888 clear();
8889 }
8890
8891 void clear()
8892 {
8893 enabled = true;
8894 cryptoType = CryptoType_t::ctSharedKeyAes256FullIv;
8895 listenPort = 7444;
8896 ipv4.clear();
8897 ipv6.clear();
8898 keepaliveIntervalSecs = 15;
8899 priority = TxPriority_t::priVoice;
8900 ttl = 64;
8901 }
8902 };
8903
8904 static void to_json(nlohmann::json& j, const RallypointUdpStreaming& p)
8905 {
8906 j = nlohmann::json{
8907 TOJSON_IMPL(enabled),
8908 TOJSON_IMPL(cryptoType),
8909 TOJSON_IMPL(listenPort),
8910 TOJSON_IMPL(keepaliveIntervalSecs),
8911 TOJSON_IMPL(ipv4),
8912 TOJSON_IMPL(ipv6),
8913 TOJSON_IMPL(priority),
8914 TOJSON_IMPL(ttl)
8915 };
8916 }
8917 static void from_json(const nlohmann::json& j, RallypointUdpStreaming& p)
8918 {
8919 p.clear();
8920 getOptional<bool>("enabled", p.enabled, j, true);
8921 getOptional<RallypointUdpStreaming::CryptoType_t>("cryptoType", p.cryptoType, j, RallypointUdpStreaming::CryptoType_t::ctSharedKeyAes256FullIv);
8922 getOptional<int>("listenPort", p.listenPort, j, 7444);
8923 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
8924 getOptional<RallypointUdpStreamingIpvX>("ipv4", p.ipv4, j);
8925 getOptional<RallypointUdpStreamingIpvX>("ipv6", p.ipv6, j);
8926 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
8927 getOptional<int>("ttl", p.ttl, j, 64);
8928 }
8929
8930 //-----------------------------------------------------------
8931 JSON_SERIALIZED_CLASS(RallypointRpRtTimingBehavior)
8939 {
8940 IMPLEMENT_JSON_SERIALIZATION()
8941 IMPLEMENT_JSON_DOCUMENTATION(RallypointRpRtTimingBehavior)
8942
8943 public:
8945 typedef enum
8946 {
8949
8952
8955
8958
8960 btDrop = 99
8961 } BehaviorType_t;
8962
8965
8967 uint32_t atOrAboveMs;
8968
8970 std::string runCmd;
8971
8973 {
8974 clear();
8975 }
8976
8977 void clear()
8978 {
8979 behavior = btNone;
8980 atOrAboveMs = 0;
8981 runCmd.clear();
8982 }
8983 };
8984
8985 static void to_json(nlohmann::json& j, const RallypointRpRtTimingBehavior& p)
8986 {
8987 j = nlohmann::json{
8988 TOJSON_IMPL(behavior),
8989 TOJSON_IMPL(atOrAboveMs),
8990 TOJSON_IMPL(runCmd)
8991 };
8992 }
8993 static void from_json(const nlohmann::json& j, RallypointRpRtTimingBehavior& p)
8994 {
8995 p.clear();
8996 getOptional<RallypointRpRtTimingBehavior::BehaviorType_t>("behavior", p.behavior, j, RallypointRpRtTimingBehavior::BehaviorType_t::btNone);
8997 getOptional<uint32_t>("atOrAboveMs", p.atOrAboveMs, j, 0);
8998 getOptional<std::string>("runCmd", p.runCmd, j);
8999 }
9000
9001
9002 //-----------------------------------------------------------
9003 JSON_SERIALIZED_CLASS(RallypointWebsocketSettings)
9011 {
9012 IMPLEMENT_JSON_SERIALIZATION()
9013 IMPLEMENT_JSON_DOCUMENTATION(RallypointWebsocketSettings)
9014
9015 public:
9018
9021
9024
9027
9030
9032 {
9033 clear();
9034 }
9035
9036 void clear()
9037 {
9038 enabled = false;
9039 listenPort = 8443;
9040 certificate.clear();
9041 requireClientCertificate = false;
9042 requireTls = true;
9043 }
9044 };
9045
9046 static void to_json(nlohmann::json& j, const RallypointWebsocketSettings& p)
9047 {
9048 j = nlohmann::json{
9049 TOJSON_IMPL(enabled),
9050 TOJSON_IMPL(listenPort),
9051 TOJSON_IMPL(certificate),
9052 TOJSON_IMPL(requireClientCertificate),
9053 TOJSON_IMPL(requireTls)
9054 };
9055 }
9056 static void from_json(const nlohmann::json& j, RallypointWebsocketSettings& p)
9057 {
9058 p.clear();
9059 getOptional<bool>("enabled", p.enabled, j, false);
9060 getOptional<int>("listenPort", p.listenPort, j, 8443);
9061 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9062 getOptional<bool>("requireClientCertificate", p.requireClientCertificate, j, false);
9063 getOptional<bool>("requireTls", p.requireTls, j, true);
9064 }
9065
9066
9067
9068 //-----------------------------------------------------------
9069 JSON_SERIALIZED_CLASS(RallypointAdvertisingSettings)
9077 {
9078 IMPLEMENT_JSON_SERIALIZATION()
9079 IMPLEMENT_JSON_DOCUMENTATION(RallypointAdvertisingSettings)
9080
9081 public:
9084
9086 std::string hostName;
9087
9089 std::string serviceName;
9090
9092 std::string interfaceName;
9093
9095 int port;
9096
9098 int ttl;
9099
9101 {
9102 clear();
9103 }
9104
9105 void clear()
9106 {
9107 enabled = false;
9108 hostName.clear();
9109 serviceName = "_rallypoint._tcp.local.";
9110 interfaceName.clear();
9111 port = 0;
9112 ttl = 60;
9113 }
9114 };
9115
9116 static void to_json(nlohmann::json& j, const RallypointAdvertisingSettings& p)
9117 {
9118 j = nlohmann::json{
9119 TOJSON_IMPL(enabled),
9120 TOJSON_IMPL(hostName),
9121 TOJSON_IMPL(serviceName),
9122 TOJSON_IMPL(interfaceName),
9123 TOJSON_IMPL(port),
9124 TOJSON_IMPL(ttl)
9125 };
9126 }
9127 static void from_json(const nlohmann::json& j, RallypointAdvertisingSettings& p)
9128 {
9129 p.clear();
9130 getOptional<bool>("enabled", p.enabled, j, false);
9131 getOptional<std::string>("hostName", p.hostName, j);
9132 getOptional<std::string>("serviceName", p.serviceName, j, "_rallypoint._tcp.local.");
9133 getOptional<std::string>("interfaceName", p.interfaceName, j);
9134
9135 getOptional<int>("port", p.port, j, 0);
9136 getOptional<int>("ttl", p.ttl, j, 60);
9137 }
9138
9139
9140
9141
9142 //-----------------------------------------------------------
9143 JSON_SERIALIZED_CLASS(NamedIdentity)
9151 {
9152 IMPLEMENT_JSON_SERIALIZATION()
9153 IMPLEMENT_JSON_DOCUMENTATION(NamedIdentity)
9154
9155 public:
9157 std::string name;
9158
9161
9163 {
9164 clear();
9165 }
9166
9167 void clear()
9168 {
9169 name.clear();
9170 certificate.clear();
9171 }
9172 };
9173
9174 static void to_json(nlohmann::json& j, const NamedIdentity& p)
9175 {
9176 j = nlohmann::json{
9177 TOJSON_IMPL(name),
9178 TOJSON_IMPL(certificate)
9179 };
9180 }
9181 static void from_json(const nlohmann::json& j, NamedIdentity& p)
9182 {
9183 p.clear();
9184 getOptional<std::string>("name", p.name, j);
9185 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9186 }
9187
9188 //-----------------------------------------------------------
9189 JSON_SERIALIZED_CLASS(RallypointExtendedGroupRestriction)
9197 {
9198 IMPLEMENT_JSON_SERIALIZATION()
9199 IMPLEMENT_JSON_DOCUMENTATION(RallypointExtendedGroupRestriction)
9200
9201 public:
9203 std::string id;
9204
9206 std::vector<StringRestrictionList> restrictions;
9207
9209 {
9210 clear();
9211 }
9212
9213 void clear()
9214 {
9215 id.clear();
9216 restrictions.clear();
9217 }
9218 };
9219
9220 static void to_json(nlohmann::json& j, const RallypointExtendedGroupRestriction& p)
9221 {
9222 j = nlohmann::json{
9223 TOJSON_IMPL(id),
9224 TOJSON_IMPL(restrictions)
9225 };
9226 }
9227 static void from_json(const nlohmann::json& j, RallypointExtendedGroupRestriction& p)
9228 {
9229 p.clear();
9230 getOptional<std::string>("id", p.id, j);
9231 getOptional<std::vector<StringRestrictionList>>("restrictions", p.restrictions, j);
9232 }
9233
9234
9235 //-----------------------------------------------------------
9236 JSON_SERIALIZED_CLASS(RallypointServer)
9246 {
9247 IMPLEMENT_JSON_SERIALIZATION()
9248 IMPLEMENT_JSON_DOCUMENTATION(RallypointServer)
9249
9250 public:
9251 typedef enum
9252 {
9253 sptDefault = 0,
9254 sptCertificate = 1,
9255 sptCertPublicKey = 2,
9256 sptCertSubject = 3,
9257 sptCertIssuer = 4,
9258 sptCertFingerprint = 5,
9259 sptCertSerial = 6,
9260 sptSubjectC = 7,
9261 sptSubjectST = 8,
9262 sptSubjectL = 9,
9263 sptSubjectO = 10,
9264 sptSubjectOU = 11,
9265 sptSubjectCN = 12,
9266 sptIssuerC = 13,
9267 sptIssuerST = 14,
9268 sptIssuerL = 15,
9269 sptIssuerO = 16,
9270 sptIssuerOU = 17,
9271 sptIssuerCN = 18
9272 } StreamIdPrivacyType_t;
9273
9275 StreamIdPrivacyType_t streamIdPrivacyType;
9276
9279
9282
9284 std::string id;
9285
9288
9291
9293 std::string interfaceName;
9294
9297
9300
9303
9306
9309
9312
9315
9318
9321
9324
9327
9330
9333
9336
9339
9342
9344 PeeringConfiguration peeringConfiguration; // NOTE: This is NOT serialized
9345
9348
9351
9354
9357
9359 std::vector<RallypointReflector> staticReflectors;
9360
9363
9366
9369
9372
9375
9378
9380 std::vector<RallypointExtendedGroupRestriction> extendedGroupRestrictions;
9381
9384
9387
9390
9393
9395 uint32_t sysFlags;
9396
9399
9402
9405
9408
9411
9414
9417
9420
9422 std::vector<RallypointRpRtTimingBehavior> peerRtBehaviors;
9423
9426
9429
9432
9435
9438
9440 std::string domainName;
9441
9443 std::vector<std::string> allowedDomains;
9444
9446 std::vector<std::string> blockedDomains;
9447
9449 std::vector<std::string> extraDomains;
9450
9453
9455 std::vector<NamedIdentity> additionalIdentities;
9456
9458 {
9459 clear();
9460 }
9461
9462 void clear()
9463 {
9464 fipsCrypto.clear();
9465 watchdog.clear();
9466 id.clear();
9467 listenPort = 7443;
9468 interfaceName.clear();
9469 certificate.clear();
9470 allowMulticastForwarding = false;
9471 peeringConfiguration.clear();
9472 peeringConfigurationFileName.clear();
9473 peeringConfigurationFileCommand.clear();
9474 peeringConfigurationFileCheckSecs = 60;
9475 ioPools = -1;
9476 statusReport.clear();
9477 limits.clear();
9478 linkGraph.clear();
9479 externalHealthCheckResponder.clear();
9480 allowPeerForwarding = false;
9481 multicastInterfaceName.clear();
9482 tls.clear();
9483 discovery.clear();
9484 forwardDiscoveredGroups = false;
9485 forwardMulticastAddressing = false;
9486 isMeshLeaf = false;
9487 disableMessageSigning = false;
9488 multicastRestrictions.clear();
9489 igmpSnooping.clear();
9490 staticReflectors.clear();
9491 tcpTxOptions.clear();
9492 multicastTxOptions.clear();
9493 certStoreFileName.clear();
9494 certStorePasswordHex.clear();
9495 groupRestrictions.clear();
9496 configurationCheckSignalName = "rts.7b392d1.${id}";
9497 licensing.clear();
9498 featureset.clear();
9499 udpStreaming.clear();
9500 sysFlags = 0;
9501 normalTaskQueueBias = 0;
9502 enableLeafReflectionReverseSubscription = false;
9503 disableLoopDetection = false;
9504 maxSecurityLevel = 0;
9505 routeMap.clear();
9506 streamStatsExport.clear();
9507 maxOutboundPeerConnectionIntervalDeltaSecs = 15;
9508 peerRtTestIntervalMs = 60000;
9509 peerRtBehaviors.clear();
9510 websocket.clear();
9511 nsm.clear();
9512 advertising.clear();
9513 extendedGroupRestrictions.clear();
9514 groupRestrictionAccessPolicyType = GroupRestrictionAccessPolicyType_t::graptPermissive;
9515 ipFamily = IpFamilyType_t::ifIp4;
9516 rxCapture.clear();
9517 txCapture.clear();
9518 domainName.clear();
9519 allowedDomains.clear();
9520 blockedDomains.clear();
9521 extraDomains.clear();
9522 tuning.clear();
9523 additionalIdentities.clear();
9524 streamIdPrivacyType = StreamIdPrivacyType_t::sptDefault;
9525 }
9526 };
9527
9528 static void to_json(nlohmann::json& j, const RallypointServer& p)
9529 {
9530 j = nlohmann::json{
9531 TOJSON_IMPL(fipsCrypto),
9532 TOJSON_IMPL(watchdog),
9533 TOJSON_IMPL(id),
9534 TOJSON_IMPL(listenPort),
9535 TOJSON_IMPL(interfaceName),
9536 TOJSON_IMPL(certificate),
9537 TOJSON_IMPL(allowMulticastForwarding),
9538 // TOJSON_IMPL(peeringConfiguration), // NOTE: Not serialized!
9539 TOJSON_IMPL(peeringConfigurationFileName),
9540 TOJSON_IMPL(peeringConfigurationFileCommand),
9541 TOJSON_IMPL(peeringConfigurationFileCheckSecs),
9542 TOJSON_IMPL(ioPools),
9543 TOJSON_IMPL(statusReport),
9544 TOJSON_IMPL(limits),
9545 TOJSON_IMPL(linkGraph),
9546 TOJSON_IMPL(externalHealthCheckResponder),
9547 TOJSON_IMPL(allowPeerForwarding),
9548 TOJSON_IMPL(multicastInterfaceName),
9549 TOJSON_IMPL(tls),
9550 TOJSON_IMPL(discovery),
9551 TOJSON_IMPL(forwardDiscoveredGroups),
9552 TOJSON_IMPL(forwardMulticastAddressing),
9553 TOJSON_IMPL(isMeshLeaf),
9554 TOJSON_IMPL(disableMessageSigning),
9555 TOJSON_IMPL(multicastRestrictions),
9556 TOJSON_IMPL(igmpSnooping),
9557 TOJSON_IMPL(staticReflectors),
9558 TOJSON_IMPL(tcpTxOptions),
9559 TOJSON_IMPL(multicastTxOptions),
9560 TOJSON_IMPL(certStoreFileName),
9561 TOJSON_IMPL(certStorePasswordHex),
9562 TOJSON_IMPL(groupRestrictions),
9563 TOJSON_IMPL(configurationCheckSignalName),
9564 TOJSON_IMPL(featureset),
9565 TOJSON_IMPL(licensing),
9566 TOJSON_IMPL(udpStreaming),
9567 TOJSON_IMPL(sysFlags),
9568 TOJSON_IMPL(normalTaskQueueBias),
9569 TOJSON_IMPL(enableLeafReflectionReverseSubscription),
9570 TOJSON_IMPL(disableLoopDetection),
9571 TOJSON_IMPL(maxSecurityLevel),
9572 TOJSON_IMPL(routeMap),
9573 TOJSON_IMPL(streamStatsExport),
9574 TOJSON_IMPL(maxOutboundPeerConnectionIntervalDeltaSecs),
9575 TOJSON_IMPL(peerRtTestIntervalMs),
9576 TOJSON_IMPL(peerRtBehaviors),
9577 TOJSON_IMPL(websocket),
9578 TOJSON_IMPL(nsm),
9579 TOJSON_IMPL(advertising),
9580 TOJSON_IMPL(extendedGroupRestrictions),
9581 TOJSON_IMPL(groupRestrictionAccessPolicyType),
9582 TOJSON_IMPL(ipFamily),
9583 TOJSON_IMPL(rxCapture),
9584 TOJSON_IMPL(txCapture),
9585 TOJSON_IMPL(domainName),
9586 TOJSON_IMPL(allowedDomains),
9587 TOJSON_IMPL(blockedDomains),
9588 TOJSON_IMPL(extraDomains),
9589 TOJSON_IMPL(tuning),
9590 TOJSON_IMPL(additionalIdentities),
9591 TOJSON_IMPL(streamIdPrivacyType)
9592 };
9593 }
9594 static void from_json(const nlohmann::json& j, RallypointServer& p)
9595 {
9596 p.clear();
9597 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
9598 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
9599 getOptional<std::string>("id", p.id, j);
9600 getOptional<SecurityCertificate>("certificate", p.certificate, j);
9601 getOptional<std::string>("interfaceName", p.interfaceName, j);
9602 getOptional<int>("listenPort", p.listenPort, j, 7443);
9603 getOptional<bool>("allowMulticastForwarding", p.allowMulticastForwarding, j, false);
9604 //getOptional<PeeringConfiguration>("peeringConfiguration", p.peeringConfiguration, j); // NOTE: Not serialized!
9605 getOptional<std::string>("peeringConfigurationFileName", p.peeringConfigurationFileName, j);
9606 getOptional<std::string>("peeringConfigurationFileCommand", p.peeringConfigurationFileCommand, j);
9607 getOptional<int>("peeringConfigurationFileCheckSecs", p.peeringConfigurationFileCheckSecs, j, 60);
9608 getOptional<int>("ioPools", p.ioPools, j, -1);
9609 getOptional<RallypointServerStatusReportConfiguration>("statusReport", p.statusReport, j);
9610 getOptional<RallypointServerLimits>("limits", p.limits, j);
9611 getOptional<RallypointServerLinkGraph>("linkGraph", p.linkGraph, j);
9612 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
9613 getOptional<bool>("allowPeerForwarding", p.allowPeerForwarding, j, false);
9614 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
9615 getOptional<Tls>("tls", p.tls, j);
9616 getOptional<DiscoveryConfiguration>("discovery", p.discovery, j);
9617 getOptional<bool>("forwardDiscoveredGroups", p.forwardDiscoveredGroups, j, false);
9618 getOptional<bool>("forwardMulticastAddressing", p.forwardMulticastAddressing, j, false);
9619 getOptional<bool>("isMeshLeaf", p.isMeshLeaf, j, false);
9620 getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
9621 getOptional<NetworkAddressRestrictionList>("multicastRestrictions", p.multicastRestrictions, j);
9622 getOptional<IgmpSnooping>("igmpSnooping", p.igmpSnooping, j);
9623 getOptional<std::vector<RallypointReflector>>("staticReflectors", p.staticReflectors, j);
9624 getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
9625 getOptional<NetworkTxOptions>("multicastTxOptions", p.multicastTxOptions, j);
9626 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
9627 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
9628 getOptional<StringRestrictionList>("groupRestrictions", p.groupRestrictions, j);
9629 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.7b392d1.${id}");
9630 getOptional<Licensing>("licensing", p.licensing, j);
9631 getOptional<Featureset>("featureset", p.featureset, j);
9632 getOptional<RallypointUdpStreaming>("udpStreaming", p.udpStreaming, j);
9633 getOptional<uint32_t>("sysFlags", p.sysFlags, j, 0);
9634 getOptional<uint32_t>("normalTaskQueueBias", p.normalTaskQueueBias, j, 0);
9635 getOptional<bool>("enableLeafReflectionReverseSubscription", p.enableLeafReflectionReverseSubscription, j, false);
9636 getOptional<bool>("disableLoopDetection", p.disableLoopDetection, j, false);
9637 getOptional<uint32_t>("maxSecurityLevel", p.maxSecurityLevel, j, 0);
9638 getOptional<RallypointServerRouteMap>("routeMap", p.routeMap, j);
9639 getOptional<RallypointServerStreamStatsExport>("streamStatsExport", p.streamStatsExport, j);
9640 getOptional<uint32_t>("maxOutboundPeerConnectionIntervalDeltaSecs", p.maxOutboundPeerConnectionIntervalDeltaSecs, j, 15);
9641 getOptional<int>("peerRtTestIntervalMs", p.peerRtTestIntervalMs, j, 60000);
9642 getOptional<std::vector<RallypointRpRtTimingBehavior>>("peerRtBehaviors", p.peerRtBehaviors, j);
9643 getOptional<RallypointWebsocketSettings>("websocket", p.websocket, j);
9644 getOptional<NsmConfiguration>("nsm", p.nsm, j);
9645 getOptional<RallypointAdvertisingSettings>("advertising", p.advertising, j);
9646 getOptional<std::vector<RallypointExtendedGroupRestriction>>("extendedGroupRestrictions", p.extendedGroupRestrictions, j);
9647 getOptional<GroupRestrictionAccessPolicyType_t>("groupRestrictionAccessPolicyType", p.groupRestrictionAccessPolicyType, j, GroupRestrictionAccessPolicyType_t::graptPermissive);
9648 getOptional<IpFamilyType_t>("ipFamily", p.ipFamily, j, IpFamilyType_t::ifIp4);
9649 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
9650 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
9651 getOptional<std::string>("domainName", p.domainName, j);
9652 getOptional<std::vector<std::string>>("allowedDomains", p.allowedDomains, j);
9653 getOptional<std::vector<std::string>>("blockedDomains", p.blockedDomains, j);
9654 getOptional<std::vector<std::string>>("extraDomains", p.extraDomains, j);
9655 getOptional<TuningSettings>("tuning", p.tuning, j);
9656 getOptional<std::vector<NamedIdentity>>("additionalIdentities", p.additionalIdentities, j);
9657 getOptional<RallypointServer::StreamIdPrivacyType_t>("streamIdPrivacyType", p.streamIdPrivacyType, j, RallypointServer::StreamIdPrivacyType_t::sptDefault);
9658 }
9659
9660 //-----------------------------------------------------------
9661 JSON_SERIALIZED_CLASS(PlatformDiscoveredService)
9672 {
9673 IMPLEMENT_JSON_SERIALIZATION()
9674 IMPLEMENT_JSON_DOCUMENTATION(PlatformDiscoveredService)
9675
9676 public:
9677
9679 std::string id;
9680
9682 std::string type;
9683
9685 std::string name;
9686
9689
9691 std::string uri;
9692
9695
9697 {
9698 clear();
9699 }
9700
9701 void clear()
9702 {
9703 id.clear();
9704 type.clear();
9705 name.clear();
9706 address.clear();
9707 uri.clear();
9708 configurationVersion = 0;
9709 }
9710 };
9711
9712 static void to_json(nlohmann::json& j, const PlatformDiscoveredService& p)
9713 {
9714 j = nlohmann::json{
9715 TOJSON_IMPL(id),
9716 TOJSON_IMPL(type),
9717 TOJSON_IMPL(name),
9718 TOJSON_IMPL(address),
9719 TOJSON_IMPL(uri),
9720 TOJSON_IMPL(configurationVersion)
9721 };
9722 }
9723 static void from_json(const nlohmann::json& j, PlatformDiscoveredService& p)
9724 {
9725 p.clear();
9726 getOptional<std::string>("id", p.id, j);
9727 getOptional<std::string>("type", p.type, j);
9728 getOptional<std::string>("name", p.name, j);
9729 getOptional<NetworkAddress>("address", p.address, j);
9730 getOptional<std::string>("uri", p.uri, j);
9731 getOptional<uint32_t>("configurationVersion", p.configurationVersion, j, 0);
9732 }
9733
9734
9735 //-----------------------------------------------------------
9737 {
9738 public:
9739 typedef enum
9740 {
9741 etUndefined = 0,
9742 etAudio = 1,
9743 etLocation = 2,
9744 etUser = 3
9745 } EventType_t;
9746
9747 typedef enum
9748 {
9749 dNone = 0,
9750 dInbound = 1,
9751 dOutbound = 2,
9752 dBoth = 3,
9753 dUndefined = 4,
9754 } Direction_t;
9755 };
9756
9757
9758 //-----------------------------------------------------------
9759 JSON_SERIALIZED_CLASS(TimelineQueryParameters)
9770 {
9771 IMPLEMENT_JSON_SERIALIZATION()
9772 IMPLEMENT_JSON_DOCUMENTATION(TimelineQueryParameters)
9773
9774 public:
9775
9778
9781
9784
9787
9790
9793
9796
9798 std::string onlyAlias;
9799
9801 std::string onlyNodeId;
9802
9805
9807 std::string sql;
9808
9810 {
9811 clear();
9812 }
9813
9814 void clear()
9815 {
9816 maxCount = 50;
9817 mostRecentFirst = true;
9818 startedOnOrAfter = 0;
9819 endedOnOrBefore = 0;
9820 onlyDirection = 0;
9821 onlyType = 0;
9822 onlyCommitted = true;
9823 onlyAlias.clear();
9824 onlyNodeId.clear();
9825 sql.clear();
9826 onlyTxId = 0;
9827 }
9828 };
9829
9830 static void to_json(nlohmann::json& j, const TimelineQueryParameters& p)
9831 {
9832 j = nlohmann::json{
9833 TOJSON_IMPL(maxCount),
9834 TOJSON_IMPL(mostRecentFirst),
9835 TOJSON_IMPL(startedOnOrAfter),
9836 TOJSON_IMPL(endedOnOrBefore),
9837 TOJSON_IMPL(onlyDirection),
9838 TOJSON_IMPL(onlyType),
9839 TOJSON_IMPL(onlyCommitted),
9840 TOJSON_IMPL(onlyAlias),
9841 TOJSON_IMPL(onlyNodeId),
9842 TOJSON_IMPL(onlyTxId),
9843 TOJSON_IMPL(sql)
9844 };
9845 }
9846 static void from_json(const nlohmann::json& j, TimelineQueryParameters& p)
9847 {
9848 p.clear();
9849 getOptional<long>("maxCount", p.maxCount, j, 50);
9850 getOptional<bool>("mostRecentFirst", p.mostRecentFirst, j, false);
9851 getOptional<uint64_t>("startedOnOrAfter", p.startedOnOrAfter, j, 0);
9852 getOptional<uint64_t>("endedOnOrBefore", p.endedOnOrBefore, j, 0);
9853 getOptional<int>("onlyDirection", p.onlyDirection, j, 0);
9854 getOptional<int>("onlyType", p.onlyType, j, 0);
9855 getOptional<bool>("onlyCommitted", p.onlyCommitted, j, true);
9856 getOptional<std::string>("onlyAlias", p.onlyAlias, j, EMPTY_STRING);
9857 getOptional<std::string>("onlyNodeId", p.onlyNodeId, j, EMPTY_STRING);
9858 getOptional<int>("onlyTxId", p.onlyTxId, j, 0);
9859 getOptional<std::string>("sql", p.sql, j, EMPTY_STRING);
9860 }
9861
9862 //-----------------------------------------------------------
9863 JSON_SERIALIZED_CLASS(CertStoreCertificate)
9871 {
9872 IMPLEMENT_JSON_SERIALIZATION()
9873 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificate)
9874
9875 public:
9877 std::string id;
9878
9880 std::string certificatePem;
9881
9883 std::string privateKeyPem;
9884
9887
9889 std::string tags;
9890
9892 {
9893 clear();
9894 }
9895
9896 void clear()
9897 {
9898 id.clear();
9899 certificatePem.clear();
9900 privateKeyPem.clear();
9901 internalData = nullptr;
9902 tags.clear();
9903 }
9904 };
9905
9906 static void to_json(nlohmann::json& j, const CertStoreCertificate& p)
9907 {
9908 j = nlohmann::json{
9909 TOJSON_IMPL(id),
9910 TOJSON_IMPL(certificatePem),
9911 TOJSON_IMPL(privateKeyPem),
9912 TOJSON_IMPL(tags)
9913 };
9914 }
9915 static void from_json(const nlohmann::json& j, CertStoreCertificate& p)
9916 {
9917 p.clear();
9918 j.at("id").get_to(p.id);
9919 j.at("certificatePem").get_to(p.certificatePem);
9920 getOptional<std::string>("privateKeyPem", p.privateKeyPem, j, EMPTY_STRING);
9921 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
9922 }
9923
9924 //-----------------------------------------------------------
9925 JSON_SERIALIZED_CLASS(CertStore)
9933 {
9934 IMPLEMENT_JSON_SERIALIZATION()
9935 IMPLEMENT_JSON_DOCUMENTATION(CertStore)
9936
9937 public:
9939 std::string id;
9940
9942 std::vector<CertStoreCertificate> certificates;
9943
9945 std::vector<KvPair> kvp;
9946
9947 CertStore()
9948 {
9949 clear();
9950 }
9951
9952 void clear()
9953 {
9954 id.clear();
9955 certificates.clear();
9956 kvp.clear();
9957 }
9958 };
9959
9960 static void to_json(nlohmann::json& j, const CertStore& p)
9961 {
9962 j = nlohmann::json{
9963 TOJSON_IMPL(id),
9964 TOJSON_IMPL(certificates),
9965 TOJSON_IMPL(kvp)
9966 };
9967 }
9968 static void from_json(const nlohmann::json& j, CertStore& p)
9969 {
9970 p.clear();
9971 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
9972 getOptional<std::vector<CertStoreCertificate>>("certificates", p.certificates, j);
9973 getOptional<std::vector<KvPair>>("kvp", p.kvp, j);
9974 }
9975
9976 //-----------------------------------------------------------
9977 JSON_SERIALIZED_CLASS(CertStoreCertificateElement)
9985 {
9986 IMPLEMENT_JSON_SERIALIZATION()
9987 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificateElement)
9988
9989 public:
9991 std::string id;
9992
9995
9997 std::string certificatePem;
9998
10000 std::string tags;
10001
10003 {
10004 clear();
10005 }
10006
10007 void clear()
10008 {
10009 id.clear();
10010 hasPrivateKey = false;
10011 tags.clear();
10012 }
10013 };
10014
10015 static void to_json(nlohmann::json& j, const CertStoreCertificateElement& p)
10016 {
10017 j = nlohmann::json{
10018 TOJSON_IMPL(id),
10019 TOJSON_IMPL(hasPrivateKey),
10020 TOJSON_IMPL(tags)
10021 };
10022
10023 if(!p.certificatePem.empty())
10024 {
10025 j["certificatePem"] = p.certificatePem;
10026 }
10027 }
10028 static void from_json(const nlohmann::json& j, CertStoreCertificateElement& p)
10029 {
10030 p.clear();
10031 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10032 getOptional<bool>("hasPrivateKey", p.hasPrivateKey, j, false);
10033 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
10034 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
10035 }
10036
10037 //-----------------------------------------------------------
10038 JSON_SERIALIZED_CLASS(CertStoreDescriptor)
10046 {
10047 IMPLEMENT_JSON_SERIALIZATION()
10048 IMPLEMENT_JSON_DOCUMENTATION(CertStoreDescriptor)
10049
10050 public:
10052 std::string id;
10053
10055 std::string fileName;
10056
10059
10062
10064 std::vector<CertStoreCertificateElement> certificates;
10065
10067 std::vector<KvPair> kvp;
10068
10070 {
10071 clear();
10072 }
10073
10074 void clear()
10075 {
10076 id.clear();
10077 fileName.clear();
10078 version = 0;
10079 flags = 0;
10080 certificates.clear();
10081 kvp.clear();
10082 }
10083 };
10084
10085 static void to_json(nlohmann::json& j, const CertStoreDescriptor& p)
10086 {
10087 j = nlohmann::json{
10088 TOJSON_IMPL(id),
10089 TOJSON_IMPL(fileName),
10090 TOJSON_IMPL(version),
10091 TOJSON_IMPL(flags),
10092 TOJSON_IMPL(certificates),
10093 TOJSON_IMPL(kvp)
10094 };
10095 }
10096 static void from_json(const nlohmann::json& j, CertStoreDescriptor& p)
10097 {
10098 p.clear();
10099 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10100 getOptional<std::string>("fileName", p.fileName, j, EMPTY_STRING);
10101 getOptional<int>("version", p.version, j, 0);
10102 getOptional<int>("flags", p.flags, j, 0);
10103 getOptional<std::vector<CertStoreCertificateElement>>("certificates", p.certificates, j);
10104 getOptional<std::vector<KvPair>>("kvp", p.kvp, j);
10105 }
10106
10107 //-----------------------------------------------------------
10108 JSON_SERIALIZED_CLASS(CertificateSubjectElement)
10116 {
10117 IMPLEMENT_JSON_SERIALIZATION()
10118 IMPLEMENT_JSON_DOCUMENTATION(CertificateSubjectElement)
10119
10120 public:
10122 std::string name;
10123
10125 std::string value;
10126
10128 {
10129 clear();
10130 }
10131
10132 void clear()
10133 {
10134 name.clear();
10135 value.clear();
10136 }
10137 };
10138
10139 static void to_json(nlohmann::json& j, const CertificateSubjectElement& p)
10140 {
10141 j = nlohmann::json{
10142 TOJSON_IMPL(name),
10143 TOJSON_IMPL(value)
10144 };
10145 }
10146 static void from_json(const nlohmann::json& j, CertificateSubjectElement& p)
10147 {
10148 p.clear();
10149 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
10150 getOptional<std::string>("value", p.value, j, EMPTY_STRING);
10151 }
10152
10153
10154 //-----------------------------------------------------------
10155 JSON_SERIALIZED_CLASS(CertificateDescriptor)
10163 {
10164 IMPLEMENT_JSON_SERIALIZATION()
10165 IMPLEMENT_JSON_DOCUMENTATION(CertificateDescriptor)
10166
10167 public:
10169 std::string subject;
10170
10172 std::string issuer;
10173
10176
10179
10181 std::string notBefore;
10182
10184 std::string notAfter;
10185
10187 std::string serial;
10188
10190 std::string fingerprint;
10191
10193 std::vector<CertificateSubjectElement> subjectElements;
10194
10196 std::vector<CertificateSubjectElement> issuerElements;
10197
10199 std::string certificatePem;
10200
10202 std::string publicKeyPem;
10203
10205 {
10206 clear();
10207 }
10208
10209 void clear()
10210 {
10211 subject.clear();
10212 issuer.clear();
10213 selfSigned = false;
10214 version = 0;
10215 notBefore.clear();
10216 notAfter.clear();
10217 serial.clear();
10218 fingerprint.clear();
10219 subjectElements.clear();
10220 issuerElements.clear();
10221 certificatePem.clear();
10222 publicKeyPem.clear();
10223 }
10224 };
10225
10226 static void to_json(nlohmann::json& j, const CertificateDescriptor& p)
10227 {
10228 j = nlohmann::json{
10229 TOJSON_IMPL(subject),
10230 TOJSON_IMPL(issuer),
10231 TOJSON_IMPL(selfSigned),
10232 TOJSON_IMPL(version),
10233 TOJSON_IMPL(notBefore),
10234 TOJSON_IMPL(notAfter),
10235 TOJSON_IMPL(serial),
10236 TOJSON_IMPL(fingerprint),
10237 TOJSON_IMPL(subjectElements),
10238 TOJSON_IMPL(issuerElements),
10239 TOJSON_IMPL(certificatePem),
10240 TOJSON_IMPL(publicKeyPem)
10241 };
10242 }
10243 static void from_json(const nlohmann::json& j, CertificateDescriptor& p)
10244 {
10245 p.clear();
10246 getOptional<std::string>("subject", p.subject, j, EMPTY_STRING);
10247 getOptional<std::string>("issuer", p.issuer, j, EMPTY_STRING);
10248 getOptional<bool>("selfSigned", p.selfSigned, j, false);
10249 getOptional<int>("version", p.version, j, 0);
10250 getOptional<std::string>("notBefore", p.notBefore, j, EMPTY_STRING);
10251 getOptional<std::string>("notAfter", p.notAfter, j, EMPTY_STRING);
10252 getOptional<std::string>("serial", p.serial, j, EMPTY_STRING);
10253 getOptional<std::string>("fingerprint", p.fingerprint, j, EMPTY_STRING);
10254 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
10255 getOptional<std::string>("publicKeyPem", p.publicKeyPem, j, EMPTY_STRING);
10256 getOptional<std::vector<CertificateSubjectElement>>("subjectElements", p.subjectElements, j);
10257 getOptional<std::vector<CertificateSubjectElement>>("issuerElements", p.issuerElements, j);
10258 }
10259
10260
10261 //-----------------------------------------------------------
10262 JSON_SERIALIZED_CLASS(RiffDescriptor)
10273 {
10274 IMPLEMENT_JSON_SERIALIZATION()
10275 IMPLEMENT_JSON_DOCUMENTATION(RiffDescriptor)
10276
10277 public:
10279 std::string file;
10280
10283
10286
10289
10291 std::string meta;
10292
10294 std::string certPem;
10295
10298
10300 std::string signature;
10301
10303 {
10304 clear();
10305 }
10306
10307 void clear()
10308 {
10309 file.clear();
10310 verified = false;
10311 channels = 0;
10312 sampleCount = 0;
10313 meta.clear();
10314 certPem.clear();
10315 certDescriptor.clear();
10316 signature.clear();
10317 }
10318 };
10319
10320 static void to_json(nlohmann::json& j, const RiffDescriptor& p)
10321 {
10322 j = nlohmann::json{
10323 TOJSON_IMPL(file),
10324 TOJSON_IMPL(verified),
10325 TOJSON_IMPL(channels),
10326 TOJSON_IMPL(sampleCount),
10327 TOJSON_IMPL(meta),
10328 TOJSON_IMPL(certPem),
10329 TOJSON_IMPL(certDescriptor),
10330 TOJSON_IMPL(signature)
10331 };
10332 }
10333
10334 static void from_json(const nlohmann::json& j, RiffDescriptor& p)
10335 {
10336 p.clear();
10337 FROMJSON_IMPL(file, std::string, EMPTY_STRING);
10338 FROMJSON_IMPL(verified, bool, false);
10339 FROMJSON_IMPL(channels, int, 0);
10340 FROMJSON_IMPL(sampleCount, int, 0);
10341 FROMJSON_IMPL(meta, std::string, EMPTY_STRING);
10342 FROMJSON_IMPL(certPem, std::string, EMPTY_STRING);
10343 getOptional<CertificateDescriptor>("certDescriptor", p.certDescriptor, j);
10344 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
10345 }
10346
10347
10348 //-----------------------------------------------------------
10349 JSON_SERIALIZED_CLASS(BridgeCreationDetail)
10357 {
10358 IMPLEMENT_JSON_SERIALIZATION()
10359 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(BridgeCreationDetail)
10360 IMPLEMENT_JSON_DOCUMENTATION(BridgeCreationDetail)
10361
10362 public:
10364 typedef enum
10365 {
10367 csUndefined = 0,
10368
10370 csOk = 1,
10371
10373 csNoJson = -1,
10374
10376 csAlreadyExists = -3,
10377
10379 csInvalidConfiguration = -4,
10380
10382 csInvalidJson = -5,
10383
10385 csInsufficientGroups = -6,
10386
10388 csTooManyGroups = -7,
10389
10391 csDuplicateGroup = -8,
10392
10394 csLocalLoopDetected = -9,
10395 } CreationStatus_t;
10396
10398 std::string id;
10399
10402
10404 {
10405 clear();
10406 }
10407
10408 void clear()
10409 {
10410 id.clear();
10411 status = csUndefined;
10412 }
10413 };
10414
10415 static void to_json(nlohmann::json& j, const BridgeCreationDetail& p)
10416 {
10417 j = nlohmann::json{
10418 TOJSON_IMPL(id),
10419 TOJSON_IMPL(status)
10420 };
10421 }
10422 static void from_json(const nlohmann::json& j, BridgeCreationDetail& p)
10423 {
10424 p.clear();
10425 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10426 getOptional<BridgeCreationDetail::CreationStatus_t>("status", p.status, j, BridgeCreationDetail::CreationStatus_t::csUndefined);
10427 }
10428 //-----------------------------------------------------------
10429 JSON_SERIALIZED_CLASS(GroupConnectionDetail)
10437 {
10438 IMPLEMENT_JSON_SERIALIZATION()
10439 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupConnectionDetail)
10440 IMPLEMENT_JSON_DOCUMENTATION(GroupConnectionDetail)
10441
10442 public:
10444 typedef enum
10445 {
10447 ctUndefined = 0,
10448
10450 ctDirectDatagram = 1,
10451
10453 ctRallypoint = 2
10454 } ConnectionType_t;
10455
10457 std::string id;
10458
10461
10463 std::string peer;
10464
10467
10469 std::string reason;
10470
10472 {
10473 clear();
10474 }
10475
10476 void clear()
10477 {
10478 id.clear();
10479 connectionType = ctUndefined;
10480 peer.clear();
10481 asFailover = false;
10482 reason.clear();
10483 }
10484 };
10485
10486 static void to_json(nlohmann::json& j, const GroupConnectionDetail& p)
10487 {
10488 j = nlohmann::json{
10489 TOJSON_IMPL(id),
10490 TOJSON_IMPL(connectionType),
10491 TOJSON_IMPL(peer),
10492 TOJSON_IMPL(asFailover),
10493 TOJSON_IMPL(reason)
10494 };
10495
10496 if(p.asFailover)
10497 {
10498 j["asFailover"] = p.asFailover;
10499 }
10500 }
10501 static void from_json(const nlohmann::json& j, GroupConnectionDetail& p)
10502 {
10503 p.clear();
10504 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10505 getOptional<GroupConnectionDetail::ConnectionType_t>("connectionType", p.connectionType, j, GroupConnectionDetail::ConnectionType_t::ctUndefined);
10506 getOptional<std::string>("peer", p.peer, j, EMPTY_STRING);
10507 getOptional<bool>("asFailover", p.asFailover, j, false);
10508 getOptional<std::string>("reason", p.reason, j, EMPTY_STRING);
10509 }
10510
10511 //-----------------------------------------------------------
10512 JSON_SERIALIZED_CLASS(GroupTxDetail)
10520 {
10521 IMPLEMENT_JSON_SERIALIZATION()
10522 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupTxDetail)
10523 IMPLEMENT_JSON_DOCUMENTATION(GroupTxDetail)
10524
10525 public:
10527 typedef enum
10528 {
10530 txsUndefined = 0,
10531
10533 txsTxStarted = 1,
10534
10536 txsTxEnded = 2,
10537
10539 txsNotAnAudioGroup = -1,
10540
10542 txsNotJoined = -2,
10543
10545 txsNotConnected = -3,
10546
10548 txsAlreadyTransmitting = -4,
10549
10551 txsInvalidParams = -5,
10552
10554 txsPriorityTooLow = -6,
10555
10557 txsRxActiveOnNonFdx = -7,
10558
10560 txsCannotSubscribeToInput = -8,
10561
10563 txsInvalidId = -9,
10564
10566 txsTxEndedWithFailure = -10,
10567
10569 txsBridgedButNotMultistream = -11,
10570
10572 txsAutoEndedDueToNonMultistreamBridge = -12,
10573
10575 txsReBeginWithoutPriorBegin = -13
10576 } TxStatus_t;
10577
10579 std::string id;
10580
10583
10586
10589
10592
10594 uint32_t txId;
10595
10597 {
10598 clear();
10599 }
10600
10601 void clear()
10602 {
10603 id.clear();
10604 status = txsUndefined;
10605 localPriority = 0;
10606 remotePriority = 0;
10607 nonFdxMsHangRemaining = 0;
10608 txId = 0;
10609 }
10610 };
10611
10612 static void to_json(nlohmann::json& j, const GroupTxDetail& p)
10613 {
10614 j = nlohmann::json{
10615 TOJSON_IMPL(id),
10616 TOJSON_IMPL(status),
10617 TOJSON_IMPL(localPriority),
10618 TOJSON_IMPL(txId)
10619 };
10620
10621 // Include remote priority if status is related to that
10622 if(p.status == GroupTxDetail::TxStatus_t::txsPriorityTooLow)
10623 {
10624 j["remotePriority"] = p.remotePriority;
10625 }
10626 else if(p.status == GroupTxDetail::TxStatus_t::txsRxActiveOnNonFdx)
10627 {
10628 j["nonFdxMsHangRemaining"] = p.nonFdxMsHangRemaining;
10629 }
10630 }
10631 static void from_json(const nlohmann::json& j, GroupTxDetail& p)
10632 {
10633 p.clear();
10634 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10635 getOptional<GroupTxDetail::TxStatus_t>("status", p.status, j, GroupTxDetail::TxStatus_t::txsUndefined);
10636 getOptional<int>("localPriority", p.localPriority, j, 0);
10637 getOptional<int>("remotePriority", p.remotePriority, j, 0);
10638 getOptional<long>("nonFdxMsHangRemaining", p.nonFdxMsHangRemaining, j, 0);
10639 getOptional<uint32_t>("txId", p.txId, j, 0);
10640 }
10641
10642 //-----------------------------------------------------------
10643 JSON_SERIALIZED_CLASS(GroupCreationDetail)
10651 {
10652 IMPLEMENT_JSON_SERIALIZATION()
10653 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupCreationDetail)
10654 IMPLEMENT_JSON_DOCUMENTATION(GroupCreationDetail)
10655
10656 public:
10658 typedef enum
10659 {
10661 csUndefined = 0,
10662
10664 csOk = 1,
10665
10667 csNoJson = -1,
10668
10670 csConflictingRpListAndCluster = -2,
10671
10673 csAlreadyExists = -3,
10674
10676 csInvalidConfiguration = -4,
10677
10679 csInvalidJson = -5,
10680
10682 csCryptoFailure = -6,
10683
10685 csAudioInputFailure = -7,
10686
10688 csAudioOutputFailure = -8,
10689
10691 csUnsupportedAudioEncoder = -9,
10692
10694 csNoLicense = -10,
10695
10697 csInvalidTransport = -11,
10698
10700 csAudioInputDeviceNotFound = -12,
10701
10703 csAudioOutputDeviceNotFound = -13
10704 } CreationStatus_t;
10705
10707 std::string id;
10708
10711
10713 {
10714 clear();
10715 }
10716
10717 void clear()
10718 {
10719 id.clear();
10720 status = csUndefined;
10721 }
10722 };
10723
10724 static void to_json(nlohmann::json& j, const GroupCreationDetail& p)
10725 {
10726 j = nlohmann::json{
10727 TOJSON_IMPL(id),
10728 TOJSON_IMPL(status)
10729 };
10730 }
10731 static void from_json(const nlohmann::json& j, GroupCreationDetail& p)
10732 {
10733 p.clear();
10734 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10735 getOptional<GroupCreationDetail::CreationStatus_t>("status", p.status, j, GroupCreationDetail::CreationStatus_t::csUndefined);
10736 }
10737
10738
10739 //-----------------------------------------------------------
10740 JSON_SERIALIZED_CLASS(GroupReconfigurationDetail)
10748 {
10749 IMPLEMENT_JSON_SERIALIZATION()
10750 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupReconfigurationDetail)
10751 IMPLEMENT_JSON_DOCUMENTATION(GroupReconfigurationDetail)
10752
10753 public:
10755 typedef enum
10756 {
10758 rsUndefined = 0,
10759
10761 rsOk = 1,
10762
10764 rsNoJson = -1,
10765
10767 rsInvalidConfiguration = -2,
10768
10770 rsInvalidJson = -3,
10771
10773 rsAudioInputFailure = -4,
10774
10776 rsAudioOutputFailure = -5,
10777
10779 rsDoesNotExist = -6,
10780
10782 rsAudioInputInUse = -7,
10783
10785 rsAudioDisabledForGroup = -8,
10786
10788 rsGroupIsNotAudio = -9
10789 } ReconfigurationStatus_t;
10790
10792 std::string id;
10793
10796
10798 {
10799 clear();
10800 }
10801
10802 void clear()
10803 {
10804 id.clear();
10805 status = rsUndefined;
10806 }
10807 };
10808
10809 static void to_json(nlohmann::json& j, const GroupReconfigurationDetail& p)
10810 {
10811 j = nlohmann::json{
10812 TOJSON_IMPL(id),
10813 TOJSON_IMPL(status)
10814 };
10815 }
10816 static void from_json(const nlohmann::json& j, GroupReconfigurationDetail& p)
10817 {
10818 p.clear();
10819 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10820 getOptional<GroupReconfigurationDetail::ReconfigurationStatus_t>("status", p.status, j, GroupReconfigurationDetail::ReconfigurationStatus_t::rsUndefined);
10821 }
10822
10823
10824 //-----------------------------------------------------------
10825 JSON_SERIALIZED_CLASS(GroupHealthReport)
10833 {
10834 IMPLEMENT_JSON_SERIALIZATION()
10835 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupHealthReport)
10836 IMPLEMENT_JSON_DOCUMENTATION(GroupHealthReport)
10837
10838 public:
10839 std::string id;
10840 uint64_t lastErrorTs;
10841 uint64_t decryptionErrors;
10842 uint64_t encryptionErrors;
10843 uint64_t unsupportDecoderErrors;
10844 uint64_t decoderFailures;
10845 uint64_t decoderStartFailures;
10846 uint64_t inboundRtpPacketAllocationFailures;
10847 uint64_t inboundRtpPacketLoadFailures;
10848 uint64_t latePacketsDiscarded;
10849 uint64_t jitterBufferInsertionFailures;
10850 uint64_t presenceDeserializationFailures;
10851 uint64_t notRtpErrors;
10852 uint64_t generalErrors;
10853 uint64_t inboundRtpProcessorAllocationFailures;
10854
10856 {
10857 clear();
10858 }
10859
10860 void clear()
10861 {
10862 id.clear();
10863 lastErrorTs = 0;
10864 decryptionErrors = 0;
10865 encryptionErrors = 0;
10866 unsupportDecoderErrors = 0;
10867 decoderFailures = 0;
10868 decoderStartFailures = 0;
10869 inboundRtpPacketAllocationFailures = 0;
10870 inboundRtpPacketLoadFailures = 0;
10871 latePacketsDiscarded = 0;
10872 jitterBufferInsertionFailures = 0;
10873 presenceDeserializationFailures = 0;
10874 notRtpErrors = 0;
10875 generalErrors = 0;
10876 inboundRtpProcessorAllocationFailures = 0;
10877 }
10878 };
10879
10880 static void to_json(nlohmann::json& j, const GroupHealthReport& p)
10881 {
10882 j = nlohmann::json{
10883 TOJSON_IMPL(id),
10884 TOJSON_IMPL(lastErrorTs),
10885 TOJSON_IMPL(decryptionErrors),
10886 TOJSON_IMPL(encryptionErrors),
10887 TOJSON_IMPL(unsupportDecoderErrors),
10888 TOJSON_IMPL(decoderFailures),
10889 TOJSON_IMPL(decoderStartFailures),
10890 TOJSON_IMPL(inboundRtpPacketAllocationFailures),
10891 TOJSON_IMPL(inboundRtpPacketLoadFailures),
10892 TOJSON_IMPL(latePacketsDiscarded),
10893 TOJSON_IMPL(jitterBufferInsertionFailures),
10894 TOJSON_IMPL(presenceDeserializationFailures),
10895 TOJSON_IMPL(notRtpErrors),
10896 TOJSON_IMPL(generalErrors),
10897 TOJSON_IMPL(inboundRtpProcessorAllocationFailures)
10898 };
10899 }
10900 static void from_json(const nlohmann::json& j, GroupHealthReport& p)
10901 {
10902 p.clear();
10903 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10904 getOptional<uint64_t>("lastErrorTs", p.lastErrorTs, j, 0);
10905 getOptional<uint64_t>("decryptionErrors", p.decryptionErrors, j, 0);
10906 getOptional<uint64_t>("encryptionErrors", p.encryptionErrors, j, 0);
10907 getOptional<uint64_t>("unsupportDecoderErrors", p.unsupportDecoderErrors, j, 0);
10908 getOptional<uint64_t>("decoderFailures", p.decoderFailures, j, 0);
10909 getOptional<uint64_t>("decoderStartFailures", p.decoderStartFailures, j, 0);
10910 getOptional<uint64_t>("inboundRtpPacketAllocationFailures", p.inboundRtpPacketAllocationFailures, j, 0);
10911 getOptional<uint64_t>("inboundRtpPacketLoadFailures", p.inboundRtpPacketLoadFailures, j, 0);
10912 getOptional<uint64_t>("latePacketsDiscarded", p.latePacketsDiscarded, j, 0);
10913 getOptional<uint64_t>("jitterBufferInsertionFailures", p.jitterBufferInsertionFailures, j, 0);
10914 getOptional<uint64_t>("presenceDeserializationFailures", p.presenceDeserializationFailures, j, 0);
10915 getOptional<uint64_t>("notRtpErrors", p.notRtpErrors, j, 0);
10916 getOptional<uint64_t>("generalErrors", p.generalErrors, j, 0);
10917 getOptional<uint64_t>("inboundRtpProcessorAllocationFailures", p.inboundRtpProcessorAllocationFailures, j, 0);
10918 }
10919
10920 //-----------------------------------------------------------
10921 JSON_SERIALIZED_CLASS(InboundProcessorStats)
10929 {
10930 IMPLEMENT_JSON_SERIALIZATION()
10931 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(InboundProcessorStats)
10932 IMPLEMENT_JSON_DOCUMENTATION(InboundProcessorStats)
10933
10934 public:
10935 uint32_t ssrc;
10936 double jitter;
10937 uint64_t minRtpSamplesInQueue;
10938 uint64_t maxRtpSamplesInQueue;
10939 uint64_t totalSamplesTrimmed;
10940 uint64_t underruns;
10941 uint64_t overruns;
10942 uint64_t samplesInQueue;
10943 uint64_t totalPacketsReceived;
10944 uint64_t totalPacketsLost;
10945 uint64_t totalPacketsDiscarded;
10946
10948 {
10949 clear();
10950 }
10951
10952 void clear()
10953 {
10954 ssrc = 0;
10955 jitter = 0.0;
10956 minRtpSamplesInQueue = 0;
10957 maxRtpSamplesInQueue = 0;
10958 totalSamplesTrimmed = 0;
10959 underruns = 0;
10960 overruns = 0;
10961 samplesInQueue = 0;
10962 totalPacketsReceived = 0;
10963 totalPacketsLost = 0;
10964 totalPacketsDiscarded = 0;
10965 }
10966 };
10967
10968 static void to_json(nlohmann::json& j, const InboundProcessorStats& p)
10969 {
10970 j = nlohmann::json{
10971 TOJSON_IMPL(ssrc),
10972 TOJSON_IMPL(jitter),
10973 TOJSON_IMPL(minRtpSamplesInQueue),
10974 TOJSON_IMPL(maxRtpSamplesInQueue),
10975 TOJSON_IMPL(totalSamplesTrimmed),
10976 TOJSON_IMPL(underruns),
10977 TOJSON_IMPL(overruns),
10978 TOJSON_IMPL(samplesInQueue),
10979 TOJSON_IMPL(totalPacketsReceived),
10980 TOJSON_IMPL(totalPacketsLost),
10981 TOJSON_IMPL(totalPacketsDiscarded)
10982 };
10983 }
10984 static void from_json(const nlohmann::json& j, InboundProcessorStats& p)
10985 {
10986 p.clear();
10987 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
10988 getOptional<double>("jitter", p.jitter, j, 0.0);
10989 getOptional<uint64_t>("minRtpSamplesInQueue", p.minRtpSamplesInQueue, j, 0);
10990 getOptional<uint64_t>("maxRtpSamplesInQueue", p.maxRtpSamplesInQueue, j, 0);
10991 getOptional<uint64_t>("totalSamplesTrimmed", p.totalSamplesTrimmed, j, 0);
10992 getOptional<uint64_t>("underruns", p.underruns, j, 0);
10993 getOptional<uint64_t>("overruns", p.overruns, j, 0);
10994 getOptional<uint64_t>("samplesInQueue", p.samplesInQueue, j, 0);
10995 getOptional<uint64_t>("totalPacketsReceived", p.totalPacketsReceived, j, 0);
10996 getOptional<uint64_t>("totalPacketsLost", p.totalPacketsLost, j, 0);
10997 getOptional<uint64_t>("totalPacketsDiscarded", p.totalPacketsDiscarded, j, 0);
10998 }
10999
11000 //-----------------------------------------------------------
11001 JSON_SERIALIZED_CLASS(TrafficCounter)
11009 {
11010 IMPLEMENT_JSON_SERIALIZATION()
11011 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(TrafficCounter)
11012 IMPLEMENT_JSON_DOCUMENTATION(TrafficCounter)
11013
11014 public:
11015 uint64_t packets;
11016 uint64_t bytes;
11017 uint64_t errors;
11018
11020 {
11021 clear();
11022 }
11023
11024 void clear()
11025 {
11026 packets = 0;
11027 bytes = 0;
11028 errors = 0;
11029 }
11030 };
11031
11032 static void to_json(nlohmann::json& j, const TrafficCounter& p)
11033 {
11034 j = nlohmann::json{
11035 TOJSON_IMPL(packets),
11036 TOJSON_IMPL(bytes),
11037 TOJSON_IMPL(errors)
11038 };
11039 }
11040 static void from_json(const nlohmann::json& j, TrafficCounter& p)
11041 {
11042 p.clear();
11043 getOptional<uint64_t>("packets", p.packets, j, 0);
11044 getOptional<uint64_t>("bytes", p.bytes, j, 0);
11045 getOptional<uint64_t>("errors", p.errors, j, 0);
11046 }
11047
11048 //-----------------------------------------------------------
11049 JSON_SERIALIZED_CLASS(GroupStats)
11057 {
11058 IMPLEMENT_JSON_SERIALIZATION()
11059 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupStats)
11060 IMPLEMENT_JSON_DOCUMENTATION(GroupStats)
11061
11062 public:
11063 std::string id;
11064 //std::vector<InboundProcessorStats> rtpInbounds;
11065 TrafficCounter rxTraffic;
11066 TrafficCounter txTraffic;
11067
11068 GroupStats()
11069 {
11070 clear();
11071 }
11072
11073 void clear()
11074 {
11075 id.clear();
11076 //rtpInbounds.clear();
11077 rxTraffic.clear();
11078 txTraffic.clear();
11079 }
11080 };
11081
11082 static void to_json(nlohmann::json& j, const GroupStats& p)
11083 {
11084 j = nlohmann::json{
11085 TOJSON_IMPL(id),
11086 //TOJSON_IMPL(rtpInbounds),
11087 TOJSON_IMPL(rxTraffic),
11088 TOJSON_IMPL(txTraffic)
11089 };
11090 }
11091 static void from_json(const nlohmann::json& j, GroupStats& p)
11092 {
11093 p.clear();
11094 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
11095 //getOptional<std::vector<InboundProcessorStats>>("rtpInbounds", p.rtpInbounds, j);
11096 getOptional<TrafficCounter>("rxTraffic", p.rxTraffic, j);
11097 getOptional<TrafficCounter>("txTraffic", p.txTraffic, j);
11098 }
11099
11100 //-----------------------------------------------------------
11101 JSON_SERIALIZED_CLASS(RallypointConnectionDetail)
11109 {
11110 IMPLEMENT_JSON_SERIALIZATION()
11111 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(RallypointConnectionDetail)
11112 IMPLEMENT_JSON_DOCUMENTATION(RallypointConnectionDetail)
11113
11114 public:
11116 std::string internalId;
11117
11119 std::string host;
11120
11122 int port;
11123
11126
11129
11131 {
11132 clear();
11133 }
11134
11135 void clear()
11136 {
11137 internalId.clear();
11138 host.clear();
11139 port = 0;
11140 msToNextConnectionAttempt = 0;
11141 serverProcessingMs = -1.0f;
11142 }
11143 };
11144
11145 static void to_json(nlohmann::json& j, const RallypointConnectionDetail& p)
11146 {
11147 j = nlohmann::json{
11148 TOJSON_IMPL(internalId),
11149 TOJSON_IMPL(host),
11150 TOJSON_IMPL(port)
11151 };
11152
11153 if(p.msToNextConnectionAttempt > 0)
11154 {
11155 j["msToNextConnectionAttempt"] = p.msToNextConnectionAttempt;
11156 }
11157
11158 if(p.serverProcessingMs >= 0.0)
11159 {
11160 j["serverProcessingMs"] = p.serverProcessingMs;
11161 }
11162 }
11163 static void from_json(const nlohmann::json& j, RallypointConnectionDetail& p)
11164 {
11165 p.clear();
11166 getOptional<std::string>("internalId", p.internalId, j, EMPTY_STRING);
11167 getOptional<std::string>("host", p.host, j, EMPTY_STRING);
11168 getOptional<int>("port", p.port, j, 0);
11169 getOptional<uint64_t>("msToNextConnectionAttempt", p.msToNextConnectionAttempt, j, 0);
11170 getOptional<float>("serverProcessingMs", p.serverProcessingMs, j, -1.0);
11171 }
11172
11173 //-----------------------------------------------------------
11174 JSON_SERIALIZED_CLASS(TranslationSession)
11185 {
11186 IMPLEMENT_JSON_SERIALIZATION()
11187 IMPLEMENT_JSON_DOCUMENTATION(TranslationSession)
11188
11189 public:
11191 std::string id;
11192
11194 std::string name;
11195
11197 std::vector<std::string> groups;
11198
11201
11203 {
11204 clear();
11205 }
11206
11207 void clear()
11208 {
11209 id.clear();
11210 name.clear();
11211 groups.clear();
11212 enabled = true;
11213 }
11214 };
11215
11216 static void to_json(nlohmann::json& j, const TranslationSession& p)
11217 {
11218 j = nlohmann::json{
11219 TOJSON_IMPL(id),
11220 TOJSON_IMPL(name),
11221 TOJSON_IMPL(groups),
11222 TOJSON_IMPL(enabled)
11223 };
11224 }
11225 static void from_json(const nlohmann::json& j, TranslationSession& p)
11226 {
11227 p.clear();
11228 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
11229 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
11230 getOptional<std::vector<std::string>>("groups", p.groups, j);
11231 FROMJSON_IMPL(enabled, bool, true);
11232 }
11233
11234 //-----------------------------------------------------------
11235 JSON_SERIALIZED_CLASS(TranslationConfiguration)
11246 {
11247 IMPLEMENT_JSON_SERIALIZATION()
11248 IMPLEMENT_JSON_DOCUMENTATION(TranslationConfiguration)
11249
11250 public:
11252 std::vector<TranslationSession> sessions;
11253
11255 std::vector<Group> groups;
11256
11258 {
11259 clear();
11260 }
11261
11262 void clear()
11263 {
11264 sessions.clear();
11265 groups.clear();
11266 }
11267 };
11268
11269 static void to_json(nlohmann::json& j, const TranslationConfiguration& p)
11270 {
11271 j = nlohmann::json{
11272 TOJSON_IMPL(sessions),
11273 TOJSON_IMPL(groups)
11274 };
11275 }
11276 static void from_json(const nlohmann::json& j, TranslationConfiguration& p)
11277 {
11278 p.clear();
11279 getOptional<std::vector<TranslationSession>>("sessions", p.sessions, j);
11280 getOptional<std::vector<Group>>("groups", p.groups, j);
11281 }
11282
11283 //-----------------------------------------------------------
11284 JSON_SERIALIZED_CLASS(LingoServerStatusReportConfiguration)
11295 {
11296 IMPLEMENT_JSON_SERIALIZATION()
11297 IMPLEMENT_JSON_DOCUMENTATION(LingoServerStatusReportConfiguration)
11298
11299 public:
11301 std::string fileName;
11302
11305
11308
11310 std::string runCmd;
11311
11314
11317
11320
11322 {
11323 clear();
11324 }
11325
11326 void clear()
11327 {
11328 fileName.clear();
11329 intervalSecs = 60;
11330 enabled = false;
11331 includeGroupDetail = false;
11332 includeSessionDetail = false;
11333 includeSessionGroupDetail = false;
11334 runCmd.clear();
11335 }
11336 };
11337
11338 static void to_json(nlohmann::json& j, const LingoServerStatusReportConfiguration& p)
11339 {
11340 j = nlohmann::json{
11341 TOJSON_IMPL(fileName),
11342 TOJSON_IMPL(intervalSecs),
11343 TOJSON_IMPL(enabled),
11344 TOJSON_IMPL(includeGroupDetail),
11345 TOJSON_IMPL(includeSessionDetail),
11346 TOJSON_IMPL(includeSessionGroupDetail),
11347 TOJSON_IMPL(runCmd)
11348 };
11349 }
11350 static void from_json(const nlohmann::json& j, LingoServerStatusReportConfiguration& p)
11351 {
11352 p.clear();
11353 getOptional<std::string>("fileName", p.fileName, j);
11354 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
11355 getOptional<bool>("enabled", p.enabled, j, false);
11356 getOptional<std::string>("runCmd", p.runCmd, j);
11357 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
11358 getOptional<bool>("includeSessionDetail", p.includeSessionDetail, j, false);
11359 getOptional<bool>("includeSessionGroupDetail", p.includeSessionGroupDetail, j, false);
11360 }
11361
11362 //-----------------------------------------------------------
11363 JSON_SERIALIZED_CLASS(LingoServerInternals)
11376 {
11377 IMPLEMENT_JSON_SERIALIZATION()
11378 IMPLEMENT_JSON_DOCUMENTATION(LingoServerInternals)
11379
11380 public:
11383
11386
11389
11391 {
11392 clear();
11393 }
11394
11395 void clear()
11396 {
11397 watchdog.clear();
11398 tuning.clear();
11399 housekeeperIntervalMs = 1000;
11400 }
11401 };
11402
11403 static void to_json(nlohmann::json& j, const LingoServerInternals& p)
11404 {
11405 j = nlohmann::json{
11406 TOJSON_IMPL(watchdog),
11407 TOJSON_IMPL(housekeeperIntervalMs),
11408 TOJSON_IMPL(tuning)
11409 };
11410 }
11411 static void from_json(const nlohmann::json& j, LingoServerInternals& p)
11412 {
11413 p.clear();
11414 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
11415 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
11416 getOptional<TuningSettings>("tuning", p.tuning, j);
11417 }
11418
11419 //-----------------------------------------------------------
11420 JSON_SERIALIZED_CLASS(LingoServerConfiguration)
11430 {
11431 IMPLEMENT_JSON_SERIALIZATION()
11432 IMPLEMENT_JSON_DOCUMENTATION(LingoServerConfiguration)
11433
11434 public:
11436 std::string id;
11437
11440
11443
11446
11449
11452
11455
11458
11461
11464
11467
11470
11473
11476
11479
11481 {
11482 clear();
11483 }
11484
11485 void clear()
11486 {
11487 id.clear();
11488 serviceConfigurationFileCheckSecs = 60;
11489 lingoConfigurationFileName.clear();
11490 lingoConfigurationFileCommand.clear();
11491 lingoConfigurationFileCheckSecs = 60;
11492 statusReport.clear();
11493 externalHealthCheckResponder.clear();
11494 internals.clear();
11495 certStoreFileName.clear();
11496 certStorePasswordHex.clear();
11497 enginePolicy.clear();
11498 configurationCheckSignalName = "rts.22f4ec3.${id}";
11499 fipsCrypto.clear();
11500 proxy.clear();
11501 nsm.clear();
11502 }
11503 };
11504
11505 static void to_json(nlohmann::json& j, const LingoServerConfiguration& p)
11506 {
11507 j = nlohmann::json{
11508 TOJSON_IMPL(id),
11509 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
11510 TOJSON_IMPL(lingoConfigurationFileName),
11511 TOJSON_IMPL(lingoConfigurationFileCommand),
11512 TOJSON_IMPL(lingoConfigurationFileCheckSecs),
11513 TOJSON_IMPL(statusReport),
11514 TOJSON_IMPL(externalHealthCheckResponder),
11515 TOJSON_IMPL(internals),
11516 TOJSON_IMPL(certStoreFileName),
11517 TOJSON_IMPL(certStorePasswordHex),
11518 TOJSON_IMPL(enginePolicy),
11519 TOJSON_IMPL(configurationCheckSignalName),
11520 TOJSON_IMPL(fipsCrypto),
11521 TOJSON_IMPL(proxy),
11522 TOJSON_IMPL(nsm)
11523 };
11524 }
11525 static void from_json(const nlohmann::json& j, LingoServerConfiguration& p)
11526 {
11527 p.clear();
11528 getOptional<std::string>("id", p.id, j);
11529 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
11530 getOptional<std::string>("lingoConfigurationFileName", p.lingoConfigurationFileName, j);
11531 getOptional<std::string>("lingoConfigurationFileCommand", p.lingoConfigurationFileCommand, j);
11532 getOptional<int>("lingoConfigurationFileCheckSecs", p.lingoConfigurationFileCheckSecs, j, 60);
11533 getOptional<LingoServerStatusReportConfiguration>("statusReport", p.statusReport, j);
11534 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
11535 getOptional<LingoServerInternals>("internals", p.internals, j);
11536 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
11537 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
11538 j.at("enginePolicy").get_to(p.enginePolicy);
11539 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.22f4ec3.${id}");
11540 getOptional<FipsCryptoSettings>("fipsCrypo", p.fipsCrypto, j);
11541 getOptional<NetworkAddress>("proxy", p.proxy, j);
11542 getOptional<NsmConfiguration>("nsm", p.nsm, j);
11543 }
11544
11545
11546 //-----------------------------------------------------------
11547 JSON_SERIALIZED_CLASS(VoiceToVoiceSession)
11558 {
11559 IMPLEMENT_JSON_SERIALIZATION()
11560 IMPLEMENT_JSON_DOCUMENTATION(VoiceToVoiceSession)
11561
11562 public:
11564 std::string id;
11565
11567 std::string name;
11568
11570 std::vector<std::string> groups;
11571
11574
11576 {
11577 clear();
11578 }
11579
11580 void clear()
11581 {
11582 id.clear();
11583 name.clear();
11584 groups.clear();
11585 enabled = true;
11586 }
11587 };
11588
11589 static void to_json(nlohmann::json& j, const VoiceToVoiceSession& p)
11590 {
11591 j = nlohmann::json{
11592 TOJSON_IMPL(id),
11593 TOJSON_IMPL(name),
11594 TOJSON_IMPL(groups),
11595 TOJSON_IMPL(enabled)
11596 };
11597 }
11598 static void from_json(const nlohmann::json& j, VoiceToVoiceSession& p)
11599 {
11600 p.clear();
11601 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
11602 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
11603 getOptional<std::vector<std::string>>("groups", p.groups, j);
11604 FROMJSON_IMPL(enabled, bool, true);
11605 }
11606
11607 //-----------------------------------------------------------
11608 JSON_SERIALIZED_CLASS(LingoConfiguration)
11619 {
11620 IMPLEMENT_JSON_SERIALIZATION()
11621 IMPLEMENT_JSON_DOCUMENTATION(LingoConfiguration)
11622
11623 public:
11625 std::vector<VoiceToVoiceSession> voiceToVoiceSessions;
11626
11628 std::vector<Group> groups;
11629
11631 {
11632 clear();
11633 }
11634
11635 void clear()
11636 {
11637 voiceToVoiceSessions.clear();
11638 groups.clear();
11639 }
11640 };
11641
11642 static void to_json(nlohmann::json& j, const LingoConfiguration& p)
11643 {
11644 j = nlohmann::json{
11645 TOJSON_IMPL(voiceToVoiceSessions),
11646 TOJSON_IMPL(groups)
11647 };
11648 }
11649 static void from_json(const nlohmann::json& j, LingoConfiguration& p)
11650 {
11651 p.clear();
11652 getOptional<std::vector<VoiceToVoiceSession>>("voiceToVoiceSessions", p.voiceToVoiceSessions, j);
11653 getOptional<std::vector<Group>>("groups", p.groups, j);
11654 }
11655
11656 //-----------------------------------------------------------
11657 JSON_SERIALIZED_CLASS(BridgingConfiguration)
11668 {
11669 IMPLEMENT_JSON_SERIALIZATION()
11670 IMPLEMENT_JSON_DOCUMENTATION(BridgingConfiguration)
11671
11672 public:
11674 std::vector<Bridge> bridges;
11675
11677 std::vector<Group> groups;
11678
11680 {
11681 clear();
11682 }
11683
11684 void clear()
11685 {
11686 bridges.clear();
11687 groups.clear();
11688 }
11689 };
11690
11691 static void to_json(nlohmann::json& j, const BridgingConfiguration& p)
11692 {
11693 j = nlohmann::json{
11694 TOJSON_IMPL(bridges),
11695 TOJSON_IMPL(groups)
11696 };
11697 }
11698 static void from_json(const nlohmann::json& j, BridgingConfiguration& p)
11699 {
11700 p.clear();
11701 getOptional<std::vector<Bridge>>("bridges", p.bridges, j);
11702 getOptional<std::vector<Group>>("groups", p.groups, j);
11703 }
11704
11705 //-----------------------------------------------------------
11706 JSON_SERIALIZED_CLASS(BridgingServerStatusReportConfiguration)
11717 {
11718 IMPLEMENT_JSON_SERIALIZATION()
11719 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerStatusReportConfiguration)
11720
11721 public:
11723 std::string fileName;
11724
11727
11730
11732 std::string runCmd;
11733
11736
11739
11742
11744 {
11745 clear();
11746 }
11747
11748 void clear()
11749 {
11750 fileName.clear();
11751 intervalSecs = 60;
11752 enabled = false;
11753 includeGroupDetail = false;
11754 includeBridgeDetail = false;
11755 includeBridgeGroupDetail = false;
11756 runCmd.clear();
11757 }
11758 };
11759
11760 static void to_json(nlohmann::json& j, const BridgingServerStatusReportConfiguration& p)
11761 {
11762 j = nlohmann::json{
11763 TOJSON_IMPL(fileName),
11764 TOJSON_IMPL(intervalSecs),
11765 TOJSON_IMPL(enabled),
11766 TOJSON_IMPL(includeGroupDetail),
11767 TOJSON_IMPL(includeBridgeDetail),
11768 TOJSON_IMPL(includeBridgeGroupDetail),
11769 TOJSON_IMPL(runCmd)
11770 };
11771 }
11772 static void from_json(const nlohmann::json& j, BridgingServerStatusReportConfiguration& p)
11773 {
11774 p.clear();
11775 getOptional<std::string>("fileName", p.fileName, j);
11776 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
11777 getOptional<bool>("enabled", p.enabled, j, false);
11778 getOptional<std::string>("runCmd", p.runCmd, j);
11779 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
11780 getOptional<bool>("includeBridgeDetail", p.includeBridgeDetail, j, false);
11781 getOptional<bool>("includeBridgeGroupDetail", p.includeBridgeGroupDetail, j, false);
11782 }
11783
11784 //-----------------------------------------------------------
11785 JSON_SERIALIZED_CLASS(BridgingServerInternals)
11798 {
11799 IMPLEMENT_JSON_SERIALIZATION()
11800 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerInternals)
11801
11802 public:
11805
11808
11811
11813 {
11814 clear();
11815 }
11816
11817 void clear()
11818 {
11819 watchdog.clear();
11820 tuning.clear();
11821 housekeeperIntervalMs = 1000;
11822 }
11823 };
11824
11825 static void to_json(nlohmann::json& j, const BridgingServerInternals& p)
11826 {
11827 j = nlohmann::json{
11828 TOJSON_IMPL(watchdog),
11829 TOJSON_IMPL(housekeeperIntervalMs),
11830 TOJSON_IMPL(tuning)
11831 };
11832 }
11833 static void from_json(const nlohmann::json& j, BridgingServerInternals& p)
11834 {
11835 p.clear();
11836 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
11837 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
11838 getOptional<TuningSettings>("tuning", p.tuning, j);
11839 }
11840
11841 //-----------------------------------------------------------
11842 JSON_SERIALIZED_CLASS(BridgingServerConfiguration)
11852 {
11853 IMPLEMENT_JSON_SERIALIZATION()
11854 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerConfiguration)
11855
11856 public:
11863 typedef enum
11864 {
11866 omRaw = 0,
11867
11870 omMultistream = 1,
11871
11874 omMixedStream = 2,
11875
11877 omADictatedByGroup = 3,
11878 } OpMode_t;
11879
11881 std::string id;
11882
11885
11888
11891
11894
11897
11900
11903
11906
11909
11912
11915
11918
11921
11924
11926 {
11927 clear();
11928 }
11929
11930 void clear()
11931 {
11932 id.clear();
11933 mode = omRaw;
11934 serviceConfigurationFileCheckSecs = 60;
11935 bridgingConfigurationFileName.clear();
11936 bridgingConfigurationFileCommand.clear();
11937 bridgingConfigurationFileCheckSecs = 60;
11938 statusReport.clear();
11939 externalHealthCheckResponder.clear();
11940 internals.clear();
11941 certStoreFileName.clear();
11942 certStorePasswordHex.clear();
11943 enginePolicy.clear();
11944 configurationCheckSignalName = "rts.6cc0651.${id}";
11945 fipsCrypto.clear();
11946 nsm.clear();
11947 }
11948 };
11949
11950 static void to_json(nlohmann::json& j, const BridgingServerConfiguration& p)
11951 {
11952 j = nlohmann::json{
11953 TOJSON_IMPL(id),
11954 TOJSON_IMPL(mode),
11955 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
11956 TOJSON_IMPL(bridgingConfigurationFileName),
11957 TOJSON_IMPL(bridgingConfigurationFileCommand),
11958 TOJSON_IMPL(bridgingConfigurationFileCheckSecs),
11959 TOJSON_IMPL(statusReport),
11960 TOJSON_IMPL(externalHealthCheckResponder),
11961 TOJSON_IMPL(internals),
11962 TOJSON_IMPL(certStoreFileName),
11963 TOJSON_IMPL(certStorePasswordHex),
11964 TOJSON_IMPL(enginePolicy),
11965 TOJSON_IMPL(configurationCheckSignalName),
11966 TOJSON_IMPL(fipsCrypto),
11967 TOJSON_IMPL(nsm)
11968 };
11969 }
11970 static void from_json(const nlohmann::json& j, BridgingServerConfiguration& p)
11971 {
11972 p.clear();
11973 getOptional<std::string>("id", p.id, j);
11974 getOptional<BridgingServerConfiguration::OpMode_t>("mode", p.mode, j, BridgingServerConfiguration::OpMode_t::omRaw);
11975 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
11976 getOptional<std::string>("bridgingConfigurationFileName", p.bridgingConfigurationFileName, j);
11977 getOptional<std::string>("bridgingConfigurationFileCommand", p.bridgingConfigurationFileCommand, j);
11978 getOptional<int>("bridgingConfigurationFileCheckSecs", p.bridgingConfigurationFileCheckSecs, j, 60);
11979 getOptional<BridgingServerStatusReportConfiguration>("statusReport", p.statusReport, j);
11980 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
11981 getOptional<BridgingServerInternals>("internals", p.internals, j);
11982 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
11983 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
11984 j.at("enginePolicy").get_to(p.enginePolicy);
11985 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.6cc0651.${id}");
11986 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
11987 getOptional<NsmConfiguration>("nsm", p.nsm, j);
11988 }
11989
11990
11991 //-----------------------------------------------------------
11992 JSON_SERIALIZED_CLASS(EarGroupsConfiguration)
12003 {
12004 IMPLEMENT_JSON_SERIALIZATION()
12005 IMPLEMENT_JSON_DOCUMENTATION(EarGroupsConfiguration)
12006
12007 public:
12009 std::vector<Group> groups;
12010
12012 {
12013 clear();
12014 }
12015
12016 void clear()
12017 {
12018 groups.clear();
12019 }
12020 };
12021
12022 static void to_json(nlohmann::json& j, const EarGroupsConfiguration& p)
12023 {
12024 j = nlohmann::json{
12025 TOJSON_IMPL(groups)
12026 };
12027 }
12028 static void from_json(const nlohmann::json& j, EarGroupsConfiguration& p)
12029 {
12030 p.clear();
12031 getOptional<std::vector<Group>>("groups", p.groups, j);
12032 }
12033
12034 //-----------------------------------------------------------
12035 JSON_SERIALIZED_CLASS(EarServerStatusReportConfiguration)
12046 {
12047 IMPLEMENT_JSON_SERIALIZATION()
12048 IMPLEMENT_JSON_DOCUMENTATION(EarServerStatusReportConfiguration)
12049
12050 public:
12052 std::string fileName;
12053
12056
12059
12061 std::string runCmd;
12062
12065
12067 {
12068 clear();
12069 }
12070
12071 void clear()
12072 {
12073 fileName.clear();
12074 intervalSecs = 60;
12075 enabled = false;
12076 includeGroupDetail = false;
12077 runCmd.clear();
12078 }
12079 };
12080
12081 static void to_json(nlohmann::json& j, const EarServerStatusReportConfiguration& p)
12082 {
12083 j = nlohmann::json{
12084 TOJSON_IMPL(fileName),
12085 TOJSON_IMPL(intervalSecs),
12086 TOJSON_IMPL(enabled),
12087 TOJSON_IMPL(includeGroupDetail),
12088 TOJSON_IMPL(runCmd)
12089 };
12090 }
12091 static void from_json(const nlohmann::json& j, EarServerStatusReportConfiguration& p)
12092 {
12093 p.clear();
12094 getOptional<std::string>("fileName", p.fileName, j);
12095 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
12096 getOptional<bool>("enabled", p.enabled, j, false);
12097 getOptional<std::string>("runCmd", p.runCmd, j);
12098 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
12099 }
12100
12101 //-----------------------------------------------------------
12102 JSON_SERIALIZED_CLASS(EarServerInternals)
12115 {
12116 IMPLEMENT_JSON_SERIALIZATION()
12117 IMPLEMENT_JSON_DOCUMENTATION(EarServerInternals)
12118
12119 public:
12122
12125
12128
12130 {
12131 clear();
12132 }
12133
12134 void clear()
12135 {
12136 watchdog.clear();
12137 tuning.clear();
12138 housekeeperIntervalMs = 1000;
12139 }
12140 };
12141
12142 static void to_json(nlohmann::json& j, const EarServerInternals& p)
12143 {
12144 j = nlohmann::json{
12145 TOJSON_IMPL(watchdog),
12146 TOJSON_IMPL(housekeeperIntervalMs),
12147 TOJSON_IMPL(tuning)
12148 };
12149 }
12150 static void from_json(const nlohmann::json& j, EarServerInternals& p)
12151 {
12152 p.clear();
12153 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
12154 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
12155 getOptional<TuningSettings>("tuning", p.tuning, j);
12156 }
12157
12158 //-----------------------------------------------------------
12159 JSON_SERIALIZED_CLASS(EarServerConfiguration)
12169 {
12170 IMPLEMENT_JSON_SERIALIZATION()
12171 IMPLEMENT_JSON_DOCUMENTATION(EarServerConfiguration)
12172
12173 public:
12174
12176 std::string id;
12177
12180
12183
12186
12189
12192
12195
12198
12201
12204
12207
12210
12213
12216
12218 {
12219 clear();
12220 }
12221
12222 void clear()
12223 {
12224 id.clear();
12225 serviceConfigurationFileCheckSecs = 60;
12226 groupsConfigurationFileName.clear();
12227 groupsConfigurationFileCommand.clear();
12228 groupsConfigurationFileCheckSecs = 60;
12229 statusReport.clear();
12230 externalHealthCheckResponder.clear();
12231 internals.clear();
12232 certStoreFileName.clear();
12233 certStorePasswordHex.clear();
12234 enginePolicy.clear();
12235 configurationCheckSignalName = "rts.9a164fa.${id}";
12236 fipsCrypto.clear();
12237 nsm.clear();
12238 }
12239 };
12240
12241 static void to_json(nlohmann::json& j, const EarServerConfiguration& p)
12242 {
12243 j = nlohmann::json{
12244 TOJSON_IMPL(id),
12245 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
12246 TOJSON_IMPL(groupsConfigurationFileName),
12247 TOJSON_IMPL(groupsConfigurationFileCommand),
12248 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
12249 TOJSON_IMPL(statusReport),
12250 TOJSON_IMPL(externalHealthCheckResponder),
12251 TOJSON_IMPL(internals),
12252 TOJSON_IMPL(certStoreFileName),
12253 TOJSON_IMPL(certStorePasswordHex),
12254 TOJSON_IMPL(enginePolicy),
12255 TOJSON_IMPL(configurationCheckSignalName),
12256 TOJSON_IMPL(fipsCrypto),
12257 TOJSON_IMPL(nsm)
12258 };
12259 }
12260 static void from_json(const nlohmann::json& j, EarServerConfiguration& p)
12261 {
12262 p.clear();
12263 getOptional<std::string>("id", p.id, j);
12264 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
12265 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
12266 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
12267 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
12268 getOptional<EarServerStatusReportConfiguration>("statusReport", p.statusReport, j);
12269 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
12270 getOptional<EarServerInternals>("internals", p.internals, j);
12271 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
12272 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
12273 j.at("enginePolicy").get_to(p.enginePolicy);
12274 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
12275 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
12276 getOptional<NsmConfiguration>("nsm", p.nsm, j);
12277 }
12278
12279//-----------------------------------------------------------
12280 JSON_SERIALIZED_CLASS(EngageSemGroupsConfiguration)
12291 {
12292 IMPLEMENT_JSON_SERIALIZATION()
12293 IMPLEMENT_JSON_DOCUMENTATION(EngageSemGroupsConfiguration)
12294
12295 public:
12297 std::vector<Group> groups;
12298
12300 {
12301 clear();
12302 }
12303
12304 void clear()
12305 {
12306 groups.clear();
12307 }
12308 };
12309
12310 static void to_json(nlohmann::json& j, const EngageSemGroupsConfiguration& p)
12311 {
12312 j = nlohmann::json{
12313 TOJSON_IMPL(groups)
12314 };
12315 }
12316 static void from_json(const nlohmann::json& j, EngageSemGroupsConfiguration& p)
12317 {
12318 p.clear();
12319 getOptional<std::vector<Group>>("groups", p.groups, j);
12320 }
12321
12322 //-----------------------------------------------------------
12323 JSON_SERIALIZED_CLASS(EngageSemServerStatusReportConfiguration)
12334 {
12335 IMPLEMENT_JSON_SERIALIZATION()
12336 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerStatusReportConfiguration)
12337
12338 public:
12340 std::string fileName;
12341
12344
12347
12349 std::string runCmd;
12350
12353
12355 {
12356 clear();
12357 }
12358
12359 void clear()
12360 {
12361 fileName.clear();
12362 intervalSecs = 60;
12363 enabled = false;
12364 includeGroupDetail = false;
12365 runCmd.clear();
12366 }
12367 };
12368
12369 static void to_json(nlohmann::json& j, const EngageSemServerStatusReportConfiguration& p)
12370 {
12371 j = nlohmann::json{
12372 TOJSON_IMPL(fileName),
12373 TOJSON_IMPL(intervalSecs),
12374 TOJSON_IMPL(enabled),
12375 TOJSON_IMPL(includeGroupDetail),
12376 TOJSON_IMPL(runCmd)
12377 };
12378 }
12379 static void from_json(const nlohmann::json& j, EngageSemServerStatusReportConfiguration& p)
12380 {
12381 p.clear();
12382 getOptional<std::string>("fileName", p.fileName, j);
12383 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
12384 getOptional<bool>("enabled", p.enabled, j, false);
12385 getOptional<std::string>("runCmd", p.runCmd, j);
12386 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
12387 }
12388
12389 //-----------------------------------------------------------
12390 JSON_SERIALIZED_CLASS(EngageSemServerInternals)
12403 {
12404 IMPLEMENT_JSON_SERIALIZATION()
12405 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerInternals)
12406
12407 public:
12410
12413
12416
12418 {
12419 clear();
12420 }
12421
12422 void clear()
12423 {
12424 watchdog.clear();
12425 tuning.clear();
12426 housekeeperIntervalMs = 1000;
12427 }
12428 };
12429
12430 static void to_json(nlohmann::json& j, const EngageSemServerInternals& p)
12431 {
12432 j = nlohmann::json{
12433 TOJSON_IMPL(watchdog),
12434 TOJSON_IMPL(housekeeperIntervalMs),
12435 TOJSON_IMPL(tuning)
12436 };
12437 }
12438 static void from_json(const nlohmann::json& j, EngageSemServerInternals& p)
12439 {
12440 p.clear();
12441 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
12442 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
12443 getOptional<TuningSettings>("tuning", p.tuning, j);
12444 }
12445
12446 //-----------------------------------------------------------
12447 JSON_SERIALIZED_CLASS(EngageSemServerConfiguration)
12457 {
12458 IMPLEMENT_JSON_SERIALIZATION()
12459 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerConfiguration)
12460
12461 public:
12462
12464 std::string id;
12465
12468
12471
12474
12477
12480
12483
12486
12489
12492
12495
12498
12501
12504
12505 int maxQueueLen;
12506 int minQueuingMs;
12507 int maxQueuingMs;
12508 int minPriority;
12509 int maxPriority;
12510
12512 {
12513 clear();
12514 }
12515
12516 void clear()
12517 {
12518 id.clear();
12519 serviceConfigurationFileCheckSecs = 60;
12520 groupsConfigurationFileName.clear();
12521 groupsConfigurationFileCommand.clear();
12522 groupsConfigurationFileCheckSecs = 60;
12523 statusReport.clear();
12524 externalHealthCheckResponder.clear();
12525 internals.clear();
12526 certStoreFileName.clear();
12527 certStorePasswordHex.clear();
12528 enginePolicy.clear();
12529 configurationCheckSignalName = "rts.9a164fa.${id}";
12530 fipsCrypto.clear();
12531 nsm.clear();
12532
12533 maxQueueLen = 64;
12534 minQueuingMs = 0;
12535 maxQueuingMs = 15000;
12536 minPriority = 0;
12537 maxPriority = 255;
12538 }
12539 };
12540
12541 static void to_json(nlohmann::json& j, const EngageSemServerConfiguration& p)
12542 {
12543 j = nlohmann::json{
12544 TOJSON_IMPL(id),
12545 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
12546 TOJSON_IMPL(groupsConfigurationFileName),
12547 TOJSON_IMPL(groupsConfigurationFileCommand),
12548 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
12549 TOJSON_IMPL(statusReport),
12550 TOJSON_IMPL(externalHealthCheckResponder),
12551 TOJSON_IMPL(internals),
12552 TOJSON_IMPL(certStoreFileName),
12553 TOJSON_IMPL(certStorePasswordHex),
12554 TOJSON_IMPL(enginePolicy),
12555 TOJSON_IMPL(configurationCheckSignalName),
12556 TOJSON_IMPL(fipsCrypto),
12557 TOJSON_IMPL(nsm),
12558 TOJSON_IMPL(maxQueueLen),
12559 TOJSON_IMPL(minQueuingMs),
12560 TOJSON_IMPL(maxQueuingMs),
12561 TOJSON_IMPL(minPriority),
12562 TOJSON_IMPL(maxPriority)
12563 };
12564 }
12565 static void from_json(const nlohmann::json& j, EngageSemServerConfiguration& p)
12566 {
12567 p.clear();
12568 getOptional<std::string>("id", p.id, j);
12569 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
12570 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
12571 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
12572 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
12573 getOptional<EngageSemServerStatusReportConfiguration>("statusReport", p.statusReport, j);
12574 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
12575 getOptional<EngageSemServerInternals>("internals", p.internals, j);
12576 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
12577 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
12578 j.at("enginePolicy").get_to(p.enginePolicy);
12579 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
12580 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
12581 getOptional<NsmConfiguration>("nsm", p.nsm, j);
12582 getOptional<int>("maxQueueLen", p.maxQueueLen, j, 64);
12583 getOptional<int>("minQueuingMs", p.minQueuingMs, j, 0);
12584 getOptional<int>("maxQueuingMs", p.maxQueuingMs, j, 15000);
12585 getOptional<int>("minPriority", p.minPriority, j, 0);
12586 getOptional<int>("maxPriority", p.maxPriority, j, 255);
12587 }
12588
12589 //-----------------------------------------------------------
12590 JSON_SERIALIZED_CLASS(EngateGroup)
12600 class EngateGroup : public Group
12601 {
12602 IMPLEMENT_JSON_SERIALIZATION()
12603 IMPLEMENT_JSON_DOCUMENTATION(EngateGroup)
12604
12605 public:
12606 bool useVad;
12607 uint32_t inputHangMs;
12608 uint32_t inputActivationPowerThreshold;
12609 uint32_t inputDeactivationPowerThreshold;
12610
12611 EngateGroup()
12612 {
12613 clear();
12614 }
12615
12616 void clear()
12617 {
12618 Group::clear();
12619 useVad = false;
12620 inputHangMs = 750;
12621 inputActivationPowerThreshold = 700;
12622 inputDeactivationPowerThreshold = 125;
12623 }
12624 };
12625
12626 static void to_json(nlohmann::json& j, const EngateGroup& p)
12627 {
12628 nlohmann::json g;
12629 to_json(g, static_cast<const Group&>(p));
12630
12631 j = nlohmann::json{
12632 TOJSON_IMPL(useVad),
12633 TOJSON_IMPL(inputHangMs),
12634 TOJSON_IMPL(inputActivationPowerThreshold),
12635 TOJSON_IMPL(inputDeactivationPowerThreshold)
12636 };
12637 }
12638 static void from_json(const nlohmann::json& j, EngateGroup& p)
12639 {
12640 p.clear();
12641 from_json(j, static_cast<Group&>(p));
12642 getOptional<uint32_t>("inputHangMs", p.inputHangMs, j, 750);
12643 getOptional<uint32_t>("inputActivationPowerThreshold", p.inputActivationPowerThreshold, j, 700);
12644 getOptional<uint32_t>("inputDeactivationPowerThreshold", p.inputDeactivationPowerThreshold, j, 125);
12645 }
12646
12647 //-----------------------------------------------------------
12648 JSON_SERIALIZED_CLASS(EngateGroupsConfiguration)
12659 {
12660 IMPLEMENT_JSON_SERIALIZATION()
12661 IMPLEMENT_JSON_DOCUMENTATION(EngateGroupsConfiguration)
12662
12663 public:
12665 std::vector<EngateGroup> groups;
12666
12668 {
12669 clear();
12670 }
12671
12672 void clear()
12673 {
12674 groups.clear();
12675 }
12676 };
12677
12678 static void to_json(nlohmann::json& j, const EngateGroupsConfiguration& p)
12679 {
12680 j = nlohmann::json{
12681 TOJSON_IMPL(groups)
12682 };
12683 }
12684 static void from_json(const nlohmann::json& j, EngateGroupsConfiguration& p)
12685 {
12686 p.clear();
12687 getOptional<std::vector<EngateGroup>>("groups", p.groups, j);
12688 }
12689
12690 //-----------------------------------------------------------
12691 JSON_SERIALIZED_CLASS(EngateServerStatusReportConfiguration)
12702 {
12703 IMPLEMENT_JSON_SERIALIZATION()
12704 IMPLEMENT_JSON_DOCUMENTATION(EngateServerStatusReportConfiguration)
12705
12706 public:
12708 std::string fileName;
12709
12712
12715
12717 std::string runCmd;
12718
12721
12723 {
12724 clear();
12725 }
12726
12727 void clear()
12728 {
12729 fileName.clear();
12730 intervalSecs = 60;
12731 enabled = false;
12732 includeGroupDetail = false;
12733 runCmd.clear();
12734 }
12735 };
12736
12737 static void to_json(nlohmann::json& j, const EngateServerStatusReportConfiguration& p)
12738 {
12739 j = nlohmann::json{
12740 TOJSON_IMPL(fileName),
12741 TOJSON_IMPL(intervalSecs),
12742 TOJSON_IMPL(enabled),
12743 TOJSON_IMPL(includeGroupDetail),
12744 TOJSON_IMPL(runCmd)
12745 };
12746 }
12747 static void from_json(const nlohmann::json& j, EngateServerStatusReportConfiguration& p)
12748 {
12749 p.clear();
12750 getOptional<std::string>("fileName", p.fileName, j);
12751 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
12752 getOptional<bool>("enabled", p.enabled, j, false);
12753 getOptional<std::string>("runCmd", p.runCmd, j);
12754 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
12755 }
12756
12757 //-----------------------------------------------------------
12758 JSON_SERIALIZED_CLASS(EngateServerInternals)
12771 {
12772 IMPLEMENT_JSON_SERIALIZATION()
12773 IMPLEMENT_JSON_DOCUMENTATION(EngateServerInternals)
12774
12775 public:
12778
12781
12784
12786 {
12787 clear();
12788 }
12789
12790 void clear()
12791 {
12792 watchdog.clear();
12793 tuning.clear();
12794 housekeeperIntervalMs = 1000;
12795 }
12796 };
12797
12798 static void to_json(nlohmann::json& j, const EngateServerInternals& p)
12799 {
12800 j = nlohmann::json{
12801 TOJSON_IMPL(watchdog),
12802 TOJSON_IMPL(housekeeperIntervalMs),
12803 TOJSON_IMPL(tuning)
12804 };
12805 }
12806 static void from_json(const nlohmann::json& j, EngateServerInternals& p)
12807 {
12808 p.clear();
12809 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
12810 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
12811 getOptional<TuningSettings>("tuning", p.tuning, j);
12812 }
12813
12814 //-----------------------------------------------------------
12815 JSON_SERIALIZED_CLASS(EngateServerConfiguration)
12825 {
12826 IMPLEMENT_JSON_SERIALIZATION()
12827 IMPLEMENT_JSON_DOCUMENTATION(EngateServerConfiguration)
12828
12829 public:
12830
12832 std::string id;
12833
12836
12839
12842
12845
12848
12851
12854
12857
12860
12863
12866
12869
12872
12874 {
12875 clear();
12876 }
12877
12878 void clear()
12879 {
12880 id.clear();
12881 serviceConfigurationFileCheckSecs = 60;
12882 groupsConfigurationFileName.clear();
12883 groupsConfigurationFileCommand.clear();
12884 groupsConfigurationFileCheckSecs = 60;
12885 statusReport.clear();
12886 externalHealthCheckResponder.clear();
12887 internals.clear();
12888 certStoreFileName.clear();
12889 certStorePasswordHex.clear();
12890 enginePolicy.clear();
12891 configurationCheckSignalName = "rts.9a164fa.${id}";
12892 fipsCrypto.clear();
12893 nsm.clear();
12894 }
12895 };
12896
12897 static void to_json(nlohmann::json& j, const EngateServerConfiguration& p)
12898 {
12899 j = nlohmann::json{
12900 TOJSON_IMPL(id),
12901 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
12902 TOJSON_IMPL(groupsConfigurationFileName),
12903 TOJSON_IMPL(groupsConfigurationFileCommand),
12904 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
12905 TOJSON_IMPL(statusReport),
12906 TOJSON_IMPL(externalHealthCheckResponder),
12907 TOJSON_IMPL(internals),
12908 TOJSON_IMPL(certStoreFileName),
12909 TOJSON_IMPL(certStorePasswordHex),
12910 TOJSON_IMPL(enginePolicy),
12911 TOJSON_IMPL(configurationCheckSignalName),
12912 TOJSON_IMPL(fipsCrypto),
12913 TOJSON_IMPL(nsm)
12914 };
12915 }
12916 static void from_json(const nlohmann::json& j, EngateServerConfiguration& p)
12917 {
12918 p.clear();
12919 getOptional<std::string>("id", p.id, j);
12920 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
12921 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
12922 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
12923 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
12924 getOptional<EngateServerStatusReportConfiguration>("statusReport", p.statusReport, j);
12925 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
12926 getOptional<EngateServerInternals>("internals", p.internals, j);
12927 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
12928 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
12929 j.at("enginePolicy").get_to(p.enginePolicy);
12930 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
12931 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
12932 getOptional<NsmConfiguration>("nsm", p.nsm, j);
12933 }
12934
12935 //-----------------------------------------------------------
12936 static inline void dumpExampleConfigurations(const char *path)
12937 {
12938 WatchdogSettings::document();
12939 FileRecordingRequest::document();
12940 Feature::document();
12941 Featureset::document();
12942 Agc::document();
12943 RtpPayloadTypeTranslation::document();
12944 NetworkInterfaceDevice::document();
12945 ListOfNetworkInterfaceDevice::document();
12946 RtpHeader::document();
12947 BlobInfo::document();
12948 TxAudioUri::document();
12949 AdvancedTxParams::document();
12950 Identity::document();
12951 Location::document();
12952 Power::document();
12953 Connectivity::document();
12954 PresenceDescriptorGroupItem::document();
12955 PresenceDescriptor::document();
12956 NetworkTxOptions::document();
12957 TcpNetworkTxOptions::document();
12958 NetworkAddress::document();
12959 NetworkAddressRxTx::document();
12960 NetworkAddressRestrictionList::document();
12961 StringRestrictionList::document();
12962 Rallypoint::document();
12963 RallypointCluster::document();
12964 NetworkDeviceDescriptor::document();
12965 TxAudio::document();
12966 AudioDeviceDescriptor::document();
12967 ListOfAudioDeviceDescriptor::document();
12968 Audio::document();
12969 TalkerInformation::document();
12970 GroupTalkers::document();
12971 Presence::document();
12972 Advertising::document();
12973 GroupPriorityTranslation::document();
12974 GroupTimeline::document();
12975 GroupAppTransport::document();
12976 RtpProfile::document();
12977 Group::document();
12978 Mission::document();
12979 LicenseDescriptor::document();
12980 EngineNetworkingRpUdpStreaming::document();
12981 EnginePolicyNetworking::document();
12982 Aec::document();
12983 Vad::document();
12984 Bridge::document();
12985 AndroidAudio::document();
12986 EnginePolicyAudio::document();
12987 SecurityCertificate::document();
12988 EnginePolicySecurity::document();
12989 EnginePolicyLogging::document();
12990 EnginePolicyDatabase::document();
12991 NamedAudioDevice::document();
12992 EnginePolicyNamedAudioDevices::document();
12993 Licensing::document();
12994 DiscoveryMagellan::document();
12995 DiscoverySsdp::document();
12996 DiscoverySap::document();
12997 DiscoveryCistech::document();
12998 DiscoveryTrellisware::document();
12999 DiscoveryConfiguration::document();
13000 EnginePolicyInternals::document();
13001 EnginePolicyTimelines::document();
13002 RtpMapEntry::document();
13003 ExternalModule::document();
13004 ExternalCodecDescriptor::document();
13005 EnginePolicy::document();
13006 TalkgroupAsset::document();
13007 EngageDiscoveredGroup::document();
13008 RallypointPeer::document();
13009 RallypointServerLimits::document();
13010 RallypointServerStatusReportConfiguration::document();
13011 RallypointServerLinkGraph::document();
13012 ExternalHealthCheckResponder::document();
13013 Tls::document();
13014 PeeringConfiguration::document();
13015 IgmpSnooping::document();
13016 RallypointReflector::document();
13017 RallypointUdpStreaming::document();
13018 RallypointServer::document();
13019 PlatformDiscoveredService::document();
13020 TimelineQueryParameters::document();
13021 CertStoreCertificate::document();
13022 CertStore::document();
13023 CertStoreCertificateElement::document();
13024 CertStoreDescriptor::document();
13025 CertificateDescriptor::document();
13026 BridgeCreationDetail::document();
13027 GroupConnectionDetail::document();
13028 GroupTxDetail::document();
13029 GroupCreationDetail::document();
13030 GroupReconfigurationDetail::document();
13031 GroupHealthReport::document();
13032 InboundProcessorStats::document();
13033 TrafficCounter::document();
13034 GroupStats::document();
13035 RallypointConnectionDetail::document();
13036 BridgingConfiguration::document();
13037 BridgingServerStatusReportConfiguration::document();
13038 BridgingServerInternals::document();
13039 BridgingServerConfiguration::document();
13040 EarGroupsConfiguration::document();
13041 EarServerStatusReportConfiguration::document();
13042 EarServerInternals::document();
13043 EarServerConfiguration::document();
13044 RangerPackets::document();
13045 TransportImpairment::document();
13046
13047 EngageSemGroupsConfiguration::document();
13048 EngageSemServerStatusReportConfiguration::document();
13049 EngageSemServerInternals::document();
13050 EngageSemServerConfiguration::document();
13051 }
13052}
13053
13054#ifndef WIN32
13055 #pragma GCC diagnostic pop
13056#endif
13057
13058#endif /* ConfigurationObjects_h */
TxPriority_t
Network Transmission Priority.
AddressResolutionPolicy_t
Address family resolution policy.
#define ENGAGE_IGNORE_COMPILER_UNUSED_WARNING
RestrictionElementType_t
Enum describing restriction element types.
@ retGenericAccessTagPattern
Elements are generic access tags regex patterns.
@ retGroupIdPattern
Elements are group ID regex patterns.
@ retGroupId
A literal group ID.
@ retCertificateIssuerPattern
Elements are X.509 certificate issuer regex patterns.
@ retCertificateSubjectPattern
Elements are X.509 certificate subject regex patterns.
@ retCertificateFingerprintPattern
Elements are X.509 certificate fingerprint regex patterns.
@ retCertificateSerialNumberPattern
Elements are X.509 certificate serial number regex patterns.
GroupRestrictionAccessPolicyType_t
Enum describing restriction types.
@ graptStrict
Registration for groups is NOT allowed by default - requires definitive access through something like...
@ graptPermissive
Registration for groups is allowed by default.
RestrictionType_t
Enum describing restriction types.
@ rtWhitelist
Elements are whitelisted.
@ rtBlacklist
Elements are blacklisted.
Configuration when using the engageBeginGroupTxAdvanced API.
TxAudioUri audioUri
[Optional] A URI to stream from instead of the audio input device
uint8_t priority
[Optional, Default: 0] Transmit priority between 0 (lowest) and 255 (highest).
bool receiverRxMuteForAliasSpecializer
[Optional, Default: false] Indicates that the aliasSpecializer must cause receivers to mute this tran...
uint16_t subchannelTag
[Optional, Default: 0] Defines a sub channel within a group. Audio will be opaque to all other client...
bool reBegin
[Optional, Default: false] Indicates that the transmission should be restarted.
uint16_t aliasSpecializer
[Optional, Default: 0] Defines a numeric affinity value to be included in the transmission....
uint16_t flags
[Optional, Default: 0] Combination of the ENGAGE_TXFLAG_xxx flags
std::string alias
[Optional, Default: empty string] The Engage Engine should transmit the user's alias as part of the h...
bool includeNodeId
[Optional, Default: false] The Engage Engine should transmit the NodeId as part of the header extensi...
uint32_t txId
[Optional, Default: 0] Transmission ID
bool muted
[Optional, Default: false] While the microphone should be opened, captured audio should be ignored un...
Defines parameters for advertising of an entity such as a known, public, group.
int intervalMs
[Optional, Default: 20000] Interval at which the advertisement should be sent in milliseconds.
bool enabled
[Optional, Default: false] Enabled advertising
bool alwaysAdvertise
[Optional, Default: false] If true, the node will advertise the item even if it detects other nodes m...
Acoustic Echo Cancellation settings.
int speakerTailMs
[Optional, Default: 60] Milliseconds of speaker tail
bool cng
[Optional, Default: true] Enable comfort noise generation
bool enabled
[Optional, Default: false] Enable acoustic echo cancellation
Mode_t
Acoustic echo cancellation mode enum.
Mode_t mode
[Optional, Default: aecmDefault] Specifies AEC mode. See Mode_t for all modes
bool enabled
[Optional, Default: false] Enables automatic gain control.
int compressionGainDb
[Optional, Default: 25, Minimum = 0, Maximum = 125] Gain in db.
bool enableLimiter
[Optional, Default: false] Enables limiter to prevent overdrive.
int maxLevel
[Optional, Default: 255] Maximum level.
int minLevel
[Optional, Default: 0] Minimum level.
int targetLevelDb
[Optional, Default: 9] Target gain level if there is no compression gain.
Default audio settings for AndroidAudio.
int api
[Optional, Default 0] Android audio API version: 0=Unspecified, 1=AAudio, 2=OpenGLES
int sessionId
[Optional, Default INVALID_SESSION_ID] A session ID from the Android AudioManager
int contentType
[Optional, Default 1] Usage type: 1=Speech 2=Music 3=Movie 4=Sonification
int sharingMode
[Optional, Default 0] Sharing mode: 0=Exclusive, 1=Shared
int performanceMode
[Optional, Default 12] Performance mode: 10=None/Default, 11=PowerSaving, 12=LowLatency
int inputPreset
[Optional, Default 7] Input preset: 1=Generic 5=Camcorder 6=VoiceRecognition 7=VoiceCommunication 9=U...
int usage
[Optional, Default 2] Usage type: 1=Media 2=VoiceCommunication 3=VoiceCommunicationSignalling 4=Alarm...
int engineMode
[Optional, Default 0] 0=use legacy low-level APIs, 1=use high-level Android APIs
int samplingRate
This is the rate that the device will process the PCM audio data at.
std::string name
Name of the device assigned by the platform.
bool isDefault
True if this is the default device for the direction above.
std::string serialNumber
Device serial number (if any)
int channels
Indicates the number of audio channels to process.
std::string hardwareId
Device hardware ID (if any)
std::string manufacturer
Device manufacturer (if any)
Direction_t direction
Audio direction the device supports.
std::string extra
Extra data provided by the platform (if any)
bool isPresent
True if the device is currently present on the system.
int boostPercentage
A percentage at which to gain/attenuate the audio.
bool isAdad
True if the device is an Application-Defined Audio Device.
int deviceId
[Read Only] Unique device identifier assigned by Engage Engine at time of device creation.
double coefficient
[Optional. Default: 1.75] Coefficient by which to multiply the current history average to determine t...
uint32_t hangMs
[Optional. Default: 1500] Hang timer in milliseconds
bool enabled
[Optional. Default: false] Enables the audio gate if true
uint32_t windowMin
[Optional. Default: 25] Number of 10ms history samples to gather before calculating the noise floor -...
bool useVad
[Optional. Default: false] Use voice activity detection rather than audio energy
uint32_t windowMax
[Optional. Default: 125] Maximum number of 10ms history samples - ignored if useVad is true
Used to configure the Audio properties for a group.
int outputLevelRight
[Optional, Default: 100] The percentage at which to set the right audio at.
std::string outputHardwareId
[Optional] Hardware ID of the output audio device to use for this group. If empty,...
bool outputMuted
[Optional, Default: false] Mutes output audio.
std::string inputHardwareId
[Optional] Hardware ID of the input audio device to use for this group. If empty, inputId is used.
bool enabled
[Optional, Default: true] Audio is enabled
int inputId
[Optional, Default: first audio device] Id for the input audio device to use for this group.
int outputGain
[Optional, Default: 0] The percentage at which to gain the output audio.
int outputId
[Optional, Default: first audio device] Id for the output audio device to use for this group.
int inputGain
[Optional, Default: 0] The percentage at which to gain the input audio.
int outputLevelLeft
[Optional, Default: 100] The percentage at which to set the left audio at.
Describes an audio device that is available on the system.
std::string manufacturer
[Optional] Manufacturer
std::string hardwareId
The string identifier used to identify the hardware.
bool isDefault
True if this is the default device.
std::string serialNumber
[Optional] Serial number
std::vector< AudioRegistryDevice > inputs
[Optional] List of input devices to use for the registry.
std::vector< AudioRegistryDevice > outputs
[Optional] List of output devices to use for the registry.
Describes the Blob data being sent used in the engageSendGroupBlob API.
size_t size
[Optional, Default : 0] Size of the payload
RtpHeader rtpHeader
Custom RTP header.
PayloadType_t payloadType
[Optional, Default: bptUndefined] The payload type to send in the blob
std::string target
[Optional, Default: empty string] The nodeId to which this message is targeted. If this is empty,...
std::string source
[Optional, Default: empty string] The nodeId of Engage Engine that sent the message....
int txnTimeoutSecs
[Optional, Default: 0] Number of seconds after which to time out delivery to the target node
PayloadType_t
Payload type. BlobInfo RTP supported Payload types.
std::string txnId
[Optional but required if txnTimeoutSecs is > 0]
Detailed information for a bridge creation.
CreationStatus_t status
The creation status.
std::vector< std::string > groups
List of group IDs to be included in the session.
bool enabled
[Optional, Default: true] Enable the bridge NOTE: this is only used bt EBS and is ignored when callin...
std::vector< Group > groups
Array of bridges in the configuration.
std::vector< Bridge > bridges
Array of bridges in the configuration.
std::string certStoreFileName
Path to the certificate store.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
OpMode_t mode
Specifies the default operation mode (see OpMode_t).
EnginePolicy enginePolicy
The policy to be used for the underlying Engage Engine.
BridgingServerStatusReportConfiguration statusReport
Details for producing a status report.
std::string bridgingConfigurationFileCommand
Command-line to execute that returns a bridging configuration.
std::string bridgingConfigurationFileName
Name of a file containing the bridging configuration.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
OpMode_t
Enum describing the default mode the bridging service runs in. Values of omRaw, omMultistream,...
BridgingServerInternals internals
Internal settings.
int bridgingConfigurationFileCheckSecs
Number of seconds between checks to see if the bridging configuration has been updated....
int serviceConfigurationFileCheckSecs
Number of seconds between checks to see if the service configuration has been updated....
std::string id
A unqiue identifier for the bridge server.
NsmConfiguration nsm
[Optional] Settings for NSM.
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
TuningSettings tuning
[Optional] Low-level tuning
WatchdogSettings watchdog
[Optional] Settings for the watchdog.
TODO: Configuration for the bridging server status report file.
Description of a certstore certificate element.
bool hasPrivateKey
True if the certificate has a private key associated with it.
Holds a certificate and (optionally) a private key in a certstore.
std::string certificatePem
Certificate in PEM format.
std::string privateKeyPem
Private key in PEM format.
std::vector< CertStoreCertificateElement > certificates
Array of certificate elements.
std::string fileName
Name of the file the certstore resides in.
std::vector< KvPair > kvp
Array of kv pairs.
std::vector< KvPair > kvp
[Optional] Array of KV pairs
std::vector< CertStoreCertificate > certificates
Array of certificates in this store.
std::string id
The ID of the certstore.
std::vector< CertificateSubjectElement > subjectElements
Array of subject elements.
std::string publicKeyPem
PEM version of the public key.
std::vector< CertificateSubjectElement > issuerElements
Array of issuer elements.
bool selfSigned
Indicates whether the certificqte is self-signed.
std::string certificatePem
PEM version of the certificate.
Description of a certificate subject element.
Connectivity Information used as part of the PresenceDescriptor.
int type
Is the type of connectivity the device has to the network.
int strength
Is the strength of the connection connection as reported by the OS - usually in dbm.
int rating
Is the quality of the network connection as reported by the OS - OS dependent.
Configuration for the Discovery features.
DiscoveryMagellan Discovery settings.
Tls tls
[Optional] Details concerning Transport Layer Security.
std::string interfaceName
[Optional, Default: default system interface] The network interface to bind to for discovery packets.
Session Announcement Discovery settings settings.
int ageTimeoutMs
[Optional, Default 30000] Number of milliseconds of no SAP announcment before the advertised entity i...
Advertising advertising
Parameters for advertising.
NetworkAddress address
[Optional, Default 224.2.127.254:9875] IP address and port.
bool enabled
[Optional, Default: false] Enables the Engage Engine to use SAP for asset discovery.
std::string interfaceName
[Optional, Default: default system interface] The network interface to bind to for discovery packets.
Simple Service Discovery Protocol settings.
bool enabled
[Optional, Default: false] Enables the Engage Engine to use SSDP for asset discovery.
std::vector< std::string > searchTerms
[Optional] An array of regex strings to be used to filter SSDP requests and responses.
int ageTimeoutMs
[Optional, Default 30000] Number of milliseconds of no SSDP announcment before the advertised entity ...
Advertising advertising
Parameters for advertising.
std::string interfaceName
[Optional, Default: default system interface] The network interface to bind to for discovery packets.
NetworkAddress address
[Optional, Default 255.255.255.255:1900] IP address and port.
std::vector< Group > groups
Array of groups in the configuration.
std::string id
A unqiue identifier for the EAR server.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
NsmConfiguration nsm
[Optional] Settings for NSM.
int groupsConfigurationFileCheckSecs
Number of seconds between checks to see if the configuration has been updated. Default is 60.
EarServerStatusReportConfiguration statusReport
Details for producing a status report.
std::string certStoreFileName
Path to the certificate store.
std::string groupsConfigurationFileName
Name of a file containing the ear configuration.
int serviceConfigurationFileCheckSecs
Number of seconds between checks to see if the service configuration has been updated....
std::string groupsConfigurationFileCommand
Command-line to execute that returns a configuration.
EnginePolicy enginePolicy
The policy to be used for the underlying Engage Engine.
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
WatchdogSettings watchdog
[Optional] Settings for the EAR's watchdog.
TuningSettings tuning
[Optional] Low-level tuning
TODO: Configuration for the ear server status report file.
std::vector< Group > groups
Array of groups in the configuration.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
EnginePolicy enginePolicy
The policy to be used for the underlying Engage Engine.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
EngageSemServerStatusReportConfiguration statusReport
Details for producing a status report.
std::string id
A unqiue identifier for the EFC server.
std::string certStoreFileName
Path to the certificate store.
std::string groupsConfigurationFileName
Name of a file containing the EFC configuration.
int serviceConfigurationFileCheckSecs
Number of seconds between checks to see if the service configuration has been updated....
NsmConfiguration nsm
[Optional] Settings for NSM.
std::string groupsConfigurationFileCommand
Command-line to execute that returns a configuration.
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
EngageSemServerInternals internals
Internal settings.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
int groupsConfigurationFileCheckSecs
Number of seconds between checks to see if the configuration has been updated. Default is 60.
WatchdogSettings watchdog
[Optional] Settings for the EFC's watchdog.
TuningSettings tuning
[Optional] Low-level tuning
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
TODO: Configuration for the EFC server status report file.
std::vector< EngateGroup > groups
Array of groups in the configuration.
EngateServerStatusReportConfiguration statusReport
Details for producing a status report.
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
std::string groupsConfigurationFileName
Name of a file containing the ear configuration.
EngateServerInternals internals
Internal settings.
int groupsConfigurationFileCheckSecs
Number of seconds between checks to see if the configuration has been updated. Default is 60.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
std::string certStoreFileName
Path to the certificate store.
NsmConfiguration nsm
[Optional] Settings for NSM.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
EnginePolicy enginePolicy
The policy to be used for the underlying Engage Engine.
int serviceConfigurationFileCheckSecs
Number of seconds between checks to see if the service configuration has been updated....
std::string id
A unqiue identifier for the EAR server.
std::string groupsConfigurationFileCommand
Command-line to execute that returns a configuration.
TuningSettings tuning
[Optional] Low-level tuning
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
WatchdogSettings watchdog
[Optional] Settings for the EAR's watchdog.
TODO: Configuration for the engate server status report file.
TxPriority_t priority
[Optional, Default: priVoice] Transmission priority. This has meaning on some operating systems based...
int keepaliveIntervalSecs
Optional, Default: 15] Seconds interval at which to send UDP keepalives to Rallypoints....
int ttl
[Optional, Default: 64] Time to live or hop limit is a mechanism that limits the lifespan or lifetime...
int port
[Optional, 0] The port to be used for Rallypoint UDP streaming. A value of 0 will result in an epheme...
bool enabled
[Optional, false] Enables UDP streaming if the RP supports it
Default audio settings for Engage Engine policy.
AudioRegistry registry
[Optional] If specified, this registry will be used to discover the input and output devices
Vad vad
[Optional] Voice activity detection settings
Agc outputAgc
[Optional] Automatic Gain Control for audio outputs
bool saveOutputPcm
[Optional, Default: false] If true, input audio is written to a PCM file in the data directory
bool enabled
[Optional, Default: true] Enables audio processing
AndroidAudio android
[Optional] Android-specific audio settings
int internalRate
[Optional, Default: 16000] Internal sampling rate - 8000 or 16000
bool muteTxOnTx
[Optional, Default: false] Automatically mute TX when TX begins
Agc inputAgc
[Optional] Automatic Gain Control for audio inputs
bool hardwareEnabled
[Optional, Default: true] Enables local machine hardware audio
Aec aec
[Optional] Acoustic echo cancellation settings
bool denoiseInput
[Optional, Default: false] Denoise input
bool saveInputPcm
[Optional, Default: false] If true, input audio is written to a PCM file in the data directory
bool denoiseOutput
[Optional, Default: false] Denoise output
int internalChannels
[Optional, Default: 2] Internal audio channel count rate - 1 or 2
Provides Engage Engine policy configuration.
std::vector< ExternalModule > externalCodecs
Optional external codecs.
EnginePolicyNamedAudioDevices namedAudioDevices
Optional named audio devices (Linux only)
Featureset featureset
Optional feature set.
EnginePolicyDatabase database
Database settings.
EnginePolicyAudio audio
Audio settings.
std::string dataDirectory
Specifies the root of the physical path to store data.
EnginePolicyLogging logging
Logging settings.
DiscoveryConfiguration discovery
Discovery settings.
std::vector< RtpMapEntry > rtpMap
Optional RTP - overrides the default.
EngineStatusReportConfiguration statusReport
Optional statusReport - details for the status report.
EnginePolicyInternals internals
Internal settings.
EnginePolicySecurity security
Security settings.
EnginePolicyTimelines timelines
Timelines settings.
EnginePolicyNetworking networking
Security settings.
TuningSettings tuning
[Optional] Low-level tuning
int stickyTidHangSecs
[Optional, Default: 10] The number of seconds after which "sticky" transmission IDs expire.
int maxTxSecs
[Optional, Default: 30] The default duration the engageBeginGroupTx and engageBeginGroupTxAdvanced fu...
int rpConnectionTimeoutSecs
[Optional, Default: 5] Connection timeout in seconds to RP
WatchdogSettings watchdog
[Optional] Settings for the Engine's watchdog.
RallypointCluster::ConnectionStrategy_t rpClusterStrategy
[Optional, Default: csRoundRobin] Specifies the default RP cluster connection strategy to be followed...
int delayedMicrophoneClosureSecs
[Optional, Default: 15] The number of seconds to cache an open microphone before actually closing it.
int rpTransactionTimeoutMs
[Optional, Default: 5] Transaction timeout with RP
int rtpExpirationCheckIntervalMs
[Optional, Default: 250] Interval at which to check for RTP expiration.
int rpClusterRolloverSecs
[Optional, Default: 10] Seconds between switching to a new target in a RP cluster
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
int uriStreamingIntervalMs
[Optional, Default: 60] The packet framing interval for audio streaming from a URI.
int maxLevel
[Optional, Default: 4, Range: 0-4] This is the maximum logging level to display in other words,...
EngineNetworkingRpUdpStreaming rpUdpStreaming
[Optional] Configuration for UDP streaming
std::string defaultNic
The default network interface card the Engage Engine should bind to.
RtpProfile rtpProfile
[Optional] Configuration for RTP profile
AddressResolutionPolicy_t addressResolutionPolicy
[Optional, Default 64] Address resolution policy
int multicastRejoinSecs
[Optional, Default: 8] Number of seconds elapsed between RX of multicast packets before an IGMP rejoi...
bool logRtpJitterBufferStats
[Optional, Default: false] If true, logs RTP jitter buffer statistics periodically
int rallypointRtTestIntervalMs
[Optional, Default: 60000] Milliseconds between sending Rallypoint round-trip test requests
bool preventMulticastFailover
[Optional, Default: false] Overrides/cancels group-level multicast failover if set to true
Default certificate to use for security operation in the Engage Engine.
SecurityCertificate certificate
The default certificate and private key for the Engine instance.
std::vector< std::string > caCertificates
[Optional] An array of CA certificates to be used for validation of far-end X.509 certificates
long autosaveIntervalSecs
[Default 5] Interval at which events are to be saved from memory to disk (a slow operation)
int maxStorageMb
Specifies the maximum storage space to use.
bool enabled
[Optional, Default: true] Specifies if Time Lines are enabled by default.
int maxDiskMb
Specifies the maximum disk space to use - defaults to maxStorageMb.
SecurityCertificate security
The certificate to use for signing the recording.
int maxAudioEventMemMb
Specifies the maximum number of megabytes to allow for a single audio event's memory block - defaults...
long maxEventAgeSecs
Maximum age of an event after which it is to be erased.
int maxMemMb
Specifies the maximum memory to use - defaults to maxStorageMb.
std::string storageRoot
Specifies where the timeline recordings will be stored physically.
bool ephemeral
[Default false] If true, recordings are automatically purged when the Engine is shut down and/or rein...
bool disableSigningAndVerification
[Default false] If true, prevents signing of events - i.e. no anti-tanpering features will be availab...
int maxEvents
Maximum number of events to be retained.
long groomingIntervalSecs
Interval at which events are to be checked for age-based grooming.
TODO: Configuration for the translation server status report file.
TODO: Configuration to enable external systems to use to check if the service is still running.
Base for a description of an external module.
nlohmann::json configuration
Optional free-form JSON configuration to be passed to the module.
bool debug
[Optional, Default false] If true, requests the crypto engine module to run in debugging mode.
bool enabled
[Optional, Default false] If true, requires FIPS140-2 crypto operation.
std::string curves
[Optional] Specifies the NIST-approved curves to be used for FIPS
std::string path
Path where the crypto engine module is located
std::string ciphers
[Optional] Specifies the NIST-approved ciphers to be used for FIPS
Configuration for the optional custom transport functionality for Group.
bool enabled
[Optional, Default: false] Enables custom feature.
std::string id
The id/name of the transport. This must match the id/name supplied when registering the app transport...
BridgingOpMode_t
Enum describing bridging operation mode types where applicable.
AdvancedTxParams mixedStreamTxParams
[Optional] Parameters to be applied when output is mixed (bomMixedStream)
BridgingOpMode_t mode
[Optional] The output mode
Detailed information for a group connection.
bool asFailover
Indicates whether the connection is for purposes of failover.
ConnectionType_t connectionType
The connection type.
std::string reason
[Optional] Additional reason information
Detailed information for a group creation.
CreationStatus_t status
The creation status.
uint8_t tx
[Optional] The default audio priority
uint8_t rx
[Optional] The default audio RX priority
Detailed information regarding a group's health.
GroupAppTransport appTransport
[Optional] Settings necessary if the group is transported via an application-supplied custom transpor...
std::string source
[Optional, Default: null] Indicates the source of this configuration - e.g. from the application or d...
Presence presence
Presence configuration (see Presence).
std::vector< uint16_t > specializerAffinities
List of specializer IDs that the local node has an affinity for/member of.
std::vector< Source > ignoreSources
[Optional] List of sources to ignore for this group
NetworkAddress rtcpPresenceRx
The network address for receiving RTCP presencing packets.
bool allowLoopback
[Optional, Default: false] Allows for processing of looped back packets - primarily meant for debuggi...
Type_t
Enum describing the group types.
NetworkAddress tx
The network address for transmitting network traffic to.
std::string alias
User alias to transmit as part of the realtime audio stream when using the engageBeginGroupTx API.
int stickyTidHangSecs
[Optional, Default: 10] The number of seconds after which "sticky" transmission IDs expire.
TxAudio txAudio
Audio transmit options such as codec, framing size etc (see TxAudio).
int maxRxSecs
[Optional, Default: 0] Maximum number of seconds the Engine will receive for on this group.
PacketCapturer txCapture
Details for capture of transmitted packets
NetworkTxOptions txOptions
Transmit options for the group (see NetworkTxOptions).
std::string synVoice
Name of the synthesis voice to use for the group
TransportImpairment rxImpairment
[Optional] The RX impairment to apply
std::string languageCode
ISO 639-2 language code for the group
std::string cryptoPassword
Password to be used for encryption. Note that this is not the encryption key but, rather,...
std::vector< std::string > presenceGroupAffinities
List of presence group IDs with which this group has an affinity.
GroupTimeline timeline
Audio timeline is configuration.
GroupPriorityTranslation priorityTranslation
[Optional] Describe how traffic for this group on a different addressing scheme translates to priorit...
bool disablePacketEvents
[Optional, Default: false] Disable packet events.
bool blockAdvertising
[Optional, Default: false] Set this to true if you do not want the Engine to advertise this Group on ...
bool ignoreAudioTraffic
[Optional, Default: false] Indicates that the group should ignore traffic that is audio-related
std::string interfaceName
The name of the network interface to use for multicasting for this group. If not provided,...
bool _wasDeserialized_rtpProfile
[Internal - not serialized
bool enableMulticastFailover
[Optional, Default: false] Set this to true to enable failover to multicast operation if a Rallypoint...
std::string name
The human readable name for the group.
NetworkAddress rx
The network address for receiving network traffic on.
Type_t type
Specifies the group type (see Type_t).
GroupDefaultAudioPriority defaultAudioPriority
Default audio priority for the group (see GroupDefaultAudioPriority).
uint16_t blobRtpPayloadType
[Optional, Default: ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE] The RTP payload type to be used for blobs s...
std::vector< Rallypoint > rallypoints
[DEPRECATED] List of Rallypoint (s) the Group should use to connect to a Rallypoint router....
RtpProfile rtpProfile
[Optional] RTP profile the group
std::vector< RtpPayloadTypeTranslation > inboundRtpPayloadTypeTranslations
[Optional] A vector of translations from external entity RTP payload types to those used by Engage
int multicastFailoverSecs
[Optional, Default: 10] Specifies the number fo seconds to wait after Rallypoint connection failure t...
InboundAliasGenerationPolicy_t
Enum describing the alias generation policy.
RangerPackets rangerPackets
[Optional] Ranger packet options
int rfc4733RtpPayloadId
[Optional, Default: 0] The RTP payload ID by which to identify (RX and TX) payloads encoded according...
uint32_t securityLevel
[Optional, Default: 0] The security classification level of the group.
PacketCapturer rxCapture
Details for capture of received packets
GroupBridgeTargetOutputDetail bridgeTargetOutputDetail
Output details for when the group is a target in a bridge (see GroupBridgeTargetOutputDetail).
std::string id
Unique identity for the group.
AudioGate gateIn
[Optional] Inbound gating of audio - only audio allowed through by the gate will be processed
RallypointCluster rallypointCluster
Cluster of one or more Rallypoints the group may use.
TransportImpairment txImpairment
[Optional] The TX impairment to apply
Audio audio
Sets audio properties like which audio device to use, audio gain etc (see Audio).
bool lbCrypto
[Optional, Default: false] Use low-bandwidth crypto
std::string spokenName
The group name as spoken - typically by a text-to-speech system
InboundAliasGenerationPolicy_t inboundAliasGenerationPolicy
[Optional, Default: iagpAnonymousAlias]
std::string anonymousAlias
[Optional] Alias to use for inbound streams that do not have an alias component
Details for priority transmission based on unique network addressing.
Detailed information for a group reconfiguration.
ReconfigurationStatus_t status
The creation status.
List of TalkerInformation objects.
std::vector< TalkerInformation > list
List of TalkerInformation objects.
Configuration for Timeline functionality for Group.
bool enabled
[Optional, Default: true] Enables timeline feature.
int maxAudioTimeMs
[Optional, Default: 30000] Maximum audio block size to record in milliseconds.
Detailed information for a group transmit.
int remotePriority
Remote TX priority (optional)
long nonFdxMsHangRemaining
Milliseconds of hang time remaining on a non-FDX group (optional)
int localPriority
Local TX priority (optional)
uint32_t txId
Transmission ID (optional)
std::string displayName
[Optional, Default: empty string] The display name to be used for the user.
std::string userId
[Optional, Default: empty string] The user ID to be used to represent the user.
std::string nodeId
[Optional, Default: Auto Generated] This is the Node ID to use to represent instance on the network.
std::string avatar
[Optional, Default: empty string] This is a application defined field used to indicate a users avatar...
Configuration for IGMP snooping.
int queryIntervalMs
[Optional, Default 125000] Interval between sending IGMP membership queries. If 0,...
int subscriptionTimeoutMs
[Optional, Default 0] Typically calculated according to RFC specifications. Set a value here to manua...
bool enabled
Enables IGMP. Default is false.
Detailed statistics for an inbound processor.
Helper class for serializing and deserializing the LicenseDescriptor JSON.
std::string activationHmac
The HMAC to be used for activation purposes.
std::string entitlement
Entitlement key to use for the product.
std::string cargo
Reserved for internal use.
std::string manufacturerId
[Read only] Manufacturer ID.
std::string key
License Key to be used for the application.
uint8_t cargoFlags
Reserved for internal use.
int type
[Read only] 0 = unknown, 1 = perpetual, 2 = expires
std::string deviceId
[Read only] Unique device identifier generated by the Engine.
time_t expires
[Read only] The time that the license key or activation code expires in Unix timestamp - Zulu/UTC.
std::string activationCode
If the key required activation, this is the activation code generated using the entitlement,...
std::string expiresFormatted
[Read only] The time that the license key or activation code expires formatted in ISO 8601 format,...
std::string deviceId
Device Identifier. See LicenseDescriptor::deviceId for details.
std::string manufacturerId
Manufacturer ID to use for the product. See LicenseDescriptor::manufacturerId for details.
std::string activationCode
Activation Code issued for the license key. See LicenseDescriptor::activationCode for details.
std::string key
License key. See LicenseDescriptor::key for details.
std::string entitlement
Entitlement key to use for the product. See LicenseDescriptor::entitlement for details.
std::vector< Group > groups
Array of groups in the configuration.
std::vector< VoiceToVoiceSession > voiceToVoiceSessions
Array of voiceToVoice sessions in the configuration.
Configuration for the linguistics server.
LingoServerStatusReportConfiguration statusReport
Details for producing a status report.
std::string lingoConfigurationFileName
Name of a file containing the linguistics configuration.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
std::string id
A unqiue identifier for the linguistics server.
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
NsmConfiguration nsm
[Optional] Settings for NSM.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
std::string lingoConfigurationFileCommand
Command-line to execute that returns a linguistics configuration.
LingoServerInternals internals
Internal settings.
EnginePolicy enginePolicy
The policy to be used for the underlying Engage Engine.
int lingoConfigurationFileCheckSecs
Number of seconds between checks to see if the linguistics configuration has been updated....
std::string certStoreFileName
Path to the certificate store.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
NetworkAddress proxy
Address and port of the proxy.
int serviceConfigurationFileCheckSecs
Number of seconds between checks to see if the service configuration has been updated....
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
WatchdogSettings watchdog
[Optional] Settings for the watchdog.
TuningSettings tuning
[Optional] Low-level tuning
TODO: Configuration for the translation server status report file.
Location information used as part of the PresenceDescriptor.
double longitude
Its the longitudinal position using the Signed degrees format (DDD.dddd) format. Valid range is -180 ...
double altitude
[Optional, Default: INVALID_LOCATION_VALUE] The altitude above sea level in meters.
uint32_t ts
[Read Only: Unix timestamp - Zulu/UTC] Indicates the timestamp that the location was recorded.
double latitude
Its the latitude position using the using the Signed degrees format (DDD.dddd). Valid range is -90 to...
double direction
[Optional, Default: INVALID_LOCATION_VALUE] Direction the endpoint is traveling in degrees....
double speed
[Optional, Default: INVALID_LOCATION_VALUE] The speed the endpoint is traveling at in meters per seco...
Defines settings for a named identity.
SecurityCertificate certificate
The identity certificate.
RestrictionType_t type
Type indicating how the elements are to be treated.
std::vector< NetworkAddressRxTx > elements
List of elements.
std::string manufacturer
Device manufacturer (if any)
int deviceId
[Read Only] Unique device identifier assigned by Engage Engine at time of device creation.
std::string extra
Extra data provided by the platform (if any)
std::string hardwareId
Device hardware ID (if any)
std::string serialNumber
Device serial number (if any)
std::string name
Name of the device assigned by the platform.
int ttl
[Optional, Default: 1] Time to live or hop limit is a mechanism that limits the lifespan or lifetime ...
TxPriority_t priority
[Optional, Default: priVoice] Transmission priority. This has meaning on some operating systems based...
Description of a packet capturer.
int version
TODO: A version number for the domain configuration. Change this whenever you update your configurati...
std::string id
An identifier useful for organizations that track different domain configurations by ID.
std::vector< RallypointPeer > peers
List of Rallypoint peers to connect to.
uint32_t configurationVersion
Internal configuration version.
Device Power Information used as part of the PresenceDescriptor.
int state
[Optional, Default: 0] Is the current state that the power system is in.
int source
[Optional, Default: 0] Is the source the power is being delivered from
int level
[Optional, Default: 0] Is the current level of the battery or power system as a percentage....
Group Alias used as part of the PresenceDescriptor.
uint16_t status
Status flags for the user's participation on the group.
std::string groupId
Group Id the alias is associated with.
Represents an endpoints presence properties. Used in engageUpdatePresenceDescriptor API and PFN_ENGAG...
Power power
[Optional, Default: see Power] Device power information like charging state, battery level,...
std::string custom
[Optional, Default: empty string] Custom string application can use of presence descriptor....
bool self
[Read Only] Indicates that this presence declaration was generated by the Engage Engine the applicati...
uint32_t nextUpdate
[Read Only, Unix timestamp - Zulu/UTC] Indicates the next time the presence descriptor will be sent.
std::vector< PresenceDescriptorGroupItem > groupAliases
[Read Only] List of group items associated with this presence descriptor.
Identity identity
[Optional, Default see Identity] Endpoint's identity information.
bool announceOnReceive
[Read Only] Indicates that the Engine will announce its PresenceDescriptor in response to this messag...
uint32_t ts
[Read Only, Unix timestamp - Zulu/UTC] Indicates the timestamp that the message was originally sent.
std::string comment
[Optional] No defined limit on size but the total size of the serialized JSON object must fit inside ...
Connectivity connectivity
[Optional, Default: see Connectivity] Device connectivity information like wifi/cellular,...
uint32_t disposition
[Optional] Indicates the users disposition
Location location
[Optional, Default: see Location] Location information
Describes how the Presence is configured for a group of type Group::gtPresence in Group::Type_t.
Format_t format
Format to be used to represent presence information.
bool reduceImmediacy
[Optional, Default: false] Instructs the Engage Engine reduce the immediacy of presence announcements...
bool listenOnly
Instructs the Engage Engine to not transmit presence descriptor.
int minIntervalSecs
[Optional, Default: 5] The minimum interval to send at to prevent network flooding
int intervalSecs
[Optional, Default: 30] The interval in seconds at which to send the presence descriptor on the prese...
Defines settings for Rallypoint advertising.
std::string interfaceName
The multicast network interface for mDNS.
std::string serviceName
[Optional, Default "_rallypoint._tcp.local."] The service name
std::string hostName
[Optional] This Rallypoint's DNS-SD host name
int port
[Default: RP port] The multicast network interface for mDNS
bool enabled
[Default: false] Advertising is enabled
int rolloverSecs
Seconds between switching to a new target.
int transactionTimeoutMs
[Optional, Default: 10000] Default transaction time in milliseconds to any RP in the cluster
int connectionTimeoutSecs
[Optional, Default: 5] Default connection timeout in seconds to any RP in the cluster
std::vector< Rallypoint > rallypoints
List of Rallypoints.
ConnectionStrategy_t connectionStrategy
[Optional, Default: csRoundRobin] Specifies the connection strategy to be followed....
Detailed information for a rallypoint connection.
float serverProcessingMs
Server processing time in milliseconds - used for roundtrip reports.
uint64_t msToNextConnectionAttempt
Milliseconds until next connection attempt.
Defines settings for Rallypoint extended group restrictions.
std::vector< StringRestrictionList > restrictions
Restrictions.
int transactionTimeoutMs
[Optional, Default 10000] Number of milliseconds that a transaction may take before the link is consi...
bool allowSelfSignedCertificate
[Optional, Default false] Allows the Rallypoint to accept self-signed certificates from the far-end
std::string sni
[Optional] A user-defined string sent as the Server Name Indication (SNI) field in the TLS setup....
std::vector< std::string > caCertificates
[Optional] A vector of certificates (raw content, file names, or certificate store elements) used to ...
std::string certificate
This is the X509 certificate to use for mutual authentication.
bool verifyPeer
[Optional, Default true] Indicates whether the connection peer is to be verified by checking the vali...
bool disableMessageSigning
[Optional, Default false] Indicates whether to forego ECSDA signing of control-plane messages.
NetworkAddress host
This is the host address for the Engine to connect to the RallyPoint service.
std::string additionalProtocols
[Optional, Default: ""] Additional protocols to use for the Rallypoint connection (only used for WebS...
RpProtocol_t protocol
[Optional, Default: rppTlsTcp] Specifies the protocol to be used for the Rallypoint connection....
std::string certificateKey
This is the private key used to generate the X509 certificate.
int connectionTimeoutSecs
[Optional, Default: 5] Connection timeout in seconds to the RP
TcpNetworkTxOptions tcpTxOptions
[Optional] Tx options for the TCP link
std::string path
[Optional, Default: ""] Path to use for the RP connection (only used for WebSocket)
SecurityCertificate certificate
Internal certificate detail.
std::string additionalProtocols
[Optional, Default: ""] Additional protocols to use for the peer (only used for WebSocket)
bool forceIsMeshLeaf
Internal enablement setting.
int connectionTimeoutSecs
[Optional, Default: 0 - OS platform default] Connection timeout in seconds to the peer
NetworkAddress host
Internal host detail.
std::string path
[Optional, Default: ""] Path to use for the peer (only used for WebSocket)
bool enabled
Internal enablement setting.
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...