Engage Engine API  1.246.9086
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(TuningSettings)
455 {
456 IMPLEMENT_JSON_SERIALIZATION()
457 IMPLEMENT_JSON_DOCUMENTATION(TuningSettings)
458
459 public:
462
465
468
469
472
475
478
479
482
485
488
491
493 {
494 clear();
495 }
496
497 void clear()
498 {
499 maxPooledRtpMb = 0;
500 maxPooledRtpObjects = 0;
501 maxActiveRtpObjects = 0;
502
503 maxPooledBlobMb = 0;
504 maxPooledBlobObjects = 0;
505 maxActiveBlobObjects = 0;
506
507 maxPooledBufferMb = 0;
508 maxPooledBufferObjects = 0;
509 maxActiveBufferObjects = 0;
510
511 maxActiveRtpProcessors = 0;
512 }
513
514 virtual void initForDocumenting()
515 {
516 clear();
517 }
518 };
519
520 static void to_json(nlohmann::json& j, const TuningSettings& p)
521 {
522 j = nlohmann::json{
523 TOJSON_IMPL(maxPooledRtpMb),
524 TOJSON_IMPL(maxPooledRtpObjects),
525 TOJSON_IMPL(maxActiveRtpObjects),
526
527 TOJSON_IMPL(maxPooledBlobMb),
528 TOJSON_IMPL(maxPooledBlobObjects),
529 TOJSON_IMPL(maxActiveBlobObjects),
530
531 TOJSON_IMPL(maxPooledBufferMb),
532 TOJSON_IMPL(maxPooledBufferObjects),
533 TOJSON_IMPL(maxActiveBufferObjects),
534
535 TOJSON_IMPL(maxActiveRtpProcessors)
536 };
537 }
538 static void from_json(const nlohmann::json& j, TuningSettings& p)
539 {
540 p.clear();
541 FROMJSON_IMPL(maxPooledRtpMb, uint32_t, 0);
542 FROMJSON_IMPL(maxPooledRtpObjects, uint32_t, 0);
543 FROMJSON_IMPL(maxActiveRtpObjects, uint32_t, 0);
544
545 FROMJSON_IMPL(maxPooledBlobMb, uint32_t, 0);
546 FROMJSON_IMPL(maxPooledBlobObjects, uint32_t, 0);
547 FROMJSON_IMPL(maxActiveBlobObjects, uint32_t, 0);
548
549 FROMJSON_IMPL(maxPooledBufferMb, uint32_t, 0);
550 FROMJSON_IMPL(maxPooledBufferObjects, uint32_t, 0);
551 FROMJSON_IMPL(maxActiveBufferObjects, uint32_t, 0);
552
553 FROMJSON_IMPL(maxActiveRtpProcessors, uint32_t, 0);
554 }
555
556
557 //-----------------------------------------------------------
558 JSON_SERIALIZED_CLASS(FipsCryptoSettings)
560 {
561 IMPLEMENT_JSON_SERIALIZATION()
562 IMPLEMENT_JSON_DOCUMENTATION(FipsCryptoSettings)
563
564 public:
567
569 std::string path;
570
572 bool debug;
573
575 {
576 clear();
577 }
578
579 void clear()
580 {
581 enabled = false;
582 path.clear();
583 debug = false;
584 }
585
586 virtual void initForDocumenting()
587 {
588 clear();
589 }
590 };
591
592 static void to_json(nlohmann::json& j, const FipsCryptoSettings& p)
593 {
594 j = nlohmann::json{
595 TOJSON_IMPL(enabled),
596 TOJSON_IMPL(path),
597 TOJSON_IMPL(debug)
598 };
599 }
600 static void from_json(const nlohmann::json& j, FipsCryptoSettings& p)
601 {
602 p.clear();
603 FROMJSON_IMPL_SIMPLE(enabled);
604 FROMJSON_IMPL_SIMPLE(path);
605 FROMJSON_IMPL_SIMPLE(debug);
606 }
607
608
609 //-----------------------------------------------------------
610 JSON_SERIALIZED_CLASS(WatchdogSettings)
612 {
613 IMPLEMENT_JSON_SERIALIZATION()
614 IMPLEMENT_JSON_DOCUMENTATION(WatchdogSettings)
615
616 public:
619
622
625
628
631
633 {
634 clear();
635 }
636
637 void clear()
638 {
639 enabled = true;
640 intervalMs = 5000;
641 hangDetectionMs = 2000;
642 abortOnHang = true;
643 slowExecutionThresholdMs = 100;
644 }
645
646 virtual void initForDocumenting()
647 {
648 clear();
649 }
650 };
651
652 static void to_json(nlohmann::json& j, const WatchdogSettings& p)
653 {
654 j = nlohmann::json{
655 TOJSON_IMPL(enabled),
656 TOJSON_IMPL(intervalMs),
657 TOJSON_IMPL(hangDetectionMs),
658 TOJSON_IMPL(abortOnHang),
659 TOJSON_IMPL(slowExecutionThresholdMs)
660 };
661 }
662 static void from_json(const nlohmann::json& j, WatchdogSettings& p)
663 {
664 p.clear();
665 getOptional<bool>("enabled", p.enabled, j, true);
666 getOptional<int>("intervalMs", p.intervalMs, j, 5000);
667 getOptional<int>("hangDetectionMs", p.hangDetectionMs, j, 2000);
668 getOptional<bool>("abortOnHang", p.abortOnHang, j, true);
669 getOptional<int>("slowExecutionThresholdMs", p.slowExecutionThresholdMs, j, 100);
670 }
671
672
673 //-----------------------------------------------------------
674 JSON_SERIALIZED_CLASS(FileRecordingRequest)
676 {
677 IMPLEMENT_JSON_SERIALIZATION()
678 IMPLEMENT_JSON_DOCUMENTATION(FileRecordingRequest)
679
680 public:
681 std::string id;
682 std::string fileName;
683 uint32_t maxMs;
684
686 {
687 clear();
688 }
689
690 void clear()
691 {
692 id.clear();
693 fileName.clear();
694 maxMs = 60000;
695 }
696
697 virtual void initForDocumenting()
698 {
699 clear();
700 id = "1-2-3-4-5-6-7-8-9";
701 fileName = "/tmp/test.wav";
702 maxMs = 10000;
703 }
704 };
705
706 static void to_json(nlohmann::json& j, const FileRecordingRequest& p)
707 {
708 j = nlohmann::json{
709 TOJSON_IMPL(id),
710 TOJSON_IMPL(fileName),
711 TOJSON_IMPL(maxMs)
712 };
713 }
714 static void from_json(const nlohmann::json& j, FileRecordingRequest& p)
715 {
716 p.clear();
717 j.at("id").get_to(p.id);
718 j.at("fileName").get_to(p.fileName);
719 getOptional<uint32_t>("maxMs", p.maxMs, j, 60000);
720 }
721
722
723 //-----------------------------------------------------------
724 JSON_SERIALIZED_CLASS(Feature)
726 {
727 IMPLEMENT_JSON_SERIALIZATION()
728 IMPLEMENT_JSON_DOCUMENTATION(Feature)
729
730 public:
731 std::string id;
732 std::string name;
733 std::string description;
734 std::string comments;
735 int count;
736 int used; // NOTE: Ignored during deserialization!
737
738 Feature()
739 {
740 clear();
741 }
742
743 void clear()
744 {
745 id.clear();
746 name.clear();
747 description.clear();
748 comments.clear();
749 count = 0;
750 used = 0;
751 }
752
753 virtual void initForDocumenting()
754 {
755 clear();
756 id = "{af9540d1-3e86-4fa6-8b80-e26daecb61ab}";
757 name = "A sample feature";
758 description = "This is an example of a feature";
759 comments = "These are comments for this feature";
760 count = 42;
761 used = 16;
762 }
763 };
764
765 static void to_json(nlohmann::json& j, const Feature& p)
766 {
767 j = nlohmann::json{
768 TOJSON_IMPL(id),
769 TOJSON_IMPL(name),
770 TOJSON_IMPL(description),
771 TOJSON_IMPL(comments),
772 TOJSON_IMPL(count),
773 TOJSON_IMPL(used)
774 };
775 }
776 static void from_json(const nlohmann::json& j, Feature& p)
777 {
778 p.clear();
779 j.at("id").get_to(p.id);
780 getOptional("name", p.name, j);
781 getOptional("description", p.description, j);
782 getOptional("comments", p.comments, j);
783 getOptional("count", p.count, j, 0);
784
785 // NOTE: Not deserialized!
786 //getOptional("used", p.used, j, 0);
787 }
788
789
790 //-----------------------------------------------------------
791 JSON_SERIALIZED_CLASS(Featureset)
793 {
794 IMPLEMENT_JSON_SERIALIZATION()
795 IMPLEMENT_JSON_DOCUMENTATION(Featureset)
796
797 public:
798 std::string signature;
799 bool lockToDeviceId;
800 std::vector<Feature> features;
801
802 Featureset()
803 {
804 clear();
805 }
806
807 void clear()
808 {
809 signature.clear();
810 lockToDeviceId = false;
811 features.clear();
812 }
813
814 virtual void initForDocumenting()
815 {
816 clear();
817 signature = "c39df3f36c6444e686e47e70fc45cf91e6ed2d8de62d4a1e89f507d567ff48aaabb1a70e54b44377b46fc4a1a2e319e5b77e4abffc444db98f8eb55d709aad5f";
818 lockToDeviceId = false;
819 }
820 };
821
822 static void to_json(nlohmann::json& j, const Featureset& p)
823 {
824 j = nlohmann::json{
825 TOJSON_IMPL(signature),
826 TOJSON_IMPL(lockToDeviceId),
827 TOJSON_IMPL(features)
828 };
829 }
830 static void from_json(const nlohmann::json& j, Featureset& p)
831 {
832 p.clear();
833 getOptional("signature", p.signature, j);
834 getOptional<bool>("lockToDeviceId", p.lockToDeviceId, j, false);
835 getOptional<std::vector<Feature>>("features", p.features, j);
836 }
837
838
839 //-----------------------------------------------------------
840 JSON_SERIALIZED_CLASS(Agc)
850 {
851 IMPLEMENT_JSON_SERIALIZATION()
852 IMPLEMENT_JSON_DOCUMENTATION(Agc)
853
854 public:
857
860
863
866
869
872
873 Agc()
874 {
875 clear();
876 }
877
878 void clear()
879 {
880 enabled = false;
881 minLevel = 0;
882 maxLevel = 255;
883 compressionGainDb = 25;
884 enableLimiter = false;
885 targetLevelDb = 3;
886 }
887 };
888
889 static void to_json(nlohmann::json& j, const Agc& p)
890 {
891 j = nlohmann::json{
892 TOJSON_IMPL(enabled),
893 TOJSON_IMPL(minLevel),
894 TOJSON_IMPL(maxLevel),
895 TOJSON_IMPL(compressionGainDb),
896 TOJSON_IMPL(enableLimiter),
897 TOJSON_IMPL(targetLevelDb)
898 };
899 }
900 static void from_json(const nlohmann::json& j, Agc& p)
901 {
902 p.clear();
903 getOptional<bool>("enabled", p.enabled, j, false);
904 getOptional<int>("minLevel", p.minLevel, j, 0);
905 getOptional<int>("maxLevel", p.maxLevel, j, 255);
906 getOptional<int>("compressionGainDb", p.compressionGainDb, j, 25);
907 getOptional<bool>("enableLimiter", p.enableLimiter, j, false);
908 getOptional<int>("targetLevelDb", p.targetLevelDb, j, 3);
909 }
910
911
912 //-----------------------------------------------------------
913 JSON_SERIALIZED_CLASS(RtpPayloadTypeTranslation)
923 {
924 IMPLEMENT_JSON_SERIALIZATION()
925 IMPLEMENT_JSON_DOCUMENTATION(RtpPayloadTypeTranslation)
926
927 public:
929 uint16_t external;
930
932 uint16_t engage;
933
935 {
936 clear();
937 }
938
939 void clear()
940 {
941 external = 0;
942 engage = 0;
943 }
944
945 bool matches(const RtpPayloadTypeTranslation& other)
946 {
947 return ( (external == other.external) && (engage == other.engage) );
948 }
949 };
950
951 static void to_json(nlohmann::json& j, const RtpPayloadTypeTranslation& p)
952 {
953 j = nlohmann::json{
954 TOJSON_IMPL(external),
955 TOJSON_IMPL(engage)
956 };
957 }
958 static void from_json(const nlohmann::json& j, RtpPayloadTypeTranslation& p)
959 {
960 p.clear();
961 getOptional<uint16_t>("external", p.external, j);
962 getOptional<uint16_t>("engage", p.engage, j);
963 }
964
965 //-----------------------------------------------------------
966 JSON_SERIALIZED_CLASS(NetworkInterfaceDevice)
968 {
969 IMPLEMENT_JSON_SERIALIZATION()
970 IMPLEMENT_JSON_DOCUMENTATION(NetworkInterfaceDevice)
971
972 public:
973 std::string name;
974 std::string friendlyName;
975 std::string description;
976 int family;
977 std::string address;
978 bool available;
979 bool isLoopback;
980 bool supportsMulticast;
981 std::string hardwareAddress;
982
984 {
985 clear();
986 }
987
988 void clear()
989 {
990 name.clear();
991 friendlyName.clear();
992 description.clear();
993 family = -1;
994 address.clear();
995 available = false;
996 isLoopback = false;
997 supportsMulticast = false;
998 hardwareAddress.clear();
999 }
1000
1001 virtual void initForDocumenting()
1002 {
1003 clear();
1004 name = "en0";
1005 friendlyName = "Wi-Fi";
1006 description = "A wi-fi adapter";
1007 family = 1;
1008 address = "127.0.0.1";
1009 available = true;
1010 isLoopback = true;
1011 supportsMulticast = false;
1012 hardwareAddress = "DE:AD:BE:EF:01:02:03";
1013 }
1014 };
1015
1016 static void to_json(nlohmann::json& j, const NetworkInterfaceDevice& p)
1017 {
1018 j = nlohmann::json{
1019 TOJSON_IMPL(name),
1020 TOJSON_IMPL(friendlyName),
1021 TOJSON_IMPL(description),
1022 TOJSON_IMPL(family),
1023 TOJSON_IMPL(address),
1024 TOJSON_IMPL(available),
1025 TOJSON_IMPL(isLoopback),
1026 TOJSON_IMPL(supportsMulticast),
1027 TOJSON_IMPL(hardwareAddress)
1028 };
1029 }
1030 static void from_json(const nlohmann::json& j, NetworkInterfaceDevice& p)
1031 {
1032 p.clear();
1033 getOptional("name", p.name, j);
1034 getOptional("friendlyName", p.friendlyName, j);
1035 getOptional("description", p.description, j);
1036 getOptional("family", p.family, j, -1);
1037 getOptional("address", p.address, j);
1038 getOptional("available", p.available, j, false);
1039 getOptional("isLoopback", p.isLoopback, j, false);
1040 getOptional("supportsMulticast", p.supportsMulticast, j, false);
1041 getOptional("hardwareAddress", p.hardwareAddress, j);
1042 }
1043
1044 //-----------------------------------------------------------
1045 JSON_SERIALIZED_CLASS(ListOfNetworkInterfaceDevice)
1047 {
1048 IMPLEMENT_JSON_SERIALIZATION()
1049 IMPLEMENT_JSON_DOCUMENTATION(ListOfNetworkInterfaceDevice)
1050
1051 public:
1052 std::vector<NetworkInterfaceDevice> list;
1053
1055 {
1056 clear();
1057 }
1058
1059 void clear()
1060 {
1061 list.clear();
1062 }
1063 };
1064
1065 static void to_json(nlohmann::json& j, const ListOfNetworkInterfaceDevice& p)
1066 {
1067 j = nlohmann::json{
1068 TOJSON_IMPL(list)
1069 };
1070 }
1071 static void from_json(const nlohmann::json& j, ListOfNetworkInterfaceDevice& p)
1072 {
1073 p.clear();
1074 getOptional<std::vector<NetworkInterfaceDevice>>("list", p.list, j);
1075 }
1076
1077
1078 //-----------------------------------------------------------
1079 JSON_SERIALIZED_CLASS(RtpHeader)
1089 {
1090 IMPLEMENT_JSON_SERIALIZATION()
1091 IMPLEMENT_JSON_DOCUMENTATION(RtpHeader)
1092
1093 public:
1094
1096 int pt;
1097
1100
1102 uint16_t seq;
1103
1105 uint32_t ssrc;
1106
1108 uint32_t ts;
1109
1110 RtpHeader()
1111 {
1112 clear();
1113 }
1114
1115 void clear()
1116 {
1117 pt = -1;
1118 marker = false;
1119 seq = 0;
1120 ssrc = 0;
1121 ts = 0;
1122 }
1123
1124 virtual void initForDocumenting()
1125 {
1126 clear();
1127 pt = 0;
1128 marker = false;
1129 seq = 123;
1130 ssrc = 12345678;
1131 ts = 87654321;
1132 }
1133 };
1134
1135 static void to_json(nlohmann::json& j, const RtpHeader& p)
1136 {
1137 if(p.pt != -1)
1138 {
1139 j = nlohmann::json{
1140 TOJSON_IMPL(pt),
1141 TOJSON_IMPL(marker),
1142 TOJSON_IMPL(seq),
1143 TOJSON_IMPL(ssrc),
1144 TOJSON_IMPL(ts)
1145 };
1146 }
1147 }
1148 static void from_json(const nlohmann::json& j, RtpHeader& p)
1149 {
1150 p.clear();
1151 getOptional<int>("pt", p.pt, j, -1);
1152 getOptional<bool>("marker", p.marker, j, false);
1153 getOptional<uint16_t>("seq", p.seq, j, 0);
1154 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
1155 getOptional<uint32_t>("ts", p.ts, j, 0);
1156 }
1157
1158 //-----------------------------------------------------------
1159 JSON_SERIALIZED_CLASS(BlobInfo)
1169 {
1170 IMPLEMENT_JSON_SERIALIZATION()
1171 IMPLEMENT_JSON_DOCUMENTATION(BlobInfo)
1172
1173 public:
1177 typedef enum
1178 {
1180 bptUndefined = 0,
1181
1183 bptAppTextUtf8 = 1,
1184
1186 bptJsonTextUtf8 = 2,
1187
1189 bptAppBinary = 3,
1190
1192 bptEngageBinaryHumanBiometrics = 4,
1193
1195 bptAppMimeMessage = 5,
1196
1198 bptEngageInternal = 42
1199 } PayloadType_t;
1200
1202 size_t size;
1203
1205 std::string source;
1206
1208 std::string target;
1209
1212
1215
1217 std::string txnId;
1218
1221
1222 BlobInfo()
1223 {
1224 clear();
1225 }
1226
1227 void clear()
1228 {
1229 size = 0;
1230 source.clear();
1231 target.clear();
1232 rtpHeader.clear();
1233 payloadType = PayloadType_t::bptUndefined;
1234 txnId.clear();
1235 txnTimeoutSecs = 0;
1236 }
1237
1238 virtual void initForDocumenting()
1239 {
1240 clear();
1241 rtpHeader.initForDocumenting();
1242 }
1243 };
1244
1245 static void to_json(nlohmann::json& j, const BlobInfo& p)
1246 {
1247 j = nlohmann::json{
1248 TOJSON_IMPL(size),
1249 TOJSON_IMPL(source),
1250 TOJSON_IMPL(target),
1251 TOJSON_IMPL(rtpHeader),
1252 TOJSON_IMPL(payloadType),
1253 TOJSON_IMPL(txnId),
1254 TOJSON_IMPL(txnTimeoutSecs)
1255 };
1256 }
1257 static void from_json(const nlohmann::json& j, BlobInfo& p)
1258 {
1259 p.clear();
1260 getOptional<size_t>("size", p.size, j, 0);
1261 getOptional<std::string>("source", p.source, j, EMPTY_STRING);
1262 getOptional<std::string>("target", p.target, j, EMPTY_STRING);
1263 getOptional<RtpHeader>("rtpHeader", p.rtpHeader, j);
1264 getOptional<BlobInfo::PayloadType_t>("payloadType", p.payloadType, j, BlobInfo::PayloadType_t::bptUndefined);
1265 getOptional<std::string>("txnId", p.txnId, j, EMPTY_STRING);
1266 getOptional<int>("txnTimeoutSecs", p.txnTimeoutSecs, j, 0);
1267 }
1268
1269
1270 //-----------------------------------------------------------
1271 JSON_SERIALIZED_CLASS(TxAudioUri)
1284 {
1285 IMPLEMENT_JSON_SERIALIZATION()
1286 IMPLEMENT_JSON_DOCUMENTATION(TxAudioUri)
1287
1288 public:
1290 std::string uri;
1291
1294
1295 TxAudioUri()
1296 {
1297 clear();
1298 }
1299
1300 void clear()
1301 {
1302 uri.clear();
1303 repeatCount = 0;
1304 }
1305
1306 virtual void initForDocumenting()
1307 {
1308 }
1309 };
1310
1311 static void to_json(nlohmann::json& j, const TxAudioUri& p)
1312 {
1313 j = nlohmann::json{
1314 TOJSON_IMPL(uri),
1315 TOJSON_IMPL(repeatCount)
1316 };
1317 }
1318 static void from_json(const nlohmann::json& j, TxAudioUri& p)
1319 {
1320 p.clear();
1321 getOptional<std::string>("uri", p.uri, j, EMPTY_STRING);
1322 getOptional<int>("repeatCount", p.repeatCount, j, 0);
1323 }
1324
1325
1326 //-----------------------------------------------------------
1327 JSON_SERIALIZED_CLASS(AdvancedTxParams)
1340 {
1341 IMPLEMENT_JSON_SERIALIZATION()
1342 IMPLEMENT_JSON_DOCUMENTATION(AdvancedTxParams)
1343
1344 public:
1345
1347 uint16_t flags;
1348
1350 uint8_t priority;
1351
1354
1357
1359 std::string alias;
1360
1362 bool muted;
1363
1365 uint32_t txId;
1366
1369
1372
1375
1377 {
1378 clear();
1379 }
1380
1381 void clear()
1382 {
1383 flags = 0;
1384 priority = 0;
1385 subchannelTag = 0;
1386 includeNodeId = false;
1387 alias.clear();
1388 muted = false;
1389 txId = 0;
1390 audioUri.clear();
1391 aliasSpecializer = 0;
1392 receiverRxMuteForAliasSpecializer = false;
1393 }
1394
1395 virtual void initForDocumenting()
1396 {
1397 }
1398 };
1399
1400 static void to_json(nlohmann::json& j, const AdvancedTxParams& p)
1401 {
1402 j = nlohmann::json{
1403 TOJSON_IMPL(flags),
1404 TOJSON_IMPL(priority),
1405 TOJSON_IMPL(subchannelTag),
1406 TOJSON_IMPL(includeNodeId),
1407 TOJSON_IMPL(alias),
1408 TOJSON_IMPL(muted),
1409 TOJSON_IMPL(txId),
1410 TOJSON_IMPL(audioUri),
1411 TOJSON_IMPL(aliasSpecializer),
1412 TOJSON_IMPL(receiverRxMuteForAliasSpecializer)
1413 };
1414 }
1415 static void from_json(const nlohmann::json& j, AdvancedTxParams& p)
1416 {
1417 p.clear();
1418 getOptional<uint16_t>("flags", p.flags, j, 0);
1419 getOptional<uint8_t>("priority", p.priority, j, 0);
1420 getOptional<uint16_t>("subchannelTag", p.subchannelTag, j, 0);
1421 getOptional<bool>("includeNodeId", p.includeNodeId, j, false);
1422 getOptional<std::string>("alias", p.alias, j, EMPTY_STRING);
1423 getOptional<bool>("muted", p.muted, j, false);
1424 getOptional<uint32_t>("txId", p.txId, j, 0);
1425 getOptional<TxAudioUri>("audioUri", p.audioUri, j);
1426 getOptional<uint16_t>("aliasSpecializer", p.aliasSpecializer, j, 0);
1427 getOptional<bool>("receiverRxMuteForAliasSpecializer", p.receiverRxMuteForAliasSpecializer, j, false);
1428 }
1429
1430 //-----------------------------------------------------------
1431 JSON_SERIALIZED_CLASS(Identity)
1444 {
1445 IMPLEMENT_JSON_SERIALIZATION()
1446 IMPLEMENT_JSON_DOCUMENTATION(Identity)
1447
1448 public:
1456 std::string nodeId;
1457
1459 std::string userId;
1460
1462 std::string displayName;
1463
1465 std::string avatar;
1466
1467 Identity()
1468 {
1469 clear();
1470 }
1471
1472 void clear()
1473 {
1474 nodeId.clear();
1475 userId.clear();
1476 displayName.clear();
1477 avatar.clear();
1478 }
1479
1480 virtual void initForDocumenting()
1481 {
1482 }
1483 };
1484
1485 static void to_json(nlohmann::json& j, const Identity& p)
1486 {
1487 j = nlohmann::json{
1488 TOJSON_IMPL(nodeId),
1489 TOJSON_IMPL(userId),
1490 TOJSON_IMPL(displayName),
1491 TOJSON_IMPL(avatar)
1492 };
1493 }
1494 static void from_json(const nlohmann::json& j, Identity& p)
1495 {
1496 p.clear();
1497 getOptional<std::string>("nodeId", p.nodeId, j);
1498 getOptional<std::string>("userId", p.userId, j);
1499 getOptional<std::string>("displayName", p.displayName, j);
1500 getOptional<std::string>("avatar", p.avatar, j);
1501 }
1502
1503
1504 //-----------------------------------------------------------
1505 JSON_SERIALIZED_CLASS(Location)
1518 {
1519 IMPLEMENT_JSON_SERIALIZATION()
1520 IMPLEMENT_JSON_DOCUMENTATION(Location)
1521
1522 public:
1523 constexpr static double INVALID_LOCATION_VALUE = -999.999;
1524
1526 uint32_t ts;
1527
1529 double latitude;
1530
1533
1535 double altitude;
1536
1539
1541 double speed;
1542
1543 Location()
1544 {
1545 clear();
1546 }
1547
1548 void clear()
1549 {
1550 ts = 0;
1551 latitude = INVALID_LOCATION_VALUE;
1552 longitude = INVALID_LOCATION_VALUE;
1553 altitude = INVALID_LOCATION_VALUE;
1554 direction = INVALID_LOCATION_VALUE;
1555 speed = INVALID_LOCATION_VALUE;
1556 }
1557
1558 virtual void initForDocumenting()
1559 {
1560 clear();
1561
1562 ts = 123456;
1563 latitude = 123.456;
1564 longitude = 456.789;
1565 altitude = 123;
1566 direction = 1;
1567 speed = 1234;
1568 }
1569 };
1570
1571 static void to_json(nlohmann::json& j, const Location& p)
1572 {
1573 if(p.latitude != Location::INVALID_LOCATION_VALUE && p.longitude != Location::INVALID_LOCATION_VALUE)
1574 {
1575 j = nlohmann::json{
1576 TOJSON_IMPL(latitude),
1577 TOJSON_IMPL(longitude),
1578 };
1579
1580 if(p.ts != 0) j["ts"] = p.ts;
1581 if(p.altitude != Location::INVALID_LOCATION_VALUE) j["altitude"] = p.altitude;
1582 if(p.speed != Location::INVALID_LOCATION_VALUE) j["speed"] = p.speed;
1583 if(p.direction != Location::INVALID_LOCATION_VALUE) j["direction"] = p.direction;
1584 }
1585 }
1586 static void from_json(const nlohmann::json& j, Location& p)
1587 {
1588 p.clear();
1589 getOptional<uint32_t>("ts", p.ts, j, 0);
1590 j.at("latitude").get_to(p.latitude);
1591 j.at("longitude").get_to(p.longitude);
1592 getOptional<double>("altitude", p.altitude, j, Location::INVALID_LOCATION_VALUE);
1593 getOptional<double>("direction", p.direction, j, Location::INVALID_LOCATION_VALUE);
1594 getOptional<double>("speed", p.speed, j, Location::INVALID_LOCATION_VALUE);
1595 }
1596
1597 //-----------------------------------------------------------
1598 JSON_SERIALIZED_CLASS(Power)
1609 {
1610 IMPLEMENT_JSON_SERIALIZATION()
1611 IMPLEMENT_JSON_DOCUMENTATION(Power)
1612
1613 public:
1614
1627
1641
1644
1645 Power()
1646 {
1647 clear();
1648 }
1649
1650 void clear()
1651 {
1652 source = 0;
1653 state = 0;
1654 level = 0;
1655 }
1656
1657 virtual void initForDocumenting()
1658 {
1659 }
1660 };
1661
1662 static void to_json(nlohmann::json& j, const Power& p)
1663 {
1664 if(p.source != 0 && p.state != 0 && p.level != 0)
1665 {
1666 j = nlohmann::json{
1667 TOJSON_IMPL(source),
1668 TOJSON_IMPL(state),
1669 TOJSON_IMPL(level)
1670 };
1671 }
1672 }
1673 static void from_json(const nlohmann::json& j, Power& p)
1674 {
1675 p.clear();
1676 getOptional<int>("source", p.source, j, 0);
1677 getOptional<int>("state", p.state, j, 0);
1678 getOptional<int>("level", p.level, j, 0);
1679 }
1680
1681
1682 //-----------------------------------------------------------
1683 JSON_SERIALIZED_CLASS(Connectivity)
1694 {
1695 IMPLEMENT_JSON_SERIALIZATION()
1696 IMPLEMENT_JSON_DOCUMENTATION(Connectivity)
1697
1698 public:
1712 int type;
1713
1716
1719
1720 Connectivity()
1721 {
1722 clear();
1723 }
1724
1725 void clear()
1726 {
1727 type = 0;
1728 strength = 0;
1729 rating = 0;
1730 }
1731
1732 virtual void initForDocumenting()
1733 {
1734 clear();
1735
1736 type = 1;
1737 strength = 2;
1738 rating = 3;
1739 }
1740 };
1741
1742 static void to_json(nlohmann::json& j, const Connectivity& p)
1743 {
1744 if(p.type != 0)
1745 {
1746 j = nlohmann::json{
1747 TOJSON_IMPL(type),
1748 TOJSON_IMPL(strength),
1749 TOJSON_IMPL(rating)
1750 };
1751 }
1752 }
1753 static void from_json(const nlohmann::json& j, Connectivity& p)
1754 {
1755 p.clear();
1756 getOptional<int>("type", p.type, j, 0);
1757 getOptional<int>("strength", p.strength, j, 0);
1758 getOptional<int>("rating", p.rating, j, 0);
1759 }
1760
1761
1762 //-----------------------------------------------------------
1763 JSON_SERIALIZED_CLASS(PresenceDescriptorGroupItem)
1774 {
1775 IMPLEMENT_JSON_SERIALIZATION()
1776 IMPLEMENT_JSON_DOCUMENTATION(PresenceDescriptorGroupItem)
1777
1778 public:
1780 std::string groupId;
1781
1783 std::string alias;
1784
1786 uint16_t status;
1787
1789 {
1790 clear();
1791 }
1792
1793 void clear()
1794 {
1795 groupId.clear();
1796 alias.clear();
1797 status = 0;
1798 }
1799
1800 virtual void initForDocumenting()
1801 {
1802 groupId = "{123-456}";
1803 alias = "MYALIAS";
1804 status = 0;
1805 }
1806 };
1807
1808 static void to_json(nlohmann::json& j, const PresenceDescriptorGroupItem& p)
1809 {
1810 j = nlohmann::json{
1811 TOJSON_IMPL(groupId),
1812 TOJSON_IMPL(alias),
1813 TOJSON_IMPL(status)
1814 };
1815 }
1816 static void from_json(const nlohmann::json& j, PresenceDescriptorGroupItem& p)
1817 {
1818 p.clear();
1819 getOptional<std::string>("groupId", p.groupId, j);
1820 getOptional<std::string>("alias", p.alias, j);
1821 getOptional<uint16_t>("status", p.status, j);
1822 }
1823
1824
1825 //-----------------------------------------------------------
1826 JSON_SERIALIZED_CLASS(PresenceDescriptor)
1837 {
1838 IMPLEMENT_JSON_SERIALIZATION()
1839 IMPLEMENT_JSON_DOCUMENTATION(PresenceDescriptor)
1840
1841 public:
1842
1848 bool self;
1849
1855 uint32_t ts;
1856
1862 uint32_t nextUpdate;
1863
1866
1868 std::string comment;
1869
1883 uint32_t disposition;
1884
1886 std::vector<PresenceDescriptorGroupItem> groupAliases;
1887
1890
1892 std::string custom;
1893
1896
1899
1902
1904 {
1905 clear();
1906 }
1907
1908 void clear()
1909 {
1910 self = false;
1911 ts = 0;
1912 nextUpdate = 0;
1913 identity.clear();
1914 comment.clear();
1915 disposition = 0;
1916 groupAliases.clear();
1917 location.clear();
1918 custom.clear();
1919 announceOnReceive = false;
1920 connectivity.clear();
1921 power.clear();
1922 }
1923
1924 virtual void initForDocumenting()
1925 {
1926 clear();
1927
1928 self = true;
1929 ts = 123;
1930 nextUpdate = 0;
1931 identity.initForDocumenting();
1932 comment = "This is a comment";
1933 disposition = 123;
1934
1935 PresenceDescriptorGroupItem gi;
1936 gi.initForDocumenting();
1937 groupAliases.push_back(gi);
1938
1939 location.initForDocumenting();
1940 custom = "{}";
1941 announceOnReceive = true;
1942 connectivity.initForDocumenting();
1943 power.initForDocumenting();
1944 }
1945 };
1946
1947 static void to_json(nlohmann::json& j, const PresenceDescriptor& p)
1948 {
1949 j = nlohmann::json{
1950 TOJSON_IMPL(ts),
1951 TOJSON_IMPL(nextUpdate),
1952 TOJSON_IMPL(identity),
1953 TOJSON_IMPL(comment),
1954 TOJSON_IMPL(disposition),
1955 TOJSON_IMPL(groupAliases),
1956 TOJSON_IMPL(location),
1957 TOJSON_IMPL(custom),
1958 TOJSON_IMPL(announceOnReceive),
1959 TOJSON_IMPL(connectivity),
1960 TOJSON_IMPL(power)
1961 };
1962
1963 if(!p.comment.empty()) j["comment"] = p.comment;
1964 if(!p.custom.empty()) j["custom"] = p.custom;
1965
1966 if(p.self)
1967 {
1968 j["self"] = true;
1969 }
1970 }
1971 static void from_json(const nlohmann::json& j, PresenceDescriptor& p)
1972 {
1973 p.clear();
1974 getOptional<bool>("self", p.self, j);
1975 getOptional<uint32_t>("ts", p.ts, j);
1976 getOptional<uint32_t>("nextUpdate", p.nextUpdate, j);
1977 getOptional<Identity>("identity", p.identity, j);
1978 getOptional<std::string>("comment", p.comment, j);
1979 getOptional<uint32_t>("disposition", p.disposition, j);
1980 getOptional<std::vector<PresenceDescriptorGroupItem>>("groupAliases", p.groupAliases, j);
1981 getOptional<Location>("location", p.location, j);
1982 getOptional<std::string>("custom", p.custom, j);
1983 getOptional<bool>("announceOnReceive", p.announceOnReceive, j);
1984 getOptional<Connectivity>("connectivity", p.connectivity, j);
1985 getOptional<Power>("power", p.power, j);
1986 }
1987
1993 typedef enum
1994 {
1997
2000
2003
2005 priVoice = 3
2006 } TxPriority_t;
2007
2013 typedef enum
2014 {
2017
2020
2023
2025 arpIpv6ThenIpv4 = 64
2026 } AddressResolutionPolicy_t;
2027
2028 //-----------------------------------------------------------
2029 JSON_SERIALIZED_CLASS(NetworkTxOptions)
2042 {
2043 IMPLEMENT_JSON_SERIALIZATION()
2044 IMPLEMENT_JSON_DOCUMENTATION(NetworkTxOptions)
2045
2046 public:
2049
2055 int ttl;
2056
2058 {
2059 clear();
2060 }
2061
2062 void clear()
2063 {
2064 priority = priVoice;
2065 ttl = 1;
2066 }
2067
2068 virtual void initForDocumenting()
2069 {
2070 }
2071 };
2072
2073 static void to_json(nlohmann::json& j, const NetworkTxOptions& p)
2074 {
2075 j = nlohmann::json{
2076 TOJSON_IMPL(priority),
2077 TOJSON_IMPL(ttl)
2078 };
2079 }
2080 static void from_json(const nlohmann::json& j, NetworkTxOptions& p)
2081 {
2082 p.clear();
2083 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
2084 getOptional<int>("ttl", p.ttl, j, 1);
2085 }
2086
2087
2088 //-----------------------------------------------------------
2089 JSON_SERIALIZED_CLASS(TcpNetworkTxOptions)
2098 {
2099 IMPLEMENT_JSON_SERIALIZATION()
2100 IMPLEMENT_JSON_DOCUMENTATION(TcpNetworkTxOptions)
2101
2102 public:
2104 {
2105 clear();
2106 }
2107
2108 void clear()
2109 {
2110 priority = priVoice;
2111 ttl = -1;
2112 }
2113
2114 virtual void initForDocumenting()
2115 {
2116 }
2117 };
2118
2119 static void to_json(nlohmann::json& j, const TcpNetworkTxOptions& p)
2120 {
2121 j = nlohmann::json{
2122 TOJSON_IMPL(priority),
2123 TOJSON_IMPL(ttl)
2124 };
2125 }
2126 static void from_json(const nlohmann::json& j, TcpNetworkTxOptions& p)
2127 {
2128 p.clear();
2129 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
2130 getOptional<int>("ttl", p.ttl, j, -1);
2131 }
2132
2133 typedef enum
2134 {
2137
2140
2142 ifIp6 = 6
2143 } IpFamilyType_t;
2144
2145 //-----------------------------------------------------------
2146 JSON_SERIALIZED_CLASS(NetworkAddress)
2158 {
2159 IMPLEMENT_JSON_SERIALIZATION()
2160 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddress)
2161
2162 public:
2164 std::string address;
2165
2167 int port;
2168
2170 {
2171 clear();
2172 }
2173
2174 void clear()
2175 {
2176 address.clear();
2177 port = 0;
2178 }
2179
2180 bool matches(const NetworkAddress& other)
2181 {
2182 if(address.compare(other.address) != 0)
2183 {
2184 return false;
2185 }
2186
2187 if(port != other.port)
2188 {
2189 return false;
2190 }
2191
2192 return true;
2193 }
2194 };
2195
2196 static void to_json(nlohmann::json& j, const NetworkAddress& p)
2197 {
2198 j = nlohmann::json{
2199 TOJSON_IMPL(address),
2200 TOJSON_IMPL(port)
2201 };
2202 }
2203 static void from_json(const nlohmann::json& j, NetworkAddress& p)
2204 {
2205 p.clear();
2206 getOptional<std::string>("address", p.address, j);
2207 getOptional<int>("port", p.port, j);
2208 }
2209
2210
2211 //-----------------------------------------------------------
2212 JSON_SERIALIZED_CLASS(NetworkAddressRxTx)
2224 {
2225 IMPLEMENT_JSON_SERIALIZATION()
2226 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddressRxTx)
2227
2228 public:
2231
2234
2236 {
2237 clear();
2238 }
2239
2240 void clear()
2241 {
2242 rx.clear();
2243 tx.clear();
2244 }
2245 };
2246
2247 static void to_json(nlohmann::json& j, const NetworkAddressRxTx& p)
2248 {
2249 j = nlohmann::json{
2250 TOJSON_IMPL(rx),
2251 TOJSON_IMPL(tx)
2252 };
2253 }
2254 static void from_json(const nlohmann::json& j, NetworkAddressRxTx& p)
2255 {
2256 p.clear();
2257 getOptional<NetworkAddress>("rx", p.rx, j);
2258 getOptional<NetworkAddress>("tx", p.tx, j);
2259 }
2260
2262 typedef enum
2263 {
2266
2268 graptStrict = 1
2269 } GroupRestrictionAccessPolicyType_t;
2270
2271 static bool isValidGroupRestrictionAccessPolicyType(GroupRestrictionAccessPolicyType_t t)
2272 {
2273 return (t == GroupRestrictionAccessPolicyType_t::graptPermissive ||
2274 t == GroupRestrictionAccessPolicyType_t::graptStrict );
2275 }
2276
2278 typedef enum
2279 {
2282
2285
2287 rtBlacklist = 2
2288 } RestrictionType_t;
2289
2290 static bool isValidRestrictionType(RestrictionType_t t)
2291 {
2292 return (t == RestrictionType_t::rtUndefined ||
2293 t == RestrictionType_t::rtWhitelist ||
2294 t == RestrictionType_t::rtBlacklist );
2295 }
2296
2321
2322 static bool isValidRestrictionElementType(RestrictionElementType_t t)
2323 {
2324 return (t == RestrictionElementType_t::retGroupId ||
2325 t == RestrictionElementType_t::retGroupIdPattern ||
2326 t == RestrictionElementType_t::retGenericAccessTagPattern ||
2327 t == RestrictionElementType_t::retCertificateSerialNumberPattern ||
2328 t == RestrictionElementType_t::retCertificateFingerprintPattern ||
2329 t == RestrictionElementType_t::retCertificateSubjectPattern ||
2330 t == RestrictionElementType_t::retCertificateIssuerPattern);
2331 }
2332
2333
2334 //-----------------------------------------------------------
2335 JSON_SERIALIZED_CLASS(NetworkAddressRestrictionList)
2347 {
2348 IMPLEMENT_JSON_SERIALIZATION()
2349 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddressRestrictionList)
2350
2351 public:
2354
2356 std::vector<NetworkAddressRxTx> elements;
2357
2359 {
2360 clear();
2361 }
2362
2363 void clear()
2364 {
2365 type = RestrictionType_t::rtUndefined;
2366 elements.clear();
2367 }
2368 };
2369
2370 static void to_json(nlohmann::json& j, const NetworkAddressRestrictionList& p)
2371 {
2372 j = nlohmann::json{
2373 TOJSON_IMPL(type),
2374 TOJSON_IMPL(elements)
2375 };
2376 }
2377 static void from_json(const nlohmann::json& j, NetworkAddressRestrictionList& p)
2378 {
2379 p.clear();
2380 getOptional<RestrictionType_t>("type", p.type, j, RestrictionType_t::rtUndefined);
2381 getOptional<std::vector<NetworkAddressRxTx>>("elements", p.elements, j);
2382 }
2383
2384 //-----------------------------------------------------------
2385 JSON_SERIALIZED_CLASS(StringRestrictionList)
2397 {
2398 IMPLEMENT_JSON_SERIALIZATION()
2399 IMPLEMENT_JSON_DOCUMENTATION(StringRestrictionList)
2400
2401 public:
2404
2407
2409 std::vector<std::string> elements;
2410
2412 {
2413 type = RestrictionType_t::rtUndefined;
2414 elementsType = RestrictionElementType_t::retGroupId;
2415 clear();
2416 }
2417
2418 void clear()
2419 {
2420 elements.clear();
2421 }
2422 };
2423
2424 static void to_json(nlohmann::json& j, const StringRestrictionList& p)
2425 {
2426 j = nlohmann::json{
2427 TOJSON_IMPL(type),
2428 TOJSON_IMPL(elementsType),
2429 TOJSON_IMPL(elements)
2430 };
2431 }
2432 static void from_json(const nlohmann::json& j, StringRestrictionList& p)
2433 {
2434 p.clear();
2435 getOptional<RestrictionType_t>("type", p.type, j, RestrictionType_t::rtUndefined);
2436 getOptional<RestrictionElementType_t>("elementsType", p.elementsType, j, RestrictionElementType_t::retGroupId);
2437 getOptional<std::vector<std::string>>("elements", p.elements, j);
2438 }
2439
2440
2441 //-----------------------------------------------------------
2442 JSON_SERIALIZED_CLASS(PacketCapturer)
2452 {
2453 IMPLEMENT_JSON_SERIALIZATION()
2454 IMPLEMENT_JSON_DOCUMENTATION(PacketCapturer)
2455
2456 public:
2457 bool enabled;
2458 uint32_t maxMb;
2459 std::string filePrefix;
2460
2462 {
2463 clear();
2464 }
2465
2466 void clear()
2467 {
2468 enabled = false;
2469 maxMb = 10;
2470 filePrefix.clear();
2471 }
2472 };
2473
2474 static void to_json(nlohmann::json& j, const PacketCapturer& p)
2475 {
2476 j = nlohmann::json{
2477 TOJSON_IMPL(enabled),
2478 TOJSON_IMPL(maxMb),
2479 TOJSON_IMPL(filePrefix)
2480 };
2481 }
2482 static void from_json(const nlohmann::json& j, PacketCapturer& p)
2483 {
2484 p.clear();
2485 getOptional<bool>("enabled", p.enabled, j, false);
2486 getOptional<uint32_t>("maxMb", p.maxMb, j, 10);
2487 getOptional<std::string>("filePrefix", p.filePrefix, j, EMPTY_STRING);
2488 }
2489
2490
2491 //-----------------------------------------------------------
2492 JSON_SERIALIZED_CLASS(TransportImpairment)
2502 {
2503 IMPLEMENT_JSON_SERIALIZATION()
2504 IMPLEMENT_JSON_DOCUMENTATION(TransportImpairment)
2505
2506 public:
2507 int applicationPercentage;
2508 int jitterMs;
2509 int lossPercentage;
2510
2512 {
2513 clear();
2514 }
2515
2516 void clear()
2517 {
2518 applicationPercentage = 0;
2519 jitterMs = 0;
2520 lossPercentage = 0;
2521 }
2522 };
2523
2524 static void to_json(nlohmann::json& j, const TransportImpairment& p)
2525 {
2526 j = nlohmann::json{
2527 TOJSON_IMPL(applicationPercentage),
2528 TOJSON_IMPL(jitterMs),
2529 TOJSON_IMPL(lossPercentage)
2530 };
2531 }
2532 static void from_json(const nlohmann::json& j, TransportImpairment& p)
2533 {
2534 p.clear();
2535 getOptional<int>("applicationPercentage", p.applicationPercentage, j, 0);
2536 getOptional<int>("jitterMs", p.jitterMs, j, 0);
2537 getOptional<int>("lossPercentage", p.lossPercentage, j, 0);
2538 }
2539
2540 //-----------------------------------------------------------
2541 JSON_SERIALIZED_CLASS(NsmNetworking)
2551 {
2552 IMPLEMENT_JSON_SERIALIZATION()
2553 IMPLEMENT_JSON_DOCUMENTATION(NsmNetworking)
2554
2555 public:
2556 std::string interfaceName;
2557 NetworkAddress address;
2558 int ttl;
2559 int tos;
2560 int txOversend;
2561 TransportImpairment rxImpairment;
2562 TransportImpairment txImpairment;
2563 std::string cryptoPassword;
2564
2566 {
2567 clear();
2568 }
2569
2570 void clear()
2571 {
2572 interfaceName.clear();
2573 address.clear();
2574 ttl = 1;
2575 tos = 56;
2576 txOversend = 0;
2577 rxImpairment.clear();
2578 txImpairment.clear();
2579 cryptoPassword.clear();
2580 }
2581 };
2582
2583 static void to_json(nlohmann::json& j, const NsmNetworking& p)
2584 {
2585 j = nlohmann::json{
2586 TOJSON_IMPL(interfaceName),
2587 TOJSON_IMPL(address),
2588 TOJSON_IMPL(ttl),
2589 TOJSON_IMPL(tos),
2590 TOJSON_IMPL(txOversend),
2591 TOJSON_IMPL(rxImpairment),
2592 TOJSON_IMPL(txImpairment),
2593 TOJSON_IMPL(cryptoPassword)
2594 };
2595 }
2596 static void from_json(const nlohmann::json& j, NsmNetworking& p)
2597 {
2598 p.clear();
2599 getOptional("interfaceName", p.interfaceName, j, EMPTY_STRING);
2600 getOptional<NetworkAddress>("address", p.address, j);
2601 getOptional<int>("ttl", p.ttl, j, 1);
2602 getOptional<int>("tos", p.tos, j, 56);
2603 getOptional<int>("txOversend", p.txOversend, j, 0);
2604 getOptional<TransportImpairment>("rxImpairment", p.rxImpairment, j);
2605 getOptional<TransportImpairment>("txImpairment", p.txImpairment, j);
2606 getOptional("cryptoPassword", p.cryptoPassword, j, EMPTY_STRING);
2607 }
2608
2609
2610 //-----------------------------------------------------------
2611 JSON_SERIALIZED_CLASS(NsmConfiguration)
2621 {
2622 IMPLEMENT_JSON_SERIALIZATION()
2623 IMPLEMENT_JSON_DOCUMENTATION(NsmConfiguration)
2624
2625 public:
2626
2627 std::string id;
2628 bool favorUptime;
2629 NsmNetworking networking;
2630 std::vector<std::string> resources;
2631 int tokenStart;
2632 int tokenEnd;
2633 int intervalSecs;
2634 int transitionSecsFactor;
2635
2637 {
2638 clear();
2639 }
2640
2641 void clear()
2642 {
2643 id.clear();
2644 favorUptime = false;
2645 networking.clear();
2646 resources.clear();
2647 tokenStart = 1000000;
2648 tokenEnd = 2000000;
2649 intervalSecs = 1;
2650 transitionSecsFactor = 3;
2651 }
2652 };
2653
2654 static void to_json(nlohmann::json& j, const NsmConfiguration& p)
2655 {
2656 j = nlohmann::json{
2657 TOJSON_IMPL(id),
2658 TOJSON_IMPL(favorUptime),
2659 TOJSON_IMPL(networking),
2660 TOJSON_IMPL(resources),
2661 TOJSON_IMPL(tokenStart),
2662 TOJSON_IMPL(tokenEnd),
2663 TOJSON_IMPL(intervalSecs),
2664 TOJSON_IMPL(transitionSecsFactor)
2665 };
2666 }
2667 static void from_json(const nlohmann::json& j, NsmConfiguration& p)
2668 {
2669 p.clear();
2670 getOptional("id", p.id, j);
2671 getOptional<bool>("favorUptime", p.favorUptime, j, false);
2672 getOptional<NsmNetworking>("networking", p.networking, j);
2673 getOptional<std::vector<std::string>>("resources", p.resources, j);
2674 getOptional<int>("tokenStart", p.tokenStart, j, 1000000);
2675 getOptional<int>("tokenEnd", p.tokenEnd, j, 2000000);
2676 getOptional<int>("intervalSecs", p.intervalSecs, j, 1);
2677 getOptional<int>("transitionSecsFactor", p.transitionSecsFactor, j, 3);
2678 }
2679
2680
2681 //-----------------------------------------------------------
2682 JSON_SERIALIZED_CLASS(Rallypoint)
2691 {
2692 IMPLEMENT_JSON_SERIALIZATION()
2693 IMPLEMENT_JSON_DOCUMENTATION(Rallypoint)
2694
2695 public:
2696
2702
2714 std::string certificate;
2715
2727 std::string certificateKey;
2728
2733
2738
2742 std::vector<std::string> caCertificates;
2743
2748
2753
2756
2759
2760 Rallypoint()
2761 {
2762 clear();
2763 }
2764
2765 void clear()
2766 {
2767 host.clear();
2768 certificate.clear();
2769 certificateKey.clear();
2770 caCertificates.clear();
2771 verifyPeer = false;
2772 transactionTimeoutMs = 5000;
2773 disableMessageSigning = false;
2774 connectionTimeoutSecs = 5;
2775 tcpTxOptions.clear();
2776 }
2777
2778 bool matches(const Rallypoint& other)
2779 {
2780 if(!host.matches(other.host))
2781 {
2782 return false;
2783 }
2784
2785 if(certificate.compare(other.certificate) != 0)
2786 {
2787 return false;
2788 }
2789
2790 if(certificateKey.compare(other.certificateKey) != 0)
2791 {
2792 return false;
2793 }
2794
2795 if(verifyPeer != other.verifyPeer)
2796 {
2797 return false;
2798 }
2799
2800 if(allowSelfSignedCertificate != other.allowSelfSignedCertificate)
2801 {
2802 return false;
2803 }
2804
2805 if(caCertificates.size() != other.caCertificates.size())
2806 {
2807 return false;
2808 }
2809
2810 for(size_t x = 0; x < caCertificates.size(); x++)
2811 {
2812 bool found = false;
2813
2814 for(size_t y = 0; y < other.caCertificates.size(); y++)
2815 {
2816 if(caCertificates[x].compare(other.caCertificates[y]) == 0)
2817 {
2818 found = true;
2819 break;
2820 }
2821 }
2822
2823 if(!found)
2824 {
2825 return false;
2826 }
2827 }
2828
2829 if(transactionTimeoutMs != other.transactionTimeoutMs)
2830 {
2831 return false;
2832 }
2833
2834 if(disableMessageSigning != other.disableMessageSigning)
2835 {
2836 return false;
2837 }
2838
2839 return true;
2840 }
2841 };
2842
2843 static void to_json(nlohmann::json& j, const Rallypoint& p)
2844 {
2845 j = nlohmann::json{
2846 TOJSON_IMPL(host),
2847 TOJSON_IMPL(certificate),
2848 TOJSON_IMPL(certificateKey),
2849 TOJSON_IMPL(verifyPeer),
2850 TOJSON_IMPL(allowSelfSignedCertificate),
2851 TOJSON_IMPL(caCertificates),
2852 TOJSON_IMPL(transactionTimeoutMs),
2853 TOJSON_IMPL(disableMessageSigning),
2854 TOJSON_IMPL(connectionTimeoutSecs),
2855 TOJSON_IMPL(tcpTxOptions)
2856 };
2857 }
2858
2859 static void from_json(const nlohmann::json& j, Rallypoint& p)
2860 {
2861 p.clear();
2862 j.at("host").get_to(p.host);
2863 getOptional("certificate", p.certificate, j);
2864 getOptional("certificateKey", p.certificateKey, j);
2865 getOptional<bool>("verifyPeer", p.verifyPeer, j, true);
2866 getOptional<bool>("allowSelfSignedCertificate", p.allowSelfSignedCertificate, j, false);
2867 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
2868 getOptional<int>("transactionTimeoutMs", p.transactionTimeoutMs, j, 5000);
2869 getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
2870 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 5);
2871 getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
2872 }
2873
2874 //-----------------------------------------------------------
2875 JSON_SERIALIZED_CLASS(RallypointCluster)
2887 {
2888 IMPLEMENT_JSON_SERIALIZATION()
2889 IMPLEMENT_JSON_DOCUMENTATION(RallypointCluster)
2890
2891 public:
2897 typedef enum
2898 {
2900 csRoundRobin = 0,
2901
2903 csFailback = 1
2904 } ConnectionStrategy_t;
2905
2908
2910 std::vector<Rallypoint> rallypoints;
2911
2914
2917
2919 {
2920 clear();
2921 }
2922
2923 void clear()
2924 {
2925 connectionStrategy = csRoundRobin;
2926 rallypoints.clear();
2927 rolloverSecs = 10;
2928 connectionTimeoutSecs = 5;
2929 }
2930 };
2931
2932 static void to_json(nlohmann::json& j, const RallypointCluster& p)
2933 {
2934 j = nlohmann::json{
2935 TOJSON_IMPL(connectionStrategy),
2936 TOJSON_IMPL(rallypoints),
2937 TOJSON_IMPL(rolloverSecs),
2938 TOJSON_IMPL(connectionTimeoutSecs)
2939 };
2940 }
2941 static void from_json(const nlohmann::json& j, RallypointCluster& p)
2942 {
2943 p.clear();
2944 getOptional<RallypointCluster::ConnectionStrategy_t>("connectionStrategy", p.connectionStrategy, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
2945 getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
2946 getOptional<int>("rolloverSecs", p.rolloverSecs, j, 10);
2947 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 5);
2948 }
2949
2950
2951 //-----------------------------------------------------------
2952 JSON_SERIALIZED_CLASS(NetworkDeviceDescriptor)
2963 {
2964 IMPLEMENT_JSON_SERIALIZATION()
2965 IMPLEMENT_JSON_DOCUMENTATION(NetworkDeviceDescriptor)
2966
2967 public:
2973
2975 std::string name;
2976
2978 std::string manufacturer;
2979
2981 std::string model;
2982
2984 std::string hardwareId;
2985
2987 std::string serialNumber;
2988
2990 std::string type;
2991
2993 std::string extra;
2994
2996 {
2997 clear();
2998 }
2999
3000 void clear()
3001 {
3002 deviceId = 0;
3003
3004 name.clear();
3005 manufacturer.clear();
3006 model.clear();
3007 hardwareId.clear();
3008 serialNumber.clear();
3009 type.clear();
3010 extra.clear();
3011 }
3012
3013 virtual std::string toString()
3014 {
3015 char buff[2048];
3016
3017 snprintf(buff, sizeof(buff), "deviceId=%d, name=%s, manufacturer=%s, model=%s, hardwareId=%s, serialNumber=%s, type=%s, extra=%s",
3018 deviceId,
3019 name.c_str(),
3020 manufacturer.c_str(),
3021 model.c_str(),
3022 hardwareId.c_str(),
3023 serialNumber.c_str(),
3024 type.c_str(),
3025 extra.c_str());
3026
3027 return std::string(buff);
3028 }
3029 };
3030
3031 static void to_json(nlohmann::json& j, const NetworkDeviceDescriptor& p)
3032 {
3033 j = nlohmann::json{
3034 TOJSON_IMPL(deviceId),
3035 TOJSON_IMPL(name),
3036 TOJSON_IMPL(manufacturer),
3037 TOJSON_IMPL(model),
3038 TOJSON_IMPL(hardwareId),
3039 TOJSON_IMPL(serialNumber),
3040 TOJSON_IMPL(type),
3041 TOJSON_IMPL(extra)
3042 };
3043 }
3044 static void from_json(const nlohmann::json& j, NetworkDeviceDescriptor& p)
3045 {
3046 p.clear();
3047 getOptional<int>("deviceId", p.deviceId, j, 0);
3048 getOptional("name", p.name, j);
3049 getOptional("manufacturer", p.manufacturer, j);
3050 getOptional("model", p.model, j);
3051 getOptional("hardwareId", p.hardwareId, j);
3052 getOptional("serialNumber", p.serialNumber, j);
3053 getOptional("type", p.type, j);
3054 getOptional("extra", p.extra, j);
3055 }
3056
3057 //-----------------------------------------------------------
3058 JSON_SERIALIZED_CLASS(AudioGate)
3068 {
3069 IMPLEMENT_JSON_SERIALIZATION()
3070 IMPLEMENT_JSON_DOCUMENTATION(AudioGate)
3071
3072 public:
3075
3078
3080 uint32_t hangMs;
3081
3083 uint32_t windowMin;
3084
3086 uint32_t windowMax;
3087
3090
3091
3092 AudioGate()
3093 {
3094 clear();
3095 }
3096
3097 void clear()
3098 {
3099 enabled = false;
3100 useVad = false;
3101 hangMs = 1500;
3102 windowMin = 25;
3103 windowMax = 125;
3104 coefficient = 1.75;
3105 }
3106 };
3107
3108 static void to_json(nlohmann::json& j, const AudioGate& p)
3109 {
3110 j = nlohmann::json{
3111 TOJSON_IMPL(enabled),
3112 TOJSON_IMPL(useVad),
3113 TOJSON_IMPL(hangMs),
3114 TOJSON_IMPL(windowMin),
3115 TOJSON_IMPL(windowMax),
3116 TOJSON_IMPL(coefficient)
3117 };
3118 }
3119 static void from_json(const nlohmann::json& j, AudioGate& p)
3120 {
3121 p.clear();
3122 getOptional<bool>("enabled", p.enabled, j, false);
3123 getOptional<bool>("useVad", p.useVad, j, false);
3124 getOptional<uint32_t>("hangMs", p.hangMs, j, 1500);
3125 getOptional<uint32_t>("windowMin", p.windowMin, j, 25);
3126 getOptional<uint32_t>("windowMax", p.windowMax, j, 125);
3127 getOptional<double>("coefficient", p.coefficient, j, 1.75);
3128 }
3129
3130 //-----------------------------------------------------------
3131 JSON_SERIALIZED_CLASS(TxAudio)
3145 {
3146 IMPLEMENT_JSON_SERIALIZATION()
3147 IMPLEMENT_JSON_DOCUMENTATION(TxAudio)
3148
3149 public:
3155 typedef enum
3156 {
3158 ctExternal = -1,
3159
3161 ctUnknown = 0,
3162
3163 /* G.711 */
3165 ctG711ulaw = 1,
3166
3168 ctG711alaw = 2,
3169
3170
3171 /* GSM */
3173 ctGsm610 = 3,
3174
3175
3176 /* G.729 */
3178 ctG729a = 4,
3179
3180
3181 /* PCM */
3183 ctPcm = 5,
3184
3185 // AMR Narrowband */
3187 ctAmrNb4750 = 10,
3188
3190 ctAmrNb5150 = 11,
3191
3193 ctAmrNb5900 = 12,
3194
3196 ctAmrNb6700 = 13,
3197
3199 ctAmrNb7400 = 14,
3200
3202 ctAmrNb7950 = 15,
3203
3205 ctAmrNb10200 = 16,
3206
3208 ctAmrNb12200 = 17,
3209
3210
3211 /* Opus */
3213 ctOpus6000 = 20,
3214
3216 ctOpus8000 = 21,
3217
3219 ctOpus10000 = 22,
3220
3222 ctOpus12000 = 23,
3223
3225 ctOpus14000 = 24,
3226
3228 ctOpus16000 = 25,
3229
3231 ctOpus18000 = 26,
3232
3234 ctOpus20000 = 27,
3235
3237 ctOpus22000 = 28,
3238
3240 ctOpus24000 = 29,
3241
3242
3243 /* Speex */
3245 ctSpxNb2150 = 30,
3246
3248 ctSpxNb3950 = 31,
3249
3251 ctSpxNb5950 = 32,
3252
3254 ctSpxNb8000 = 33,
3255
3257 ctSpxNb11000 = 34,
3258
3260 ctSpxNb15000 = 35,
3261
3263 ctSpxNb18200 = 36,
3264
3266 ctSpxNb24600 = 37,
3267
3268
3269 /* Codec2 */
3271 ctC2450 = 40,
3272
3274 ctC2700 = 41,
3275
3277 ctC21200 = 42,
3278
3280 ctC21300 = 43,
3281
3283 ctC21400 = 44,
3284
3286 ctC21600 = 45,
3287
3289 ctC22400 = 46,
3290
3292 ctC23200 = 47,
3293
3294
3295 /* MELPe */
3297 ctMelpe600 = 50,
3298
3300 ctMelpe1200 = 51,
3301
3303 ctMelpe2400 = 52
3304 } TxCodec_t;
3305
3308
3311
3313 std::string encoderName;
3314
3317
3320
3322 bool fdx;
3323
3331
3338
3345
3348
3351
3354
3359
3361 uint32_t internalKey;
3362
3365
3368
3370 bool dtx;
3371
3374
3375 TxAudio()
3376 {
3377 clear();
3378 }
3379
3380 void clear()
3381 {
3382 enabled = true;
3383 encoder = TxAudio::TxCodec_t::ctUnknown;
3384 encoderName.clear();
3385 framingMs = 60;
3386 blockCount = 0;
3387 fdx = false;
3388 noHdrExt = false;
3389 maxTxSecs = 0;
3390 extensionSendInterval = 10;
3391 initialHeaderBurst = 5;
3392 trailingHeaderBurst = 5;
3393 startTxNotifications = 5;
3394 customRtpPayloadType = -1;
3395 internalKey = 0;
3396 resetRtpOnTx = true;
3397 enableSmoothing = true;
3398 dtx = false;
3399 smoothedHangTimeMs = 0;
3400 }
3401 };
3402
3403 static void to_json(nlohmann::json& j, const TxAudio& p)
3404 {
3405 j = nlohmann::json{
3406 TOJSON_IMPL(enabled),
3407 TOJSON_IMPL(encoder),
3408 TOJSON_IMPL(encoderName),
3409 TOJSON_IMPL(framingMs),
3410 TOJSON_IMPL(blockCount),
3411 TOJSON_IMPL(fdx),
3412 TOJSON_IMPL(noHdrExt),
3413 TOJSON_IMPL(maxTxSecs),
3414 TOJSON_IMPL(extensionSendInterval),
3415 TOJSON_IMPL(initialHeaderBurst),
3416 TOJSON_IMPL(trailingHeaderBurst),
3417 TOJSON_IMPL(startTxNotifications),
3418 TOJSON_IMPL(customRtpPayloadType),
3419 TOJSON_IMPL(resetRtpOnTx),
3420 TOJSON_IMPL(enableSmoothing),
3421 TOJSON_IMPL(dtx),
3422 TOJSON_IMPL(smoothedHangTimeMs)
3423 };
3424
3425 // internalKey is not serialized
3426 }
3427 static void from_json(const nlohmann::json& j, TxAudio& p)
3428 {
3429 p.clear();
3430 getOptional<bool>("enabled", p.enabled, j, true);
3431 getOptional<TxAudio::TxCodec_t>("encoder", p.encoder, j, TxAudio::TxCodec_t::ctOpus8000);
3432 getOptional<std::string>("encoderName", p.encoderName, j, EMPTY_STRING);
3433 getOptional("framingMs", p.framingMs, j, 60);
3434 getOptional("blockCount", p.blockCount, j, 0);
3435 getOptional("fdx", p.fdx, j, false);
3436 getOptional("noHdrExt", p.noHdrExt, j, false);
3437 getOptional("maxTxSecs", p.maxTxSecs, j, 0);
3438 getOptional("extensionSendInterval", p.extensionSendInterval, j, 10);
3439 getOptional("initialHeaderBurst", p.initialHeaderBurst, j, 5);
3440 getOptional("trailingHeaderBurst", p.trailingHeaderBurst, j, 5);
3441 getOptional("startTxNotifications", p.startTxNotifications, j, 5);
3442 getOptional("customRtpPayloadType", p.customRtpPayloadType, j, -1);
3443 getOptional("resetRtpOnTx", p.resetRtpOnTx, j, true);
3444 getOptional("enableSmoothing", p.enableSmoothing, j, true);
3445 getOptional("dtx", p.dtx, j, false);
3446 getOptional("smoothedHangTimeMs", p.smoothedHangTimeMs, j, 0);
3447
3448 // internalKey is not serialized
3449 }
3450
3451 //-----------------------------------------------------------
3452 JSON_SERIALIZED_CLASS(AudioDeviceDescriptor)
3463 {
3464 IMPLEMENT_JSON_SERIALIZATION()
3465 IMPLEMENT_JSON_DOCUMENTATION(AudioDeviceDescriptor)
3466
3467 public:
3468
3470 typedef enum
3471 {
3473 dirUnknown = 0,
3474
3477
3480
3482 dirBoth
3483 } Direction_t;
3484
3490
3498
3506
3509
3517
3520
3522 std::string name;
3523
3525 std::string manufacturer;
3526
3528 std::string model;
3529
3531 std::string hardwareId;
3532
3534 std::string serialNumber;
3535
3538
3540 std::string type;
3541
3543 std::string extra;
3544
3547
3549 {
3550 clear();
3551 }
3552
3553 void clear()
3554 {
3555 deviceId = 0;
3556 samplingRate = 0;
3557 channels = 0;
3558 direction = dirUnknown;
3559 boostPercentage = 0;
3560 isAdad = false;
3561 isDefault = false;
3562
3563 name.clear();
3564 manufacturer.clear();
3565 model.clear();
3566 hardwareId.clear();
3567 serialNumber.clear();
3568 type.clear();
3569 extra.clear();
3570 isPresent = false;
3571 }
3572
3573 virtual std::string toString()
3574 {
3575 char buff[2048];
3576
3577 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",
3578 deviceId,
3579 samplingRate,
3580 channels,
3581 (int)direction,
3582 boostPercentage,
3583 (int)isAdad,
3584 name.c_str(),
3585 manufacturer.c_str(),
3586 model.c_str(),
3587 hardwareId.c_str(),
3588 serialNumber.c_str(),
3589 (int)isDefault,
3590 type.c_str(),
3591 (int)isPresent,
3592 extra.c_str());
3593
3594 return std::string(buff);
3595 }
3596 };
3597
3598 static void to_json(nlohmann::json& j, const AudioDeviceDescriptor& p)
3599 {
3600 j = nlohmann::json{
3601 TOJSON_IMPL(deviceId),
3602 TOJSON_IMPL(samplingRate),
3603 TOJSON_IMPL(channels),
3604 TOJSON_IMPL(direction),
3605 TOJSON_IMPL(boostPercentage),
3606 TOJSON_IMPL(isAdad),
3607 TOJSON_IMPL(name),
3608 TOJSON_IMPL(manufacturer),
3609 TOJSON_IMPL(model),
3610 TOJSON_IMPL(hardwareId),
3611 TOJSON_IMPL(serialNumber),
3612 TOJSON_IMPL(isDefault),
3613 TOJSON_IMPL(type),
3614 TOJSON_IMPL(extra),
3615 TOJSON_IMPL(isPresent)
3616 };
3617 }
3618 static void from_json(const nlohmann::json& j, AudioDeviceDescriptor& p)
3619 {
3620 p.clear();
3621 getOptional<int>("deviceId", p.deviceId, j, 0);
3622 getOptional<int>("samplingRate", p.samplingRate, j, 0);
3623 getOptional<int>("channels", p.channels, j, 0);
3624 getOptional<AudioDeviceDescriptor::Direction_t>("direction", p.direction, j,
3625 AudioDeviceDescriptor::Direction_t::dirUnknown);
3626 getOptional<int>("boostPercentage", p.boostPercentage, j, 0);
3627
3628 getOptional<bool>("isAdad", p.isAdad, j, false);
3629 getOptional("name", p.name, j);
3630 getOptional("manufacturer", p.manufacturer, j);
3631 getOptional("model", p.model, j);
3632 getOptional("hardwareId", p.hardwareId, j);
3633 getOptional("serialNumber", p.serialNumber, j);
3634 getOptional("isDefault", p.isDefault, j);
3635 getOptional("type", p.type, j);
3636 getOptional("extra", p.extra, j);
3637 getOptional<bool>("isPresent", p.isPresent, j, false);
3638 }
3639
3640 //-----------------------------------------------------------
3641 JSON_SERIALIZED_CLASS(ListOfAudioDeviceDescriptor)
3643 {
3644 IMPLEMENT_JSON_SERIALIZATION()
3645 IMPLEMENT_JSON_DOCUMENTATION(ListOfAudioDeviceDescriptor)
3646
3647 public:
3648 std::vector<AudioDeviceDescriptor> list;
3649
3651 {
3652 clear();
3653 }
3654
3655 void clear()
3656 {
3657 list.clear();
3658 }
3659 };
3660
3661 static void to_json(nlohmann::json& j, const ListOfAudioDeviceDescriptor& p)
3662 {
3663 j = nlohmann::json{
3664 TOJSON_IMPL(list)
3665 };
3666 }
3667 static void from_json(const nlohmann::json& j, ListOfAudioDeviceDescriptor& p)
3668 {
3669 p.clear();
3670 getOptional<std::vector<AudioDeviceDescriptor>>("list", p.list, j);
3671 }
3672
3673 //-----------------------------------------------------------
3674 JSON_SERIALIZED_CLASS(Audio)
3683 {
3684 IMPLEMENT_JSON_SERIALIZATION()
3685 IMPLEMENT_JSON_DOCUMENTATION(Audio)
3686
3687 public:
3690
3693
3696
3699
3702
3705
3708
3711
3712 Audio()
3713 {
3714 clear();
3715 }
3716
3717 void clear()
3718 {
3719 enabled = true;
3720 inputId = 0;
3721 inputGain = 0;
3722 outputId = 0;
3723 outputGain = 0;
3724 outputLevelLeft = 100;
3725 outputLevelRight = 100;
3726 outputMuted = false;
3727 }
3728 };
3729
3730 static void to_json(nlohmann::json& j, const Audio& p)
3731 {
3732 j = nlohmann::json{
3733 TOJSON_IMPL(enabled),
3734 TOJSON_IMPL(inputId),
3735 TOJSON_IMPL(inputGain),
3736 TOJSON_IMPL(outputId),
3737 TOJSON_IMPL(outputLevelLeft),
3738 TOJSON_IMPL(outputLevelRight),
3739 TOJSON_IMPL(outputMuted)
3740 };
3741 }
3742 static void from_json(const nlohmann::json& j, Audio& p)
3743 {
3744 p.clear();
3745 getOptional<bool>("enabled", p.enabled, j, true);
3746 getOptional<int>("inputId", p.inputId, j, 0);
3747 getOptional<int>("inputGain", p.inputGain, j, 0);
3748 getOptional<int>("outputId", p.outputId, j, 0);
3749 getOptional<int>("outputGain", p.outputGain, j, 0);
3750 getOptional<int>("outputLevelLeft", p.outputLevelLeft, j, 100);
3751 getOptional<int>("outputLevelRight", p.outputLevelRight, j, 100);
3752 getOptional<bool>("outputMuted", p.outputMuted, j, false);
3753 }
3754
3755 //-----------------------------------------------------------
3756 JSON_SERIALIZED_CLASS(TalkerInformation)
3767 {
3768 IMPLEMENT_JSON_SERIALIZATION()
3769 IMPLEMENT_JSON_DOCUMENTATION(TalkerInformation)
3770
3771 public:
3775 typedef enum
3776 {
3778 matNone = 0,
3779
3781 matAnonymous = 1,
3782
3784 matSsrcGenerated = 2
3785 } ManufacturedAliasType_t;
3786
3788 std::string alias;
3789
3791 std::string nodeId;
3792
3794 uint16_t rxFlags;
3795
3798
3800 uint32_t txId;
3801
3804
3807
3810
3812 uint32_t ssrc;
3813
3816
3818 {
3819 clear();
3820 }
3821
3822 void clear()
3823 {
3824 alias.clear();
3825 nodeId.clear();
3826 rxFlags = 0;
3827 txPriority = 0;
3828 txId = 0;
3829 duplicateCount = 0;
3830 aliasSpecializer = 0;
3831 rxMuted = false;
3832 manufacturedAliasType = ManufacturedAliasType_t::matNone;
3833 ssrc = 0;
3834 }
3835 };
3836
3837 static void to_json(nlohmann::json& j, const TalkerInformation& p)
3838 {
3839 j = nlohmann::json{
3840 TOJSON_IMPL(alias),
3841 TOJSON_IMPL(nodeId),
3842 TOJSON_IMPL(rxFlags),
3843 TOJSON_IMPL(txPriority),
3844 TOJSON_IMPL(txId),
3845 TOJSON_IMPL(duplicateCount),
3846 TOJSON_IMPL(aliasSpecializer),
3847 TOJSON_IMPL(rxMuted),
3848 TOJSON_IMPL(manufacturedAliasType),
3849 TOJSON_IMPL(ssrc)
3850 };
3851 }
3852 static void from_json(const nlohmann::json& j, TalkerInformation& p)
3853 {
3854 p.clear();
3855 getOptional<std::string>("alias", p.alias, j, EMPTY_STRING);
3856 getOptional<std::string>("nodeId", p.nodeId, j, EMPTY_STRING);
3857 getOptional<uint16_t>("rxFlags", p.rxFlags, j, 0);
3858 getOptional<int>("txPriority", p.txPriority, j, 0);
3859 getOptional<uint32_t>("txId", p.txId, j, 0);
3860 getOptional<int>("duplicateCount", p.duplicateCount, j, 0);
3861 getOptional<uint16_t>("aliasSpecializer", p.aliasSpecializer, j, 0);
3862 getOptional<bool>("rxMuted", p.rxMuted, j, false);
3863 getOptional<TalkerInformation::ManufacturedAliasType_t>("manufacturedAliasType", p.manufacturedAliasType, j, TalkerInformation::ManufacturedAliasType_t::matNone);
3864 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
3865 }
3866
3867 //-----------------------------------------------------------
3868 JSON_SERIALIZED_CLASS(GroupTalkers)
3881 {
3882 IMPLEMENT_JSON_SERIALIZATION()
3883 IMPLEMENT_JSON_DOCUMENTATION(GroupTalkers)
3884
3885 public:
3887 std::vector<TalkerInformation> list;
3888
3889 GroupTalkers()
3890 {
3891 clear();
3892 }
3893
3894 void clear()
3895 {
3896 list.clear();
3897 }
3898 };
3899
3900 static void to_json(nlohmann::json& j, const GroupTalkers& p)
3901 {
3902 j = nlohmann::json{
3903 TOJSON_IMPL(list)
3904 };
3905 }
3906 static void from_json(const nlohmann::json& j, GroupTalkers& p)
3907 {
3908 p.clear();
3909 getOptional<std::vector<TalkerInformation>>("list", p.list, j);
3910 }
3911
3912 //-----------------------------------------------------------
3913 JSON_SERIALIZED_CLASS(Presence)
3924 {
3925 IMPLEMENT_JSON_SERIALIZATION()
3926 IMPLEMENT_JSON_DOCUMENTATION(Presence)
3927
3928 public:
3932 typedef enum
3933 {
3935 pfUnknown = 0,
3936
3938 pfEngage = 1,
3939
3946 pfCot = 2
3947 } Format_t;
3948
3951
3954
3957
3960
3961 Presence()
3962 {
3963 clear();
3964 }
3965
3966 void clear()
3967 {
3968 format = pfUnknown;
3969 intervalSecs = 30;
3970 listenOnly = false;
3971 minIntervalSecs = 5;
3972 }
3973 };
3974
3975 static void to_json(nlohmann::json& j, const Presence& p)
3976 {
3977 j = nlohmann::json{
3978 TOJSON_IMPL(format),
3979 TOJSON_IMPL(intervalSecs),
3980 TOJSON_IMPL(listenOnly),
3981 TOJSON_IMPL(minIntervalSecs)
3982 };
3983 }
3984 static void from_json(const nlohmann::json& j, Presence& p)
3985 {
3986 p.clear();
3987 getOptional<Presence::Format_t>("format", p.format, j, Presence::Format_t::pfEngage);
3988 getOptional<int>("intervalSecs", p.intervalSecs, j, 30);
3989 getOptional<bool>("listenOnly", p.listenOnly, j, false);
3990 getOptional<int>("minIntervalSecs", p.minIntervalSecs, j, 5);
3991 }
3992
3993
3994 //-----------------------------------------------------------
3995 JSON_SERIALIZED_CLASS(Advertising)
4006 {
4007 IMPLEMENT_JSON_SERIALIZATION()
4008 IMPLEMENT_JSON_DOCUMENTATION(Advertising)
4009
4010 public:
4013
4016
4019
4020 Advertising()
4021 {
4022 clear();
4023 }
4024
4025 void clear()
4026 {
4027 enabled = false;
4028 intervalMs = 20000;
4029 alwaysAdvertise = false;
4030 }
4031 };
4032
4033 static void to_json(nlohmann::json& j, const Advertising& p)
4034 {
4035 j = nlohmann::json{
4036 TOJSON_IMPL(enabled),
4037 TOJSON_IMPL(intervalMs),
4038 TOJSON_IMPL(alwaysAdvertise)
4039 };
4040 }
4041 static void from_json(const nlohmann::json& j, Advertising& p)
4042 {
4043 p.clear();
4044 getOptional("enabled", p.enabled, j, false);
4045 getOptional<int>("intervalMs", p.intervalMs, j, 20000);
4046 getOptional<bool>("alwaysAdvertise", p.alwaysAdvertise, j, false);
4047 }
4048
4049 //-----------------------------------------------------------
4050 JSON_SERIALIZED_CLASS(GroupPriorityTranslation)
4061 {
4062 IMPLEMENT_JSON_SERIALIZATION()
4063 IMPLEMENT_JSON_DOCUMENTATION(GroupPriorityTranslation)
4064
4065 public:
4068
4071
4074
4076 {
4077 clear();
4078 }
4079
4080 void clear()
4081 {
4082 rx.clear();
4083 tx.clear();
4084 priority = 0;
4085 }
4086 };
4087
4088 static void to_json(nlohmann::json& j, const GroupPriorityTranslation& p)
4089 {
4090 j = nlohmann::json{
4091 TOJSON_IMPL(rx),
4092 TOJSON_IMPL(tx),
4093 TOJSON_IMPL(priority)
4094 };
4095 }
4096 static void from_json(const nlohmann::json& j, GroupPriorityTranslation& p)
4097 {
4098 p.clear();
4099 j.at("rx").get_to(p.rx);
4100 j.at("tx").get_to(p.tx);
4101 FROMJSON_IMPL(priority, int, 0);
4102 }
4103
4104 //-----------------------------------------------------------
4105 JSON_SERIALIZED_CLASS(GroupTimeline)
4118 {
4119 IMPLEMENT_JSON_SERIALIZATION()
4120 IMPLEMENT_JSON_DOCUMENTATION(GroupTimeline)
4121
4122 public:
4125
4128 bool recordAudio;
4129
4131 {
4132 clear();
4133 }
4134
4135 void clear()
4136 {
4137 enabled = true;
4138 maxAudioTimeMs = 30000;
4139 recordAudio = true;
4140 }
4141 };
4142
4143 static void to_json(nlohmann::json& j, const GroupTimeline& p)
4144 {
4145 j = nlohmann::json{
4146 TOJSON_IMPL(enabled),
4147 TOJSON_IMPL(maxAudioTimeMs),
4148 TOJSON_IMPL(recordAudio)
4149 };
4150 }
4151 static void from_json(const nlohmann::json& j, GroupTimeline& p)
4152 {
4153 p.clear();
4154 getOptional("enabled", p.enabled, j, true);
4155 getOptional<int>("maxAudioTimeMs", p.maxAudioTimeMs, j, 30000);
4156 getOptional("recordAudio", p.recordAudio, j, true);
4157 }
4158
4166 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_INTERNAL = "com.rallytac.engage.internal";
4168 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_CORE = "com.rallytac.magellan.core";
4170 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_CISTECH = "com.rallytac.engage.magellan.cistech";
4172 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_TRELLISWARE = "com.rallytac.engage.magellan.trellisware";
4174 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_SILVUS = "com.rallytac.engage.magellan.silvus";
4176 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_PERSISTENT = "com.rallytac.engage.magellan.persistent";
4178 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_DOMO = "com.rallytac.engage.magellan.domo";
4180 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_KENWOOD = "com.rallytac.engage.magellan.kenwood";
4182 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_TAIT = "com.rallytac.engage.magellan.tait";
4184 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_VOCALITY = "com.rallytac.engage.magellan.vocality";
4205
4230
4246 //-----------------------------------------------------------
4247 JSON_SERIALIZED_CLASS(GroupAppTransport)
4258 {
4259 IMPLEMENT_JSON_SERIALIZATION()
4260 IMPLEMENT_JSON_DOCUMENTATION(GroupAppTransport)
4261
4262 public:
4265
4267 std::string id;
4268
4270 {
4271 clear();
4272 }
4273
4274 void clear()
4275 {
4276 enabled = false;
4277 id.clear();
4278 }
4279 };
4280
4281 static void to_json(nlohmann::json& j, const GroupAppTransport& p)
4282 {
4283 j = nlohmann::json{
4284 TOJSON_IMPL(enabled),
4285 TOJSON_IMPL(id)
4286 };
4287 }
4288 static void from_json(const nlohmann::json& j, GroupAppTransport& p)
4289 {
4290 p.clear();
4291 getOptional<bool>("enabled", p.enabled, j, false);
4292 getOptional<std::string>("id", p.id, j);
4293 }
4294
4295 //-----------------------------------------------------------
4296 JSON_SERIALIZED_CLASS(RtpProfile)
4307 {
4308 IMPLEMENT_JSON_SERIALIZATION()
4309 IMPLEMENT_JSON_DOCUMENTATION(RtpProfile)
4310
4311 public:
4317 typedef enum
4318 {
4320 jmStandard = 0,
4321
4323 jmLowLatency = 1,
4324
4326 jmReleaseOnTxEnd = 2
4327 } JitterMode_t;
4328
4331
4334
4337
4340
4343
4346
4349
4352
4355
4358
4361
4364
4367
4370
4373
4376
4380
4381 RtpProfile()
4382 {
4383 clear();
4384 }
4385
4386 void clear()
4387 {
4388 mode = jmStandard;
4389 jitterMaxMs = 10000;
4390 jitterMinMs = 100;
4391 jitterMaxFactor = 8;
4392 jitterTrimPercentage = 10;
4393 jitterUnderrunReductionThresholdMs = 1500;
4394 jitterUnderrunReductionAger = 100;
4395 latePacketSequenceRange = 5;
4396 latePacketTimestampRangeMs = 2000;
4397 inboundProcessorInactivityMs = 500;
4398 jitterForceTrimAtMs = 0;
4399 rtcpPresenceTimeoutMs = 45000;
4400 jitterMaxExceededClipPerc = 10;
4401 jitterMaxExceededClipHangMs = 1500;
4402 zombieLifetimeMs = 15000;
4403 jitterMaxTrimMs = 250;
4404 signalledInboundProcessorInactivityMs = (inboundProcessorInactivityMs * 4);
4405 }
4406 };
4407
4408 static void to_json(nlohmann::json& j, const RtpProfile& p)
4409 {
4410 j = nlohmann::json{
4411 TOJSON_IMPL(mode),
4412 TOJSON_IMPL(jitterMaxMs),
4413 TOJSON_IMPL(inboundProcessorInactivityMs),
4414 TOJSON_IMPL(jitterMinMs),
4415 TOJSON_IMPL(jitterMaxFactor),
4416 TOJSON_IMPL(jitterTrimPercentage),
4417 TOJSON_IMPL(jitterUnderrunReductionThresholdMs),
4418 TOJSON_IMPL(jitterUnderrunReductionAger),
4419 TOJSON_IMPL(latePacketSequenceRange),
4420 TOJSON_IMPL(latePacketTimestampRangeMs),
4421 TOJSON_IMPL(inboundProcessorInactivityMs),
4422 TOJSON_IMPL(jitterForceTrimAtMs),
4423 TOJSON_IMPL(jitterMaxExceededClipPerc),
4424 TOJSON_IMPL(jitterMaxExceededClipHangMs),
4425 TOJSON_IMPL(zombieLifetimeMs),
4426 TOJSON_IMPL(jitterMaxTrimMs),
4427 TOJSON_IMPL(signalledInboundProcessorInactivityMs)
4428 };
4429 }
4430 static void from_json(const nlohmann::json& j, RtpProfile& p)
4431 {
4432 p.clear();
4433 FROMJSON_IMPL(mode, RtpProfile::JitterMode_t, RtpProfile::JitterMode_t::jmStandard);
4434 FROMJSON_IMPL(jitterMaxMs, int, 10000);
4435 FROMJSON_IMPL(jitterMinMs, int, 20);
4436 FROMJSON_IMPL(jitterMaxFactor, int, 8);
4437 FROMJSON_IMPL(jitterTrimPercentage, int, 10);
4438 FROMJSON_IMPL(jitterUnderrunReductionThresholdMs, int, 1500);
4439 FROMJSON_IMPL(jitterUnderrunReductionAger, int, 100);
4440 FROMJSON_IMPL(latePacketSequenceRange, int, 5);
4441 FROMJSON_IMPL(latePacketTimestampRangeMs, int, 2000);
4442 FROMJSON_IMPL(inboundProcessorInactivityMs, int, 500);
4443 FROMJSON_IMPL(jitterForceTrimAtMs, int, 0);
4444 FROMJSON_IMPL(rtcpPresenceTimeoutMs, int, 45000);
4445 FROMJSON_IMPL(jitterMaxExceededClipPerc, int, 10);
4446 FROMJSON_IMPL(jitterMaxExceededClipHangMs, int, 1500);
4447 FROMJSON_IMPL(zombieLifetimeMs, int, 15000);
4448 FROMJSON_IMPL(jitterMaxTrimMs, int, 250);
4449 FROMJSON_IMPL(signalledInboundProcessorInactivityMs, int, (p.inboundProcessorInactivityMs * 4));
4450 }
4451
4452 //-----------------------------------------------------------
4453 JSON_SERIALIZED_CLASS(Tls)
4464 {
4465 IMPLEMENT_JSON_SERIALIZATION()
4466 IMPLEMENT_JSON_DOCUMENTATION(Tls)
4467
4468 public:
4469
4472
4475
4477 std::vector<std::string> caCertificates;
4478
4481
4484
4486 std::vector<std::string> crlSerials;
4487
4488 Tls()
4489 {
4490 clear();
4491 }
4492
4493 void clear()
4494 {
4495 verifyPeers = true;
4496 allowSelfSignedCertificates = false;
4497 caCertificates.clear();
4498 subjectRestrictions.clear();
4499 issuerRestrictions.clear();
4500 crlSerials.clear();
4501 }
4502 };
4503
4504 static void to_json(nlohmann::json& j, const Tls& p)
4505 {
4506 j = nlohmann::json{
4507 TOJSON_IMPL(verifyPeers),
4508 TOJSON_IMPL(allowSelfSignedCertificates),
4509 TOJSON_IMPL(caCertificates),
4510 TOJSON_IMPL(subjectRestrictions),
4511 TOJSON_IMPL(issuerRestrictions),
4512 TOJSON_IMPL(crlSerials)
4513 };
4514 }
4515 static void from_json(const nlohmann::json& j, Tls& p)
4516 {
4517 p.clear();
4518 getOptional<bool>("verifyPeers", p.verifyPeers, j, true);
4519 getOptional<bool>("allowSelfSignedCertificates", p.allowSelfSignedCertificates, j, false);
4520 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
4521 getOptional<StringRestrictionList>("subjectRestrictions", p.subjectRestrictions, j);
4522 getOptional<StringRestrictionList>("issuerRestrictions", p.issuerRestrictions, j);
4523 getOptional<std::vector<std::string>>("crlSerials", p.crlSerials, j);
4524 }
4525
4526 //-----------------------------------------------------------
4527 JSON_SERIALIZED_CLASS(RangerPackets)
4540 {
4541 IMPLEMENT_JSON_SERIALIZATION()
4542 IMPLEMENT_JSON_DOCUMENTATION(RangerPackets)
4543
4544 public:
4547
4550
4552 {
4553 clear();
4554 }
4555
4556 void clear()
4557 {
4558 hangTimerSecs = -1;
4559 count = 5;
4560 }
4561
4562 virtual void initForDocumenting()
4563 {
4564 }
4565 };
4566
4567 static void to_json(nlohmann::json& j, const RangerPackets& p)
4568 {
4569 j = nlohmann::json{
4570 TOJSON_IMPL(hangTimerSecs),
4571 TOJSON_IMPL(count)
4572 };
4573 }
4574 static void from_json(const nlohmann::json& j, RangerPackets& p)
4575 {
4576 p.clear();
4577 getOptional<int>("hangTimerSecs", p.hangTimerSecs, j, 11);
4578 getOptional<int>("count", p.count, j, 5);
4579 }
4580
4581 //-----------------------------------------------------------
4582 JSON_SERIALIZED_CLASS(Source)
4595 {
4596 IMPLEMENT_JSON_SERIALIZATION()
4597 IMPLEMENT_JSON_DOCUMENTATION(Source)
4598
4599 public:
4601 std::string nodeId;
4602
4603 /* NOTE: Not serialized ! */
4604 uint8_t _internal_binary_nodeId[ENGAGE_MAX_NODE_ID_SIZE];
4605
4607 std::string alias;
4608
4609 /* NOTE: Not serialized ! */
4610 uint8_t _internal_binary_alias[ENGAGE_MAX_ALIAS_SIZE];
4611
4612 Source()
4613 {
4614 clear();
4615 }
4616
4617 void clear()
4618 {
4619 nodeId.clear();
4620 memset(_internal_binary_nodeId, 0, sizeof(_internal_binary_nodeId));
4621
4622 alias.clear();
4623 memset(_internal_binary_alias, 0, sizeof(_internal_binary_alias));
4624 }
4625
4626 virtual void initForDocumenting()
4627 {
4628 }
4629 };
4630
4631 static void to_json(nlohmann::json& j, const Source& p)
4632 {
4633 j = nlohmann::json{
4634 TOJSON_IMPL(nodeId),
4635 TOJSON_IMPL(alias)
4636 };
4637 }
4638 static void from_json(const nlohmann::json& j, Source& p)
4639 {
4640 p.clear();
4641 FROMJSON_IMPL_SIMPLE(nodeId);
4642 FROMJSON_IMPL_SIMPLE(alias);
4643 }
4644
4645 //-----------------------------------------------------------
4646 JSON_SERIALIZED_CLASS(Group)
4658 {
4659 IMPLEMENT_JSON_SERIALIZATION()
4660 IMPLEMENT_JSON_DOCUMENTATION(Group)
4661
4662 public:
4664 typedef enum
4665 {
4667 gtUnknown = 0,
4668
4670 gtAudio = 1,
4671
4673 gtPresence = 2,
4674
4676 gtRaw = 3
4677 } Type_t;
4678
4679
4681 typedef enum
4682 {
4684 bomRaw = 0,
4685
4687 bomPayloadTransformation = 1,
4688
4690 bomAnonymousMixing = 2,
4691
4693 bomLanguageTranslation = 3
4694 } BridgingOpMode_t;
4695
4697 typedef enum
4698 {
4700 iagpAnonymousAlias = 0,
4701
4703 iagpSsrcInHex = 1
4704 } InboundAliasGenerationPolicy_t;
4705
4708
4711
4718 std::string id;
4719
4721 std::string name;
4722
4724 std::string spokenName;
4725
4727 std::string interfaceName;
4728
4731
4734
4737
4740
4743
4745 std::string cryptoPassword;
4746
4749
4751 std::vector<Rallypoint> rallypoints;
4752
4755
4758
4767
4769 std::string alias;
4770
4773
4775 std::string source;
4776
4783
4786
4789
4792
4794 std::vector<std::string> presenceGroupAffinities;
4795
4798
4801
4803 std::vector<RtpPayloadTypeTranslation> inboundRtpPayloadTypeTranslations;
4804
4807
4810
4812 std::string anonymousAlias;
4813
4816
4819
4822
4825
4828
4831
4834
4836 std::vector<uint16_t> specializerAffinities;
4837
4840
4842 std::vector<Source> ignoreSources;
4843
4845 std::string languageCode;
4846
4848 std::string synVoice;
4849
4852
4855
4858
4861
4864
4867
4868 Group()
4869 {
4870 clear();
4871 }
4872
4873 void clear()
4874 {
4875 type = gtUnknown;
4876 bom = bomRaw;
4877 id.clear();
4878 name.clear();
4879 spokenName.clear();
4880 interfaceName.clear();
4881 rx.clear();
4882 tx.clear();
4883 txOptions.clear();
4884 txAudio.clear();
4885 presence.clear();
4886 cryptoPassword.clear();
4887
4888 alias.clear();
4889
4890 rallypoints.clear();
4891 rallypointCluster.clear();
4892
4893 audio.clear();
4894 timeline.clear();
4895
4896 blockAdvertising = false;
4897
4898 source.clear();
4899
4900 maxRxSecs = 0;
4901
4902 enableMulticastFailover = false;
4903 multicastFailoverSecs = 10;
4904
4905 rtcpPresenceRx.clear();
4906
4907 presenceGroupAffinities.clear();
4908 disablePacketEvents = false;
4909
4910 rfc4733RtpPayloadId = 0;
4911 inboundRtpPayloadTypeTranslations.clear();
4912 priorityTranslation.clear();
4913
4914 stickyTidHangSecs = 10;
4915 anonymousAlias.clear();
4916 lbCrypto = false;
4917
4918 appTransport.clear();
4919 allowLoopback = false;
4920
4921 rtpProfile.clear();
4922 rangerPackets.clear();
4923
4924 _wasDeserialized_rtpProfile = false;
4925
4926 txImpairment.clear();
4927 rxImpairment.clear();
4928
4929 specializerAffinities.clear();
4930
4931 securityLevel = 0;
4932
4933 ignoreSources.clear();
4934
4935 languageCode.clear();
4936 synVoice.clear();
4937
4938 rxCapture.clear();
4939 txCapture.clear();
4940
4941 blobRtpPayloadType = ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE;
4942 inboundAliasGenerationPolicy = iagpAnonymousAlias;
4943 gateIn.clear();
4944
4945 ignoreAudioTraffic = false;
4946 }
4947 };
4948
4949 static void to_json(nlohmann::json& j, const Group& p)
4950 {
4951 j = nlohmann::json{
4952 TOJSON_IMPL(type),
4953 TOJSON_IMPL(bom),
4954 TOJSON_IMPL(id),
4955 TOJSON_IMPL(name),
4956 TOJSON_IMPL(spokenName),
4957 TOJSON_IMPL(interfaceName),
4958 TOJSON_IMPL(rx),
4959 TOJSON_IMPL(tx),
4960 TOJSON_IMPL(txOptions),
4961 TOJSON_IMPL(txAudio),
4962 TOJSON_IMPL(presence),
4963 TOJSON_IMPL(cryptoPassword),
4964 TOJSON_IMPL(alias),
4965
4966 // See below
4967 //TOJSON_IMPL(rallypoints),
4968 //TOJSON_IMPL(rallypointCluster),
4969
4970 TOJSON_IMPL(alias),
4971 TOJSON_IMPL(audio),
4972 TOJSON_IMPL(timeline),
4973 TOJSON_IMPL(blockAdvertising),
4974 TOJSON_IMPL(source),
4975 TOJSON_IMPL(maxRxSecs),
4976 TOJSON_IMPL(enableMulticastFailover),
4977 TOJSON_IMPL(multicastFailoverSecs),
4978 TOJSON_IMPL(rtcpPresenceRx),
4979 TOJSON_IMPL(presenceGroupAffinities),
4980 TOJSON_IMPL(disablePacketEvents),
4981 TOJSON_IMPL(rfc4733RtpPayloadId),
4982 TOJSON_IMPL(inboundRtpPayloadTypeTranslations),
4983 TOJSON_IMPL(priorityTranslation),
4984 TOJSON_IMPL(stickyTidHangSecs),
4985 TOJSON_IMPL(anonymousAlias),
4986 TOJSON_IMPL(lbCrypto),
4987 TOJSON_IMPL(appTransport),
4988 TOJSON_IMPL(allowLoopback),
4989 TOJSON_IMPL(rangerPackets),
4990
4991 TOJSON_IMPL(txImpairment),
4992 TOJSON_IMPL(rxImpairment),
4993
4994 TOJSON_IMPL(specializerAffinities),
4995
4996 TOJSON_IMPL(securityLevel),
4997
4998 TOJSON_IMPL(ignoreSources),
4999
5000 TOJSON_IMPL(languageCode),
5001 TOJSON_IMPL(synVoice),
5002
5003 TOJSON_IMPL(rxCapture),
5004 TOJSON_IMPL(txCapture),
5005
5006 TOJSON_IMPL(blobRtpPayloadType),
5007
5008 TOJSON_IMPL(inboundAliasGenerationPolicy),
5009
5010 TOJSON_IMPL(gateIn),
5011
5012 TOJSON_IMPL(ignoreAudioTraffic)
5013 };
5014
5015 TOJSON_BASE_IMPL();
5016
5017 // TODO: need a better way to indicate whether rtpProfile is present
5018 if(p._wasDeserialized_rtpProfile || p.isDocumenting())
5019 {
5020 j["rtpProfile"] = p.rtpProfile;
5021 }
5022
5023 if(p.isDocumenting())
5024 {
5025 j["rallypointCluster"] = p.rallypointCluster;
5026 j["rallypoints"] = p.rallypoints;
5027 }
5028 else
5029 {
5030 // rallypointCluster takes precedence if it has elements
5031 if(!p.rallypointCluster.rallypoints.empty())
5032 {
5033 j["rallypointCluster"] = p.rallypointCluster;
5034 }
5035 else if(!p.rallypoints.empty())
5036 {
5037 j["rallypoints"] = p.rallypoints;
5038 }
5039 }
5040 }
5041 static void from_json(const nlohmann::json& j, Group& p)
5042 {
5043 p.clear();
5044 j.at("type").get_to(p.type);
5045 getOptional<Group::BridgingOpMode_t>("bom", p.bom, j, Group::BridgingOpMode_t::bomRaw);
5046 j.at("id").get_to(p.id);
5047 getOptional<std::string>("name", p.name, j);
5048 getOptional<std::string>("spokenName", p.spokenName, j);
5049 getOptional<std::string>("interfaceName", p.interfaceName, j);
5050 getOptional<NetworkAddress>("rx", p.rx, j);
5051 getOptional<NetworkAddress>("tx", p.tx, j);
5052 getOptional<NetworkTxOptions>("txOptions", p.txOptions, j);
5053 getOptional<std::string>("cryptoPassword", p.cryptoPassword, j);
5054 getOptional<std::string>("alias", p.alias, j);
5055 getOptional<TxAudio>("txAudio", p.txAudio, j);
5056 getOptional<Presence>("presence", p.presence, j);
5057 getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
5058 getOptional<RallypointCluster>("rallypointCluster", p.rallypointCluster, j);
5059 getOptional<Audio>("audio", p.audio, j);
5060 getOptional<GroupTimeline>("timeline", p.timeline, j);
5061 getOptional<bool>("blockAdvertising", p.blockAdvertising, j, false);
5062 getOptional<std::string>("source", p.source, j);
5063 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
5064 getOptional<bool>("enableMulticastFailover", p.enableMulticastFailover, j, false);
5065 getOptional<int>("multicastFailoverSecs", p.multicastFailoverSecs, j, 10);
5066 getOptional<NetworkAddress>("rtcpPresenceRx", p.rtcpPresenceRx, j);
5067 getOptional<std::vector<std::string>>("presenceGroupAffinities", p.presenceGroupAffinities, j);
5068 getOptional<bool>("disablePacketEvents", p.disablePacketEvents, j, false);
5069 getOptional<int>("rfc4733RtpPayloadId", p.rfc4733RtpPayloadId, j, 0);
5070 getOptional<std::vector<RtpPayloadTypeTranslation>>("inboundRtpPayloadTypeTranslations", p.inboundRtpPayloadTypeTranslations, j);
5071 getOptional<GroupPriorityTranslation>("priorityTranslation", p.priorityTranslation, j);
5072 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
5073 getOptional<std::string>("anonymousAlias", p.anonymousAlias, j);
5074 getOptional<bool>("lbCrypto", p.lbCrypto, j, false);
5075 getOptional<GroupAppTransport>("appTransport", p.appTransport, j);
5076 getOptional<bool>("allowLoopback", p.allowLoopback, j, false);
5077 getOptionalWithIndicator<RtpProfile>("rtpProfile", p.rtpProfile, j, &p._wasDeserialized_rtpProfile);
5078 getOptional<RangerPackets>("rangerPackets", p.rangerPackets, j);
5079 getOptional<TransportImpairment>("txImpairment", p.txImpairment, j);
5080 getOptional<TransportImpairment>("rxImpairment", p.rxImpairment, j);
5081 getOptional<std::vector<uint16_t>>("specializerAffinities", p.specializerAffinities, j);
5082 getOptional<uint32_t>("securityLevel", p.securityLevel, j, 0);
5083 getOptional<std::vector<Source>>("ignoreSources", p.ignoreSources, j);
5084 getOptional<std::string>("languageCode", p.languageCode, j);
5085 getOptional<std::string>("synVoice", p.synVoice, j);
5086
5087 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
5088 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
5089
5090 getOptional<uint16_t>("blobRtpPayloadType", p.blobRtpPayloadType, j, ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE);
5091
5092 getOptional<Group::InboundAliasGenerationPolicy_t>("inboundAliasGenerationPolicy", p.inboundAliasGenerationPolicy, j, Group::InboundAliasGenerationPolicy_t::iagpAnonymousAlias);
5093
5094 getOptional<AudioGate>("gateIn", p.gateIn, j);
5095
5096 getOptional<bool>("ignoreAudioTraffic", p.ignoreAudioTraffic, j, false);
5097
5098 FROMJSON_BASE_IMPL();
5099 }
5100
5101
5102 //-----------------------------------------------------------
5103 JSON_SERIALIZED_CLASS(Mission)
5105 {
5106 IMPLEMENT_JSON_SERIALIZATION()
5107 IMPLEMENT_JSON_DOCUMENTATION(Mission)
5108
5109 public:
5110 std::string id;
5111 std::string name;
5112 std::vector<Group> groups;
5113 std::chrono::system_clock::time_point begins;
5114 std::chrono::system_clock::time_point ends;
5115 std::string certStoreId;
5116 int multicastFailoverPolicy;
5117 Rallypoint rallypoint;
5118
5119 void clear()
5120 {
5121 id.clear();
5122 name.clear();
5123 groups.clear();
5124 certStoreId.clear();
5125 multicastFailoverPolicy = 0;
5126 rallypoint.clear();
5127 }
5128 };
5129
5130 static void to_json(nlohmann::json& j, const Mission& p)
5131 {
5132 j = nlohmann::json{
5133 TOJSON_IMPL(id),
5134 TOJSON_IMPL(name),
5135 TOJSON_IMPL(groups),
5136 TOJSON_IMPL(certStoreId),
5137 TOJSON_IMPL(multicastFailoverPolicy),
5138 TOJSON_IMPL(rallypoint)
5139 };
5140 }
5141
5142 static void from_json(const nlohmann::json& j, Mission& p)
5143 {
5144 p.clear();
5145 j.at("id").get_to(p.id);
5146 j.at("name").get_to(p.name);
5147
5148 // Groups are optional
5149 try
5150 {
5151 j.at("groups").get_to(p.groups);
5152 }
5153 catch(...)
5154 {
5155 p.groups.clear();
5156 }
5157
5158 FROMJSON_IMPL(certStoreId, std::string, EMPTY_STRING);
5159 FROMJSON_IMPL(multicastFailoverPolicy, int, 0);
5160 getOptional<Rallypoint>("rallypoint", p.rallypoint, j);
5161 }
5162
5163 //-----------------------------------------------------------
5164 JSON_SERIALIZED_CLASS(LicenseDescriptor)
5175 {
5176 IMPLEMENT_JSON_SERIALIZATION()
5177 IMPLEMENT_JSON_DOCUMENTATION(LicenseDescriptor)
5178
5179 public:
5185 static const int STATUS_OK = 0;
5186 static const int ERR_NULL_ENTITLEMENT_KEY = -1;
5187 static const int ERR_NULL_LICENSE_KEY = -2;
5188 static const int ERR_INVALID_LICENSE_KEY_LEN = -3;
5189 static const int ERR_LICENSE_KEY_VERIFICATION_FAILURE = -4;
5190 static const int ERR_ACTIVATION_CODE_VERIFICATION_FAILURE = -5;
5191 static const int ERR_INVALID_EXPIRATION_DATE = -6;
5192 static const int ERR_GENERAL_FAILURE = -7;
5193 static const int ERR_NOT_INITIALIZED = -8;
5194 static const int ERR_REQUIRES_ACTIVATION = -9;
5195 static const int ERR_LICENSE_NOT_SUITED_FOR_ACTIVATION = -10;
5203 static const uint8_t LIC_CARGO_FLAG_LIMIT_TO_FEATURES = 0x01;
5214 std::string entitlement;
5215
5222 std::string key;
5223
5225 std::string activationCode;
5226
5228 std::string deviceId;
5229
5231 int type;
5232
5234 time_t expires;
5235
5237 std::string expiresFormatted;
5238
5243 uint32_t flags;
5244
5246 std::string cargo;
5247
5249 uint8_t cargoFlags;
5250
5256
5258 std::string manufacturerId;
5259
5261 {
5262 clear();
5263 }
5264
5265 void clear()
5266 {
5267 entitlement.clear();
5268 key.clear();
5269 activationCode.clear();
5270 type = 0;
5271 expires = 0;
5272 expiresFormatted.clear();
5273 flags = 0;
5274 cargo.clear();
5275 cargoFlags = 0;
5276 deviceId.clear();
5277 status = ERR_NOT_INITIALIZED;
5278 manufacturerId.clear();
5279 }
5280 };
5281
5282 static void to_json(nlohmann::json& j, const LicenseDescriptor& p)
5283 {
5284 j = nlohmann::json{
5285 //TOJSON_IMPL(entitlement),
5286 {"entitlement", "*entitlement*"},
5287 TOJSON_IMPL(key),
5288 TOJSON_IMPL(activationCode),
5289 TOJSON_IMPL(type),
5290 TOJSON_IMPL(expires),
5291 TOJSON_IMPL(expiresFormatted),
5292 TOJSON_IMPL(flags),
5293 TOJSON_IMPL(deviceId),
5294 TOJSON_IMPL(status),
5295 //TOJSON_IMPL(manufacturerId),
5296 {"manufacturerId", "*manufacturerId*"},
5297 TOJSON_IMPL(cargo),
5298 TOJSON_IMPL(cargoFlags)
5299 };
5300 }
5301
5302 static void from_json(const nlohmann::json& j, LicenseDescriptor& p)
5303 {
5304 p.clear();
5305 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
5306 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
5307 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
5308 FROMJSON_IMPL(type, int, 0);
5309 FROMJSON_IMPL(expires, time_t, 0);
5310 FROMJSON_IMPL(expiresFormatted, std::string, EMPTY_STRING);
5311 FROMJSON_IMPL(flags, uint32_t, 0);
5312 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
5313 FROMJSON_IMPL(status, int, LicenseDescriptor::ERR_NOT_INITIALIZED);
5314 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
5315 FROMJSON_IMPL(cargo, std::string, EMPTY_STRING);
5316 FROMJSON_IMPL(cargoFlags, uint8_t, 0);
5317 }
5318
5319
5320 //-----------------------------------------------------------
5321 JSON_SERIALIZED_CLASS(EngineNetworkingRpUdpStreaming)
5334 {
5335 IMPLEMENT_JSON_SERIALIZATION()
5336 IMPLEMENT_JSON_DOCUMENTATION(EngineNetworkingRpUdpStreaming)
5337
5338 public:
5341
5343 int port;
5344
5347
5350
5352 int ttl;
5353
5355 {
5356 clear();
5357 }
5358
5359 void clear()
5360 {
5361 enabled = false;
5362 port = 0;
5363 keepaliveIntervalSecs = 15;
5364 priority = TxPriority_t::priVoice;
5365 ttl = 64;
5366 }
5367
5368 virtual void initForDocumenting()
5369 {
5370 }
5371 };
5372
5373 static void to_json(nlohmann::json& j, const EngineNetworkingRpUdpStreaming& p)
5374 {
5375 j = nlohmann::json{
5376 TOJSON_IMPL(enabled),
5377 TOJSON_IMPL(port),
5378 TOJSON_IMPL(keepaliveIntervalSecs),
5379 TOJSON_IMPL(priority),
5380 TOJSON_IMPL(ttl)
5381 };
5382 }
5383 static void from_json(const nlohmann::json& j, EngineNetworkingRpUdpStreaming& p)
5384 {
5385 p.clear();
5386 getOptional<bool>("enabled", p.enabled, j, false);
5387 getOptional<int>("port", p.port, j, 0);
5388 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
5389 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
5390 getOptional<int>("ttl", p.ttl, j, 64);
5391 }
5392
5393 //-----------------------------------------------------------
5394 JSON_SERIALIZED_CLASS(EnginePolicyNetworking)
5404 {
5405 IMPLEMENT_JSON_SERIALIZATION()
5406 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNetworking)
5407
5408 public:
5410 std::string defaultNic;
5411
5414
5417
5420
5423
5426
5429
5432
5434 {
5435 clear();
5436 }
5437
5438 void clear()
5439 {
5440 defaultNic.clear();
5441 multicastRejoinSecs = 8;
5442 rallypointRtTestIntervalMs = 60000;
5443 logRtpJitterBufferStats = false;
5444 preventMulticastFailover = false;
5445 addressResolutionPolicy = AddressResolutionPolicy_t::arpIpv6ThenIpv4;
5446
5447 rpUdpStreaming.clear();
5448 rtpProfile.clear();
5449 }
5450 };
5451
5452 static void to_json(nlohmann::json& j, const EnginePolicyNetworking& p)
5453 {
5454 j = nlohmann::json{
5455 TOJSON_IMPL(defaultNic),
5456 TOJSON_IMPL(multicastRejoinSecs),
5457
5458 TOJSON_IMPL(rallypointRtTestIntervalMs),
5459 TOJSON_IMPL(logRtpJitterBufferStats),
5460 TOJSON_IMPL(preventMulticastFailover),
5461
5462 TOJSON_IMPL(rpUdpStreaming),
5463 TOJSON_IMPL(rtpProfile),
5464 TOJSON_IMPL(addressResolutionPolicy)
5465 };
5466 }
5467 static void from_json(const nlohmann::json& j, EnginePolicyNetworking& p)
5468 {
5469 p.clear();
5470 FROMJSON_IMPL(defaultNic, std::string, EMPTY_STRING);
5471 FROMJSON_IMPL(multicastRejoinSecs, int, 8);
5472 FROMJSON_IMPL(rallypointRtTestIntervalMs, int, 60000);
5473 FROMJSON_IMPL(logRtpJitterBufferStats, bool, false);
5474 FROMJSON_IMPL(preventMulticastFailover, bool, false);
5475
5476 getOptional<EngineNetworkingRpUdpStreaming>("rpUdpStreaming", p.rpUdpStreaming, j);
5477 getOptional<RtpProfile>("rtpProfile", p.rtpProfile, j);
5478 getOptional<AddressResolutionPolicy_t>("addressResolutionPolicy", p.addressResolutionPolicy, j, AddressResolutionPolicy_t::arpIpv6ThenIpv4);
5479 }
5480
5481 //-----------------------------------------------------------
5482 JSON_SERIALIZED_CLASS(Aec)
5493 {
5494 IMPLEMENT_JSON_SERIALIZATION()
5495 IMPLEMENT_JSON_DOCUMENTATION(Aec)
5496
5497 public:
5503 typedef enum
5504 {
5506 aecmDefault = 0,
5507
5509 aecmLow = 1,
5510
5512 aecmMedium = 2,
5513
5515 aecmHigh = 3,
5516
5518 aecmVeryHigh = 4,
5519
5521 aecmHighest = 5
5522 } Mode_t;
5523
5526
5529
5532
5534 bool cng;
5535
5536 Aec()
5537 {
5538 clear();
5539 }
5540
5541 void clear()
5542 {
5543 enabled = false;
5544 mode = aecmDefault;
5545 speakerTailMs = 60;
5546 cng = true;
5547 }
5548 };
5549
5550 static void to_json(nlohmann::json& j, const Aec& p)
5551 {
5552 j = nlohmann::json{
5553 TOJSON_IMPL(enabled),
5554 TOJSON_IMPL(mode),
5555 TOJSON_IMPL(speakerTailMs),
5556 TOJSON_IMPL(cng)
5557 };
5558 }
5559 static void from_json(const nlohmann::json& j, Aec& p)
5560 {
5561 p.clear();
5562 FROMJSON_IMPL(enabled, bool, false);
5563 FROMJSON_IMPL(mode, Aec::Mode_t, Aec::Mode_t::aecmDefault);
5564 FROMJSON_IMPL(speakerTailMs, int, 60);
5565 FROMJSON_IMPL(cng, bool, true);
5566 }
5567
5568 //-----------------------------------------------------------
5569 JSON_SERIALIZED_CLASS(Vad)
5580 {
5581 IMPLEMENT_JSON_SERIALIZATION()
5582 IMPLEMENT_JSON_DOCUMENTATION(Vad)
5583
5584 public:
5590 typedef enum
5591 {
5593 vamDefault = 0,
5594
5596 vamLowBitRate = 1,
5597
5599 vamAggressive = 2,
5600
5602 vamVeryAggressive = 3
5603 } Mode_t;
5604
5607
5610
5611 Vad()
5612 {
5613 clear();
5614 }
5615
5616 void clear()
5617 {
5618 enabled = false;
5619 mode = vamDefault;
5620 }
5621 };
5622
5623 static void to_json(nlohmann::json& j, const Vad& p)
5624 {
5625 j = nlohmann::json{
5626 TOJSON_IMPL(enabled),
5627 TOJSON_IMPL(mode)
5628 };
5629 }
5630 static void from_json(const nlohmann::json& j, Vad& p)
5631 {
5632 p.clear();
5633 FROMJSON_IMPL(enabled, bool, false);
5634 FROMJSON_IMPL(mode, Vad::Mode_t, Vad::Mode_t::vamDefault);
5635 }
5636
5637 //-----------------------------------------------------------
5638 JSON_SERIALIZED_CLASS(Bridge)
5649 {
5650 IMPLEMENT_JSON_SERIALIZATION()
5651 IMPLEMENT_JSON_DOCUMENTATION(Bridge)
5652
5653 public:
5655 std::string id;
5656
5658 std::string name;
5659
5661 std::vector<std::string> groups;
5662
5665
5666 Bridge()
5667 {
5668 clear();
5669 }
5670
5671 void clear()
5672 {
5673 id.clear();
5674 name.clear();
5675 groups.clear();
5676 enabled = true;
5677 }
5678 };
5679
5680 static void to_json(nlohmann::json& j, const Bridge& p)
5681 {
5682 j = nlohmann::json{
5683 TOJSON_IMPL(id),
5684 TOJSON_IMPL(name),
5685 TOJSON_IMPL(groups),
5686 TOJSON_IMPL(enabled)
5687 };
5688 }
5689 static void from_json(const nlohmann::json& j, Bridge& p)
5690 {
5691 p.clear();
5692 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
5693 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
5694 getOptional<std::vector<std::string>>("groups", p.groups, j);
5695 FROMJSON_IMPL(enabled, bool, true);
5696 }
5697
5698 //-----------------------------------------------------------
5699 JSON_SERIALIZED_CLASS(AndroidAudio)
5710 {
5711 IMPLEMENT_JSON_SERIALIZATION()
5712 IMPLEMENT_JSON_DOCUMENTATION(AndroidAudio)
5713
5714 public:
5715 constexpr static int INVALID_SESSION_ID = -9999;
5716
5718 int api;
5719
5722
5725
5741
5749
5759
5762
5765
5766
5767 AndroidAudio()
5768 {
5769 clear();
5770 }
5771
5772 void clear()
5773 {
5774 api = 0;
5775 sharingMode = 0;
5776 performanceMode = 12;
5777 usage = 2;
5778 contentType = 1;
5779 inputPreset = 7;
5780 sessionId = AndroidAudio::INVALID_SESSION_ID;
5781 engineMode = 0;
5782 }
5783 };
5784
5785 static void to_json(nlohmann::json& j, const AndroidAudio& p)
5786 {
5787 j = nlohmann::json{
5788 TOJSON_IMPL(api),
5789 TOJSON_IMPL(sharingMode),
5790 TOJSON_IMPL(performanceMode),
5791 TOJSON_IMPL(usage),
5792 TOJSON_IMPL(contentType),
5793 TOJSON_IMPL(inputPreset),
5794 TOJSON_IMPL(sessionId),
5795 TOJSON_IMPL(engineMode)
5796 };
5797 }
5798 static void from_json(const nlohmann::json& j, AndroidAudio& p)
5799 {
5800 p.clear();
5801 FROMJSON_IMPL(api, int, 0);
5802 FROMJSON_IMPL(sharingMode, int, 0);
5803 FROMJSON_IMPL(performanceMode, int, 12);
5804 FROMJSON_IMPL(usage, int, 2);
5805 FROMJSON_IMPL(contentType, int, 1);
5806 FROMJSON_IMPL(inputPreset, int, 7);
5807 FROMJSON_IMPL(sessionId, int, AndroidAudio::INVALID_SESSION_ID);
5808 FROMJSON_IMPL(engineMode, int, 0);
5809 }
5810
5811 //-----------------------------------------------------------
5812 JSON_SERIALIZED_CLASS(EnginePolicyAudio)
5823 {
5824 IMPLEMENT_JSON_SERIALIZATION()
5825 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyAudio)
5826
5827 public:
5830
5833
5836
5839
5842
5845
5848
5851
5854
5857
5860
5863
5866
5869
5870
5872 {
5873 clear();
5874 }
5875
5876 void clear()
5877 {
5878 enabled = true;
5879 hardwareEnabled = true;
5880 internalRate = 16000;
5881 internalChannels = 2;
5882 muteTxOnTx = false;
5883 aec.clear();
5884 vad.clear();
5885 android.clear();
5886 inputAgc.clear();
5887 outputAgc.clear();
5888 denoiseInput = false;
5889 denoiseOutput = false;
5890 saveInputPcm = false;
5891 saveOutputPcm = false;
5892 }
5893 };
5894
5895 static void to_json(nlohmann::json& j, const EnginePolicyAudio& p)
5896 {
5897 j = nlohmann::json{
5898 TOJSON_IMPL(enabled),
5899 TOJSON_IMPL(hardwareEnabled),
5900 TOJSON_IMPL(internalRate),
5901 TOJSON_IMPL(internalChannels),
5902 TOJSON_IMPL(muteTxOnTx),
5903 TOJSON_IMPL(aec),
5904 TOJSON_IMPL(vad),
5905 TOJSON_IMPL(android),
5906 TOJSON_IMPL(inputAgc),
5907 TOJSON_IMPL(outputAgc),
5908 TOJSON_IMPL(denoiseInput),
5909 TOJSON_IMPL(denoiseOutput),
5910 TOJSON_IMPL(saveInputPcm),
5911 TOJSON_IMPL(saveOutputPcm)
5912 };
5913 }
5914 static void from_json(const nlohmann::json& j, EnginePolicyAudio& p)
5915 {
5916 p.clear();
5917 getOptional<bool>("enabled", p.enabled, j, true);
5918 getOptional<bool>("hardwareEnabled", p.hardwareEnabled, j, true);
5919 FROMJSON_IMPL(internalRate, int, 16000);
5920 FROMJSON_IMPL(internalChannels, int, 2);
5921
5922 FROMJSON_IMPL(muteTxOnTx, bool, false);
5923 getOptional<Aec>("aec", p.aec, j);
5924 getOptional<Vad>("vad", p.vad, j);
5925 getOptional<AndroidAudio>("android", p.android, j);
5926 getOptional<Agc>("inputAgc", p.inputAgc, j);
5927 getOptional<Agc>("outputAgc", p.outputAgc, j);
5928 FROMJSON_IMPL(denoiseInput, bool, false);
5929 FROMJSON_IMPL(denoiseOutput, bool, false);
5930 FROMJSON_IMPL(saveInputPcm, bool, false);
5931 FROMJSON_IMPL(saveOutputPcm, bool, false);
5932 }
5933
5934 //-----------------------------------------------------------
5935 JSON_SERIALIZED_CLASS(SecurityCertificate)
5946 {
5947 IMPLEMENT_JSON_SERIALIZATION()
5948 IMPLEMENT_JSON_DOCUMENTATION(SecurityCertificate)
5949
5950 public:
5951
5957 std::string certificate;
5958
5960 std::string key;
5961
5963 {
5964 clear();
5965 }
5966
5967 void clear()
5968 {
5969 certificate.clear();
5970 key.clear();
5971 }
5972 };
5973
5974 static void to_json(nlohmann::json& j, const SecurityCertificate& p)
5975 {
5976 j = nlohmann::json{
5977 TOJSON_IMPL(certificate),
5978 TOJSON_IMPL(key)
5979 };
5980 }
5981 static void from_json(const nlohmann::json& j, SecurityCertificate& p)
5982 {
5983 p.clear();
5984 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
5985 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
5986 }
5987
5988 // This is where spell checking stops
5989 //-----------------------------------------------------------
5990 JSON_SERIALIZED_CLASS(EnginePolicySecurity)
5991
5992
6002 {
6003 IMPLEMENT_JSON_SERIALIZATION()
6004 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicySecurity)
6005
6006 public:
6007
6019
6027 std::vector<std::string> caCertificates;
6028
6030 {
6031 clear();
6032 }
6033
6034 void clear()
6035 {
6036 certificate.clear();
6037 caCertificates.clear();
6038 }
6039 };
6040
6041 static void to_json(nlohmann::json& j, const EnginePolicySecurity& p)
6042 {
6043 j = nlohmann::json{
6044 TOJSON_IMPL(certificate),
6045 TOJSON_IMPL(caCertificates)
6046 };
6047 }
6048 static void from_json(const nlohmann::json& j, EnginePolicySecurity& p)
6049 {
6050 p.clear();
6051 getOptional("certificate", p.certificate, j);
6052 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
6053 }
6054
6055 //-----------------------------------------------------------
6056 JSON_SERIALIZED_CLASS(EnginePolicyLogging)
6067 {
6068 IMPLEMENT_JSON_SERIALIZATION()
6069 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyLogging)
6070
6071 public:
6072
6089
6092
6094 {
6095 clear();
6096 }
6097
6098 void clear()
6099 {
6100 maxLevel = 4; // ILogger::Level::debug
6101 enableSyslog = false;
6102 }
6103 };
6104
6105 static void to_json(nlohmann::json& j, const EnginePolicyLogging& p)
6106 {
6107 j = nlohmann::json{
6108 TOJSON_IMPL(maxLevel),
6109 TOJSON_IMPL(enableSyslog)
6110 };
6111 }
6112 static void from_json(const nlohmann::json& j, EnginePolicyLogging& p)
6113 {
6114 p.clear();
6115 getOptional("maxLevel", p.maxLevel, j, 4); // ILogger::Level::debug
6116 getOptional("enableSyslog", p.enableSyslog, j);
6117 }
6118
6119
6120 //-----------------------------------------------------------
6121 JSON_SERIALIZED_CLASS(EnginePolicyDatabase)
6123 {
6124 IMPLEMENT_JSON_SERIALIZATION()
6125 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyDatabase)
6126
6127 public:
6128 typedef enum
6129 {
6130 dbtFixedMemory = 0,
6131 dbtPagedMemory = 1,
6132 dbtFixedFile = 2
6133 } DatabaseType_t;
6134
6135 DatabaseType_t type;
6136 std::string fixedFileName;
6137 bool forceMaintenance;
6138 bool reclaimSpace;
6139
6141 {
6142 clear();
6143 }
6144
6145 void clear()
6146 {
6147 type = DatabaseType_t::dbtFixedMemory;
6148 fixedFileName.clear();
6149 forceMaintenance = false;
6150 reclaimSpace = false;
6151 }
6152 };
6153
6154 static void to_json(nlohmann::json& j, const EnginePolicyDatabase& p)
6155 {
6156 j = nlohmann::json{
6157 TOJSON_IMPL(type),
6158 TOJSON_IMPL(fixedFileName),
6159 TOJSON_IMPL(forceMaintenance),
6160 TOJSON_IMPL(reclaimSpace)
6161 };
6162 }
6163 static void from_json(const nlohmann::json& j, EnginePolicyDatabase& p)
6164 {
6165 p.clear();
6166 FROMJSON_IMPL(type, EnginePolicyDatabase::DatabaseType_t, EnginePolicyDatabase::DatabaseType_t::dbtFixedMemory);
6167 FROMJSON_IMPL(fixedFileName, std::string, EMPTY_STRING);
6168 FROMJSON_IMPL(forceMaintenance, bool, false);
6169 FROMJSON_IMPL(reclaimSpace, bool, false);
6170 }
6171
6172
6173 //-----------------------------------------------------------
6174 JSON_SERIALIZED_CLASS(SecureSignature)
6183 {
6184 IMPLEMENT_JSON_SERIALIZATION()
6185 IMPLEMENT_JSON_DOCUMENTATION(SecureSignature)
6186
6187 public:
6188
6190 std::string certificate;
6191
6192 // /** @brief Contains the PEM-formatted text of the certificate's public key */
6193 //std::string publicKey;
6194
6196 std::string signature;
6197
6199 {
6200 clear();
6201 }
6202
6203 void clear()
6204 {
6205 certificate.clear();
6206 //publicKey.clear();
6207 signature.clear();
6208 }
6209 };
6210
6211 static void to_json(nlohmann::json& j, const SecureSignature& p)
6212 {
6213 j = nlohmann::json{
6214 TOJSON_IMPL(certificate),
6215 //TOJSON_IMPL(publicKey),
6216 TOJSON_IMPL(signature)
6217 };
6218 }
6219 static void from_json(const nlohmann::json& j, SecureSignature& p)
6220 {
6221 p.clear();
6222 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
6223 //FROMJSON_IMPL(publicKey, std::string, EMPTY_STRING);
6224 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
6225 }
6226
6227 //-----------------------------------------------------------
6228 JSON_SERIALIZED_CLASS(NamedAudioDevice)
6230 {
6231 IMPLEMENT_JSON_SERIALIZATION()
6232 IMPLEMENT_JSON_DOCUMENTATION(NamedAudioDevice)
6233
6234 public:
6235 std::string name;
6236 std::string manufacturer;
6237 std::string model;
6238 std::string id;
6239 std::string serialNumber;
6240 std::string type;
6241 std::string extra;
6242 bool isDefault;
6243
6245 {
6246 clear();
6247 }
6248
6249 void clear()
6250 {
6251 name.clear();
6252 manufacturer.clear();
6253 model.clear();
6254 id.clear();
6255 serialNumber.clear();
6256 type.clear();
6257 extra.clear();
6258 isDefault = false;
6259 }
6260 };
6261
6262 static void to_json(nlohmann::json& j, const NamedAudioDevice& p)
6263 {
6264 j = nlohmann::json{
6265 TOJSON_IMPL(name),
6266 TOJSON_IMPL(manufacturer),
6267 TOJSON_IMPL(model),
6268 TOJSON_IMPL(id),
6269 TOJSON_IMPL(serialNumber),
6270 TOJSON_IMPL(type),
6271 TOJSON_IMPL(extra),
6272 TOJSON_IMPL(isDefault),
6273 };
6274 }
6275 static void from_json(const nlohmann::json& j, NamedAudioDevice& p)
6276 {
6277 p.clear();
6278 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
6279 getOptional<std::string>("manufacturer", p.manufacturer, j, EMPTY_STRING);
6280 getOptional<std::string>("model", p.model, j, EMPTY_STRING);
6281 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
6282 getOptional<std::string>("serialNumber", p.serialNumber, j, EMPTY_STRING);
6283 getOptional<std::string>("type", p.type, j, EMPTY_STRING);
6284 getOptional<std::string>("extra", p.extra, j, EMPTY_STRING);
6285 getOptional<bool>("isDefault", p.isDefault, j, false);
6286 }
6287
6288
6289 //-----------------------------------------------------------
6290 JSON_SERIALIZED_CLASS(EnginePolicyNamedAudioDevices)
6292 {
6293 IMPLEMENT_JSON_SERIALIZATION()
6294 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNamedAudioDevices)
6295
6296 public:
6297 std::vector<NamedAudioDevice> inputs;
6298 std::vector<NamedAudioDevice> outputs;
6299
6301 {
6302 clear();
6303 }
6304
6305 void clear()
6306 {
6307 inputs.clear();
6308 outputs.clear();
6309 }
6310 };
6311
6312 static void to_json(nlohmann::json& j, const EnginePolicyNamedAudioDevices& p)
6313 {
6314 j = nlohmann::json{
6315 TOJSON_IMPL(inputs),
6316 TOJSON_IMPL(outputs)
6317 };
6318 }
6319 static void from_json(const nlohmann::json& j, EnginePolicyNamedAudioDevices& p)
6320 {
6321 p.clear();
6322 getOptional<std::vector<NamedAudioDevice>>("inputs", p.inputs, j);
6323 getOptional<std::vector<NamedAudioDevice>>("outputs", p.outputs, j);
6324 }
6325
6326 //-----------------------------------------------------------
6327 JSON_SERIALIZED_CLASS(Licensing)
6340 {
6341 IMPLEMENT_JSON_SERIALIZATION()
6342 IMPLEMENT_JSON_DOCUMENTATION(Licensing)
6343
6344 public:
6345
6347 std::string entitlement;
6348
6350 std::string key;
6351
6353 std::string activationCode;
6354
6356 std::string deviceId;
6357
6359 std::string manufacturerId;
6360
6361 Licensing()
6362 {
6363 clear();
6364 }
6365
6366 void clear()
6367 {
6368 entitlement.clear();
6369 key.clear();
6370 activationCode.clear();
6371 deviceId.clear();
6372 manufacturerId.clear();
6373 }
6374 };
6375
6376 static void to_json(nlohmann::json& j, const Licensing& p)
6377 {
6378 j = nlohmann::json{
6379 TOJSON_IMPL(entitlement),
6380 TOJSON_IMPL(key),
6381 TOJSON_IMPL(activationCode),
6382 TOJSON_IMPL(deviceId),
6383 TOJSON_IMPL(manufacturerId)
6384 };
6385 }
6386 static void from_json(const nlohmann::json& j, Licensing& p)
6387 {
6388 p.clear();
6389 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
6390 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
6391 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
6392 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
6393 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
6394 }
6395
6396 //-----------------------------------------------------------
6397 JSON_SERIALIZED_CLASS(DiscoveryMagellan)
6408 {
6409 IMPLEMENT_JSON_SERIALIZATION()
6410 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryMagellan)
6411
6412 public:
6413
6416
6418 std::string interfaceName;
6419
6422
6425
6427 {
6428 clear();
6429 }
6430
6431 void clear()
6432 {
6433 enabled = false;
6434 interfaceName.clear();
6435 security.clear();
6436 tls.clear();
6437 }
6438 };
6439
6440 static void to_json(nlohmann::json& j, const DiscoveryMagellan& p)
6441 {
6442 j = nlohmann::json{
6443 TOJSON_IMPL(enabled),
6444 TOJSON_IMPL(interfaceName),
6445 TOJSON_IMPL(security),
6446 TOJSON_IMPL(tls)
6447 };
6448 }
6449 static void from_json(const nlohmann::json& j, DiscoveryMagellan& p)
6450 {
6451 p.clear();
6452 getOptional("enabled", p.enabled, j, false);
6453 getOptional<Tls>("tls", p.tls, j);
6454 getOptional<SecurityCertificate>("security", p.security, j);
6455 FROMJSON_IMPL(interfaceName, std::string, EMPTY_STRING);
6456 }
6457
6458 //-----------------------------------------------------------
6459 JSON_SERIALIZED_CLASS(DiscoverySsdp)
6470 {
6471 IMPLEMENT_JSON_SERIALIZATION()
6472 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySsdp)
6473
6474 public:
6475
6478
6480 std::string interfaceName;
6481
6484
6486 std::vector<std::string> searchTerms;
6487
6490
6493
6495 {
6496 clear();
6497 }
6498
6499 void clear()
6500 {
6501 enabled = false;
6502 interfaceName.clear();
6503 address.clear();
6504 searchTerms.clear();
6505 ageTimeoutMs = 30000;
6506 advertising.clear();
6507 }
6508 };
6509
6510 static void to_json(nlohmann::json& j, const DiscoverySsdp& p)
6511 {
6512 j = nlohmann::json{
6513 TOJSON_IMPL(enabled),
6514 TOJSON_IMPL(interfaceName),
6515 TOJSON_IMPL(address),
6516 TOJSON_IMPL(searchTerms),
6517 TOJSON_IMPL(ageTimeoutMs),
6518 TOJSON_IMPL(advertising)
6519 };
6520 }
6521 static void from_json(const nlohmann::json& j, DiscoverySsdp& p)
6522 {
6523 p.clear();
6524 getOptional("enabled", p.enabled, j, false);
6525 getOptional<std::string>("interfaceName", p.interfaceName, j);
6526
6527 getOptional<NetworkAddress>("address", p.address, j);
6528 if(p.address.address.empty())
6529 {
6530 p.address.address = "255.255.255.255";
6531 }
6532 if(p.address.port <= 0)
6533 {
6534 p.address.port = 1900;
6535 }
6536
6537 getOptional<std::vector<std::string>>("searchTerms", p.searchTerms, j);
6538 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
6539 getOptional<Advertising>("advertising", p.advertising, j);
6540 }
6541
6542 //-----------------------------------------------------------
6543 JSON_SERIALIZED_CLASS(DiscoverySap)
6554 {
6555 IMPLEMENT_JSON_SERIALIZATION()
6556 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySap)
6557
6558 public:
6561
6563 std::string interfaceName;
6564
6567
6570
6573
6574 DiscoverySap()
6575 {
6576 clear();
6577 }
6578
6579 void clear()
6580 {
6581 enabled = false;
6582 interfaceName.clear();
6583 address.clear();
6584 ageTimeoutMs = 30000;
6585 advertising.clear();
6586 }
6587 };
6588
6589 static void to_json(nlohmann::json& j, const DiscoverySap& p)
6590 {
6591 j = nlohmann::json{
6592 TOJSON_IMPL(enabled),
6593 TOJSON_IMPL(interfaceName),
6594 TOJSON_IMPL(address),
6595 TOJSON_IMPL(ageTimeoutMs),
6596 TOJSON_IMPL(advertising)
6597 };
6598 }
6599 static void from_json(const nlohmann::json& j, DiscoverySap& p)
6600 {
6601 p.clear();
6602 getOptional("enabled", p.enabled, j, false);
6603 getOptional<std::string>("interfaceName", p.interfaceName, j);
6604 getOptional<NetworkAddress>("address", p.address, j);
6605 if(p.address.address.empty())
6606 {
6607 p.address.address = "224.2.127.254";
6608 }
6609 if(p.address.port <= 0)
6610 {
6611 p.address.port = 9875;
6612 }
6613
6614 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
6615 getOptional<Advertising>("advertising", p.advertising, j);
6616 }
6617
6618 //-----------------------------------------------------------
6619 JSON_SERIALIZED_CLASS(DiscoveryCistech)
6632 {
6633 IMPLEMENT_JSON_SERIALIZATION()
6634 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryCistech)
6635
6636 public:
6637 bool enabled;
6638 std::string interfaceName;
6639 NetworkAddress address;
6640 int ageTimeoutMs;
6641
6643 {
6644 clear();
6645 }
6646
6647 void clear()
6648 {
6649 enabled = false;
6650 interfaceName.clear();
6651 address.clear();
6652 ageTimeoutMs = 30000;
6653 }
6654 };
6655
6656 static void to_json(nlohmann::json& j, const DiscoveryCistech& p)
6657 {
6658 j = nlohmann::json{
6659 TOJSON_IMPL(enabled),
6660 TOJSON_IMPL(interfaceName),
6661 TOJSON_IMPL(address),
6662 TOJSON_IMPL(ageTimeoutMs)
6663 };
6664 }
6665 static void from_json(const nlohmann::json& j, DiscoveryCistech& p)
6666 {
6667 p.clear();
6668 getOptional("enabled", p.enabled, j, false);
6669 getOptional<std::string>("interfaceName", p.interfaceName, j);
6670 getOptional<NetworkAddress>("address", p.address, j);
6671 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
6672 }
6673
6674
6675 //-----------------------------------------------------------
6676 JSON_SERIALIZED_CLASS(DiscoveryTrellisware)
6687 {
6688 IMPLEMENT_JSON_SERIALIZATION()
6689 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryTrellisware)
6690
6691 public:
6692
6695
6698
6700 {
6701 clear();
6702 }
6703
6704 void clear()
6705 {
6706 enabled = false;
6707 security.clear();
6708 }
6709 };
6710
6711 static void to_json(nlohmann::json& j, const DiscoveryTrellisware& p)
6712 {
6713 j = nlohmann::json{
6714 TOJSON_IMPL(enabled),
6715 TOJSON_IMPL(security)
6716 };
6717 }
6718 static void from_json(const nlohmann::json& j, DiscoveryTrellisware& p)
6719 {
6720 p.clear();
6721 getOptional("enabled", p.enabled, j, false);
6722 getOptional<SecurityCertificate>("security", p.security, j);
6723 }
6724
6725 //-----------------------------------------------------------
6726 JSON_SERIALIZED_CLASS(DiscoveryConfiguration)
6737 {
6738 IMPLEMENT_JSON_SERIALIZATION()
6739 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryConfiguration)
6740
6741 public:
6744
6747
6750
6753
6756
6758 {
6759 clear();
6760 }
6761
6762 void clear()
6763 {
6764 magellan.clear();
6765 ssdp.clear();
6766 sap.clear();
6767 cistech.clear();
6768 }
6769 };
6770
6771 static void to_json(nlohmann::json& j, const DiscoveryConfiguration& p)
6772 {
6773 j = nlohmann::json{
6774 TOJSON_IMPL(magellan),
6775 TOJSON_IMPL(ssdp),
6776 TOJSON_IMPL(sap),
6777 TOJSON_IMPL(cistech),
6778 TOJSON_IMPL(trellisware)
6779 };
6780 }
6781 static void from_json(const nlohmann::json& j, DiscoveryConfiguration& p)
6782 {
6783 p.clear();
6784 getOptional<DiscoveryMagellan>("magellan", p.magellan, j);
6785 getOptional<DiscoverySsdp>("ssdp", p.ssdp, j);
6786 getOptional<DiscoverySap>("sap", p.sap, j);
6787 getOptional<DiscoveryCistech>("cistech", p.cistech, j);
6788 getOptional<DiscoveryTrellisware>("trellisware", p.trellisware, j);
6789 }
6790
6791
6792 //-----------------------------------------------------------
6793 JSON_SERIALIZED_CLASS(EnginePolicyInternals)
6806 {
6807 IMPLEMENT_JSON_SERIALIZATION()
6808 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyInternals)
6809
6810 public:
6813
6816
6819
6820 int maxRxSecs;
6821
6822 int logTaskQueueStatsIntervalMs;
6823
6824 bool enableLazySpeakerClosure;
6825
6828
6831
6834
6837
6840
6843
6846
6849
6851 {
6852 clear();
6853 }
6854
6855 void clear()
6856 {
6857 watchdog.clear();
6858 housekeeperIntervalMs = 1000;
6859 logTaskQueueStatsIntervalMs = 0;
6860 maxTxSecs = 30;
6861 maxRxSecs = 0;
6862 enableLazySpeakerClosure = false;
6863 rpClusterStrategy = RallypointCluster::ConnectionStrategy_t::csRoundRobin;
6864 rpClusterRolloverSecs = 10;
6865 rtpExpirationCheckIntervalMs = 250;
6866 rpConnectionTimeoutSecs = 5;
6867 stickyTidHangSecs = 10;
6868 uriStreamingIntervalMs = 60;
6869 delayedMicrophoneClosureSecs = 15;
6870 tuning.clear();
6871 }
6872 };
6873
6874 static void to_json(nlohmann::json& j, const EnginePolicyInternals& p)
6875 {
6876 j = nlohmann::json{
6877 TOJSON_IMPL(watchdog),
6878 TOJSON_IMPL(housekeeperIntervalMs),
6879 TOJSON_IMPL(logTaskQueueStatsIntervalMs),
6880 TOJSON_IMPL(maxTxSecs),
6881 TOJSON_IMPL(maxRxSecs),
6882 TOJSON_IMPL(enableLazySpeakerClosure),
6883 TOJSON_IMPL(rpClusterStrategy),
6884 TOJSON_IMPL(rpClusterRolloverSecs),
6885 TOJSON_IMPL(rtpExpirationCheckIntervalMs),
6886 TOJSON_IMPL(rpConnectionTimeoutSecs),
6887 TOJSON_IMPL(stickyTidHangSecs),
6888 TOJSON_IMPL(uriStreamingIntervalMs),
6889 TOJSON_IMPL(delayedMicrophoneClosureSecs),
6890 TOJSON_IMPL(tuning)
6891 };
6892 }
6893 static void from_json(const nlohmann::json& j, EnginePolicyInternals& p)
6894 {
6895 p.clear();
6896 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
6897 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
6898 getOptional<int>("logTaskQueueStatsIntervalMs", p.logTaskQueueStatsIntervalMs, j, 0);
6899 getOptional<int>("maxTxSecs", p.maxTxSecs, j, 30);
6900 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
6901 getOptional<bool>("enableLazySpeakerClosure", p.enableLazySpeakerClosure, j, false);
6902 getOptional<RallypointCluster::ConnectionStrategy_t>("rpClusterStrategy", p.rpClusterStrategy, j, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
6903 getOptional<int>("rpClusterRolloverSecs", p.rpClusterRolloverSecs, j, 10);
6904 getOptional<int>("rtpExpirationCheckIntervalMs", p.rtpExpirationCheckIntervalMs, j, 250);
6905 getOptional<int>("rpConnectionTimeoutSecs", p.rpConnectionTimeoutSecs, j, 5);
6906 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
6907 getOptional<int>("uriStreamingIntervalMs", p.uriStreamingIntervalMs, j, 60);
6908 getOptional<int>("delayedMicrophoneClosureSecs", p.delayedMicrophoneClosureSecs, j, 15);
6909 getOptional<TuningSettings>("tuning", p.tuning, j);
6910 }
6911
6912 //-----------------------------------------------------------
6913 JSON_SERIALIZED_CLASS(EnginePolicyTimelines)
6926 {
6927 IMPLEMENT_JSON_SERIALIZATION()
6928 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyTimelines)
6929
6930 public:
6931
6938
6940 std::string storageRoot;
6941
6944
6947
6950
6953
6956
6959
6962
6971
6974
6977
6980
6982 {
6983 clear();
6984 }
6985
6986 void clear()
6987 {
6988 enabled = true;
6989 storageRoot.clear();
6990 maxStorageMb = 1024; // 1 Gigabyte
6991 maxMemMb = maxStorageMb;
6992 maxAudioEventMemMb = maxMemMb;
6993 maxDiskMb = maxStorageMb;
6994 maxEventAgeSecs = (86400 * 30); // 30 days
6995 groomingIntervalSecs = (60 * 30); // 30 minutes
6996 maxEvents = 1000;
6997 autosaveIntervalSecs = 5;
6998 security.clear();
6999 disableSigningAndVerification = false;
7000 ephemeral = false;
7001 }
7002 };
7003
7004 static void to_json(nlohmann::json& j, const EnginePolicyTimelines& p)
7005 {
7006 j = nlohmann::json{
7007 TOJSON_IMPL(enabled),
7008 TOJSON_IMPL(storageRoot),
7009 TOJSON_IMPL(maxMemMb),
7010 TOJSON_IMPL(maxAudioEventMemMb),
7011 TOJSON_IMPL(maxDiskMb),
7012 TOJSON_IMPL(maxEventAgeSecs),
7013 TOJSON_IMPL(maxEvents),
7014 TOJSON_IMPL(groomingIntervalSecs),
7015 TOJSON_IMPL(autosaveIntervalSecs),
7016 TOJSON_IMPL(security),
7017 TOJSON_IMPL(disableSigningAndVerification),
7018 TOJSON_IMPL(ephemeral)
7019 };
7020 }
7021 static void from_json(const nlohmann::json& j, EnginePolicyTimelines& p)
7022 {
7023 p.clear();
7024 getOptional<bool>("enabled", p.enabled, j, true);
7025 getOptional<std::string>("storageRoot", p.storageRoot, j, EMPTY_STRING);
7026
7027 getOptional<int>("maxStorageMb", p.maxStorageMb, j, 1024);
7028 getOptional<int>("maxMemMb", p.maxMemMb, j, p.maxStorageMb);
7029 getOptional<int>("maxAudioEventMemMb", p.maxAudioEventMemMb, j, p.maxMemMb);
7030 getOptional<int>("maxDiskMb", p.maxDiskMb, j, p.maxStorageMb);
7031 getOptional<long>("maxEventAgeSecs", p.maxEventAgeSecs, j, (86400 * 30));
7032 getOptional<long>("groomingIntervalSecs", p.groomingIntervalSecs, j, (60 * 30));
7033 getOptional<long>("autosaveIntervalSecs", p.autosaveIntervalSecs, j, 5);
7034 getOptional<int>("maxEvents", p.maxEvents, j, 1000);
7035 getOptional<SecurityCertificate>("security", p.security, j);
7036 getOptional<bool>("disableSigningAndVerification", p.disableSigningAndVerification, j, false);
7037 getOptional<bool>("ephemeral", p.ephemeral, j, false);
7038 }
7039
7040
7041 //-----------------------------------------------------------
7042 JSON_SERIALIZED_CLASS(RtpMapEntry)
7053 {
7054 IMPLEMENT_JSON_SERIALIZATION()
7055 IMPLEMENT_JSON_DOCUMENTATION(RtpMapEntry)
7056
7057 public:
7059 std::string name;
7060
7063
7066
7067 RtpMapEntry()
7068 {
7069 clear();
7070 }
7071
7072 void clear()
7073 {
7074 name.clear();
7075 engageType = -1;
7076 rtpPayloadType = -1;
7077 }
7078 };
7079
7080 static void to_json(nlohmann::json& j, const RtpMapEntry& p)
7081 {
7082 j = nlohmann::json{
7083 TOJSON_IMPL(name),
7084 TOJSON_IMPL(engageType),
7085 TOJSON_IMPL(rtpPayloadType)
7086 };
7087 }
7088 static void from_json(const nlohmann::json& j, RtpMapEntry& p)
7089 {
7090 p.clear();
7091 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7092 getOptional<int>("engageType", p.engageType, j, -1);
7093 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
7094 }
7095
7096 //-----------------------------------------------------------
7097 JSON_SERIALIZED_CLASS(ExternalModule)
7108 {
7109 IMPLEMENT_JSON_SERIALIZATION()
7110 IMPLEMENT_JSON_DOCUMENTATION(ExternalModule)
7111
7112 public:
7114 std::string name;
7115
7117 std::string file;
7118
7120 nlohmann::json configuration;
7121
7123 {
7124 clear();
7125 }
7126
7127 void clear()
7128 {
7129 name.clear();
7130 file.clear();
7131 configuration.clear();
7132 }
7133 };
7134
7135 static void to_json(nlohmann::json& j, const ExternalModule& p)
7136 {
7137 j = nlohmann::json{
7138 TOJSON_IMPL(name),
7139 TOJSON_IMPL(file)
7140 };
7141
7142 if(!p.configuration.empty())
7143 {
7144 j["configuration"] = p.configuration;
7145 }
7146 }
7147 static void from_json(const nlohmann::json& j, ExternalModule& p)
7148 {
7149 p.clear();
7150 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7151 getOptional<std::string>("file", p.file, j, EMPTY_STRING);
7152
7153 try
7154 {
7155 p.configuration = j.at("configuration");
7156 }
7157 catch(...)
7158 {
7159 p.configuration.clear();
7160 }
7161 }
7162
7163
7164 //-----------------------------------------------------------
7165 JSON_SERIALIZED_CLASS(ExternalCodecDescriptor)
7176 {
7177 IMPLEMENT_JSON_SERIALIZATION()
7178 IMPLEMENT_JSON_DOCUMENTATION(ExternalCodecDescriptor)
7179
7180 public:
7183
7186
7189
7192
7194 {
7195 clear();
7196 }
7197
7198 void clear()
7199 {
7200 rtpPayloadType = -1;
7201 samplingRate = -1;
7202 channels = -1;
7203 rtpTsMultiplier = 0;
7204 }
7205 };
7206
7207 static void to_json(nlohmann::json& j, const ExternalCodecDescriptor& p)
7208 {
7209 j = nlohmann::json{
7210 TOJSON_IMPL(rtpPayloadType),
7211 TOJSON_IMPL(samplingRate),
7212 TOJSON_IMPL(channels),
7213 TOJSON_IMPL(rtpTsMultiplier)
7214 };
7215 }
7216 static void from_json(const nlohmann::json& j, ExternalCodecDescriptor& p)
7217 {
7218 p.clear();
7219
7220 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
7221 getOptional<int>("samplingRate", p.samplingRate, j, -1);
7222 getOptional<int>("channels", p.channels, j, -1);
7223 getOptional<int>("rtpTsMultiplier", p.rtpTsMultiplier, j, -1);
7224 }
7225
7226 //-----------------------------------------------------------
7227 JSON_SERIALIZED_CLASS(EngineStatusReportConfiguration)
7238 {
7239 IMPLEMENT_JSON_SERIALIZATION()
7240 IMPLEMENT_JSON_DOCUMENTATION(EngineStatusReportConfiguration)
7241
7242 public:
7244 std::string fileName;
7245
7248
7251
7253 std::string runCmd;
7254
7257
7260
7262 {
7263 clear();
7264 }
7265
7266 void clear()
7267 {
7268 fileName.clear();
7269 intervalSecs = 60;
7270 enabled = false;
7271 includeMemoryDetail = false;
7272 includeTaskQueueDetail = false;
7273 runCmd.clear();
7274 }
7275 };
7276
7277 static void to_json(nlohmann::json& j, const EngineStatusReportConfiguration& p)
7278 {
7279 j = nlohmann::json{
7280 TOJSON_IMPL(fileName),
7281 TOJSON_IMPL(intervalSecs),
7282 TOJSON_IMPL(enabled),
7283 TOJSON_IMPL(includeMemoryDetail),
7284 TOJSON_IMPL(includeTaskQueueDetail),
7285 TOJSON_IMPL(runCmd)
7286 };
7287 }
7288 static void from_json(const nlohmann::json& j, EngineStatusReportConfiguration& p)
7289 {
7290 p.clear();
7291 getOptional<std::string>("fileName", p.fileName, j);
7292 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
7293 getOptional<bool>("enabled", p.enabled, j, false);
7294 getOptional<std::string>("runCmd", p.runCmd, j);
7295 getOptional<bool>("includeMemoryDetail", p.includeMemoryDetail, j, false);
7296 getOptional<bool>("includeTaskQueueDetail", p.includeTaskQueueDetail, j, false);
7297 }
7298
7299 //-----------------------------------------------------------
7300 JSON_SERIALIZED_CLASS(EnginePolicy)
7313 {
7314 IMPLEMENT_JSON_SERIALIZATION()
7315 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicy)
7316
7317 public:
7318
7320 std::string dataDirectory;
7321
7324
7327
7330
7333
7336
7339
7342
7345
7348
7351
7354
7356 std::vector<ExternalModule> externalCodecs;
7357
7359 std::vector<RtpMapEntry> rtpMap;
7360
7363
7364 EnginePolicy()
7365 {
7366 clear();
7367 }
7368
7369 void clear()
7370 {
7371 dataDirectory.clear();
7372 licensing.clear();
7373 security.clear();
7374 networking.clear();
7375 audio.clear();
7376 discovery.clear();
7377 logging.clear();
7378 internals.clear();
7379 timelines.clear();
7380 database.clear();
7381 featureset.clear();
7382 namedAudioDevices.clear();
7383 externalCodecs.clear();
7384 rtpMap.clear();
7385 statusReport.clear();
7386 }
7387 };
7388
7389 static void to_json(nlohmann::json& j, const EnginePolicy& p)
7390 {
7391 j = nlohmann::json{
7392 TOJSON_IMPL(dataDirectory),
7393 TOJSON_IMPL(licensing),
7394 TOJSON_IMPL(security),
7395 TOJSON_IMPL(networking),
7396 TOJSON_IMPL(audio),
7397 TOJSON_IMPL(discovery),
7398 TOJSON_IMPL(logging),
7399 TOJSON_IMPL(internals),
7400 TOJSON_IMPL(timelines),
7401 TOJSON_IMPL(database),
7402 TOJSON_IMPL(featureset),
7403 TOJSON_IMPL(namedAudioDevices),
7404 TOJSON_IMPL(externalCodecs),
7405 TOJSON_IMPL(rtpMap),
7406 TOJSON_IMPL(statusReport)
7407 };
7408 }
7409 static void from_json(const nlohmann::json& j, EnginePolicy& p)
7410 {
7411 p.clear();
7412 FROMJSON_IMPL_SIMPLE(dataDirectory);
7413 FROMJSON_IMPL_SIMPLE(licensing);
7414 FROMJSON_IMPL_SIMPLE(security);
7415 FROMJSON_IMPL_SIMPLE(networking);
7416 FROMJSON_IMPL_SIMPLE(audio);
7417 FROMJSON_IMPL_SIMPLE(discovery);
7418 FROMJSON_IMPL_SIMPLE(logging);
7419 FROMJSON_IMPL_SIMPLE(internals);
7420 FROMJSON_IMPL_SIMPLE(timelines);
7421 FROMJSON_IMPL_SIMPLE(database);
7422 FROMJSON_IMPL_SIMPLE(featureset);
7423 FROMJSON_IMPL_SIMPLE(namedAudioDevices);
7424 FROMJSON_IMPL_SIMPLE(externalCodecs);
7425 FROMJSON_IMPL_SIMPLE(rtpMap);
7426 FROMJSON_IMPL_SIMPLE(statusReport);
7427 }
7428
7429
7430 //-----------------------------------------------------------
7431 JSON_SERIALIZED_CLASS(TalkgroupAsset)
7442 {
7443 IMPLEMENT_JSON_SERIALIZATION()
7444 IMPLEMENT_JSON_DOCUMENTATION(TalkgroupAsset)
7445
7446 public:
7447
7449 std::string nodeId;
7450
7453
7455 {
7456 clear();
7457 }
7458
7459 void clear()
7460 {
7461 nodeId.clear();
7462 group.clear();
7463 }
7464 };
7465
7466 static void to_json(nlohmann::json& j, const TalkgroupAsset& p)
7467 {
7468 j = nlohmann::json{
7469 TOJSON_IMPL(nodeId),
7470 TOJSON_IMPL(group)
7471 };
7472 }
7473 static void from_json(const nlohmann::json& j, TalkgroupAsset& p)
7474 {
7475 p.clear();
7476 getOptional<std::string>("nodeId", p.nodeId, j);
7477 getOptional<Group>("group", p.group, j);
7478 }
7479
7480 //-----------------------------------------------------------
7481 JSON_SERIALIZED_CLASS(EngageDiscoveredGroup)
7490 {
7491 IMPLEMENT_JSON_SERIALIZATION()
7492 IMPLEMENT_JSON_DOCUMENTATION(EngageDiscoveredGroup)
7493
7494 public:
7496 std::string id;
7497
7499 int type;
7500
7503
7506
7508 {
7509 clear();
7510 }
7511
7512 void clear()
7513 {
7514 id.clear();
7515 type = 0;
7516 rx.clear();
7517 tx.clear();
7518 }
7519 };
7520
7521 static void to_json(nlohmann::json& j, const EngageDiscoveredGroup& p)
7522 {
7523 j = nlohmann::json{
7524 TOJSON_IMPL(id),
7525 TOJSON_IMPL(type),
7526 TOJSON_IMPL(rx),
7527 TOJSON_IMPL(tx)
7528 };
7529 }
7530 static void from_json(const nlohmann::json& j, EngageDiscoveredGroup& p)
7531 {
7532 p.clear();
7533 getOptional<std::string>("id", p.id, j);
7534 getOptional<int>("type", p.type, j, 0);
7535 getOptional<NetworkAddress>("rx", p.rx, j);
7536 getOptional<NetworkAddress>("tx", p.tx, j);
7537 }
7538
7539 //-----------------------------------------------------------
7540 JSON_SERIALIZED_CLASS(RallypointPeer)
7551 {
7552 IMPLEMENT_JSON_SERIALIZATION()
7553 IMPLEMENT_JSON_DOCUMENTATION(RallypointPeer)
7554
7555 public:
7557 std::string id;
7558
7561
7564
7567
7570
7573
7575 {
7576 clear();
7577 }
7578
7579 void clear()
7580 {
7581 id.clear();
7582 enabled = true;
7583 host.clear();
7584 certificate.clear();
7585 connectionTimeoutSecs = 0;
7586 forceIsMeshLeaf = false;
7587 }
7588 };
7589
7590 static void to_json(nlohmann::json& j, const RallypointPeer& p)
7591 {
7592 j = nlohmann::json{
7593 TOJSON_IMPL(id),
7594 TOJSON_IMPL(enabled),
7595 TOJSON_IMPL(host),
7596 TOJSON_IMPL(certificate),
7597 TOJSON_IMPL(connectionTimeoutSecs),
7598 TOJSON_IMPL(forceIsMeshLeaf)
7599 };
7600 }
7601 static void from_json(const nlohmann::json& j, RallypointPeer& p)
7602 {
7603 p.clear();
7604 j.at("id").get_to(p.id);
7605 getOptional<bool>("enabled", p.enabled, j, true);
7606 getOptional<NetworkAddress>("host", p.host, j);
7607 getOptional<SecurityCertificate>("certificate", p.certificate, j);
7608 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
7609 getOptional<bool>("forceIsMeshLeaf", p.forceIsMeshLeaf, j, false);
7610 }
7611
7612 //-----------------------------------------------------------
7613 JSON_SERIALIZED_CLASS(RallypointServerLimits)
7624 {
7625 IMPLEMENT_JSON_SERIALIZATION()
7626 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLimits)
7627
7628 public:
7630 uint32_t maxClients;
7631
7633 uint32_t maxPeers;
7634
7637
7640
7643
7646
7649
7652
7655
7658
7661
7664
7667
7670
7673
7675 {
7676 clear();
7677 }
7678
7679 void clear()
7680 {
7681 maxClients = 0;
7682 maxPeers = 0;
7683 maxMulticastReflectors = 0;
7684 maxRegisteredStreams = 0;
7685 maxStreamPaths = 0;
7686 maxRxPacketsPerSec = 0;
7687 maxTxPacketsPerSec = 0;
7688 maxRxBytesPerSec = 0;
7689 maxTxBytesPerSec = 0;
7690 maxQOpsPerSec = 0;
7691 maxInboundBacklog = 64;
7692 lowPriorityQueueThreshold = 64;
7693 normalPriorityQueueThreshold = 256;
7694 denyNewConnectionCpuThreshold = 75;
7695 warnAtCpuThreshold = 65;
7696 }
7697 };
7698
7699 static void to_json(nlohmann::json& j, const RallypointServerLimits& p)
7700 {
7701 j = nlohmann::json{
7702 TOJSON_IMPL(maxClients),
7703 TOJSON_IMPL(maxPeers),
7704 TOJSON_IMPL(maxMulticastReflectors),
7705 TOJSON_IMPL(maxRegisteredStreams),
7706 TOJSON_IMPL(maxStreamPaths),
7707 TOJSON_IMPL(maxRxPacketsPerSec),
7708 TOJSON_IMPL(maxTxPacketsPerSec),
7709 TOJSON_IMPL(maxRxBytesPerSec),
7710 TOJSON_IMPL(maxTxBytesPerSec),
7711 TOJSON_IMPL(maxQOpsPerSec),
7712 TOJSON_IMPL(maxInboundBacklog),
7713 TOJSON_IMPL(lowPriorityQueueThreshold),
7714 TOJSON_IMPL(normalPriorityQueueThreshold),
7715 TOJSON_IMPL(denyNewConnectionCpuThreshold),
7716 TOJSON_IMPL(warnAtCpuThreshold)
7717 };
7718 }
7719 static void from_json(const nlohmann::json& j, RallypointServerLimits& p)
7720 {
7721 p.clear();
7722 getOptional<uint32_t>("maxClients", p.maxClients, j, 0);
7723 getOptional<uint32_t>("maxPeers", p.maxPeers, j, 0);
7724 getOptional<uint32_t>("maxMulticastReflectors", p.maxMulticastReflectors, j, 0);
7725 getOptional<uint32_t>("maxRegisteredStreams", p.maxRegisteredStreams, j, 0);
7726 getOptional<uint32_t>("maxStreamPaths", p.maxStreamPaths, j, 0);
7727 getOptional<uint32_t>("maxRxPacketsPerSec", p.maxRxPacketsPerSec, j, 0);
7728 getOptional<uint32_t>("maxTxPacketsPerSec", p.maxTxPacketsPerSec, j, 0);
7729 getOptional<uint32_t>("maxRxBytesPerSec", p.maxRxBytesPerSec, j, 0);
7730 getOptional<uint32_t>("maxTxBytesPerSec", p.maxTxBytesPerSec, j, 0);
7731 getOptional<uint32_t>("maxQOpsPerSec", p.maxQOpsPerSec, j, 0);
7732 getOptional<uint32_t>("maxInboundBacklog", p.maxInboundBacklog, j, 64);
7733 getOptional<uint32_t>("lowPriorityQueueThreshold", p.lowPriorityQueueThreshold, j, 64);
7734 getOptional<uint32_t>("normalPriorityQueueThreshold", p.normalPriorityQueueThreshold, j, 256);
7735 getOptional<uint32_t>("denyNewConnectionCpuThreshold", p.denyNewConnectionCpuThreshold, j, 75);
7736 getOptional<uint32_t>("warnAtCpuThreshold", p.warnAtCpuThreshold, j, 65);
7737 }
7738
7739 //-----------------------------------------------------------
7740 JSON_SERIALIZED_CLASS(RallypointServerStatusReportConfiguration)
7751 {
7752 IMPLEMENT_JSON_SERIALIZATION()
7753 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerStatusReportConfiguration)
7754
7755 public:
7757 std::string fileName;
7758
7761
7764
7767
7770
7773
7775 std::string runCmd;
7776
7778 {
7779 clear();
7780 }
7781
7782 void clear()
7783 {
7784 fileName.clear();
7785 intervalSecs = 60;
7786 enabled = false;
7787 includeLinks = false;
7788 includePeerLinkDetails = false;
7789 includeClientLinkDetails = false;
7790 runCmd.clear();
7791 }
7792 };
7793
7794 static void to_json(nlohmann::json& j, const RallypointServerStatusReportConfiguration& p)
7795 {
7796 j = nlohmann::json{
7797 TOJSON_IMPL(fileName),
7798 TOJSON_IMPL(intervalSecs),
7799 TOJSON_IMPL(enabled),
7800 TOJSON_IMPL(includeLinks),
7801 TOJSON_IMPL(includePeerLinkDetails),
7802 TOJSON_IMPL(includeClientLinkDetails),
7803 TOJSON_IMPL(runCmd)
7804 };
7805 }
7806 static void from_json(const nlohmann::json& j, RallypointServerStatusReportConfiguration& p)
7807 {
7808 p.clear();
7809 getOptional<std::string>("fileName", p.fileName, j);
7810 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
7811 getOptional<bool>("enabled", p.enabled, j, false);
7812 getOptional<bool>("includeLinks", p.includeLinks, j, false);
7813 getOptional<bool>("includePeerLinkDetails", p.includePeerLinkDetails, j, false);
7814 getOptional<bool>("includeClientLinkDetails", p.includeClientLinkDetails, j, false);
7815 getOptional<std::string>("runCmd", p.runCmd, j);
7816 }
7817
7818 //-----------------------------------------------------------
7819 JSON_SERIALIZED_CLASS(RallypointServerLinkGraph)
7821 {
7822 IMPLEMENT_JSON_SERIALIZATION()
7823 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLinkGraph)
7824
7825 public:
7827 std::string fileName;
7828
7831
7834
7837
7842
7844 std::string coreRpStyling;
7845
7847 std::string leafRpStyling;
7848
7850 std::string clientStyling;
7851
7853 std::string runCmd;
7854
7856 {
7857 clear();
7858 }
7859
7860 void clear()
7861 {
7862 fileName.clear();
7863 minRefreshSecs = 5;
7864 enabled = false;
7865 includeDigraphEnclosure = true;
7866 includeClients = false;
7867 coreRpStyling = "[shape=hexagon color=firebrick style=filled]";
7868 leafRpStyling = "[shape=box color=gray style=filled]";
7869 clientStyling.clear();
7870 runCmd.clear();
7871 }
7872 };
7873
7874 static void to_json(nlohmann::json& j, const RallypointServerLinkGraph& p)
7875 {
7876 j = nlohmann::json{
7877 TOJSON_IMPL(fileName),
7878 TOJSON_IMPL(minRefreshSecs),
7879 TOJSON_IMPL(enabled),
7880 TOJSON_IMPL(includeDigraphEnclosure),
7881 TOJSON_IMPL(includeClients),
7882 TOJSON_IMPL(coreRpStyling),
7883 TOJSON_IMPL(leafRpStyling),
7884 TOJSON_IMPL(clientStyling),
7885 TOJSON_IMPL(runCmd)
7886 };
7887 }
7888 static void from_json(const nlohmann::json& j, RallypointServerLinkGraph& p)
7889 {
7890 p.clear();
7891 getOptional<std::string>("fileName", p.fileName, j);
7892 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
7893 getOptional<bool>("enabled", p.enabled, j, false);
7894 getOptional<bool>("includeDigraphEnclosure", p.includeDigraphEnclosure, j, true);
7895 getOptional<bool>("includeClients", p.includeClients, j, false);
7896 getOptional<std::string>("coreRpStyling", p.coreRpStyling, j, "[shape=hexagon color=firebrick style=filled]");
7897 getOptional<std::string>("leafRpStyling", p.leafRpStyling, j, "[shape=box color=gray style=filled]");
7898 getOptional<std::string>("clientStyling", p.clientStyling, j);
7899 getOptional<std::string>("runCmd", p.runCmd, j);
7900 }
7901
7902
7903 //-----------------------------------------------------------
7904 JSON_SERIALIZED_CLASS(RallypointServerRouteMap)
7906 {
7907 IMPLEMENT_JSON_SERIALIZATION()
7908 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerRouteMap)
7909
7910 public:
7912 std::string fileName;
7913
7916
7919
7921 std::string runCmd;
7922
7924 {
7925 clear();
7926 }
7927
7928 void clear()
7929 {
7930 fileName.clear();
7931 minRefreshSecs = 5;
7932 enabled = false;
7933 }
7934 };
7935
7936 static void to_json(nlohmann::json& j, const RallypointServerRouteMap& p)
7937 {
7938 j = nlohmann::json{
7939 TOJSON_IMPL(fileName),
7940 TOJSON_IMPL(minRefreshSecs),
7941 TOJSON_IMPL(enabled),
7942 TOJSON_IMPL(runCmd)
7943 };
7944 }
7945 static void from_json(const nlohmann::json& j, RallypointServerRouteMap& p)
7946 {
7947 p.clear();
7948 getOptional<std::string>("fileName", p.fileName, j);
7949 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
7950 getOptional<bool>("enabled", p.enabled, j, false);
7951 getOptional<std::string>("runCmd", p.runCmd, j);
7952 }
7953
7954
7955 //-----------------------------------------------------------
7956 JSON_SERIALIZED_CLASS(ExternalHealthCheckResponder)
7967 {
7968 IMPLEMENT_JSON_SERIALIZATION()
7969 IMPLEMENT_JSON_DOCUMENTATION(ExternalHealthCheckResponder)
7970
7971 public:
7972
7975
7978
7980 {
7981 clear();
7982 }
7983
7984 void clear()
7985 {
7986 listenPort = 0;
7987 immediateClose = true;
7988 }
7989 };
7990
7991 static void to_json(nlohmann::json& j, const ExternalHealthCheckResponder& p)
7992 {
7993 j = nlohmann::json{
7994 TOJSON_IMPL(listenPort),
7995 TOJSON_IMPL(immediateClose)
7996 };
7997 }
7998 static void from_json(const nlohmann::json& j, ExternalHealthCheckResponder& p)
7999 {
8000 p.clear();
8001 getOptional<int>("listenPort", p.listenPort, j, 0);
8002 getOptional<bool>("immediateClose", p.immediateClose, j, true);
8003 }
8004
8005
8006 //-----------------------------------------------------------
8007 JSON_SERIALIZED_CLASS(PeeringConfiguration)
8016 {
8017 IMPLEMENT_JSON_SERIALIZATION()
8018 IMPLEMENT_JSON_DOCUMENTATION(PeeringConfiguration)
8019
8020 public:
8021
8023 std::string id;
8024
8027
8029 std::string comments;
8030
8032 std::vector<RallypointPeer> peers;
8033
8035 {
8036 clear();
8037 }
8038
8039 void clear()
8040 {
8041 id.clear();
8042 version = 0;
8043 comments.clear();
8044 }
8045 };
8046
8047 static void to_json(nlohmann::json& j, const PeeringConfiguration& p)
8048 {
8049 j = nlohmann::json{
8050 TOJSON_IMPL(id),
8051 TOJSON_IMPL(version),
8052 TOJSON_IMPL(comments),
8053 TOJSON_IMPL(peers)
8054 };
8055 }
8056 static void from_json(const nlohmann::json& j, PeeringConfiguration& p)
8057 {
8058 p.clear();
8059 getOptional<std::string>("id", p.id, j);
8060 getOptional<int>("version", p.version, j, 0);
8061 getOptional<std::string>("comments", p.comments, j);
8062 getOptional<std::vector<RallypointPeer>>("peers", p.peers, j);
8063 }
8064
8065 //-----------------------------------------------------------
8066 JSON_SERIALIZED_CLASS(IgmpSnooping)
8075 {
8076 IMPLEMENT_JSON_SERIALIZATION()
8077 IMPLEMENT_JSON_DOCUMENTATION(IgmpSnooping)
8078
8079 public:
8080
8083
8086
8089
8092
8093 IgmpSnooping()
8094 {
8095 clear();
8096 }
8097
8098 void clear()
8099 {
8100 enabled = false;
8101 queryIntervalMs = 60000;
8102 lastMemberQueryIntervalMs = 1000;
8103 lastMemberQueryCount = 1;
8104 }
8105 };
8106
8107 static void to_json(nlohmann::json& j, const IgmpSnooping& p)
8108 {
8109 j = nlohmann::json{
8110 TOJSON_IMPL(enabled),
8111 TOJSON_IMPL(queryIntervalMs),
8112 TOJSON_IMPL(lastMemberQueryIntervalMs),
8113 TOJSON_IMPL(lastMemberQueryCount)
8114 };
8115 }
8116 static void from_json(const nlohmann::json& j, IgmpSnooping& p)
8117 {
8118 p.clear();
8119 getOptional<bool>("enabled", p.enabled, j);
8120 getOptional<int>("queryIntervalMs", p.queryIntervalMs, j, 60000);
8121 getOptional<int>("lastMemberQueryIntervalMs", p.lastMemberQueryIntervalMs, j, 1000);
8122 getOptional<int>("lastMemberQueryCount", p.lastMemberQueryCount, j, 1);
8123 }
8124
8125
8126 //-----------------------------------------------------------
8127 JSON_SERIALIZED_CLASS(RallypointReflector)
8135 {
8136 IMPLEMENT_JSON_SERIALIZATION()
8137 IMPLEMENT_JSON_DOCUMENTATION(RallypointReflector)
8138
8139 public:
8141 typedef enum
8142 {
8144 drNone = 0,
8145
8147 drRxOnly = 1,
8148
8150 drTxOnly = 2
8151 } DirectionRestriction_t;
8152
8156 std::string id;
8157
8160
8163
8166
8168 std::vector<NetworkAddress> additionalTx;
8169
8172
8174 {
8175 clear();
8176 }
8177
8178 void clear()
8179 {
8180 id.clear();
8181 rx.clear();
8182 tx.clear();
8183 multicastInterfaceName.clear();
8184 additionalTx.clear();
8185 directionRestriction = drNone;
8186 }
8187 };
8188
8189 static void to_json(nlohmann::json& j, const RallypointReflector& p)
8190 {
8191 j = nlohmann::json{
8192 TOJSON_IMPL(id),
8193 TOJSON_IMPL(rx),
8194 TOJSON_IMPL(tx),
8195 TOJSON_IMPL(multicastInterfaceName),
8196 TOJSON_IMPL(additionalTx),
8197 TOJSON_IMPL(directionRestriction)
8198 };
8199 }
8200 static void from_json(const nlohmann::json& j, RallypointReflector& p)
8201 {
8202 p.clear();
8203 j.at("id").get_to(p.id);
8204 j.at("rx").get_to(p.rx);
8205 j.at("tx").get_to(p.tx);
8206 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
8207 getOptional<std::vector<NetworkAddress>>("additionalTx", p.additionalTx, j);
8208 getOptional<RallypointReflector::DirectionRestriction_t>("directionRestriction", p.directionRestriction, j, RallypointReflector::DirectionRestriction_t::drNone);
8209 }
8210
8211
8212 //-----------------------------------------------------------
8213 JSON_SERIALIZED_CLASS(RallypointUdpStreamingIpvX)
8221 {
8222 IMPLEMENT_JSON_SERIALIZATION()
8223 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreamingIpvX)
8224
8225 public:
8228
8231
8233 {
8234 clear();
8235 }
8236
8237 void clear()
8238 {
8239 enabled = true;
8240 external.clear();
8241 }
8242 };
8243
8244 static void to_json(nlohmann::json& j, const RallypointUdpStreamingIpvX& p)
8245 {
8246 j = nlohmann::json{
8247 TOJSON_IMPL(enabled),
8248 TOJSON_IMPL(external)
8249 };
8250 }
8251 static void from_json(const nlohmann::json& j, RallypointUdpStreamingIpvX& p)
8252 {
8253 p.clear();
8254 getOptional<bool>("enabled", p.enabled, j, true);
8255 getOptional<NetworkAddress>("external", p.external, j);
8256 }
8257
8258 //-----------------------------------------------------------
8259 JSON_SERIALIZED_CLASS(RallypointUdpStreaming)
8267 {
8268 IMPLEMENT_JSON_SERIALIZATION()
8269 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreaming)
8270
8271 public:
8273 typedef enum
8274 {
8276 ctUnknown = 0,
8277
8279 ctSharedKeyAes256FullIv = 1,
8280
8282 ctSharedKeyAes256IdxIv = 2,
8283
8285 ctSharedKeyChaCha20FullIv = 3,
8286
8288 ctSharedKeyChaCha20IdxIv = 4
8289 } CryptoType_t;
8290
8293
8296
8299
8302
8305
8308
8311
8313 int ttl;
8314
8315
8317 {
8318 clear();
8319 }
8320
8321 void clear()
8322 {
8323 enabled = true;
8324 cryptoType = CryptoType_t::ctSharedKeyAes256FullIv;
8325 listenPort = 7444;
8326 ipv4.clear();
8327 ipv6.clear();
8328 keepaliveIntervalSecs = 15;
8329 priority = TxPriority_t::priVoice;
8330 ttl = 64;
8331 }
8332 };
8333
8334 static void to_json(nlohmann::json& j, const RallypointUdpStreaming& p)
8335 {
8336 j = nlohmann::json{
8337 TOJSON_IMPL(enabled),
8338 TOJSON_IMPL(cryptoType),
8339 TOJSON_IMPL(listenPort),
8340 TOJSON_IMPL(keepaliveIntervalSecs),
8341 TOJSON_IMPL(ipv4),
8342 TOJSON_IMPL(ipv6),
8343 TOJSON_IMPL(priority),
8344 TOJSON_IMPL(ttl)
8345 };
8346 }
8347 static void from_json(const nlohmann::json& j, RallypointUdpStreaming& p)
8348 {
8349 p.clear();
8350 getOptional<bool>("enabled", p.enabled, j, true);
8351 getOptional<RallypointUdpStreaming::CryptoType_t>("cryptoType", p.cryptoType, j, RallypointUdpStreaming::CryptoType_t::ctSharedKeyAes256FullIv);
8352 getOptional<int>("listenPort", p.listenPort, j, 7444);
8353 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
8354 getOptional<RallypointUdpStreamingIpvX>("ipv4", p.ipv4, j);
8355 getOptional<RallypointUdpStreamingIpvX>("ipv6", p.ipv6, j);
8356 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
8357 getOptional<int>("ttl", p.ttl, j, 64);
8358 }
8359
8360 //-----------------------------------------------------------
8361 JSON_SERIALIZED_CLASS(RallypointRpRtTimingBehavior)
8369 {
8370 IMPLEMENT_JSON_SERIALIZATION()
8371 IMPLEMENT_JSON_DOCUMENTATION(RallypointRpRtTimingBehavior)
8372
8373 public:
8375 typedef enum
8376 {
8379
8382
8385
8388
8390 btDrop = 99
8391 } BehaviorType_t;
8392
8395
8397 uint32_t atOrAboveMs;
8398
8400 std::string runCmd;
8401
8403 {
8404 clear();
8405 }
8406
8407 void clear()
8408 {
8409 behavior = btNone;
8410 atOrAboveMs = 0;
8411 runCmd.clear();
8412 }
8413 };
8414
8415 static void to_json(nlohmann::json& j, const RallypointRpRtTimingBehavior& p)
8416 {
8417 j = nlohmann::json{
8418 TOJSON_IMPL(behavior),
8419 TOJSON_IMPL(atOrAboveMs),
8420 TOJSON_IMPL(runCmd)
8421 };
8422 }
8423 static void from_json(const nlohmann::json& j, RallypointRpRtTimingBehavior& p)
8424 {
8425 p.clear();
8426 getOptional<RallypointRpRtTimingBehavior::BehaviorType_t>("behavior", p.behavior, j, RallypointRpRtTimingBehavior::BehaviorType_t::btNone);
8427 getOptional<uint32_t>("atOrAboveMs", p.atOrAboveMs, j, 0);
8428 getOptional<std::string>("runCmd", p.runCmd, j);
8429 }
8430
8431
8432 //-----------------------------------------------------------
8433 JSON_SERIALIZED_CLASS(RallypointWebsocketSettings)
8441 {
8442 IMPLEMENT_JSON_SERIALIZATION()
8443 IMPLEMENT_JSON_DOCUMENTATION(RallypointWebsocketSettings)
8444
8445 public:
8448
8451
8454
8456 {
8457 clear();
8458 }
8459
8460 void clear()
8461 {
8462 enabled = false;
8463 listenPort = 8443;
8464 certificate.clear();
8465 }
8466 };
8467
8468 static void to_json(nlohmann::json& j, const RallypointWebsocketSettings& p)
8469 {
8470 j = nlohmann::json{
8471 TOJSON_IMPL(enabled),
8472 TOJSON_IMPL(listenPort),
8473 TOJSON_IMPL(certificate)
8474 };
8475 }
8476 static void from_json(const nlohmann::json& j, RallypointWebsocketSettings& p)
8477 {
8478 p.clear();
8479 getOptional<bool>("enabled", p.enabled, j, false);
8480 getOptional<int>("listenPort", p.listenPort, j, 8443);
8481 getOptional<SecurityCertificate>("certificate", p.certificate, j);
8482 }
8483
8484
8485
8486 //-----------------------------------------------------------
8487 JSON_SERIALIZED_CLASS(RallypointAdvertisingSettings)
8495 {
8496 IMPLEMENT_JSON_SERIALIZATION()
8497 IMPLEMENT_JSON_DOCUMENTATION(RallypointAdvertisingSettings)
8498
8499 public:
8502
8504 std::string hostName;
8505
8507 std::string serviceName;
8508
8510 std::string interfaceName;
8511
8513 int port;
8514
8516 int ttl;
8517
8519 {
8520 clear();
8521 }
8522
8523 void clear()
8524 {
8525 enabled = false;
8526 hostName.clear();
8527 serviceName = "_rallypoint._tcp.local.";
8528 interfaceName.clear();
8529 port = 0;
8530 ttl = 60;
8531 }
8532 };
8533
8534 static void to_json(nlohmann::json& j, const RallypointAdvertisingSettings& p)
8535 {
8536 j = nlohmann::json{
8537 TOJSON_IMPL(enabled),
8538 TOJSON_IMPL(hostName),
8539 TOJSON_IMPL(serviceName),
8540 TOJSON_IMPL(interfaceName),
8541 TOJSON_IMPL(port),
8542 TOJSON_IMPL(ttl)
8543 };
8544 }
8545 static void from_json(const nlohmann::json& j, RallypointAdvertisingSettings& p)
8546 {
8547 p.clear();
8548 getOptional<bool>("enabled", p.enabled, j, false);
8549 getOptional<std::string>("hostName", p.hostName, j);
8550 getOptional<std::string>("serviceName", p.serviceName, j, "_rallypoint._tcp.local.");
8551 getOptional<std::string>("interfaceName", p.interfaceName, j);
8552
8553 getOptional<int>("port", p.port, j, 0);
8554 getOptional<int>("ttl", p.ttl, j, 60);
8555 }
8556
8557
8558 //-----------------------------------------------------------
8559 JSON_SERIALIZED_CLASS(RallypointExtendedGroupRestriction)
8567 {
8568 IMPLEMENT_JSON_SERIALIZATION()
8569 IMPLEMENT_JSON_DOCUMENTATION(RallypointExtendedGroupRestriction)
8570
8571 public:
8573 std::string id;
8574
8576 std::vector<StringRestrictionList> restrictions;
8577
8579 {
8580 clear();
8581 }
8582
8583 void clear()
8584 {
8585 id.clear();
8586 restrictions.clear();
8587 }
8588 };
8589
8590 static void to_json(nlohmann::json& j, const RallypointExtendedGroupRestriction& p)
8591 {
8592 j = nlohmann::json{
8593 TOJSON_IMPL(id),
8594 TOJSON_IMPL(restrictions)
8595 };
8596 }
8597 static void from_json(const nlohmann::json& j, RallypointExtendedGroupRestriction& p)
8598 {
8599 p.clear();
8600 getOptional<std::string>("id", p.id, j);
8601 getOptional<std::vector<StringRestrictionList>>("restrictions", p.restrictions, j);
8602 }
8603
8604
8605 //-----------------------------------------------------------
8606 JSON_SERIALIZED_CLASS(RallypointServer)
8616 {
8617 IMPLEMENT_JSON_SERIALIZATION()
8618 IMPLEMENT_JSON_DOCUMENTATION(RallypointServer)
8619
8620 public:
8623
8626
8628 std::string id;
8629
8632
8635
8637 std::string interfaceName;
8638
8641
8644
8647
8650
8653
8656
8659
8662
8665
8668
8671
8674
8677
8680
8683
8686
8688 PeeringConfiguration peeringConfiguration; // NOTE: This is NOT serialized
8689
8692
8695
8698
8701
8703 std::vector<RallypointReflector> staticReflectors;
8704
8707
8710
8713
8716
8719
8722
8724 std::vector<RallypointExtendedGroupRestriction> extendedGroupRestrictions;
8725
8728
8731
8734
8737
8739 uint32_t sysFlags;
8740
8743
8746
8749
8752
8755
8758
8761
8763 std::vector<RallypointRpRtTimingBehavior> peerRtBehaviors;
8764
8767
8770
8773
8776
8779
8781 std::string meshName;
8782
8784 std::vector<std::string> extraMeshes;
8785
8788
8790 {
8791 clear();
8792 }
8793
8794 void clear()
8795 {
8796 fipsCrypto.clear();
8797 watchdog.clear();
8798 id.clear();
8799 listenPort = 7443;
8800 interfaceName.clear();
8801 certificate.clear();
8802 allowMulticastForwarding = false;
8803 peeringConfiguration.clear();
8804 peeringConfigurationFileName.clear();
8805 peeringConfigurationFileCommand.clear();
8806 peeringConfigurationFileCheckSecs = 60;
8807 ioPools = -1;
8808 statusReport.clear();
8809 limits.clear();
8810 linkGraph.clear();
8811 externalHealthCheckResponder.clear();
8812 allowPeerForwarding = false;
8813 multicastInterfaceName.clear();
8814 tls.clear();
8815 discovery.clear();
8816 forwardDiscoveredGroups = false;
8817 forwardMulticastAddressing = false;
8818 isMeshLeaf = false;
8819 disableMessageSigning = false;
8820 multicastRestrictions.clear();
8821 igmpSnooping.clear();
8822 staticReflectors.clear();
8823 tcpTxOptions.clear();
8824 multicastTxOptions.clear();
8825 certStoreFileName.clear();
8826 certStorePasswordHex.clear();
8827 groupRestrictions.clear();
8828 configurationCheckSignalName = "rts.7b392d1.${id}";
8829 licensing.clear();
8830 featureset.clear();
8831 udpStreaming.clear();
8832 sysFlags = 0;
8833 normalTaskQueueBias = 0;
8834 enableLeafReflectionReverseSubscription = false;
8835 disableLoopDetection = false;
8836 maxSecurityLevel = 0;
8837 routeMap.clear();
8838 maxOutboundPeerConnectionIntervalDeltaSecs = 15;
8839 peerRtTestIntervalMs = 60000;
8840 peerRtBehaviors.clear();
8841 websocket.clear();
8842 nsm.clear();
8843 advertising.clear();
8844 extendedGroupRestrictions.clear();
8845 groupRestrictionAccessPolicyType = GroupRestrictionAccessPolicyType_t::graptPermissive;
8846 ipFamily = IpFamilyType_t::ifIpUnspec;
8847 rxCapture.clear();
8848 txCapture.clear();
8849 meshName.clear();
8850 extraMeshes.clear();
8851 tuning.clear();
8852 }
8853 };
8854
8855 static void to_json(nlohmann::json& j, const RallypointServer& p)
8856 {
8857 j = nlohmann::json{
8858 TOJSON_IMPL(fipsCrypto),
8859 TOJSON_IMPL(watchdog),
8860 TOJSON_IMPL(id),
8861 TOJSON_IMPL(listenPort),
8862 TOJSON_IMPL(interfaceName),
8863 TOJSON_IMPL(certificate),
8864 TOJSON_IMPL(allowMulticastForwarding),
8865 // TOJSON_IMPL(peeringConfiguration), // NOTE: Not serialized!
8866 TOJSON_IMPL(peeringConfigurationFileName),
8867 TOJSON_IMPL(peeringConfigurationFileCommand),
8868 TOJSON_IMPL(peeringConfigurationFileCheckSecs),
8869 TOJSON_IMPL(ioPools),
8870 TOJSON_IMPL(statusReport),
8871 TOJSON_IMPL(limits),
8872 TOJSON_IMPL(linkGraph),
8873 TOJSON_IMPL(externalHealthCheckResponder),
8874 TOJSON_IMPL(allowPeerForwarding),
8875 TOJSON_IMPL(multicastInterfaceName),
8876 TOJSON_IMPL(tls),
8877 TOJSON_IMPL(discovery),
8878 TOJSON_IMPL(forwardDiscoveredGroups),
8879 TOJSON_IMPL(forwardMulticastAddressing),
8880 TOJSON_IMPL(isMeshLeaf),
8881 TOJSON_IMPL(disableMessageSigning),
8882 TOJSON_IMPL(multicastRestrictions),
8883 TOJSON_IMPL(igmpSnooping),
8884 TOJSON_IMPL(staticReflectors),
8885 TOJSON_IMPL(tcpTxOptions),
8886 TOJSON_IMPL(multicastTxOptions),
8887 TOJSON_IMPL(certStoreFileName),
8888 TOJSON_IMPL(certStorePasswordHex),
8889 TOJSON_IMPL(groupRestrictions),
8890 TOJSON_IMPL(configurationCheckSignalName),
8891 TOJSON_IMPL(featureset),
8892 TOJSON_IMPL(licensing),
8893 TOJSON_IMPL(udpStreaming),
8894 TOJSON_IMPL(sysFlags),
8895 TOJSON_IMPL(normalTaskQueueBias),
8896 TOJSON_IMPL(enableLeafReflectionReverseSubscription),
8897 TOJSON_IMPL(disableLoopDetection),
8898 TOJSON_IMPL(maxSecurityLevel),
8899 TOJSON_IMPL(routeMap),
8900 TOJSON_IMPL(maxOutboundPeerConnectionIntervalDeltaSecs),
8901 TOJSON_IMPL(peerRtTestIntervalMs),
8902 TOJSON_IMPL(peerRtBehaviors),
8903 TOJSON_IMPL(websocket),
8904 TOJSON_IMPL(nsm),
8905 TOJSON_IMPL(advertising),
8906 TOJSON_IMPL(extendedGroupRestrictions),
8907 TOJSON_IMPL(groupRestrictionAccessPolicyType),
8908 TOJSON_IMPL(ipFamily),
8909 TOJSON_IMPL(rxCapture),
8910 TOJSON_IMPL(txCapture),
8911 TOJSON_IMPL(meshName),
8912 TOJSON_IMPL(extraMeshes),
8913 TOJSON_IMPL(tuning)
8914 };
8915 }
8916 static void from_json(const nlohmann::json& j, RallypointServer& p)
8917 {
8918 p.clear();
8919 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
8920 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
8921 getOptional<std::string>("id", p.id, j);
8922 getOptional<SecurityCertificate>("certificate", p.certificate, j);
8923 getOptional<std::string>("interfaceName", p.interfaceName, j);
8924 getOptional<int>("listenPort", p.listenPort, j, 7443);
8925 getOptional<bool>("allowMulticastForwarding", p.allowMulticastForwarding, j, false);
8926 //getOptional<PeeringConfiguration>("peeringConfiguration", p.peeringConfiguration, j); // NOTE: Not serialized!
8927 getOptional<std::string>("peeringConfigurationFileName", p.peeringConfigurationFileName, j);
8928 getOptional<std::string>("peeringConfigurationFileCommand", p.peeringConfigurationFileCommand, j);
8929 getOptional<int>("peeringConfigurationFileCheckSecs", p.peeringConfigurationFileCheckSecs, j, 60);
8930 getOptional<int>("ioPools", p.ioPools, j, -1);
8931 getOptional<RallypointServerStatusReportConfiguration>("statusReport", p.statusReport, j);
8932 getOptional<RallypointServerLimits>("limits", p.limits, j);
8933 getOptional<RallypointServerLinkGraph>("linkGraph", p.linkGraph, j);
8934 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
8935 getOptional<bool>("allowPeerForwarding", p.allowPeerForwarding, j, false);
8936 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
8937 getOptional<Tls>("tls", p.tls, j);
8938 getOptional<DiscoveryConfiguration>("discovery", p.discovery, j);
8939 getOptional<bool>("forwardDiscoveredGroups", p.forwardDiscoveredGroups, j, false);
8940 getOptional<bool>("forwardMulticastAddressing", p.forwardMulticastAddressing, j, false);
8941 getOptional<bool>("isMeshLeaf", p.isMeshLeaf, j, false);
8942 getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
8943 getOptional<NetworkAddressRestrictionList>("multicastRestrictions", p.multicastRestrictions, j);
8944 getOptional<IgmpSnooping>("igmpSnooping", p.igmpSnooping, j);
8945 getOptional<std::vector<RallypointReflector>>("staticReflectors", p.staticReflectors, j);
8946 getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
8947 getOptional<NetworkTxOptions>("multicastTxOptions", p.multicastTxOptions, j);
8948 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
8949 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
8950 getOptional<StringRestrictionList>("groupRestrictions", p.groupRestrictions, j);
8951 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.7b392d1.${id}");
8952 getOptional<Licensing>("licensing", p.licensing, j);
8953 getOptional<Featureset>("featureset", p.featureset, j);
8954 getOptional<RallypointUdpStreaming>("udpStreaming", p.udpStreaming, j);
8955 getOptional<uint32_t>("sysFlags", p.sysFlags, j, 0);
8956 getOptional<uint32_t>("normalTaskQueueBias", p.normalTaskQueueBias, j, 0);
8957 getOptional<bool>("enableLeafReflectionReverseSubscription", p.enableLeafReflectionReverseSubscription, j, false);
8958 getOptional<bool>("disableLoopDetection", p.disableLoopDetection, j, false);
8959 getOptional<uint32_t>("maxSecurityLevel", p.maxSecurityLevel, j, 0);
8960 getOptional<RallypointServerRouteMap>("routeMap", p.routeMap, j);
8961 getOptional<uint32_t>("maxOutboundPeerConnectionIntervalDeltaSecs", p.maxOutboundPeerConnectionIntervalDeltaSecs, j, 15);
8962 getOptional<int>("peerRtTestIntervalMs", p.peerRtTestIntervalMs, j, 60000);
8963 getOptional<std::vector<RallypointRpRtTimingBehavior>>("peerRtBehaviors", p.peerRtBehaviors, j);
8964 getOptional<RallypointWebsocketSettings>("websocket", p.websocket, j);
8965 getOptional<NsmConfiguration>("nsm", p.nsm, j);
8966 getOptional<RallypointAdvertisingSettings>("advertising", p.advertising, j);
8967 getOptional<std::vector<RallypointExtendedGroupRestriction>>("extendedGroupRestrictions", p.extendedGroupRestrictions, j);
8968 getOptional<GroupRestrictionAccessPolicyType_t>("groupRestrictionAccessPolicyType", p.groupRestrictionAccessPolicyType, j, GroupRestrictionAccessPolicyType_t::graptPermissive);
8969 getOptional<IpFamilyType_t>("ipFamily", p.ipFamily, j, IpFamilyType_t::ifIpUnspec);
8970 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
8971 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
8972 getOptional<std::string>("meshName", p.meshName, j);
8973 getOptional<std::vector<std::string>>("extraMeshes", p.extraMeshes, j);
8974 getOptional<TuningSettings>("tuning", p.tuning, j);
8975 }
8976
8977 //-----------------------------------------------------------
8978 JSON_SERIALIZED_CLASS(PlatformDiscoveredService)
8989 {
8990 IMPLEMENT_JSON_SERIALIZATION()
8991 IMPLEMENT_JSON_DOCUMENTATION(PlatformDiscoveredService)
8992
8993 public:
8994
8996 std::string id;
8997
8999 std::string type;
9000
9002 std::string name;
9003
9006
9008 std::string uri;
9009
9012
9014 {
9015 clear();
9016 }
9017
9018 void clear()
9019 {
9020 id.clear();
9021 type.clear();
9022 name.clear();
9023 address.clear();
9024 uri.clear();
9025 configurationVersion = 0;
9026 }
9027 };
9028
9029 static void to_json(nlohmann::json& j, const PlatformDiscoveredService& p)
9030 {
9031 j = nlohmann::json{
9032 TOJSON_IMPL(id),
9033 TOJSON_IMPL(type),
9034 TOJSON_IMPL(name),
9035 TOJSON_IMPL(address),
9036 TOJSON_IMPL(uri),
9037 TOJSON_IMPL(configurationVersion)
9038 };
9039 }
9040 static void from_json(const nlohmann::json& j, PlatformDiscoveredService& p)
9041 {
9042 p.clear();
9043 getOptional<std::string>("id", p.id, j);
9044 getOptional<std::string>("type", p.type, j);
9045 getOptional<std::string>("name", p.name, j);
9046 getOptional<NetworkAddress>("address", p.address, j);
9047 getOptional<std::string>("uri", p.uri, j);
9048 getOptional<uint32_t>("configurationVersion", p.configurationVersion, j, 0);
9049 }
9050
9051
9052 //-----------------------------------------------------------
9054 {
9055 public:
9056 typedef enum
9057 {
9058 etUndefined = 0,
9059 etAudio = 1,
9060 etLocation = 2,
9061 etUser = 3
9062 } EventType_t;
9063
9064 typedef enum
9065 {
9066 dNone = 0,
9067 dInbound = 1,
9068 dOutbound = 2,
9069 dBoth = 3,
9070 dUndefined = 4,
9071 } Direction_t;
9072 };
9073
9074
9075 //-----------------------------------------------------------
9076 JSON_SERIALIZED_CLASS(TimelineQueryParameters)
9087 {
9088 IMPLEMENT_JSON_SERIALIZATION()
9089 IMPLEMENT_JSON_DOCUMENTATION(TimelineQueryParameters)
9090
9091 public:
9092
9095
9098
9101
9104
9107
9110
9113
9115 std::string onlyAlias;
9116
9118 std::string onlyNodeId;
9119
9122
9124 std::string sql;
9125
9127 {
9128 clear();
9129 }
9130
9131 void clear()
9132 {
9133 maxCount = 50;
9134 mostRecentFirst = true;
9135 startedOnOrAfter = 0;
9136 endedOnOrBefore = 0;
9137 onlyDirection = 0;
9138 onlyType = 0;
9139 onlyCommitted = true;
9140 onlyAlias.clear();
9141 onlyNodeId.clear();
9142 sql.clear();
9143 onlyTxId = 0;
9144 }
9145 };
9146
9147 static void to_json(nlohmann::json& j, const TimelineQueryParameters& p)
9148 {
9149 j = nlohmann::json{
9150 TOJSON_IMPL(maxCount),
9151 TOJSON_IMPL(mostRecentFirst),
9152 TOJSON_IMPL(startedOnOrAfter),
9153 TOJSON_IMPL(endedOnOrBefore),
9154 TOJSON_IMPL(onlyDirection),
9155 TOJSON_IMPL(onlyType),
9156 TOJSON_IMPL(onlyCommitted),
9157 TOJSON_IMPL(onlyAlias),
9158 TOJSON_IMPL(onlyNodeId),
9159 TOJSON_IMPL(onlyTxId),
9160 TOJSON_IMPL(sql)
9161 };
9162 }
9163 static void from_json(const nlohmann::json& j, TimelineQueryParameters& p)
9164 {
9165 p.clear();
9166 getOptional<long>("maxCount", p.maxCount, j, 50);
9167 getOptional<bool>("mostRecentFirst", p.mostRecentFirst, j, false);
9168 getOptional<uint64_t>("startedOnOrAfter", p.startedOnOrAfter, j, 0);
9169 getOptional<uint64_t>("endedOnOrBefore", p.endedOnOrBefore, j, 0);
9170 getOptional<int>("onlyDirection", p.onlyDirection, j, 0);
9171 getOptional<int>("onlyType", p.onlyType, j, 0);
9172 getOptional<bool>("onlyCommitted", p.onlyCommitted, j, true);
9173 getOptional<std::string>("onlyAlias", p.onlyAlias, j, EMPTY_STRING);
9174 getOptional<std::string>("onlyNodeId", p.onlyNodeId, j, EMPTY_STRING);
9175 getOptional<int>("onlyTxId", p.onlyTxId, j, 0);
9176 getOptional<std::string>("sql", p.sql, j, EMPTY_STRING);
9177 }
9178
9179 //-----------------------------------------------------------
9180 JSON_SERIALIZED_CLASS(CertStoreCertificate)
9188 {
9189 IMPLEMENT_JSON_SERIALIZATION()
9190 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificate)
9191
9192 public:
9194 std::string id;
9195
9197 std::string certificatePem;
9198
9200 std::string privateKeyPem;
9201
9204
9206 std::string tags;
9207
9209 {
9210 clear();
9211 }
9212
9213 void clear()
9214 {
9215 id.clear();
9216 certificatePem.clear();
9217 privateKeyPem.clear();
9218 internalData = nullptr;
9219 tags.clear();
9220 }
9221 };
9222
9223 static void to_json(nlohmann::json& j, const CertStoreCertificate& p)
9224 {
9225 j = nlohmann::json{
9226 TOJSON_IMPL(id),
9227 TOJSON_IMPL(certificatePem),
9228 TOJSON_IMPL(privateKeyPem),
9229 TOJSON_IMPL(tags)
9230 };
9231 }
9232 static void from_json(const nlohmann::json& j, CertStoreCertificate& p)
9233 {
9234 p.clear();
9235 j.at("id").get_to(p.id);
9236 j.at("certificatePem").get_to(p.certificatePem);
9237 getOptional<std::string>("privateKeyPem", p.privateKeyPem, j, EMPTY_STRING);
9238 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
9239 }
9240
9241 //-----------------------------------------------------------
9242 JSON_SERIALIZED_CLASS(CertStore)
9250 {
9251 IMPLEMENT_JSON_SERIALIZATION()
9252 IMPLEMENT_JSON_DOCUMENTATION(CertStore)
9253
9254 public:
9256 std::string id;
9257
9259 std::vector<CertStoreCertificate> certificates;
9260
9261 CertStore()
9262 {
9263 clear();
9264 }
9265
9266 void clear()
9267 {
9268 id.clear();
9269 certificates.clear();
9270 }
9271 };
9272
9273 static void to_json(nlohmann::json& j, const CertStore& p)
9274 {
9275 j = nlohmann::json{
9276 TOJSON_IMPL(id),
9277 TOJSON_IMPL(certificates)
9278 };
9279 }
9280 static void from_json(const nlohmann::json& j, CertStore& p)
9281 {
9282 p.clear();
9283 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
9284 getOptional<std::vector<CertStoreCertificate>>("certificates", p.certificates, j);
9285 }
9286
9287 //-----------------------------------------------------------
9288 JSON_SERIALIZED_CLASS(CertStoreCertificateElement)
9296 {
9297 IMPLEMENT_JSON_SERIALIZATION()
9298 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificateElement)
9299
9300 public:
9302 std::string id;
9303
9306
9308 std::string certificatePem;
9309
9311 std::string tags;
9312
9314 {
9315 clear();
9316 }
9317
9318 void clear()
9319 {
9320 id.clear();
9321 hasPrivateKey = false;
9322 tags.clear();
9323 }
9324 };
9325
9326 static void to_json(nlohmann::json& j, const CertStoreCertificateElement& p)
9327 {
9328 j = nlohmann::json{
9329 TOJSON_IMPL(id),
9330 TOJSON_IMPL(hasPrivateKey),
9331 TOJSON_IMPL(tags)
9332 };
9333
9334 if(!p.certificatePem.empty())
9335 {
9336 j["certificatePem"] = p.certificatePem;
9337 }
9338 }
9339 static void from_json(const nlohmann::json& j, CertStoreCertificateElement& p)
9340 {
9341 p.clear();
9342 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
9343 getOptional<bool>("hasPrivateKey", p.hasPrivateKey, j, false);
9344 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
9345 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
9346 }
9347
9348 //-----------------------------------------------------------
9349 JSON_SERIALIZED_CLASS(CertStoreDescriptor)
9357 {
9358 IMPLEMENT_JSON_SERIALIZATION()
9359 IMPLEMENT_JSON_DOCUMENTATION(CertStoreDescriptor)
9360
9361 public:
9363 std::string id;
9364
9366 std::string fileName;
9367
9370
9373
9375 std::vector<CertStoreCertificateElement> certificates;
9376
9378 {
9379 clear();
9380 }
9381
9382 void clear()
9383 {
9384 id.clear();
9385 fileName.clear();
9386 version = 0;
9387 flags = 0;
9388 certificates.clear();
9389 }
9390 };
9391
9392 static void to_json(nlohmann::json& j, const CertStoreDescriptor& p)
9393 {
9394 j = nlohmann::json{
9395 TOJSON_IMPL(id),
9396 TOJSON_IMPL(fileName),
9397 TOJSON_IMPL(version),
9398 TOJSON_IMPL(flags),
9399 TOJSON_IMPL(certificates)
9400 };
9401 }
9402 static void from_json(const nlohmann::json& j, CertStoreDescriptor& p)
9403 {
9404 p.clear();
9405 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
9406 getOptional<std::string>("fileName", p.fileName, j, EMPTY_STRING);
9407 getOptional<int>("version", p.version, j, 0);
9408 getOptional<int>("flags", p.flags, j, 0);
9409 getOptional<std::vector<CertStoreCertificateElement>>("certificates", p.certificates, j);
9410 }
9411
9412 //-----------------------------------------------------------
9413 JSON_SERIALIZED_CLASS(CertificateSubjectElement)
9421 {
9422 IMPLEMENT_JSON_SERIALIZATION()
9423 IMPLEMENT_JSON_DOCUMENTATION(CertificateSubjectElement)
9424
9425 public:
9427 std::string name;
9428
9430 std::string value;
9431
9433 {
9434 clear();
9435 }
9436
9437 void clear()
9438 {
9439 name.clear();
9440 value.clear();
9441 }
9442 };
9443
9444 static void to_json(nlohmann::json& j, const CertificateSubjectElement& p)
9445 {
9446 j = nlohmann::json{
9447 TOJSON_IMPL(name),
9448 TOJSON_IMPL(value)
9449 };
9450 }
9451 static void from_json(const nlohmann::json& j, CertificateSubjectElement& p)
9452 {
9453 p.clear();
9454 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
9455 getOptional<std::string>("value", p.value, j, EMPTY_STRING);
9456 }
9457
9458
9459 //-----------------------------------------------------------
9460 JSON_SERIALIZED_CLASS(CertificateDescriptor)
9468 {
9469 IMPLEMENT_JSON_SERIALIZATION()
9470 IMPLEMENT_JSON_DOCUMENTATION(CertificateDescriptor)
9471
9472 public:
9474 std::string subject;
9475
9477 std::string issuer;
9478
9481
9484
9486 std::string notBefore;
9487
9489 std::string notAfter;
9490
9492 std::string serial;
9493
9495 std::string fingerprint;
9496
9498 std::vector<CertificateSubjectElement> subjectElements;
9499
9501 std::string certificatePem;
9502
9504 std::string publicKeyPem;
9505
9507 {
9508 clear();
9509 }
9510
9511 void clear()
9512 {
9513 subject.clear();
9514 issuer.clear();
9515 selfSigned = false;
9516 version = 0;
9517 notBefore.clear();
9518 notAfter.clear();
9519 serial.clear();
9520 fingerprint.clear();
9521 subjectElements.clear();
9522 certificatePem.clear();
9523 publicKeyPem.clear();
9524 }
9525 };
9526
9527 static void to_json(nlohmann::json& j, const CertificateDescriptor& p)
9528 {
9529 j = nlohmann::json{
9530 TOJSON_IMPL(subject),
9531 TOJSON_IMPL(issuer),
9532 TOJSON_IMPL(selfSigned),
9533 TOJSON_IMPL(version),
9534 TOJSON_IMPL(notBefore),
9535 TOJSON_IMPL(notAfter),
9536 TOJSON_IMPL(serial),
9537 TOJSON_IMPL(fingerprint),
9538 TOJSON_IMPL(subjectElements),
9539 TOJSON_IMPL(certificatePem),
9540 TOJSON_IMPL(publicKeyPem)
9541 };
9542 }
9543 static void from_json(const nlohmann::json& j, CertificateDescriptor& p)
9544 {
9545 p.clear();
9546 getOptional<std::string>("subject", p.subject, j, EMPTY_STRING);
9547 getOptional<std::string>("issuer", p.issuer, j, EMPTY_STRING);
9548 getOptional<bool>("selfSigned", p.selfSigned, j, false);
9549 getOptional<int>("version", p.version, j, 0);
9550 getOptional<std::string>("notBefore", p.notBefore, j, EMPTY_STRING);
9551 getOptional<std::string>("notAfter", p.notAfter, j, EMPTY_STRING);
9552 getOptional<std::string>("serial", p.serial, j, EMPTY_STRING);
9553 getOptional<std::string>("fingerprint", p.fingerprint, j, EMPTY_STRING);
9554 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
9555 getOptional<std::string>("publicKeyPem", p.publicKeyPem, j, EMPTY_STRING);
9556 getOptional<std::vector<CertificateSubjectElement>>("subjectElements", p.subjectElements, j);
9557 }
9558
9559
9560 //-----------------------------------------------------------
9561 JSON_SERIALIZED_CLASS(RiffDescriptor)
9572 {
9573 IMPLEMENT_JSON_SERIALIZATION()
9574 IMPLEMENT_JSON_DOCUMENTATION(RiffDescriptor)
9575
9576 public:
9578 std::string file;
9579
9582
9585
9588
9590 std::string meta;
9591
9593 std::string certPem;
9594
9597
9599 std::string signature;
9600
9602 {
9603 clear();
9604 }
9605
9606 void clear()
9607 {
9608 file.clear();
9609 verified = false;
9610 channels = 0;
9611 sampleCount = 0;
9612 meta.clear();
9613 certPem.clear();
9614 certDescriptor.clear();
9615 signature.clear();
9616 }
9617 };
9618
9619 static void to_json(nlohmann::json& j, const RiffDescriptor& p)
9620 {
9621 j = nlohmann::json{
9622 TOJSON_IMPL(file),
9623 TOJSON_IMPL(verified),
9624 TOJSON_IMPL(channels),
9625 TOJSON_IMPL(sampleCount),
9626 TOJSON_IMPL(meta),
9627 TOJSON_IMPL(certPem),
9628 TOJSON_IMPL(certDescriptor),
9629 TOJSON_IMPL(signature)
9630 };
9631 }
9632
9633 static void from_json(const nlohmann::json& j, RiffDescriptor& p)
9634 {
9635 p.clear();
9636 FROMJSON_IMPL(file, std::string, EMPTY_STRING);
9637 FROMJSON_IMPL(verified, bool, false);
9638 FROMJSON_IMPL(channels, int, 0);
9639 FROMJSON_IMPL(sampleCount, int, 0);
9640 FROMJSON_IMPL(meta, std::string, EMPTY_STRING);
9641 FROMJSON_IMPL(certPem, std::string, EMPTY_STRING);
9642 getOptional<CertificateDescriptor>("certDescriptor", p.certDescriptor, j);
9643 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
9644 }
9645
9646
9647 //-----------------------------------------------------------
9648 JSON_SERIALIZED_CLASS(BridgeCreationDetail)
9656 {
9657 IMPLEMENT_JSON_SERIALIZATION()
9658 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(BridgeCreationDetail)
9659 IMPLEMENT_JSON_DOCUMENTATION(BridgeCreationDetail)
9660
9661 public:
9663 typedef enum
9664 {
9666 csUndefined = 0,
9667
9669 csOk = 1,
9670
9672 csNoJson = -1,
9673
9675 csAlreadyExists = -3,
9676
9678 csInvalidConfiguration = -4,
9679
9681 csInvalidJson = -5,
9682
9684 csInsufficientGroups = -6,
9685
9687 csTooManyGroups = -7,
9688
9690 csDuplicateGroup = -8,
9691
9693 csLocalLoopDetected = -9,
9694 } CreationStatus_t;
9695
9697 std::string id;
9698
9701
9703 {
9704 clear();
9705 }
9706
9707 void clear()
9708 {
9709 id.clear();
9710 status = csUndefined;
9711 }
9712 };
9713
9714 static void to_json(nlohmann::json& j, const BridgeCreationDetail& p)
9715 {
9716 j = nlohmann::json{
9717 TOJSON_IMPL(id),
9718 TOJSON_IMPL(status)
9719 };
9720 }
9721 static void from_json(const nlohmann::json& j, BridgeCreationDetail& p)
9722 {
9723 p.clear();
9724 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
9725 getOptional<BridgeCreationDetail::CreationStatus_t>("status", p.status, j, BridgeCreationDetail::CreationStatus_t::csUndefined);
9726 }
9727 //-----------------------------------------------------------
9728 JSON_SERIALIZED_CLASS(GroupConnectionDetail)
9736 {
9737 IMPLEMENT_JSON_SERIALIZATION()
9738 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupConnectionDetail)
9739 IMPLEMENT_JSON_DOCUMENTATION(GroupConnectionDetail)
9740
9741 public:
9743 typedef enum
9744 {
9746 ctUndefined = 0,
9747
9749 ctDirectDatagram = 1,
9750
9752 ctRallypoint = 2
9753 } ConnectionType_t;
9754
9756 std::string id;
9757
9760
9762 std::string peer;
9763
9766
9768 std::string reason;
9769
9771 {
9772 clear();
9773 }
9774
9775 void clear()
9776 {
9777 id.clear();
9778 connectionType = ctUndefined;
9779 peer.clear();
9780 asFailover = false;
9781 reason.clear();
9782 }
9783 };
9784
9785 static void to_json(nlohmann::json& j, const GroupConnectionDetail& p)
9786 {
9787 j = nlohmann::json{
9788 TOJSON_IMPL(id),
9789 TOJSON_IMPL(connectionType),
9790 TOJSON_IMPL(peer),
9791 TOJSON_IMPL(asFailover),
9792 TOJSON_IMPL(reason)
9793 };
9794
9795 if(p.asFailover)
9796 {
9797 j["asFailover"] = p.asFailover;
9798 }
9799 }
9800 static void from_json(const nlohmann::json& j, GroupConnectionDetail& p)
9801 {
9802 p.clear();
9803 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
9804 getOptional<GroupConnectionDetail::ConnectionType_t>("connectionType", p.connectionType, j, GroupConnectionDetail::ConnectionType_t::ctUndefined);
9805 getOptional<std::string>("peer", p.peer, j, EMPTY_STRING);
9806 getOptional<bool>("asFailover", p.asFailover, j, false);
9807 getOptional<std::string>("reason", p.reason, j, EMPTY_STRING);
9808 }
9809
9810 //-----------------------------------------------------------
9811 JSON_SERIALIZED_CLASS(GroupTxDetail)
9819 {
9820 IMPLEMENT_JSON_SERIALIZATION()
9821 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupTxDetail)
9822 IMPLEMENT_JSON_DOCUMENTATION(GroupTxDetail)
9823
9824 public:
9826 typedef enum
9827 {
9829 txsUndefined = 0,
9830
9832 txsTxStarted = 1,
9833
9835 txsTxEnded = 2,
9836
9838 txsNotAnAudioGroup = -1,
9839
9841 txsNotJoined = -2,
9842
9844 txsNotConnected = -3,
9845
9847 txsAlreadyTransmitting = -4,
9848
9850 txsInvalidParams = -5,
9851
9853 txsPriorityTooLow = -6,
9854
9856 txsRxActiveOnNonFdx = -7,
9857
9859 txsCannotSubscribeToInput = -8,
9860
9862 txsInvalidId = -9,
9863
9865 txsTxEndedWithFailure = -10,
9866 } TxStatus_t;
9867
9869 std::string id;
9870
9873
9876
9879
9882
9884 uint32_t txId;
9885
9887 {
9888 clear();
9889 }
9890
9891 void clear()
9892 {
9893 id.clear();
9894 status = txsUndefined;
9895 localPriority = 0;
9896 remotePriority = 0;
9897 nonFdxMsHangRemaining = 0;
9898 txId = 0;
9899 }
9900 };
9901
9902 static void to_json(nlohmann::json& j, const GroupTxDetail& p)
9903 {
9904 j = nlohmann::json{
9905 TOJSON_IMPL(id),
9906 TOJSON_IMPL(status),
9907 TOJSON_IMPL(localPriority),
9908 TOJSON_IMPL(txId)
9909 };
9910
9911 // Include remote priority if status is related to that
9912 if(p.status == GroupTxDetail::TxStatus_t::txsPriorityTooLow)
9913 {
9914 j["remotePriority"] = p.remotePriority;
9915 }
9916 else if(p.status == GroupTxDetail::TxStatus_t::txsRxActiveOnNonFdx)
9917 {
9918 j["nonFdxMsHangRemaining"] = p.nonFdxMsHangRemaining;
9919 }
9920 }
9921 static void from_json(const nlohmann::json& j, GroupTxDetail& p)
9922 {
9923 p.clear();
9924 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
9925 getOptional<GroupTxDetail::TxStatus_t>("status", p.status, j, GroupTxDetail::TxStatus_t::txsUndefined);
9926 getOptional<int>("localPriority", p.localPriority, j, 0);
9927 getOptional<int>("remotePriority", p.remotePriority, j, 0);
9928 getOptional<long>("nonFdxMsHangRemaining", p.nonFdxMsHangRemaining, j, 0);
9929 getOptional<uint32_t>("txId", p.txId, j, 0);
9930 }
9931
9932 //-----------------------------------------------------------
9933 JSON_SERIALIZED_CLASS(GroupCreationDetail)
9941 {
9942 IMPLEMENT_JSON_SERIALIZATION()
9943 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupCreationDetail)
9944 IMPLEMENT_JSON_DOCUMENTATION(GroupCreationDetail)
9945
9946 public:
9948 typedef enum
9949 {
9951 csUndefined = 0,
9952
9954 csOk = 1,
9955
9957 csNoJson = -1,
9958
9960 csConflictingRpListAndCluster = -2,
9961
9963 csAlreadyExists = -3,
9964
9966 csInvalidConfiguration = -4,
9967
9969 csInvalidJson = -5,
9970
9972 csCryptoFailure = -6,
9973
9975 csAudioInputFailure = -7,
9976
9978 csAudioOutputFailure = -8,
9979
9981 csUnsupportedAudioEncoder = -9,
9982
9984 csNoLicense = -10,
9985
9987 csInvalidTransport = -11,
9988 } CreationStatus_t;
9989
9991 std::string id;
9992
9995
9997 {
9998 clear();
9999 }
10000
10001 void clear()
10002 {
10003 id.clear();
10004 status = csUndefined;
10005 }
10006 };
10007
10008 static void to_json(nlohmann::json& j, const GroupCreationDetail& p)
10009 {
10010 j = nlohmann::json{
10011 TOJSON_IMPL(id),
10012 TOJSON_IMPL(status)
10013 };
10014 }
10015 static void from_json(const nlohmann::json& j, GroupCreationDetail& p)
10016 {
10017 p.clear();
10018 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10019 getOptional<GroupCreationDetail::CreationStatus_t>("status", p.status, j, GroupCreationDetail::CreationStatus_t::csUndefined);
10020 }
10021
10022
10023 //-----------------------------------------------------------
10024 JSON_SERIALIZED_CLASS(GroupReconfigurationDetail)
10032 {
10033 IMPLEMENT_JSON_SERIALIZATION()
10034 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupReconfigurationDetail)
10035 IMPLEMENT_JSON_DOCUMENTATION(GroupReconfigurationDetail)
10036
10037 public:
10039 typedef enum
10040 {
10042 rsUndefined = 0,
10043
10045 rsOk = 1,
10046
10048 rsNoJson = -1,
10049
10051 rsInvalidConfiguration = -2,
10052
10054 rsInvalidJson = -3,
10055
10057 rsAudioInputFailure = -4,
10058
10060 rsAudioOutputFailure = -5,
10061
10063 rsDoesNotExist = -6,
10064
10066 rsAudioInputInUse = -7,
10067
10069 rsAudioDisabledForGroup = -8,
10070
10072 rsGroupIsNotAudio = -9
10073 } ReconfigurationStatus_t;
10074
10076 std::string id;
10077
10080
10082 {
10083 clear();
10084 }
10085
10086 void clear()
10087 {
10088 id.clear();
10089 status = rsUndefined;
10090 }
10091 };
10092
10093 static void to_json(nlohmann::json& j, const GroupReconfigurationDetail& p)
10094 {
10095 j = nlohmann::json{
10096 TOJSON_IMPL(id),
10097 TOJSON_IMPL(status)
10098 };
10099 }
10100 static void from_json(const nlohmann::json& j, GroupReconfigurationDetail& p)
10101 {
10102 p.clear();
10103 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10104 getOptional<GroupReconfigurationDetail::ReconfigurationStatus_t>("status", p.status, j, GroupReconfigurationDetail::ReconfigurationStatus_t::rsUndefined);
10105 }
10106
10107
10108 //-----------------------------------------------------------
10109 JSON_SERIALIZED_CLASS(GroupHealthReport)
10117 {
10118 IMPLEMENT_JSON_SERIALIZATION()
10119 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupHealthReport)
10120 IMPLEMENT_JSON_DOCUMENTATION(GroupHealthReport)
10121
10122 public:
10123 std::string id;
10124 uint64_t lastErrorTs;
10125 uint64_t decryptionErrors;
10126 uint64_t encryptionErrors;
10127 uint64_t unsupportDecoderErrors;
10128 uint64_t decoderFailures;
10129 uint64_t decoderStartFailures;
10130 uint64_t inboundRtpPacketAllocationFailures;
10131 uint64_t inboundRtpPacketLoadFailures;
10132 uint64_t latePacketsDiscarded;
10133 uint64_t jitterBufferInsertionFailures;
10134 uint64_t presenceDeserializationFailures;
10135 uint64_t notRtpErrors;
10136 uint64_t generalErrors;
10137 uint64_t inboundRtpProcessorAllocationFailures;
10138
10140 {
10141 clear();
10142 }
10143
10144 void clear()
10145 {
10146 id.clear();
10147 lastErrorTs = 0;
10148 decryptionErrors = 0;
10149 encryptionErrors = 0;
10150 unsupportDecoderErrors = 0;
10151 decoderFailures = 0;
10152 decoderStartFailures = 0;
10153 inboundRtpPacketAllocationFailures = 0;
10154 inboundRtpPacketLoadFailures = 0;
10155 latePacketsDiscarded = 0;
10156 jitterBufferInsertionFailures = 0;
10157 presenceDeserializationFailures = 0;
10158 notRtpErrors = 0;
10159 generalErrors = 0;
10160 inboundRtpProcessorAllocationFailures = 0;
10161 }
10162 };
10163
10164 static void to_json(nlohmann::json& j, const GroupHealthReport& p)
10165 {
10166 j = nlohmann::json{
10167 TOJSON_IMPL(id),
10168 TOJSON_IMPL(lastErrorTs),
10169 TOJSON_IMPL(decryptionErrors),
10170 TOJSON_IMPL(encryptionErrors),
10171 TOJSON_IMPL(unsupportDecoderErrors),
10172 TOJSON_IMPL(decoderFailures),
10173 TOJSON_IMPL(decoderStartFailures),
10174 TOJSON_IMPL(inboundRtpPacketAllocationFailures),
10175 TOJSON_IMPL(inboundRtpPacketLoadFailures),
10176 TOJSON_IMPL(latePacketsDiscarded),
10177 TOJSON_IMPL(jitterBufferInsertionFailures),
10178 TOJSON_IMPL(presenceDeserializationFailures),
10179 TOJSON_IMPL(notRtpErrors),
10180 TOJSON_IMPL(generalErrors),
10181 TOJSON_IMPL(inboundRtpProcessorAllocationFailures)
10182 };
10183 }
10184 static void from_json(const nlohmann::json& j, GroupHealthReport& p)
10185 {
10186 p.clear();
10187 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10188 getOptional<uint64_t>("lastErrorTs", p.lastErrorTs, j, 0);
10189 getOptional<uint64_t>("decryptionErrors", p.decryptionErrors, j, 0);
10190 getOptional<uint64_t>("encryptionErrors", p.encryptionErrors, j, 0);
10191 getOptional<uint64_t>("unsupportDecoderErrors", p.unsupportDecoderErrors, j, 0);
10192 getOptional<uint64_t>("decoderFailures", p.decoderFailures, j, 0);
10193 getOptional<uint64_t>("decoderStartFailures", p.decoderStartFailures, j, 0);
10194 getOptional<uint64_t>("inboundRtpPacketAllocationFailures", p.inboundRtpPacketAllocationFailures, j, 0);
10195 getOptional<uint64_t>("inboundRtpPacketLoadFailures", p.inboundRtpPacketLoadFailures, j, 0);
10196 getOptional<uint64_t>("latePacketsDiscarded", p.latePacketsDiscarded, j, 0);
10197 getOptional<uint64_t>("jitterBufferInsertionFailures", p.jitterBufferInsertionFailures, j, 0);
10198 getOptional<uint64_t>("presenceDeserializationFailures", p.presenceDeserializationFailures, j, 0);
10199 getOptional<uint64_t>("notRtpErrors", p.notRtpErrors, j, 0);
10200 getOptional<uint64_t>("generalErrors", p.generalErrors, j, 0);
10201 getOptional<uint64_t>("inboundRtpProcessorAllocationFailures", p.inboundRtpProcessorAllocationFailures, j, 0);
10202 }
10203
10204 //-----------------------------------------------------------
10205 JSON_SERIALIZED_CLASS(InboundProcessorStats)
10213 {
10214 IMPLEMENT_JSON_SERIALIZATION()
10215 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(InboundProcessorStats)
10216 IMPLEMENT_JSON_DOCUMENTATION(InboundProcessorStats)
10217
10218 public:
10219 uint32_t ssrc;
10220 double jitter;
10221 uint64_t minRtpSamplesInQueue;
10222 uint64_t maxRtpSamplesInQueue;
10223 uint64_t totalSamplesTrimmed;
10224 uint64_t underruns;
10225 uint64_t overruns;
10226 uint64_t samplesInQueue;
10227 uint64_t totalPacketsReceived;
10228 uint64_t totalPacketsLost;
10229 uint64_t totalPacketsDiscarded;
10230
10232 {
10233 clear();
10234 }
10235
10236 void clear()
10237 {
10238 ssrc = 0;
10239 jitter = 0.0;
10240 minRtpSamplesInQueue = 0;
10241 maxRtpSamplesInQueue = 0;
10242 totalSamplesTrimmed = 0;
10243 underruns = 0;
10244 overruns = 0;
10245 samplesInQueue = 0;
10246 totalPacketsReceived = 0;
10247 totalPacketsLost = 0;
10248 totalPacketsDiscarded = 0;
10249 }
10250 };
10251
10252 static void to_json(nlohmann::json& j, const InboundProcessorStats& p)
10253 {
10254 j = nlohmann::json{
10255 TOJSON_IMPL(ssrc),
10256 TOJSON_IMPL(jitter),
10257 TOJSON_IMPL(minRtpSamplesInQueue),
10258 TOJSON_IMPL(maxRtpSamplesInQueue),
10259 TOJSON_IMPL(totalSamplesTrimmed),
10260 TOJSON_IMPL(underruns),
10261 TOJSON_IMPL(overruns),
10262 TOJSON_IMPL(samplesInQueue),
10263 TOJSON_IMPL(totalPacketsReceived),
10264 TOJSON_IMPL(totalPacketsLost),
10265 TOJSON_IMPL(totalPacketsDiscarded)
10266 };
10267 }
10268 static void from_json(const nlohmann::json& j, InboundProcessorStats& p)
10269 {
10270 p.clear();
10271 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
10272 getOptional<double>("jitter", p.jitter, j, 0.0);
10273 getOptional<uint64_t>("minRtpSamplesInQueue", p.minRtpSamplesInQueue, j, 0);
10274 getOptional<uint64_t>("maxRtpSamplesInQueue", p.maxRtpSamplesInQueue, j, 0);
10275 getOptional<uint64_t>("totalSamplesTrimmed", p.totalSamplesTrimmed, j, 0);
10276 getOptional<uint64_t>("underruns", p.underruns, j, 0);
10277 getOptional<uint64_t>("overruns", p.overruns, j, 0);
10278 getOptional<uint64_t>("samplesInQueue", p.samplesInQueue, j, 0);
10279 getOptional<uint64_t>("totalPacketsReceived", p.totalPacketsReceived, j, 0);
10280 getOptional<uint64_t>("totalPacketsLost", p.totalPacketsLost, j, 0);
10281 getOptional<uint64_t>("totalPacketsDiscarded", p.totalPacketsDiscarded, j, 0);
10282 }
10283
10284 //-----------------------------------------------------------
10285 JSON_SERIALIZED_CLASS(TrafficCounter)
10293 {
10294 IMPLEMENT_JSON_SERIALIZATION()
10295 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(TrafficCounter)
10296 IMPLEMENT_JSON_DOCUMENTATION(TrafficCounter)
10297
10298 public:
10299 uint64_t packets;
10300 uint64_t bytes;
10301 uint64_t errors;
10302
10304 {
10305 clear();
10306 }
10307
10308 void clear()
10309 {
10310 packets = 0;
10311 bytes = 0;
10312 errors = 0;
10313 }
10314 };
10315
10316 static void to_json(nlohmann::json& j, const TrafficCounter& p)
10317 {
10318 j = nlohmann::json{
10319 TOJSON_IMPL(packets),
10320 TOJSON_IMPL(bytes),
10321 TOJSON_IMPL(errors)
10322 };
10323 }
10324 static void from_json(const nlohmann::json& j, TrafficCounter& p)
10325 {
10326 p.clear();
10327 getOptional<uint64_t>("packets", p.packets, j, 0);
10328 getOptional<uint64_t>("bytes", p.bytes, j, 0);
10329 getOptional<uint64_t>("errors", p.errors, j, 0);
10330 }
10331
10332 //-----------------------------------------------------------
10333 JSON_SERIALIZED_CLASS(GroupStats)
10341 {
10342 IMPLEMENT_JSON_SERIALIZATION()
10343 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupStats)
10344 IMPLEMENT_JSON_DOCUMENTATION(GroupStats)
10345
10346 public:
10347 std::string id;
10348 //std::vector<InboundProcessorStats> rtpInbounds;
10349 TrafficCounter rxTraffic;
10350 TrafficCounter txTraffic;
10351
10352 GroupStats()
10353 {
10354 clear();
10355 }
10356
10357 void clear()
10358 {
10359 id.clear();
10360 //rtpInbounds.clear();
10361 rxTraffic.clear();
10362 txTraffic.clear();
10363 }
10364 };
10365
10366 static void to_json(nlohmann::json& j, const GroupStats& p)
10367 {
10368 j = nlohmann::json{
10369 TOJSON_IMPL(id),
10370 //TOJSON_IMPL(rtpInbounds),
10371 TOJSON_IMPL(rxTraffic),
10372 TOJSON_IMPL(txTraffic)
10373 };
10374 }
10375 static void from_json(const nlohmann::json& j, GroupStats& p)
10376 {
10377 p.clear();
10378 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10379 //getOptional<std::vector<InboundProcessorStats>>("rtpInbounds", p.rtpInbounds, j);
10380 getOptional<TrafficCounter>("rxTraffic", p.rxTraffic, j);
10381 getOptional<TrafficCounter>("txTraffic", p.txTraffic, j);
10382 }
10383
10384 //-----------------------------------------------------------
10385 JSON_SERIALIZED_CLASS(RallypointConnectionDetail)
10393 {
10394 IMPLEMENT_JSON_SERIALIZATION()
10395 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(RallypointConnectionDetail)
10396 IMPLEMENT_JSON_DOCUMENTATION(RallypointConnectionDetail)
10397
10398 public:
10400 std::string internalId;
10401
10403 std::string host;
10404
10406 int port;
10407
10410
10412 {
10413 clear();
10414 }
10415
10416 void clear()
10417 {
10418 internalId.clear();
10419 host.clear();
10420 port = 0;
10421 msToNextConnectionAttempt = 0;
10422 }
10423 };
10424
10425 static void to_json(nlohmann::json& j, const RallypointConnectionDetail& p)
10426 {
10427 j = nlohmann::json{
10428 TOJSON_IMPL(internalId),
10429 TOJSON_IMPL(host),
10430 TOJSON_IMPL(port)
10431 };
10432
10433 if(p.msToNextConnectionAttempt > 0)
10434 {
10435 j["msToNextConnectionAttempt"] = p.msToNextConnectionAttempt;
10436 }
10437 }
10438 static void from_json(const nlohmann::json& j, RallypointConnectionDetail& p)
10439 {
10440 p.clear();
10441 getOptional<std::string>("internalId", p.internalId, j, EMPTY_STRING);
10442 getOptional<std::string>("host", p.host, j, EMPTY_STRING);
10443 getOptional<int>("port", p.port, j, 0);
10444 getOptional<uint64_t>("msToNextConnectionAttempt", p.msToNextConnectionAttempt, j, 0);
10445 }
10446
10447 //-----------------------------------------------------------
10448 JSON_SERIALIZED_CLASS(TranslationSession)
10459 {
10460 IMPLEMENT_JSON_SERIALIZATION()
10461 IMPLEMENT_JSON_DOCUMENTATION(TranslationSession)
10462
10463 public:
10465 std::string id;
10466
10468 std::string name;
10469
10471 std::vector<std::string> groups;
10472
10475
10477 {
10478 clear();
10479 }
10480
10481 void clear()
10482 {
10483 id.clear();
10484 name.clear();
10485 groups.clear();
10486 enabled = true;
10487 }
10488 };
10489
10490 static void to_json(nlohmann::json& j, const TranslationSession& p)
10491 {
10492 j = nlohmann::json{
10493 TOJSON_IMPL(id),
10494 TOJSON_IMPL(name),
10495 TOJSON_IMPL(groups),
10496 TOJSON_IMPL(enabled)
10497 };
10498 }
10499 static void from_json(const nlohmann::json& j, TranslationSession& p)
10500 {
10501 p.clear();
10502 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
10503 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
10504 getOptional<std::vector<std::string>>("groups", p.groups, j);
10505 FROMJSON_IMPL(enabled, bool, true);
10506 }
10507
10508 //-----------------------------------------------------------
10509 JSON_SERIALIZED_CLASS(TranslationConfiguration)
10520 {
10521 IMPLEMENT_JSON_SERIALIZATION()
10522 IMPLEMENT_JSON_DOCUMENTATION(TranslationConfiguration)
10523
10524 public:
10526 std::vector<TranslationSession> sessions;
10527
10529 std::vector<Group> groups;
10530
10532 {
10533 clear();
10534 }
10535
10536 void clear()
10537 {
10538 sessions.clear();
10539 groups.clear();
10540 }
10541 };
10542
10543 static void to_json(nlohmann::json& j, const TranslationConfiguration& p)
10544 {
10545 j = nlohmann::json{
10546 TOJSON_IMPL(sessions),
10547 TOJSON_IMPL(groups)
10548 };
10549 }
10550 static void from_json(const nlohmann::json& j, TranslationConfiguration& p)
10551 {
10552 p.clear();
10553 getOptional<std::vector<TranslationSession>>("sessions", p.sessions, j);
10554 getOptional<std::vector<Group>>("groups", p.groups, j);
10555 }
10556
10557 //-----------------------------------------------------------
10558 JSON_SERIALIZED_CLASS(LingoServerStatusReportConfiguration)
10569 {
10570 IMPLEMENT_JSON_SERIALIZATION()
10571 IMPLEMENT_JSON_DOCUMENTATION(LingoServerStatusReportConfiguration)
10572
10573 public:
10575 std::string fileName;
10576
10579
10582
10584 std::string runCmd;
10585
10588
10591
10594
10596 {
10597 clear();
10598 }
10599
10600 void clear()
10601 {
10602 fileName.clear();
10603 intervalSecs = 60;
10604 enabled = false;
10605 includeGroupDetail = false;
10606 includeSessionDetail = false;
10607 includeSessionGroupDetail = false;
10608 runCmd.clear();
10609 }
10610 };
10611
10612 static void to_json(nlohmann::json& j, const LingoServerStatusReportConfiguration& p)
10613 {
10614 j = nlohmann::json{
10615 TOJSON_IMPL(fileName),
10616 TOJSON_IMPL(intervalSecs),
10617 TOJSON_IMPL(enabled),
10618 TOJSON_IMPL(includeGroupDetail),
10619 TOJSON_IMPL(includeSessionDetail),
10620 TOJSON_IMPL(includeSessionGroupDetail),
10621 TOJSON_IMPL(runCmd)
10622 };
10623 }
10624 static void from_json(const nlohmann::json& j, LingoServerStatusReportConfiguration& p)
10625 {
10626 p.clear();
10627 getOptional<std::string>("fileName", p.fileName, j);
10628 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
10629 getOptional<bool>("enabled", p.enabled, j, false);
10630 getOptional<std::string>("runCmd", p.runCmd, j);
10631 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
10632 getOptional<bool>("includeSessionDetail", p.includeSessionDetail, j, false);
10633 getOptional<bool>("includeSessionGroupDetail", p.includeSessionGroupDetail, j, false);
10634 }
10635
10636 //-----------------------------------------------------------
10637 JSON_SERIALIZED_CLASS(LingoServerInternals)
10650 {
10651 IMPLEMENT_JSON_SERIALIZATION()
10652 IMPLEMENT_JSON_DOCUMENTATION(LingoServerInternals)
10653
10654 public:
10657
10660
10663
10665 {
10666 clear();
10667 }
10668
10669 void clear()
10670 {
10671 watchdog.clear();
10672 tuning.clear();
10673 housekeeperIntervalMs = 1000;
10674 }
10675 };
10676
10677 static void to_json(nlohmann::json& j, const LingoServerInternals& p)
10678 {
10679 j = nlohmann::json{
10680 TOJSON_IMPL(watchdog),
10681 TOJSON_IMPL(housekeeperIntervalMs),
10682 TOJSON_IMPL(tuning)
10683 };
10684 }
10685 static void from_json(const nlohmann::json& j, LingoServerInternals& p)
10686 {
10687 p.clear();
10688 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
10689 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
10690 getOptional<TuningSettings>("tuning", p.tuning, j);
10691 }
10692
10693 //-----------------------------------------------------------
10694 JSON_SERIALIZED_CLASS(LingoServerConfiguration)
10704 {
10705 IMPLEMENT_JSON_SERIALIZATION()
10706 IMPLEMENT_JSON_DOCUMENTATION(LingoServerConfiguration)
10707
10708 public:
10710 std::string id;
10711
10714
10717
10720
10723
10726
10729
10732
10735
10738
10741
10744
10747
10750
10753
10755 {
10756 clear();
10757 }
10758
10759 void clear()
10760 {
10761 id.clear();
10762 serviceConfigurationFileCheckSecs = 60;
10763 lingoConfigurationFileName.clear();
10764 lingoConfigurationFileCommand.clear();
10765 lingoConfigurationFileCheckSecs = 60;
10766 statusReport.clear();
10767 externalHealthCheckResponder.clear();
10768 internals.clear();
10769 certStoreFileName.clear();
10770 certStorePasswordHex.clear();
10771 enginePolicy.clear();
10772 configurationCheckSignalName = "rts.22f4ec3.${id}";
10773 fipsCrypto.clear();
10774 proxy.clear();
10775 nsm.clear();
10776 }
10777 };
10778
10779 static void to_json(nlohmann::json& j, const LingoServerConfiguration& p)
10780 {
10781 j = nlohmann::json{
10782 TOJSON_IMPL(id),
10783 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
10784 TOJSON_IMPL(lingoConfigurationFileName),
10785 TOJSON_IMPL(lingoConfigurationFileCommand),
10786 TOJSON_IMPL(lingoConfigurationFileCheckSecs),
10787 TOJSON_IMPL(statusReport),
10788 TOJSON_IMPL(externalHealthCheckResponder),
10789 TOJSON_IMPL(internals),
10790 TOJSON_IMPL(certStoreFileName),
10791 TOJSON_IMPL(certStorePasswordHex),
10792 TOJSON_IMPL(enginePolicy),
10793 TOJSON_IMPL(configurationCheckSignalName),
10794 TOJSON_IMPL(fipsCrypto),
10795 TOJSON_IMPL(proxy),
10796 TOJSON_IMPL(nsm)
10797 };
10798 }
10799 static void from_json(const nlohmann::json& j, LingoServerConfiguration& p)
10800 {
10801 p.clear();
10802 getOptional<std::string>("id", p.id, j);
10803 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
10804 getOptional<std::string>("lingoConfigurationFileName", p.lingoConfigurationFileName, j);
10805 getOptional<std::string>("lingoConfigurationFileCommand", p.lingoConfigurationFileCommand, j);
10806 getOptional<int>("lingoConfigurationFileCheckSecs", p.lingoConfigurationFileCheckSecs, j, 60);
10807 getOptional<LingoServerStatusReportConfiguration>("statusReport", p.statusReport, j);
10808 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
10809 getOptional<LingoServerInternals>("internals", p.internals, j);
10810 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
10811 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
10812 j.at("enginePolicy").get_to(p.enginePolicy);
10813 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.22f4ec3.${id}");
10814 getOptional<FipsCryptoSettings>("fipsCrypo", p.fipsCrypto, j);
10815 getOptional<NetworkAddress>("proxy", p.proxy, j);
10816 getOptional<NsmConfiguration>("nsm", p.nsm, j);
10817 }
10818
10819
10820 //-----------------------------------------------------------
10821 JSON_SERIALIZED_CLASS(VoiceToVoiceSession)
10832 {
10833 IMPLEMENT_JSON_SERIALIZATION()
10834 IMPLEMENT_JSON_DOCUMENTATION(VoiceToVoiceSession)
10835
10836 public:
10838 std::string id;
10839
10841 std::string name;
10842
10844 std::vector<std::string> groups;
10845
10848
10850 {
10851 clear();
10852 }
10853
10854 void clear()
10855 {
10856 id.clear();
10857 name.clear();
10858 groups.clear();
10859 enabled = true;
10860 }
10861 };
10862
10863 static void to_json(nlohmann::json& j, const VoiceToVoiceSession& p)
10864 {
10865 j = nlohmann::json{
10866 TOJSON_IMPL(id),
10867 TOJSON_IMPL(name),
10868 TOJSON_IMPL(groups),
10869 TOJSON_IMPL(enabled)
10870 };
10871 }
10872 static void from_json(const nlohmann::json& j, VoiceToVoiceSession& p)
10873 {
10874 p.clear();
10875 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
10876 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
10877 getOptional<std::vector<std::string>>("groups", p.groups, j);
10878 FROMJSON_IMPL(enabled, bool, true);
10879 }
10880
10881 //-----------------------------------------------------------
10882 JSON_SERIALIZED_CLASS(LingoConfiguration)
10893 {
10894 IMPLEMENT_JSON_SERIALIZATION()
10895 IMPLEMENT_JSON_DOCUMENTATION(LingoConfiguration)
10896
10897 public:
10899 std::vector<VoiceToVoiceSession> voiceToVoiceSessions;
10900
10902 std::vector<Group> groups;
10903
10905 {
10906 clear();
10907 }
10908
10909 void clear()
10910 {
10911 voiceToVoiceSessions.clear();
10912 groups.clear();
10913 }
10914 };
10915
10916 static void to_json(nlohmann::json& j, const LingoConfiguration& p)
10917 {
10918 j = nlohmann::json{
10919 TOJSON_IMPL(voiceToVoiceSessions),
10920 TOJSON_IMPL(groups)
10921 };
10922 }
10923 static void from_json(const nlohmann::json& j, LingoConfiguration& p)
10924 {
10925 p.clear();
10926 getOptional<std::vector<VoiceToVoiceSession>>("voiceToVoiceSessions", p.voiceToVoiceSessions, j);
10927 getOptional<std::vector<Group>>("groups", p.groups, j);
10928 }
10929
10930 //-----------------------------------------------------------
10931 JSON_SERIALIZED_CLASS(BridgingConfiguration)
10942 {
10943 IMPLEMENT_JSON_SERIALIZATION()
10944 IMPLEMENT_JSON_DOCUMENTATION(BridgingConfiguration)
10945
10946 public:
10948 std::vector<Bridge> bridges;
10949
10951 std::vector<Group> groups;
10952
10954 {
10955 clear();
10956 }
10957
10958 void clear()
10959 {
10960 bridges.clear();
10961 groups.clear();
10962 }
10963 };
10964
10965 static void to_json(nlohmann::json& j, const BridgingConfiguration& p)
10966 {
10967 j = nlohmann::json{
10968 TOJSON_IMPL(bridges),
10969 TOJSON_IMPL(groups)
10970 };
10971 }
10972 static void from_json(const nlohmann::json& j, BridgingConfiguration& p)
10973 {
10974 p.clear();
10975 getOptional<std::vector<Bridge>>("bridges", p.bridges, j);
10976 getOptional<std::vector<Group>>("groups", p.groups, j);
10977 }
10978
10979 //-----------------------------------------------------------
10980 JSON_SERIALIZED_CLASS(BridgingServerStatusReportConfiguration)
10991 {
10992 IMPLEMENT_JSON_SERIALIZATION()
10993 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerStatusReportConfiguration)
10994
10995 public:
10997 std::string fileName;
10998
11001
11004
11006 std::string runCmd;
11007
11010
11013
11016
11018 {
11019 clear();
11020 }
11021
11022 void clear()
11023 {
11024 fileName.clear();
11025 intervalSecs = 60;
11026 enabled = false;
11027 includeGroupDetail = false;
11028 includeBridgeDetail = false;
11029 includeBridgeGroupDetail = false;
11030 runCmd.clear();
11031 }
11032 };
11033
11034 static void to_json(nlohmann::json& j, const BridgingServerStatusReportConfiguration& p)
11035 {
11036 j = nlohmann::json{
11037 TOJSON_IMPL(fileName),
11038 TOJSON_IMPL(intervalSecs),
11039 TOJSON_IMPL(enabled),
11040 TOJSON_IMPL(includeGroupDetail),
11041 TOJSON_IMPL(includeBridgeDetail),
11042 TOJSON_IMPL(includeBridgeGroupDetail),
11043 TOJSON_IMPL(runCmd)
11044 };
11045 }
11046 static void from_json(const nlohmann::json& j, BridgingServerStatusReportConfiguration& p)
11047 {
11048 p.clear();
11049 getOptional<std::string>("fileName", p.fileName, j);
11050 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
11051 getOptional<bool>("enabled", p.enabled, j, false);
11052 getOptional<std::string>("runCmd", p.runCmd, j);
11053 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
11054 getOptional<bool>("includeBridgeDetail", p.includeBridgeDetail, j, false);
11055 getOptional<bool>("includeBridgeGroupDetail", p.includeBridgeGroupDetail, j, false);
11056 }
11057
11058 //-----------------------------------------------------------
11059 JSON_SERIALIZED_CLASS(BridgingServerInternals)
11072 {
11073 IMPLEMENT_JSON_SERIALIZATION()
11074 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerInternals)
11075
11076 public:
11079
11082
11085
11087 {
11088 clear();
11089 }
11090
11091 void clear()
11092 {
11093 watchdog.clear();
11094 tuning.clear();
11095 housekeeperIntervalMs = 1000;
11096 }
11097 };
11098
11099 static void to_json(nlohmann::json& j, const BridgingServerInternals& p)
11100 {
11101 j = nlohmann::json{
11102 TOJSON_IMPL(watchdog),
11103 TOJSON_IMPL(housekeeperIntervalMs),
11104 TOJSON_IMPL(tuning)
11105 };
11106 }
11107 static void from_json(const nlohmann::json& j, BridgingServerInternals& p)
11108 {
11109 p.clear();
11110 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
11111 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
11112 getOptional<TuningSettings>("tuning", p.tuning, j);
11113 }
11114
11115 //-----------------------------------------------------------
11116 JSON_SERIALIZED_CLASS(BridgingServerConfiguration)
11126 {
11127 IMPLEMENT_JSON_SERIALIZATION()
11128 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerConfiguration)
11129
11130 public:
11132 typedef enum
11133 {
11135 omRaw = 0,
11136
11138 omPayloadTransformation = 1,
11139
11141 omAnonymousMixing = 2,
11142
11144 omLanguageTranslation = 3
11145 } OpMode_t;
11146
11148 std::string id;
11149
11152
11155
11158
11161
11164
11167
11170
11173
11176
11179
11182
11185
11188
11191
11193 {
11194 clear();
11195 }
11196
11197 void clear()
11198 {
11199 id.clear();
11200 mode = omRaw;
11201 serviceConfigurationFileCheckSecs = 60;
11202 bridgingConfigurationFileName.clear();
11203 bridgingConfigurationFileCommand.clear();
11204 bridgingConfigurationFileCheckSecs = 60;
11205 statusReport.clear();
11206 externalHealthCheckResponder.clear();
11207 internals.clear();
11208 certStoreFileName.clear();
11209 certStorePasswordHex.clear();
11210 enginePolicy.clear();
11211 configurationCheckSignalName = "rts.6cc0651.${id}";
11212 fipsCrypto.clear();
11213 nsm.clear();
11214 }
11215 };
11216
11217 static void to_json(nlohmann::json& j, const BridgingServerConfiguration& p)
11218 {
11219 j = nlohmann::json{
11220 TOJSON_IMPL(id),
11221 TOJSON_IMPL(mode),
11222 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
11223 TOJSON_IMPL(bridgingConfigurationFileName),
11224 TOJSON_IMPL(bridgingConfigurationFileCommand),
11225 TOJSON_IMPL(bridgingConfigurationFileCheckSecs),
11226 TOJSON_IMPL(statusReport),
11227 TOJSON_IMPL(externalHealthCheckResponder),
11228 TOJSON_IMPL(internals),
11229 TOJSON_IMPL(certStoreFileName),
11230 TOJSON_IMPL(certStorePasswordHex),
11231 TOJSON_IMPL(enginePolicy),
11232 TOJSON_IMPL(configurationCheckSignalName),
11233 TOJSON_IMPL(fipsCrypto),
11234 TOJSON_IMPL(nsm)
11235 };
11236 }
11237 static void from_json(const nlohmann::json& j, BridgingServerConfiguration& p)
11238 {
11239 p.clear();
11240 getOptional<std::string>("id", p.id, j);
11241 getOptional<BridgingServerConfiguration::OpMode_t>("mode", p.mode, j, BridgingServerConfiguration::OpMode_t::omRaw);
11242 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
11243 getOptional<std::string>("bridgingConfigurationFileName", p.bridgingConfigurationFileName, j);
11244 getOptional<std::string>("bridgingConfigurationFileCommand", p.bridgingConfigurationFileCommand, j);
11245 getOptional<int>("bridgingConfigurationFileCheckSecs", p.bridgingConfigurationFileCheckSecs, j, 60);
11246 getOptional<BridgingServerStatusReportConfiguration>("statusReport", p.statusReport, j);
11247 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
11248 getOptional<BridgingServerInternals>("internals", p.internals, j);
11249 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
11250 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
11251 j.at("enginePolicy").get_to(p.enginePolicy);
11252 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.6cc0651.${id}");
11253 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
11254 getOptional<NsmConfiguration>("nsm", p.nsm, j);
11255 }
11256
11257
11258 //-----------------------------------------------------------
11259 JSON_SERIALIZED_CLASS(EarGroupsConfiguration)
11270 {
11271 IMPLEMENT_JSON_SERIALIZATION()
11272 IMPLEMENT_JSON_DOCUMENTATION(EarGroupsConfiguration)
11273
11274 public:
11276 std::vector<Group> groups;
11277
11279 {
11280 clear();
11281 }
11282
11283 void clear()
11284 {
11285 groups.clear();
11286 }
11287 };
11288
11289 static void to_json(nlohmann::json& j, const EarGroupsConfiguration& p)
11290 {
11291 j = nlohmann::json{
11292 TOJSON_IMPL(groups)
11293 };
11294 }
11295 static void from_json(const nlohmann::json& j, EarGroupsConfiguration& p)
11296 {
11297 p.clear();
11298 getOptional<std::vector<Group>>("groups", p.groups, j);
11299 }
11300
11301 //-----------------------------------------------------------
11302 JSON_SERIALIZED_CLASS(EarServerStatusReportConfiguration)
11313 {
11314 IMPLEMENT_JSON_SERIALIZATION()
11315 IMPLEMENT_JSON_DOCUMENTATION(EarServerStatusReportConfiguration)
11316
11317 public:
11319 std::string fileName;
11320
11323
11326
11328 std::string runCmd;
11329
11332
11334 {
11335 clear();
11336 }
11337
11338 void clear()
11339 {
11340 fileName.clear();
11341 intervalSecs = 60;
11342 enabled = false;
11343 includeGroupDetail = false;
11344 runCmd.clear();
11345 }
11346 };
11347
11348 static void to_json(nlohmann::json& j, const EarServerStatusReportConfiguration& p)
11349 {
11350 j = nlohmann::json{
11351 TOJSON_IMPL(fileName),
11352 TOJSON_IMPL(intervalSecs),
11353 TOJSON_IMPL(enabled),
11354 TOJSON_IMPL(includeGroupDetail),
11355 TOJSON_IMPL(runCmd)
11356 };
11357 }
11358 static void from_json(const nlohmann::json& j, EarServerStatusReportConfiguration& p)
11359 {
11360 p.clear();
11361 getOptional<std::string>("fileName", p.fileName, j);
11362 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
11363 getOptional<bool>("enabled", p.enabled, j, false);
11364 getOptional<std::string>("runCmd", p.runCmd, j);
11365 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
11366 }
11367
11368 //-----------------------------------------------------------
11369 JSON_SERIALIZED_CLASS(EarServerInternals)
11382 {
11383 IMPLEMENT_JSON_SERIALIZATION()
11384 IMPLEMENT_JSON_DOCUMENTATION(EarServerInternals)
11385
11386 public:
11389
11392
11395
11397 {
11398 clear();
11399 }
11400
11401 void clear()
11402 {
11403 watchdog.clear();
11404 tuning.clear();
11405 housekeeperIntervalMs = 1000;
11406 }
11407 };
11408
11409 static void to_json(nlohmann::json& j, const EarServerInternals& p)
11410 {
11411 j = nlohmann::json{
11412 TOJSON_IMPL(watchdog),
11413 TOJSON_IMPL(housekeeperIntervalMs),
11414 TOJSON_IMPL(tuning)
11415 };
11416 }
11417 static void from_json(const nlohmann::json& j, EarServerInternals& p)
11418 {
11419 p.clear();
11420 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
11421 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
11422 getOptional<TuningSettings>("tuning", p.tuning, j);
11423 }
11424
11425 //-----------------------------------------------------------
11426 JSON_SERIALIZED_CLASS(EarServerConfiguration)
11436 {
11437 IMPLEMENT_JSON_SERIALIZATION()
11438 IMPLEMENT_JSON_DOCUMENTATION(EarServerConfiguration)
11439
11440 public:
11441
11443 std::string id;
11444
11447
11450
11453
11456
11459
11462
11465
11468
11471
11474
11477
11480
11483
11485 {
11486 clear();
11487 }
11488
11489 void clear()
11490 {
11491 id.clear();
11492 serviceConfigurationFileCheckSecs = 60;
11493 groupsConfigurationFileName.clear();
11494 groupsConfigurationFileCommand.clear();
11495 groupsConfigurationFileCheckSecs = 60;
11496 statusReport.clear();
11497 externalHealthCheckResponder.clear();
11498 internals.clear();
11499 certStoreFileName.clear();
11500 certStorePasswordHex.clear();
11501 enginePolicy.clear();
11502 configurationCheckSignalName = "rts.9a164fa.${id}";
11503 fipsCrypto.clear();
11504 nsm.clear();
11505 }
11506 };
11507
11508 static void to_json(nlohmann::json& j, const EarServerConfiguration& p)
11509 {
11510 j = nlohmann::json{
11511 TOJSON_IMPL(id),
11512 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
11513 TOJSON_IMPL(groupsConfigurationFileName),
11514 TOJSON_IMPL(groupsConfigurationFileCommand),
11515 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
11516 TOJSON_IMPL(statusReport),
11517 TOJSON_IMPL(externalHealthCheckResponder),
11518 TOJSON_IMPL(internals),
11519 TOJSON_IMPL(certStoreFileName),
11520 TOJSON_IMPL(certStorePasswordHex),
11521 TOJSON_IMPL(enginePolicy),
11522 TOJSON_IMPL(configurationCheckSignalName),
11523 TOJSON_IMPL(fipsCrypto),
11524 TOJSON_IMPL(nsm)
11525 };
11526 }
11527 static void from_json(const nlohmann::json& j, EarServerConfiguration& p)
11528 {
11529 p.clear();
11530 getOptional<std::string>("id", p.id, j);
11531 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
11532 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
11533 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
11534 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
11535 getOptional<EarServerStatusReportConfiguration>("statusReport", p.statusReport, j);
11536 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
11537 getOptional<EarServerInternals>("internals", p.internals, j);
11538 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
11539 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
11540 j.at("enginePolicy").get_to(p.enginePolicy);
11541 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
11542 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
11543 getOptional<NsmConfiguration>("nsm", p.nsm, j);
11544 }
11545
11546//-----------------------------------------------------------
11547 JSON_SERIALIZED_CLASS(EngageSemGroupsConfiguration)
11558 {
11559 IMPLEMENT_JSON_SERIALIZATION()
11560 IMPLEMENT_JSON_DOCUMENTATION(EngageSemGroupsConfiguration)
11561
11562 public:
11564 std::vector<Group> groups;
11565
11567 {
11568 clear();
11569 }
11570
11571 void clear()
11572 {
11573 groups.clear();
11574 }
11575 };
11576
11577 static void to_json(nlohmann::json& j, const EngageSemGroupsConfiguration& p)
11578 {
11579 j = nlohmann::json{
11580 TOJSON_IMPL(groups)
11581 };
11582 }
11583 static void from_json(const nlohmann::json& j, EngageSemGroupsConfiguration& p)
11584 {
11585 p.clear();
11586 getOptional<std::vector<Group>>("groups", p.groups, j);
11587 }
11588
11589 //-----------------------------------------------------------
11590 JSON_SERIALIZED_CLASS(EngageSemServerStatusReportConfiguration)
11601 {
11602 IMPLEMENT_JSON_SERIALIZATION()
11603 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerStatusReportConfiguration)
11604
11605 public:
11607 std::string fileName;
11608
11611
11614
11616 std::string runCmd;
11617
11620
11622 {
11623 clear();
11624 }
11625
11626 void clear()
11627 {
11628 fileName.clear();
11629 intervalSecs = 60;
11630 enabled = false;
11631 includeGroupDetail = false;
11632 runCmd.clear();
11633 }
11634 };
11635
11636 static void to_json(nlohmann::json& j, const EngageSemServerStatusReportConfiguration& p)
11637 {
11638 j = nlohmann::json{
11639 TOJSON_IMPL(fileName),
11640 TOJSON_IMPL(intervalSecs),
11641 TOJSON_IMPL(enabled),
11642 TOJSON_IMPL(includeGroupDetail),
11643 TOJSON_IMPL(runCmd)
11644 };
11645 }
11646 static void from_json(const nlohmann::json& j, EngageSemServerStatusReportConfiguration& p)
11647 {
11648 p.clear();
11649 getOptional<std::string>("fileName", p.fileName, j);
11650 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
11651 getOptional<bool>("enabled", p.enabled, j, false);
11652 getOptional<std::string>("runCmd", p.runCmd, j);
11653 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
11654 }
11655
11656 //-----------------------------------------------------------
11657 JSON_SERIALIZED_CLASS(EngageSemServerInternals)
11670 {
11671 IMPLEMENT_JSON_SERIALIZATION()
11672 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerInternals)
11673
11674 public:
11677
11680
11683
11685 {
11686 clear();
11687 }
11688
11689 void clear()
11690 {
11691 watchdog.clear();
11692 tuning.clear();
11693 housekeeperIntervalMs = 1000;
11694 }
11695 };
11696
11697 static void to_json(nlohmann::json& j, const EngageSemServerInternals& p)
11698 {
11699 j = nlohmann::json{
11700 TOJSON_IMPL(watchdog),
11701 TOJSON_IMPL(housekeeperIntervalMs),
11702 TOJSON_IMPL(tuning)
11703 };
11704 }
11705 static void from_json(const nlohmann::json& j, EngageSemServerInternals& p)
11706 {
11707 p.clear();
11708 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
11709 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
11710 getOptional<TuningSettings>("tuning", p.tuning, j);
11711 }
11712
11713 //-----------------------------------------------------------
11714 JSON_SERIALIZED_CLASS(EngageSemServerConfiguration)
11724 {
11725 IMPLEMENT_JSON_SERIALIZATION()
11726 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerConfiguration)
11727
11728 public:
11729
11731 std::string id;
11732
11735
11738
11741
11744
11747
11750
11753
11756
11759
11762
11765
11768
11771
11772 int maxQueueLen;
11773 int minQueuingMs;
11774 int maxQueuingMs;
11775 int minPriority;
11776 int maxPriority;
11777
11779 {
11780 clear();
11781 }
11782
11783 void clear()
11784 {
11785 id.clear();
11786 serviceConfigurationFileCheckSecs = 60;
11787 groupsConfigurationFileName.clear();
11788 groupsConfigurationFileCommand.clear();
11789 groupsConfigurationFileCheckSecs = 60;
11790 statusReport.clear();
11791 externalHealthCheckResponder.clear();
11792 internals.clear();
11793 certStoreFileName.clear();
11794 certStorePasswordHex.clear();
11795 enginePolicy.clear();
11796 configurationCheckSignalName = "rts.9a164fa.${id}";
11797 fipsCrypto.clear();
11798 nsm.clear();
11799
11800 maxQueueLen = 64;
11801 minQueuingMs = 0;
11802 maxQueuingMs = 15000;
11803 minPriority = 0;
11804 maxPriority = 255;
11805 }
11806 };
11807
11808 static void to_json(nlohmann::json& j, const EngageSemServerConfiguration& p)
11809 {
11810 j = nlohmann::json{
11811 TOJSON_IMPL(id),
11812 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
11813 TOJSON_IMPL(groupsConfigurationFileName),
11814 TOJSON_IMPL(groupsConfigurationFileCommand),
11815 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
11816 TOJSON_IMPL(statusReport),
11817 TOJSON_IMPL(externalHealthCheckResponder),
11818 TOJSON_IMPL(internals),
11819 TOJSON_IMPL(certStoreFileName),
11820 TOJSON_IMPL(certStorePasswordHex),
11821 TOJSON_IMPL(enginePolicy),
11822 TOJSON_IMPL(configurationCheckSignalName),
11823 TOJSON_IMPL(fipsCrypto),
11824 TOJSON_IMPL(nsm),
11825 TOJSON_IMPL(maxQueueLen),
11826 TOJSON_IMPL(minQueuingMs),
11827 TOJSON_IMPL(maxQueuingMs),
11828 TOJSON_IMPL(minPriority),
11829 TOJSON_IMPL(maxPriority)
11830 };
11831 }
11832 static void from_json(const nlohmann::json& j, EngageSemServerConfiguration& p)
11833 {
11834 p.clear();
11835 getOptional<std::string>("id", p.id, j);
11836 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
11837 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
11838 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
11839 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
11840 getOptional<EngageSemServerStatusReportConfiguration>("statusReport", p.statusReport, j);
11841 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
11842 getOptional<EngageSemServerInternals>("internals", p.internals, j);
11843 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
11844 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
11845 j.at("enginePolicy").get_to(p.enginePolicy);
11846 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
11847 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
11848 getOptional<NsmConfiguration>("nsm", p.nsm, j);
11849 getOptional<int>("maxQueueLen", p.maxQueueLen, j, 64);
11850 getOptional<int>("minQueuingMs", p.minQueuingMs, j, 0);
11851 getOptional<int>("maxQueuingMs", p.maxQueuingMs, j, 15000);
11852 getOptional<int>("minPriority", p.minPriority, j, 0);
11853 getOptional<int>("maxPriority", p.maxPriority, j, 255);
11854 }
11855
11856 //-----------------------------------------------------------
11857 static inline void dumpExampleConfigurations(const char *path)
11858 {
11859 WatchdogSettings::document();
11860 FileRecordingRequest::document();
11861 Feature::document();
11862 Featureset::document();
11863 Agc::document();
11864 RtpPayloadTypeTranslation::document();
11865 NetworkInterfaceDevice::document();
11866 ListOfNetworkInterfaceDevice::document();
11867 RtpHeader::document();
11868 BlobInfo::document();
11869 TxAudioUri::document();
11870 AdvancedTxParams::document();
11871 Identity::document();
11872 Location::document();
11873 Power::document();
11874 Connectivity::document();
11875 PresenceDescriptorGroupItem::document();
11876 PresenceDescriptor::document();
11877 NetworkTxOptions::document();
11878 TcpNetworkTxOptions::document();
11879 NetworkAddress::document();
11880 NetworkAddressRxTx::document();
11881 NetworkAddressRestrictionList::document();
11882 StringRestrictionList::document();
11883 Rallypoint::document();
11884 RallypointCluster::document();
11885 NetworkDeviceDescriptor::document();
11886 TxAudio::document();
11887 AudioDeviceDescriptor::document();
11888 ListOfAudioDeviceDescriptor::document();
11889 Audio::document();
11890 TalkerInformation::document();
11891 GroupTalkers::document();
11892 Presence::document();
11893 Advertising::document();
11894 GroupPriorityTranslation::document();
11895 GroupTimeline::document();
11896 GroupAppTransport::document();
11897 RtpProfile::document();
11898 Group::document();
11899 Mission::document();
11900 LicenseDescriptor::document();
11901 EngineNetworkingRpUdpStreaming::document();
11902 EnginePolicyNetworking::document();
11903 Aec::document();
11904 Vad::document();
11905 Bridge::document();
11906 AndroidAudio::document();
11907 EnginePolicyAudio::document();
11908 SecurityCertificate::document();
11909 EnginePolicySecurity::document();
11910 EnginePolicyLogging::document();
11911 EnginePolicyDatabase::document();
11912 NamedAudioDevice::document();
11913 EnginePolicyNamedAudioDevices::document();
11914 Licensing::document();
11915 DiscoveryMagellan::document();
11916 DiscoverySsdp::document();
11917 DiscoverySap::document();
11918 DiscoveryCistech::document();
11919 DiscoveryTrellisware::document();
11920 DiscoveryConfiguration::document();
11921 EnginePolicyInternals::document();
11922 EnginePolicyTimelines::document();
11923 RtpMapEntry::document();
11924 ExternalModule::document();
11925 ExternalCodecDescriptor::document();
11926 EnginePolicy::document();
11927 TalkgroupAsset::document();
11928 EngageDiscoveredGroup::document();
11929 RallypointPeer::document();
11930 RallypointServerLimits::document();
11931 RallypointServerStatusReportConfiguration::document();
11932 RallypointServerLinkGraph::document();
11933 ExternalHealthCheckResponder::document();
11934 Tls::document();
11935 PeeringConfiguration::document();
11936 IgmpSnooping::document();
11937 RallypointReflector::document();
11938 RallypointUdpStreaming::document();
11939 RallypointServer::document();
11940 PlatformDiscoveredService::document();
11941 TimelineQueryParameters::document();
11942 CertStoreCertificate::document();
11943 CertStore::document();
11944 CertStoreCertificateElement::document();
11945 CertStoreDescriptor::document();
11946 CertificateDescriptor::document();
11947 BridgeCreationDetail::document();
11948 GroupConnectionDetail::document();
11949 GroupTxDetail::document();
11950 GroupCreationDetail::document();
11951 GroupReconfigurationDetail::document();
11952 GroupHealthReport::document();
11953 InboundProcessorStats::document();
11954 TrafficCounter::document();
11955 GroupStats::document();
11956 RallypointConnectionDetail::document();
11957 BridgingConfiguration::document();
11958 BridgingServerStatusReportConfiguration::document();
11959 BridgingServerInternals::document();
11960 BridgingServerConfiguration::document();
11961 EarGroupsConfiguration::document();
11962 EarServerStatusReportConfiguration::document();
11963 EarServerInternals::document();
11964 EarServerConfiguration::document();
11965 RangerPackets::document();
11966 TransportImpairment::document();
11967
11968 EngageSemGroupsConfiguration::document();
11969 EngageSemServerStatusReportConfiguration::document();
11970 EngageSemServerInternals::document();
11971 EngageSemServerConfiguration::document();
11972 }
11973}
11974
11975#ifndef WIN32
11976 #pragma GCC diagnostic pop
11977#endif
11978
11979#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...
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.
bool outputMuted
[Optional, Default: false] Mutes output audio.
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 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
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 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 modes the briging service runs in.
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< 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.
bool selfSigned
Indicates whether the certificqte is self-signed.
std::string notBefore
Validity date notBefore.
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.
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.
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 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 path
Path where the crypto engine module is located
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...
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.
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).
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....
BridgingOpMode_t bom
Specifies the bridging operation mode if applicable (see BridgingOpMode_t).
BridgingOpMode_t
Enum describing bridging operation mode types where applicable.
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
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.
bool enabled
Enables IGMP. Default is false.
Detailed statistics for an inbound processor.
Helper class for serializing and deserializing the LicenseDescriptor JSON.
std::string entitlement
Entitlement key to use for the product.
std::string cargo
Reserved for internal use.
std::string manufacturerId
[Read only] Manufacturer ID.
std::string key
License Key to be used for the application.
uint8_t cargoFlags
Reserved for internal use.
int type
[Read only] 0 = unknown, 1 = perpetual, 2 = expires
std::string deviceId
[Read only] Unique device identifier generated by the Engine.
time_t expires
[Read only] The time that the license key or activation code expires in Unix timestamp - Zulu/UTC.
std::string activationCode
If the key required activation, this is the activation code generated using the entitlement,...
std::string expiresFormatted
[Read only] The time that the license key or activation code expires formatted in ISO 8601 format,...
std::string deviceId
Device Identifier. See LicenseDescriptor::deviceId for details.
std::string manufacturerId
Manufacturer ID to use for the product. See LicenseDescriptor::manufacturerId for details.
std::string activationCode
Activation Code issued for the license key. See LicenseDescriptor::activationCode for details.
std::string key
License key. See LicenseDescriptor::key for details.
std::string entitlement
Entitlement key to use for the product. See LicenseDescriptor::entitlement for details.
std::vector< Group > groups
Array of groups in the configuration.
std::vector< VoiceToVoiceSession > voiceToVoiceSessions
Array of voiceToVoice sessions in the configuration.
Configuration for the linguistics server.
LingoServerStatusReportConfiguration statusReport
Details for producing a status report.
std::string lingoConfigurationFileName
Name of a file containing the linguistics configuration.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
std::string id
A unqiue identifier for the linguistics server.
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
NsmConfiguration nsm
[Optional] Settings for NSM.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
std::string lingoConfigurationFileCommand
Command-line to execute that returns a linguistics configuration.
LingoServerInternals internals
Internal settings.
EnginePolicy enginePolicy
The policy to be used for the underlying Engage Engine.
int lingoConfigurationFileCheckSecs
Number of seconds between checks to see if the linguistics configuration has been updated....
std::string certStoreFileName
Path to the certificate store.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
NetworkAddress proxy
Address and port of the proxy.
int serviceConfigurationFileCheckSecs
Number of seconds between checks to see if the service configuration has been updated....
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
WatchdogSettings watchdog
[Optional] Settings for the watchdog.
TuningSettings tuning
[Optional] Low-level tuning
TODO: Configuration for the translation server status report file.
Location information used as part of the PresenceDescriptor.
double longitude
Its the longitudinal position using the Signed degrees format (DDD.dddd) format. Valid range is -180 ...
double altitude
[Optional, Default: INVALID_LOCATION_VALUE] The altitude above sea level in meters.
uint32_t ts
[Read Only: Unix timestamp - Zulu/UTC] Indicates the timestamp that the location was recorded.
double latitude
Its the latitude position using the using the Signed degrees format (DDD.dddd). Valid range is -90 to...
double direction
[Optional, Default: INVALID_LOCATION_VALUE] Direction the endpoint is traveling in degrees....
double speed
[Optional, Default: INVALID_LOCATION_VALUE] The speed the endpoint is traveling at in meters per seco...
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 mesh configuration. Change this whenever you update your configuration...
std::string id
An identifier useful for organizations that track different mesh 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 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 connectionTimeoutSecs
[Optional, Default: 0] 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.
uint64_t msToNextConnectionAttempt
Milliseconds until next connection attempt.
Defines settings for Rallypoint extended group restrictions.
std::vector< StringRestrictionList > restrictions
Restrictions.
int transactionTimeoutMs
[Optional, Default 5000] Number of milliseconds that a transaction may take before the link is consid...
bool allowSelfSignedCertificate
[Optional, Default false] Allows the Rallypoint to accept self-signed certificates from the far-end
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 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
SecurityCertificate certificate
Internal certificate detail.
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.
bool enabled
Internal enablement setting.
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 mesh leaf to reverse-subscribe to a core node upon the core subscribing and a re...
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 mesh 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.
PacketCapturer rxCapture
Details for capture of received packets
std::string meshName
[Optional] This Rallypoint's mesh name
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.
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::vector< std::string > extraMeshes
[Optional] List of additional meshes that can be reached via this RP
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.
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::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.
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 enabled
[Default: false] Websocket is enabled
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...