Engage Engine API  1.249.9089
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 std::string curves;
576
578 std::string ciphers;
579
581 {
582 clear();
583 }
584
585 void clear()
586 {
587 enabled = false;
588 path.clear();
589 debug = false;
590 curves.clear();
591 ciphers.clear();
592 }
593
594 virtual void initForDocumenting()
595 {
596 clear();
597 }
598 };
599
600 static void to_json(nlohmann::json& j, const FipsCryptoSettings& p)
601 {
602 j = nlohmann::json{
603 TOJSON_IMPL(enabled),
604 TOJSON_IMPL(path),
605 TOJSON_IMPL(debug),
606 TOJSON_IMPL(curves),
607 TOJSON_IMPL(ciphers)
608 };
609 }
610 static void from_json(const nlohmann::json& j, FipsCryptoSettings& p)
611 {
612 p.clear();
613 FROMJSON_IMPL_SIMPLE(enabled);
614 FROMJSON_IMPL_SIMPLE(path);
615 FROMJSON_IMPL_SIMPLE(debug);
616 FROMJSON_IMPL_SIMPLE(curves);
617 FROMJSON_IMPL_SIMPLE(ciphers);
618 }
619
620
621 //-----------------------------------------------------------
622 JSON_SERIALIZED_CLASS(WatchdogSettings)
624 {
625 IMPLEMENT_JSON_SERIALIZATION()
626 IMPLEMENT_JSON_DOCUMENTATION(WatchdogSettings)
627
628 public:
631
634
637
640
643
645 {
646 clear();
647 }
648
649 void clear()
650 {
651 enabled = true;
652 intervalMs = 5000;
653 hangDetectionMs = 2000;
654 abortOnHang = true;
655 slowExecutionThresholdMs = 100;
656 }
657
658 virtual void initForDocumenting()
659 {
660 clear();
661 }
662 };
663
664 static void to_json(nlohmann::json& j, const WatchdogSettings& p)
665 {
666 j = nlohmann::json{
667 TOJSON_IMPL(enabled),
668 TOJSON_IMPL(intervalMs),
669 TOJSON_IMPL(hangDetectionMs),
670 TOJSON_IMPL(abortOnHang),
671 TOJSON_IMPL(slowExecutionThresholdMs)
672 };
673 }
674 static void from_json(const nlohmann::json& j, WatchdogSettings& p)
675 {
676 p.clear();
677 getOptional<bool>("enabled", p.enabled, j, true);
678 getOptional<int>("intervalMs", p.intervalMs, j, 5000);
679 getOptional<int>("hangDetectionMs", p.hangDetectionMs, j, 2000);
680 getOptional<bool>("abortOnHang", p.abortOnHang, j, true);
681 getOptional<int>("slowExecutionThresholdMs", p.slowExecutionThresholdMs, j, 100);
682 }
683
684
685 //-----------------------------------------------------------
686 JSON_SERIALIZED_CLASS(FileRecordingRequest)
688 {
689 IMPLEMENT_JSON_SERIALIZATION()
690 IMPLEMENT_JSON_DOCUMENTATION(FileRecordingRequest)
691
692 public:
693 std::string id;
694 std::string fileName;
695 uint32_t maxMs;
696
698 {
699 clear();
700 }
701
702 void clear()
703 {
704 id.clear();
705 fileName.clear();
706 maxMs = 60000;
707 }
708
709 virtual void initForDocumenting()
710 {
711 clear();
712 id = "1-2-3-4-5-6-7-8-9";
713 fileName = "/tmp/test.wav";
714 maxMs = 10000;
715 }
716 };
717
718 static void to_json(nlohmann::json& j, const FileRecordingRequest& p)
719 {
720 j = nlohmann::json{
721 TOJSON_IMPL(id),
722 TOJSON_IMPL(fileName),
723 TOJSON_IMPL(maxMs)
724 };
725 }
726 static void from_json(const nlohmann::json& j, FileRecordingRequest& p)
727 {
728 p.clear();
729 j.at("id").get_to(p.id);
730 j.at("fileName").get_to(p.fileName);
731 getOptional<uint32_t>("maxMs", p.maxMs, j, 60000);
732 }
733
734
735 //-----------------------------------------------------------
736 JSON_SERIALIZED_CLASS(Feature)
738 {
739 IMPLEMENT_JSON_SERIALIZATION()
740 IMPLEMENT_JSON_DOCUMENTATION(Feature)
741
742 public:
743 std::string id;
744 std::string name;
745 std::string description;
746 std::string comments;
747 int count;
748 int used; // NOTE: Ignored during deserialization!
749
750 Feature()
751 {
752 clear();
753 }
754
755 void clear()
756 {
757 id.clear();
758 name.clear();
759 description.clear();
760 comments.clear();
761 count = 0;
762 used = 0;
763 }
764
765 virtual void initForDocumenting()
766 {
767 clear();
768 id = "{af9540d1-3e86-4fa6-8b80-e26daecb61ab}";
769 name = "A sample feature";
770 description = "This is an example of a feature";
771 comments = "These are comments for this feature";
772 count = 42;
773 used = 16;
774 }
775 };
776
777 static void to_json(nlohmann::json& j, const Feature& p)
778 {
779 j = nlohmann::json{
780 TOJSON_IMPL(id),
781 TOJSON_IMPL(name),
782 TOJSON_IMPL(description),
783 TOJSON_IMPL(comments),
784 TOJSON_IMPL(count),
785 TOJSON_IMPL(used)
786 };
787 }
788 static void from_json(const nlohmann::json& j, Feature& p)
789 {
790 p.clear();
791 j.at("id").get_to(p.id);
792 getOptional("name", p.name, j);
793 getOptional("description", p.description, j);
794 getOptional("comments", p.comments, j);
795 getOptional("count", p.count, j, 0);
796
797 // NOTE: Not deserialized!
798 //getOptional("used", p.used, j, 0);
799 }
800
801
802 //-----------------------------------------------------------
803 JSON_SERIALIZED_CLASS(Featureset)
805 {
806 IMPLEMENT_JSON_SERIALIZATION()
807 IMPLEMENT_JSON_DOCUMENTATION(Featureset)
808
809 public:
810 std::string signature;
811 bool lockToDeviceId;
812 std::vector<Feature> features;
813
814 Featureset()
815 {
816 clear();
817 }
818
819 void clear()
820 {
821 signature.clear();
822 lockToDeviceId = false;
823 features.clear();
824 }
825
826 virtual void initForDocumenting()
827 {
828 clear();
829 signature = "c39df3f36c6444e686e47e70fc45cf91e6ed2d8de62d4a1e89f507d567ff48aaabb1a70e54b44377b46fc4a1a2e319e5b77e4abffc444db98f8eb55d709aad5f";
830 lockToDeviceId = false;
831 }
832 };
833
834 static void to_json(nlohmann::json& j, const Featureset& p)
835 {
836 j = nlohmann::json{
837 TOJSON_IMPL(signature),
838 TOJSON_IMPL(lockToDeviceId),
839 TOJSON_IMPL(features)
840 };
841 }
842 static void from_json(const nlohmann::json& j, Featureset& p)
843 {
844 p.clear();
845 getOptional("signature", p.signature, j);
846 getOptional<bool>("lockToDeviceId", p.lockToDeviceId, j, false);
847 getOptional<std::vector<Feature>>("features", p.features, j);
848 }
849
850
851 //-----------------------------------------------------------
852 JSON_SERIALIZED_CLASS(Agc)
862 {
863 IMPLEMENT_JSON_SERIALIZATION()
864 IMPLEMENT_JSON_DOCUMENTATION(Agc)
865
866 public:
869
872
875
878
881
884
885 Agc()
886 {
887 clear();
888 }
889
890 void clear()
891 {
892 enabled = false;
893 minLevel = 0;
894 maxLevel = 255;
895 compressionGainDb = 25;
896 enableLimiter = false;
897 targetLevelDb = 3;
898 }
899 };
900
901 static void to_json(nlohmann::json& j, const Agc& p)
902 {
903 j = nlohmann::json{
904 TOJSON_IMPL(enabled),
905 TOJSON_IMPL(minLevel),
906 TOJSON_IMPL(maxLevel),
907 TOJSON_IMPL(compressionGainDb),
908 TOJSON_IMPL(enableLimiter),
909 TOJSON_IMPL(targetLevelDb)
910 };
911 }
912 static void from_json(const nlohmann::json& j, Agc& p)
913 {
914 p.clear();
915 getOptional<bool>("enabled", p.enabled, j, false);
916 getOptional<int>("minLevel", p.minLevel, j, 0);
917 getOptional<int>("maxLevel", p.maxLevel, j, 255);
918 getOptional<int>("compressionGainDb", p.compressionGainDb, j, 25);
919 getOptional<bool>("enableLimiter", p.enableLimiter, j, false);
920 getOptional<int>("targetLevelDb", p.targetLevelDb, j, 3);
921 }
922
923
924 //-----------------------------------------------------------
925 JSON_SERIALIZED_CLASS(RtpPayloadTypeTranslation)
935 {
936 IMPLEMENT_JSON_SERIALIZATION()
937 IMPLEMENT_JSON_DOCUMENTATION(RtpPayloadTypeTranslation)
938
939 public:
941 uint16_t external;
942
944 uint16_t engage;
945
947 {
948 clear();
949 }
950
951 void clear()
952 {
953 external = 0;
954 engage = 0;
955 }
956
957 bool matches(const RtpPayloadTypeTranslation& other)
958 {
959 return ( (external == other.external) && (engage == other.engage) );
960 }
961 };
962
963 static void to_json(nlohmann::json& j, const RtpPayloadTypeTranslation& p)
964 {
965 j = nlohmann::json{
966 TOJSON_IMPL(external),
967 TOJSON_IMPL(engage)
968 };
969 }
970 static void from_json(const nlohmann::json& j, RtpPayloadTypeTranslation& p)
971 {
972 p.clear();
973 getOptional<uint16_t>("external", p.external, j);
974 getOptional<uint16_t>("engage", p.engage, j);
975 }
976
977 //-----------------------------------------------------------
978 JSON_SERIALIZED_CLASS(NetworkInterfaceDevice)
980 {
981 IMPLEMENT_JSON_SERIALIZATION()
982 IMPLEMENT_JSON_DOCUMENTATION(NetworkInterfaceDevice)
983
984 public:
985 std::string name;
986 std::string friendlyName;
987 std::string description;
988 int family;
989 std::string address;
990 bool available;
991 bool isLoopback;
992 bool supportsMulticast;
993 std::string hardwareAddress;
994
996 {
997 clear();
998 }
999
1000 void clear()
1001 {
1002 name.clear();
1003 friendlyName.clear();
1004 description.clear();
1005 family = -1;
1006 address.clear();
1007 available = false;
1008 isLoopback = false;
1009 supportsMulticast = false;
1010 hardwareAddress.clear();
1011 }
1012
1013 virtual void initForDocumenting()
1014 {
1015 clear();
1016 name = "en0";
1017 friendlyName = "Wi-Fi";
1018 description = "A wi-fi adapter";
1019 family = 1;
1020 address = "127.0.0.1";
1021 available = true;
1022 isLoopback = true;
1023 supportsMulticast = false;
1024 hardwareAddress = "DE:AD:BE:EF:01:02:03";
1025 }
1026 };
1027
1028 static void to_json(nlohmann::json& j, const NetworkInterfaceDevice& p)
1029 {
1030 j = nlohmann::json{
1031 TOJSON_IMPL(name),
1032 TOJSON_IMPL(friendlyName),
1033 TOJSON_IMPL(description),
1034 TOJSON_IMPL(family),
1035 TOJSON_IMPL(address),
1036 TOJSON_IMPL(available),
1037 TOJSON_IMPL(isLoopback),
1038 TOJSON_IMPL(supportsMulticast),
1039 TOJSON_IMPL(hardwareAddress)
1040 };
1041 }
1042 static void from_json(const nlohmann::json& j, NetworkInterfaceDevice& p)
1043 {
1044 p.clear();
1045 getOptional("name", p.name, j);
1046 getOptional("friendlyName", p.friendlyName, j);
1047 getOptional("description", p.description, j);
1048 getOptional("family", p.family, j, -1);
1049 getOptional("address", p.address, j);
1050 getOptional("available", p.available, j, false);
1051 getOptional("isLoopback", p.isLoopback, j, false);
1052 getOptional("supportsMulticast", p.supportsMulticast, j, false);
1053 getOptional("hardwareAddress", p.hardwareAddress, j);
1054 }
1055
1056 //-----------------------------------------------------------
1057 JSON_SERIALIZED_CLASS(ListOfNetworkInterfaceDevice)
1059 {
1060 IMPLEMENT_JSON_SERIALIZATION()
1061 IMPLEMENT_JSON_DOCUMENTATION(ListOfNetworkInterfaceDevice)
1062
1063 public:
1064 std::vector<NetworkInterfaceDevice> list;
1065
1067 {
1068 clear();
1069 }
1070
1071 void clear()
1072 {
1073 list.clear();
1074 }
1075 };
1076
1077 static void to_json(nlohmann::json& j, const ListOfNetworkInterfaceDevice& p)
1078 {
1079 j = nlohmann::json{
1080 TOJSON_IMPL(list)
1081 };
1082 }
1083 static void from_json(const nlohmann::json& j, ListOfNetworkInterfaceDevice& p)
1084 {
1085 p.clear();
1086 getOptional<std::vector<NetworkInterfaceDevice>>("list", p.list, j);
1087 }
1088
1089
1090 //-----------------------------------------------------------
1091 JSON_SERIALIZED_CLASS(RtpHeader)
1101 {
1102 IMPLEMENT_JSON_SERIALIZATION()
1103 IMPLEMENT_JSON_DOCUMENTATION(RtpHeader)
1104
1105 public:
1106
1108 int pt;
1109
1112
1114 uint16_t seq;
1115
1117 uint32_t ssrc;
1118
1120 uint32_t ts;
1121
1122 RtpHeader()
1123 {
1124 clear();
1125 }
1126
1127 void clear()
1128 {
1129 pt = -1;
1130 marker = false;
1131 seq = 0;
1132 ssrc = 0;
1133 ts = 0;
1134 }
1135
1136 virtual void initForDocumenting()
1137 {
1138 clear();
1139 pt = 0;
1140 marker = false;
1141 seq = 123;
1142 ssrc = 12345678;
1143 ts = 87654321;
1144 }
1145 };
1146
1147 static void to_json(nlohmann::json& j, const RtpHeader& p)
1148 {
1149 if(p.pt != -1)
1150 {
1151 j = nlohmann::json{
1152 TOJSON_IMPL(pt),
1153 TOJSON_IMPL(marker),
1154 TOJSON_IMPL(seq),
1155 TOJSON_IMPL(ssrc),
1156 TOJSON_IMPL(ts)
1157 };
1158 }
1159 }
1160 static void from_json(const nlohmann::json& j, RtpHeader& p)
1161 {
1162 p.clear();
1163 getOptional<int>("pt", p.pt, j, -1);
1164 getOptional<bool>("marker", p.marker, j, false);
1165 getOptional<uint16_t>("seq", p.seq, j, 0);
1166 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
1167 getOptional<uint32_t>("ts", p.ts, j, 0);
1168 }
1169
1170 //-----------------------------------------------------------
1171 JSON_SERIALIZED_CLASS(BlobInfo)
1181 {
1182 IMPLEMENT_JSON_SERIALIZATION()
1183 IMPLEMENT_JSON_DOCUMENTATION(BlobInfo)
1184
1185 public:
1189 typedef enum
1190 {
1192 bptUndefined = 0,
1193
1195 bptAppTextUtf8 = 1,
1196
1198 bptJsonTextUtf8 = 2,
1199
1201 bptAppBinary = 3,
1202
1204 bptEngageBinaryHumanBiometrics = 4,
1205
1207 bptAppMimeMessage = 5,
1208
1210 bptEngageInternal = 42
1211 } PayloadType_t;
1212
1214 size_t size;
1215
1217 std::string source;
1218
1220 std::string target;
1221
1224
1227
1229 std::string txnId;
1230
1233
1234 BlobInfo()
1235 {
1236 clear();
1237 }
1238
1239 void clear()
1240 {
1241 size = 0;
1242 source.clear();
1243 target.clear();
1244 rtpHeader.clear();
1245 payloadType = PayloadType_t::bptUndefined;
1246 txnId.clear();
1247 txnTimeoutSecs = 0;
1248 }
1249
1250 virtual void initForDocumenting()
1251 {
1252 clear();
1253 rtpHeader.initForDocumenting();
1254 }
1255 };
1256
1257 static void to_json(nlohmann::json& j, const BlobInfo& p)
1258 {
1259 j = nlohmann::json{
1260 TOJSON_IMPL(size),
1261 TOJSON_IMPL(source),
1262 TOJSON_IMPL(target),
1263 TOJSON_IMPL(rtpHeader),
1264 TOJSON_IMPL(payloadType),
1265 TOJSON_IMPL(txnId),
1266 TOJSON_IMPL(txnTimeoutSecs)
1267 };
1268 }
1269 static void from_json(const nlohmann::json& j, BlobInfo& p)
1270 {
1271 p.clear();
1272 getOptional<size_t>("size", p.size, j, 0);
1273 getOptional<std::string>("source", p.source, j, EMPTY_STRING);
1274 getOptional<std::string>("target", p.target, j, EMPTY_STRING);
1275 getOptional<RtpHeader>("rtpHeader", p.rtpHeader, j);
1276 getOptional<BlobInfo::PayloadType_t>("payloadType", p.payloadType, j, BlobInfo::PayloadType_t::bptUndefined);
1277 getOptional<std::string>("txnId", p.txnId, j, EMPTY_STRING);
1278 getOptional<int>("txnTimeoutSecs", p.txnTimeoutSecs, j, 0);
1279 }
1280
1281
1282 //-----------------------------------------------------------
1283 JSON_SERIALIZED_CLASS(TxAudioUri)
1296 {
1297 IMPLEMENT_JSON_SERIALIZATION()
1298 IMPLEMENT_JSON_DOCUMENTATION(TxAudioUri)
1299
1300 public:
1302 std::string uri;
1303
1306
1307 TxAudioUri()
1308 {
1309 clear();
1310 }
1311
1312 void clear()
1313 {
1314 uri.clear();
1315 repeatCount = 0;
1316 }
1317
1318 virtual void initForDocumenting()
1319 {
1320 }
1321 };
1322
1323 static void to_json(nlohmann::json& j, const TxAudioUri& p)
1324 {
1325 j = nlohmann::json{
1326 TOJSON_IMPL(uri),
1327 TOJSON_IMPL(repeatCount)
1328 };
1329 }
1330 static void from_json(const nlohmann::json& j, TxAudioUri& p)
1331 {
1332 p.clear();
1333 getOptional<std::string>("uri", p.uri, j, EMPTY_STRING);
1334 getOptional<int>("repeatCount", p.repeatCount, j, 0);
1335 }
1336
1337
1338 //-----------------------------------------------------------
1339 JSON_SERIALIZED_CLASS(AdvancedTxParams)
1352 {
1353 IMPLEMENT_JSON_SERIALIZATION()
1354 IMPLEMENT_JSON_DOCUMENTATION(AdvancedTxParams)
1355
1356 public:
1357
1359 uint16_t flags;
1360
1362 uint8_t priority;
1363
1366
1369
1371 std::string alias;
1372
1374 bool muted;
1375
1377 uint32_t txId;
1378
1381
1384
1387
1389 {
1390 clear();
1391 }
1392
1393 void clear()
1394 {
1395 flags = 0;
1396 priority = 0;
1397 subchannelTag = 0;
1398 includeNodeId = false;
1399 alias.clear();
1400 muted = false;
1401 txId = 0;
1402 audioUri.clear();
1403 aliasSpecializer = 0;
1404 receiverRxMuteForAliasSpecializer = false;
1405 }
1406
1407 virtual void initForDocumenting()
1408 {
1409 }
1410 };
1411
1412 static void to_json(nlohmann::json& j, const AdvancedTxParams& p)
1413 {
1414 j = nlohmann::json{
1415 TOJSON_IMPL(flags),
1416 TOJSON_IMPL(priority),
1417 TOJSON_IMPL(subchannelTag),
1418 TOJSON_IMPL(includeNodeId),
1419 TOJSON_IMPL(alias),
1420 TOJSON_IMPL(muted),
1421 TOJSON_IMPL(txId),
1422 TOJSON_IMPL(audioUri),
1423 TOJSON_IMPL(aliasSpecializer),
1424 TOJSON_IMPL(receiverRxMuteForAliasSpecializer)
1425 };
1426 }
1427 static void from_json(const nlohmann::json& j, AdvancedTxParams& p)
1428 {
1429 p.clear();
1430 getOptional<uint16_t>("flags", p.flags, j, 0);
1431 getOptional<uint8_t>("priority", p.priority, j, 0);
1432 getOptional<uint16_t>("subchannelTag", p.subchannelTag, j, 0);
1433 getOptional<bool>("includeNodeId", p.includeNodeId, j, false);
1434 getOptional<std::string>("alias", p.alias, j, EMPTY_STRING);
1435 getOptional<bool>("muted", p.muted, j, false);
1436 getOptional<uint32_t>("txId", p.txId, j, 0);
1437 getOptional<TxAudioUri>("audioUri", p.audioUri, j);
1438 getOptional<uint16_t>("aliasSpecializer", p.aliasSpecializer, j, 0);
1439 getOptional<bool>("receiverRxMuteForAliasSpecializer", p.receiverRxMuteForAliasSpecializer, j, false);
1440 }
1441
1442 //-----------------------------------------------------------
1443 JSON_SERIALIZED_CLASS(Identity)
1456 {
1457 IMPLEMENT_JSON_SERIALIZATION()
1458 IMPLEMENT_JSON_DOCUMENTATION(Identity)
1459
1460 public:
1468 std::string nodeId;
1469
1471 std::string userId;
1472
1474 std::string displayName;
1475
1477 std::string avatar;
1478
1479 Identity()
1480 {
1481 clear();
1482 }
1483
1484 void clear()
1485 {
1486 nodeId.clear();
1487 userId.clear();
1488 displayName.clear();
1489 avatar.clear();
1490 }
1491
1492 virtual void initForDocumenting()
1493 {
1494 }
1495 };
1496
1497 static void to_json(nlohmann::json& j, const Identity& p)
1498 {
1499 j = nlohmann::json{
1500 TOJSON_IMPL(nodeId),
1501 TOJSON_IMPL(userId),
1502 TOJSON_IMPL(displayName),
1503 TOJSON_IMPL(avatar)
1504 };
1505 }
1506 static void from_json(const nlohmann::json& j, Identity& p)
1507 {
1508 p.clear();
1509 getOptional<std::string>("nodeId", p.nodeId, j);
1510 getOptional<std::string>("userId", p.userId, j);
1511 getOptional<std::string>("displayName", p.displayName, j);
1512 getOptional<std::string>("avatar", p.avatar, j);
1513 }
1514
1515
1516 //-----------------------------------------------------------
1517 JSON_SERIALIZED_CLASS(Location)
1530 {
1531 IMPLEMENT_JSON_SERIALIZATION()
1532 IMPLEMENT_JSON_DOCUMENTATION(Location)
1533
1534 public:
1535 constexpr static double INVALID_LOCATION_VALUE = -999.999;
1536
1538 uint32_t ts;
1539
1541 double latitude;
1542
1545
1547 double altitude;
1548
1551
1553 double speed;
1554
1555 Location()
1556 {
1557 clear();
1558 }
1559
1560 void clear()
1561 {
1562 ts = 0;
1563 latitude = INVALID_LOCATION_VALUE;
1564 longitude = INVALID_LOCATION_VALUE;
1565 altitude = INVALID_LOCATION_VALUE;
1566 direction = INVALID_LOCATION_VALUE;
1567 speed = INVALID_LOCATION_VALUE;
1568 }
1569
1570 virtual void initForDocumenting()
1571 {
1572 clear();
1573
1574 ts = 123456;
1575 latitude = 123.456;
1576 longitude = 456.789;
1577 altitude = 123;
1578 direction = 1;
1579 speed = 1234;
1580 }
1581 };
1582
1583 static void to_json(nlohmann::json& j, const Location& p)
1584 {
1585 if(p.latitude != Location::INVALID_LOCATION_VALUE && p.longitude != Location::INVALID_LOCATION_VALUE)
1586 {
1587 j = nlohmann::json{
1588 TOJSON_IMPL(latitude),
1589 TOJSON_IMPL(longitude),
1590 };
1591
1592 if(p.ts != 0) j["ts"] = p.ts;
1593 if(p.altitude != Location::INVALID_LOCATION_VALUE) j["altitude"] = p.altitude;
1594 if(p.speed != Location::INVALID_LOCATION_VALUE) j["speed"] = p.speed;
1595 if(p.direction != Location::INVALID_LOCATION_VALUE) j["direction"] = p.direction;
1596 }
1597 }
1598 static void from_json(const nlohmann::json& j, Location& p)
1599 {
1600 p.clear();
1601 getOptional<uint32_t>("ts", p.ts, j, 0);
1602 j.at("latitude").get_to(p.latitude);
1603 j.at("longitude").get_to(p.longitude);
1604 getOptional<double>("altitude", p.altitude, j, Location::INVALID_LOCATION_VALUE);
1605 getOptional<double>("direction", p.direction, j, Location::INVALID_LOCATION_VALUE);
1606 getOptional<double>("speed", p.speed, j, Location::INVALID_LOCATION_VALUE);
1607 }
1608
1609 //-----------------------------------------------------------
1610 JSON_SERIALIZED_CLASS(Power)
1621 {
1622 IMPLEMENT_JSON_SERIALIZATION()
1623 IMPLEMENT_JSON_DOCUMENTATION(Power)
1624
1625 public:
1626
1639
1653
1656
1657 Power()
1658 {
1659 clear();
1660 }
1661
1662 void clear()
1663 {
1664 source = 0;
1665 state = 0;
1666 level = 0;
1667 }
1668
1669 virtual void initForDocumenting()
1670 {
1671 }
1672 };
1673
1674 static void to_json(nlohmann::json& j, const Power& p)
1675 {
1676 if(p.source != 0 && p.state != 0 && p.level != 0)
1677 {
1678 j = nlohmann::json{
1679 TOJSON_IMPL(source),
1680 TOJSON_IMPL(state),
1681 TOJSON_IMPL(level)
1682 };
1683 }
1684 }
1685 static void from_json(const nlohmann::json& j, Power& p)
1686 {
1687 p.clear();
1688 getOptional<int>("source", p.source, j, 0);
1689 getOptional<int>("state", p.state, j, 0);
1690 getOptional<int>("level", p.level, j, 0);
1691 }
1692
1693
1694 //-----------------------------------------------------------
1695 JSON_SERIALIZED_CLASS(Connectivity)
1706 {
1707 IMPLEMENT_JSON_SERIALIZATION()
1708 IMPLEMENT_JSON_DOCUMENTATION(Connectivity)
1709
1710 public:
1724 int type;
1725
1728
1731
1732 Connectivity()
1733 {
1734 clear();
1735 }
1736
1737 void clear()
1738 {
1739 type = 0;
1740 strength = 0;
1741 rating = 0;
1742 }
1743
1744 virtual void initForDocumenting()
1745 {
1746 clear();
1747
1748 type = 1;
1749 strength = 2;
1750 rating = 3;
1751 }
1752 };
1753
1754 static void to_json(nlohmann::json& j, const Connectivity& p)
1755 {
1756 if(p.type != 0)
1757 {
1758 j = nlohmann::json{
1759 TOJSON_IMPL(type),
1760 TOJSON_IMPL(strength),
1761 TOJSON_IMPL(rating)
1762 };
1763 }
1764 }
1765 static void from_json(const nlohmann::json& j, Connectivity& p)
1766 {
1767 p.clear();
1768 getOptional<int>("type", p.type, j, 0);
1769 getOptional<int>("strength", p.strength, j, 0);
1770 getOptional<int>("rating", p.rating, j, 0);
1771 }
1772
1773
1774 //-----------------------------------------------------------
1775 JSON_SERIALIZED_CLASS(PresenceDescriptorGroupItem)
1786 {
1787 IMPLEMENT_JSON_SERIALIZATION()
1788 IMPLEMENT_JSON_DOCUMENTATION(PresenceDescriptorGroupItem)
1789
1790 public:
1792 std::string groupId;
1793
1795 std::string alias;
1796
1798 uint16_t status;
1799
1801 {
1802 clear();
1803 }
1804
1805 void clear()
1806 {
1807 groupId.clear();
1808 alias.clear();
1809 status = 0;
1810 }
1811
1812 virtual void initForDocumenting()
1813 {
1814 groupId = "{123-456}";
1815 alias = "MYALIAS";
1816 status = 0;
1817 }
1818 };
1819
1820 static void to_json(nlohmann::json& j, const PresenceDescriptorGroupItem& p)
1821 {
1822 j = nlohmann::json{
1823 TOJSON_IMPL(groupId),
1824 TOJSON_IMPL(alias),
1825 TOJSON_IMPL(status)
1826 };
1827 }
1828 static void from_json(const nlohmann::json& j, PresenceDescriptorGroupItem& p)
1829 {
1830 p.clear();
1831 getOptional<std::string>("groupId", p.groupId, j);
1832 getOptional<std::string>("alias", p.alias, j);
1833 getOptional<uint16_t>("status", p.status, j);
1834 }
1835
1836
1837 //-----------------------------------------------------------
1838 JSON_SERIALIZED_CLASS(PresenceDescriptor)
1849 {
1850 IMPLEMENT_JSON_SERIALIZATION()
1851 IMPLEMENT_JSON_DOCUMENTATION(PresenceDescriptor)
1852
1853 public:
1854
1860 bool self;
1861
1867 uint32_t ts;
1868
1874 uint32_t nextUpdate;
1875
1878
1880 std::string comment;
1881
1895 uint32_t disposition;
1896
1898 std::vector<PresenceDescriptorGroupItem> groupAliases;
1899
1902
1904 std::string custom;
1905
1908
1911
1914
1916 {
1917 clear();
1918 }
1919
1920 void clear()
1921 {
1922 self = false;
1923 ts = 0;
1924 nextUpdate = 0;
1925 identity.clear();
1926 comment.clear();
1927 disposition = 0;
1928 groupAliases.clear();
1929 location.clear();
1930 custom.clear();
1931 announceOnReceive = false;
1932 connectivity.clear();
1933 power.clear();
1934 }
1935
1936 virtual void initForDocumenting()
1937 {
1938 clear();
1939
1940 self = true;
1941 ts = 123;
1942 nextUpdate = 0;
1943 identity.initForDocumenting();
1944 comment = "This is a comment";
1945 disposition = 123;
1946
1947 PresenceDescriptorGroupItem gi;
1948 gi.initForDocumenting();
1949 groupAliases.push_back(gi);
1950
1951 location.initForDocumenting();
1952 custom = "{}";
1953 announceOnReceive = true;
1954 connectivity.initForDocumenting();
1955 power.initForDocumenting();
1956 }
1957 };
1958
1959 static void to_json(nlohmann::json& j, const PresenceDescriptor& p)
1960 {
1961 j = nlohmann::json{
1962 TOJSON_IMPL(ts),
1963 TOJSON_IMPL(nextUpdate),
1964 TOJSON_IMPL(identity),
1965 TOJSON_IMPL(comment),
1966 TOJSON_IMPL(disposition),
1967 TOJSON_IMPL(groupAliases),
1968 TOJSON_IMPL(location),
1969 TOJSON_IMPL(custom),
1970 TOJSON_IMPL(announceOnReceive),
1971 TOJSON_IMPL(connectivity),
1972 TOJSON_IMPL(power)
1973 };
1974
1975 if(!p.comment.empty()) j["comment"] = p.comment;
1976 if(!p.custom.empty()) j["custom"] = p.custom;
1977
1978 if(p.self)
1979 {
1980 j["self"] = true;
1981 }
1982 }
1983 static void from_json(const nlohmann::json& j, PresenceDescriptor& p)
1984 {
1985 p.clear();
1986 getOptional<bool>("self", p.self, j);
1987 getOptional<uint32_t>("ts", p.ts, j);
1988 getOptional<uint32_t>("nextUpdate", p.nextUpdate, j);
1989 getOptional<Identity>("identity", p.identity, j);
1990 getOptional<std::string>("comment", p.comment, j);
1991 getOptional<uint32_t>("disposition", p.disposition, j);
1992 getOptional<std::vector<PresenceDescriptorGroupItem>>("groupAliases", p.groupAliases, j);
1993 getOptional<Location>("location", p.location, j);
1994 getOptional<std::string>("custom", p.custom, j);
1995 getOptional<bool>("announceOnReceive", p.announceOnReceive, j);
1996 getOptional<Connectivity>("connectivity", p.connectivity, j);
1997 getOptional<Power>("power", p.power, j);
1998 }
1999
2005 typedef enum
2006 {
2009
2012
2015
2017 priVoice = 3
2018 } TxPriority_t;
2019
2025 typedef enum
2026 {
2029
2032
2035
2037 arpIpv6ThenIpv4 = 64
2038 } AddressResolutionPolicy_t;
2039
2040 //-----------------------------------------------------------
2041 JSON_SERIALIZED_CLASS(NetworkTxOptions)
2054 {
2055 IMPLEMENT_JSON_SERIALIZATION()
2056 IMPLEMENT_JSON_DOCUMENTATION(NetworkTxOptions)
2057
2058 public:
2061
2067 int ttl;
2068
2070 {
2071 clear();
2072 }
2073
2074 void clear()
2075 {
2076 priority = priVoice;
2077 ttl = 1;
2078 }
2079
2080 virtual void initForDocumenting()
2081 {
2082 }
2083 };
2084
2085 static void to_json(nlohmann::json& j, const NetworkTxOptions& p)
2086 {
2087 j = nlohmann::json{
2088 TOJSON_IMPL(priority),
2089 TOJSON_IMPL(ttl)
2090 };
2091 }
2092 static void from_json(const nlohmann::json& j, NetworkTxOptions& p)
2093 {
2094 p.clear();
2095 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
2096 getOptional<int>("ttl", p.ttl, j, 1);
2097 }
2098
2099
2100 //-----------------------------------------------------------
2101 JSON_SERIALIZED_CLASS(TcpNetworkTxOptions)
2110 {
2111 IMPLEMENT_JSON_SERIALIZATION()
2112 IMPLEMENT_JSON_DOCUMENTATION(TcpNetworkTxOptions)
2113
2114 public:
2116 {
2117 clear();
2118 }
2119
2120 void clear()
2121 {
2122 priority = priVoice;
2123 ttl = -1;
2124 }
2125
2126 virtual void initForDocumenting()
2127 {
2128 }
2129 };
2130
2131 static void to_json(nlohmann::json& j, const TcpNetworkTxOptions& p)
2132 {
2133 j = nlohmann::json{
2134 TOJSON_IMPL(priority),
2135 TOJSON_IMPL(ttl)
2136 };
2137 }
2138 static void from_json(const nlohmann::json& j, TcpNetworkTxOptions& p)
2139 {
2140 p.clear();
2141 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
2142 getOptional<int>("ttl", p.ttl, j, -1);
2143 }
2144
2145 typedef enum
2146 {
2149
2152
2154 ifIp6 = 6
2155 } IpFamilyType_t;
2156
2157 //-----------------------------------------------------------
2158 JSON_SERIALIZED_CLASS(NetworkAddress)
2170 {
2171 IMPLEMENT_JSON_SERIALIZATION()
2172 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddress)
2173
2174 public:
2176 std::string address;
2177
2179 int port;
2180
2182 {
2183 clear();
2184 }
2185
2186 void clear()
2187 {
2188 address.clear();
2189 port = 0;
2190 }
2191
2192 bool matches(const NetworkAddress& other)
2193 {
2194 if(address.compare(other.address) != 0)
2195 {
2196 return false;
2197 }
2198
2199 if(port != other.port)
2200 {
2201 return false;
2202 }
2203
2204 return true;
2205 }
2206 };
2207
2208 static void to_json(nlohmann::json& j, const NetworkAddress& p)
2209 {
2210 j = nlohmann::json{
2211 TOJSON_IMPL(address),
2212 TOJSON_IMPL(port)
2213 };
2214 }
2215 static void from_json(const nlohmann::json& j, NetworkAddress& p)
2216 {
2217 p.clear();
2218 getOptional<std::string>("address", p.address, j);
2219 getOptional<int>("port", p.port, j);
2220 }
2221
2222
2223 //-----------------------------------------------------------
2224 JSON_SERIALIZED_CLASS(NetworkAddressRxTx)
2236 {
2237 IMPLEMENT_JSON_SERIALIZATION()
2238 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddressRxTx)
2239
2240 public:
2243
2246
2248 {
2249 clear();
2250 }
2251
2252 void clear()
2253 {
2254 rx.clear();
2255 tx.clear();
2256 }
2257 };
2258
2259 static void to_json(nlohmann::json& j, const NetworkAddressRxTx& p)
2260 {
2261 j = nlohmann::json{
2262 TOJSON_IMPL(rx),
2263 TOJSON_IMPL(tx)
2264 };
2265 }
2266 static void from_json(const nlohmann::json& j, NetworkAddressRxTx& p)
2267 {
2268 p.clear();
2269 getOptional<NetworkAddress>("rx", p.rx, j);
2270 getOptional<NetworkAddress>("tx", p.tx, j);
2271 }
2272
2274 typedef enum
2275 {
2278
2280 graptStrict = 1
2281 } GroupRestrictionAccessPolicyType_t;
2282
2283 static bool isValidGroupRestrictionAccessPolicyType(GroupRestrictionAccessPolicyType_t t)
2284 {
2285 return (t == GroupRestrictionAccessPolicyType_t::graptPermissive ||
2286 t == GroupRestrictionAccessPolicyType_t::graptStrict );
2287 }
2288
2290 typedef enum
2291 {
2294
2297
2299 rtBlacklist = 2
2300 } RestrictionType_t;
2301
2302 static bool isValidRestrictionType(RestrictionType_t t)
2303 {
2304 return (t == RestrictionType_t::rtUndefined ||
2305 t == RestrictionType_t::rtWhitelist ||
2306 t == RestrictionType_t::rtBlacklist );
2307 }
2308
2333
2334 static bool isValidRestrictionElementType(RestrictionElementType_t t)
2335 {
2336 return (t == RestrictionElementType_t::retGroupId ||
2337 t == RestrictionElementType_t::retGroupIdPattern ||
2338 t == RestrictionElementType_t::retGenericAccessTagPattern ||
2339 t == RestrictionElementType_t::retCertificateSerialNumberPattern ||
2340 t == RestrictionElementType_t::retCertificateFingerprintPattern ||
2341 t == RestrictionElementType_t::retCertificateSubjectPattern ||
2342 t == RestrictionElementType_t::retCertificateIssuerPattern);
2343 }
2344
2345
2346 //-----------------------------------------------------------
2347 JSON_SERIALIZED_CLASS(NetworkAddressRestrictionList)
2359 {
2360 IMPLEMENT_JSON_SERIALIZATION()
2361 IMPLEMENT_JSON_DOCUMENTATION(NetworkAddressRestrictionList)
2362
2363 public:
2366
2368 std::vector<NetworkAddressRxTx> elements;
2369
2371 {
2372 clear();
2373 }
2374
2375 void clear()
2376 {
2377 type = RestrictionType_t::rtUndefined;
2378 elements.clear();
2379 }
2380 };
2381
2382 static void to_json(nlohmann::json& j, const NetworkAddressRestrictionList& p)
2383 {
2384 j = nlohmann::json{
2385 TOJSON_IMPL(type),
2386 TOJSON_IMPL(elements)
2387 };
2388 }
2389 static void from_json(const nlohmann::json& j, NetworkAddressRestrictionList& p)
2390 {
2391 p.clear();
2392 getOptional<RestrictionType_t>("type", p.type, j, RestrictionType_t::rtUndefined);
2393 getOptional<std::vector<NetworkAddressRxTx>>("elements", p.elements, j);
2394 }
2395
2396 //-----------------------------------------------------------
2397 JSON_SERIALIZED_CLASS(StringRestrictionList)
2409 {
2410 IMPLEMENT_JSON_SERIALIZATION()
2411 IMPLEMENT_JSON_DOCUMENTATION(StringRestrictionList)
2412
2413 public:
2416
2419
2421 std::vector<std::string> elements;
2422
2424 {
2425 type = RestrictionType_t::rtUndefined;
2426 elementsType = RestrictionElementType_t::retGroupId;
2427 clear();
2428 }
2429
2430 void clear()
2431 {
2432 elements.clear();
2433 }
2434 };
2435
2436 static void to_json(nlohmann::json& j, const StringRestrictionList& p)
2437 {
2438 j = nlohmann::json{
2439 TOJSON_IMPL(type),
2440 TOJSON_IMPL(elementsType),
2441 TOJSON_IMPL(elements)
2442 };
2443 }
2444 static void from_json(const nlohmann::json& j, StringRestrictionList& p)
2445 {
2446 p.clear();
2447 getOptional<RestrictionType_t>("type", p.type, j, RestrictionType_t::rtUndefined);
2448 getOptional<RestrictionElementType_t>("elementsType", p.elementsType, j, RestrictionElementType_t::retGroupId);
2449 getOptional<std::vector<std::string>>("elements", p.elements, j);
2450 }
2451
2452
2453 //-----------------------------------------------------------
2454 JSON_SERIALIZED_CLASS(PacketCapturer)
2464 {
2465 IMPLEMENT_JSON_SERIALIZATION()
2466 IMPLEMENT_JSON_DOCUMENTATION(PacketCapturer)
2467
2468 public:
2469 bool enabled;
2470 uint32_t maxMb;
2471 std::string filePrefix;
2472
2474 {
2475 clear();
2476 }
2477
2478 void clear()
2479 {
2480 enabled = false;
2481 maxMb = 10;
2482 filePrefix.clear();
2483 }
2484 };
2485
2486 static void to_json(nlohmann::json& j, const PacketCapturer& p)
2487 {
2488 j = nlohmann::json{
2489 TOJSON_IMPL(enabled),
2490 TOJSON_IMPL(maxMb),
2491 TOJSON_IMPL(filePrefix)
2492 };
2493 }
2494 static void from_json(const nlohmann::json& j, PacketCapturer& p)
2495 {
2496 p.clear();
2497 getOptional<bool>("enabled", p.enabled, j, false);
2498 getOptional<uint32_t>("maxMb", p.maxMb, j, 10);
2499 getOptional<std::string>("filePrefix", p.filePrefix, j, EMPTY_STRING);
2500 }
2501
2502
2503 //-----------------------------------------------------------
2504 JSON_SERIALIZED_CLASS(TransportImpairment)
2514 {
2515 IMPLEMENT_JSON_SERIALIZATION()
2516 IMPLEMENT_JSON_DOCUMENTATION(TransportImpairment)
2517
2518 public:
2519 int applicationPercentage;
2520 int jitterMs;
2521 int lossPercentage;
2522
2524 {
2525 clear();
2526 }
2527
2528 void clear()
2529 {
2530 applicationPercentage = 0;
2531 jitterMs = 0;
2532 lossPercentage = 0;
2533 }
2534 };
2535
2536 static void to_json(nlohmann::json& j, const TransportImpairment& p)
2537 {
2538 j = nlohmann::json{
2539 TOJSON_IMPL(applicationPercentage),
2540 TOJSON_IMPL(jitterMs),
2541 TOJSON_IMPL(lossPercentage)
2542 };
2543 }
2544 static void from_json(const nlohmann::json& j, TransportImpairment& p)
2545 {
2546 p.clear();
2547 getOptional<int>("applicationPercentage", p.applicationPercentage, j, 0);
2548 getOptional<int>("jitterMs", p.jitterMs, j, 0);
2549 getOptional<int>("lossPercentage", p.lossPercentage, j, 0);
2550 }
2551
2552 //-----------------------------------------------------------
2553 JSON_SERIALIZED_CLASS(NsmNetworking)
2563 {
2564 IMPLEMENT_JSON_SERIALIZATION()
2565 IMPLEMENT_JSON_DOCUMENTATION(NsmNetworking)
2566
2567 public:
2568 std::string interfaceName;
2569 NetworkAddress address;
2570 int ttl;
2571 int tos;
2572 int txOversend;
2573 TransportImpairment rxImpairment;
2574 TransportImpairment txImpairment;
2575 std::string cryptoPassword;
2576
2578 {
2579 clear();
2580 }
2581
2582 void clear()
2583 {
2584 interfaceName.clear();
2585 address.clear();
2586 ttl = 1;
2587 tos = 56;
2588 txOversend = 0;
2589 rxImpairment.clear();
2590 txImpairment.clear();
2591 cryptoPassword.clear();
2592 }
2593 };
2594
2595 static void to_json(nlohmann::json& j, const NsmNetworking& p)
2596 {
2597 j = nlohmann::json{
2598 TOJSON_IMPL(interfaceName),
2599 TOJSON_IMPL(address),
2600 TOJSON_IMPL(ttl),
2601 TOJSON_IMPL(tos),
2602 TOJSON_IMPL(txOversend),
2603 TOJSON_IMPL(rxImpairment),
2604 TOJSON_IMPL(txImpairment),
2605 TOJSON_IMPL(cryptoPassword)
2606 };
2607 }
2608 static void from_json(const nlohmann::json& j, NsmNetworking& p)
2609 {
2610 p.clear();
2611 getOptional("interfaceName", p.interfaceName, j, EMPTY_STRING);
2612 getOptional<NetworkAddress>("address", p.address, j);
2613 getOptional<int>("ttl", p.ttl, j, 1);
2614 getOptional<int>("tos", p.tos, j, 56);
2615 getOptional<int>("txOversend", p.txOversend, j, 0);
2616 getOptional<TransportImpairment>("rxImpairment", p.rxImpairment, j);
2617 getOptional<TransportImpairment>("txImpairment", p.txImpairment, j);
2618 getOptional("cryptoPassword", p.cryptoPassword, j, EMPTY_STRING);
2619 }
2620
2621
2622 //-----------------------------------------------------------
2623 JSON_SERIALIZED_CLASS(NsmConfiguration)
2633 {
2634 IMPLEMENT_JSON_SERIALIZATION()
2635 IMPLEMENT_JSON_DOCUMENTATION(NsmConfiguration)
2636
2637 public:
2638
2639 std::string id;
2640 bool favorUptime;
2641 NsmNetworking networking;
2642 std::vector<std::string> resources;
2643 int tokenStart;
2644 int tokenEnd;
2645 int intervalSecs;
2646 int transitionSecsFactor;
2647
2649 {
2650 clear();
2651 }
2652
2653 void clear()
2654 {
2655 id.clear();
2656 favorUptime = false;
2657 networking.clear();
2658 resources.clear();
2659 tokenStart = 1000000;
2660 tokenEnd = 2000000;
2661 intervalSecs = 1;
2662 transitionSecsFactor = 3;
2663 }
2664 };
2665
2666 static void to_json(nlohmann::json& j, const NsmConfiguration& p)
2667 {
2668 j = nlohmann::json{
2669 TOJSON_IMPL(id),
2670 TOJSON_IMPL(favorUptime),
2671 TOJSON_IMPL(networking),
2672 TOJSON_IMPL(resources),
2673 TOJSON_IMPL(tokenStart),
2674 TOJSON_IMPL(tokenEnd),
2675 TOJSON_IMPL(intervalSecs),
2676 TOJSON_IMPL(transitionSecsFactor)
2677 };
2678 }
2679 static void from_json(const nlohmann::json& j, NsmConfiguration& p)
2680 {
2681 p.clear();
2682 getOptional("id", p.id, j);
2683 getOptional<bool>("favorUptime", p.favorUptime, j, false);
2684 getOptional<NsmNetworking>("networking", p.networking, j);
2685 getOptional<std::vector<std::string>>("resources", p.resources, j);
2686 getOptional<int>("tokenStart", p.tokenStart, j, 1000000);
2687 getOptional<int>("tokenEnd", p.tokenEnd, j, 2000000);
2688 getOptional<int>("intervalSecs", p.intervalSecs, j, 1);
2689 getOptional<int>("transitionSecsFactor", p.transitionSecsFactor, j, 3);
2690 }
2691
2692
2693 //-----------------------------------------------------------
2694 JSON_SERIALIZED_CLASS(Rallypoint)
2703 {
2704 IMPLEMENT_JSON_SERIALIZATION()
2705 IMPLEMENT_JSON_DOCUMENTATION(Rallypoint)
2706
2707 public:
2708
2714
2726 std::string certificate;
2727
2739 std::string certificateKey;
2740
2745
2750
2754 std::vector<std::string> caCertificates;
2755
2760
2765
2768
2771
2772 Rallypoint()
2773 {
2774 clear();
2775 }
2776
2777 void clear()
2778 {
2779 host.clear();
2780 certificate.clear();
2781 certificateKey.clear();
2782 caCertificates.clear();
2783 verifyPeer = false;
2784 transactionTimeoutMs = 5000;
2785 disableMessageSigning = false;
2786 connectionTimeoutSecs = 5;
2787 tcpTxOptions.clear();
2788 }
2789
2790 bool matches(const Rallypoint& other)
2791 {
2792 if(!host.matches(other.host))
2793 {
2794 return false;
2795 }
2796
2797 if(certificate.compare(other.certificate) != 0)
2798 {
2799 return false;
2800 }
2801
2802 if(certificateKey.compare(other.certificateKey) != 0)
2803 {
2804 return false;
2805 }
2806
2807 if(verifyPeer != other.verifyPeer)
2808 {
2809 return false;
2810 }
2811
2812 if(allowSelfSignedCertificate != other.allowSelfSignedCertificate)
2813 {
2814 return false;
2815 }
2816
2817 if(caCertificates.size() != other.caCertificates.size())
2818 {
2819 return false;
2820 }
2821
2822 for(size_t x = 0; x < caCertificates.size(); x++)
2823 {
2824 bool found = false;
2825
2826 for(size_t y = 0; y < other.caCertificates.size(); y++)
2827 {
2828 if(caCertificates[x].compare(other.caCertificates[y]) == 0)
2829 {
2830 found = true;
2831 break;
2832 }
2833 }
2834
2835 if(!found)
2836 {
2837 return false;
2838 }
2839 }
2840
2841 if(transactionTimeoutMs != other.transactionTimeoutMs)
2842 {
2843 return false;
2844 }
2845
2846 if(disableMessageSigning != other.disableMessageSigning)
2847 {
2848 return false;
2849 }
2850
2851 return true;
2852 }
2853 };
2854
2855 static void to_json(nlohmann::json& j, const Rallypoint& p)
2856 {
2857 j = nlohmann::json{
2858 TOJSON_IMPL(host),
2859 TOJSON_IMPL(certificate),
2860 TOJSON_IMPL(certificateKey),
2861 TOJSON_IMPL(verifyPeer),
2862 TOJSON_IMPL(allowSelfSignedCertificate),
2863 TOJSON_IMPL(caCertificates),
2864 TOJSON_IMPL(transactionTimeoutMs),
2865 TOJSON_IMPL(disableMessageSigning),
2866 TOJSON_IMPL(connectionTimeoutSecs),
2867 TOJSON_IMPL(tcpTxOptions)
2868 };
2869 }
2870
2871 static void from_json(const nlohmann::json& j, Rallypoint& p)
2872 {
2873 p.clear();
2874 j.at("host").get_to(p.host);
2875 getOptional("certificate", p.certificate, j);
2876 getOptional("certificateKey", p.certificateKey, j);
2877 getOptional<bool>("verifyPeer", p.verifyPeer, j, true);
2878 getOptional<bool>("allowSelfSignedCertificate", p.allowSelfSignedCertificate, j, false);
2879 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
2880 getOptional<int>("transactionTimeoutMs", p.transactionTimeoutMs, j, 5000);
2881 getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
2882 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 5);
2883 getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
2884 }
2885
2886 //-----------------------------------------------------------
2887 JSON_SERIALIZED_CLASS(RallypointCluster)
2899 {
2900 IMPLEMENT_JSON_SERIALIZATION()
2901 IMPLEMENT_JSON_DOCUMENTATION(RallypointCluster)
2902
2903 public:
2909 typedef enum
2910 {
2912 csRoundRobin = 0,
2913
2915 csFailback = 1
2916 } ConnectionStrategy_t;
2917
2920
2922 std::vector<Rallypoint> rallypoints;
2923
2926
2929
2931 {
2932 clear();
2933 }
2934
2935 void clear()
2936 {
2937 connectionStrategy = csRoundRobin;
2938 rallypoints.clear();
2939 rolloverSecs = 10;
2940 connectionTimeoutSecs = 5;
2941 }
2942 };
2943
2944 static void to_json(nlohmann::json& j, const RallypointCluster& p)
2945 {
2946 j = nlohmann::json{
2947 TOJSON_IMPL(connectionStrategy),
2948 TOJSON_IMPL(rallypoints),
2949 TOJSON_IMPL(rolloverSecs),
2950 TOJSON_IMPL(connectionTimeoutSecs)
2951 };
2952 }
2953 static void from_json(const nlohmann::json& j, RallypointCluster& p)
2954 {
2955 p.clear();
2956 getOptional<RallypointCluster::ConnectionStrategy_t>("connectionStrategy", p.connectionStrategy, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
2957 getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
2958 getOptional<int>("rolloverSecs", p.rolloverSecs, j, 10);
2959 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 5);
2960 }
2961
2962
2963 //-----------------------------------------------------------
2964 JSON_SERIALIZED_CLASS(NetworkDeviceDescriptor)
2975 {
2976 IMPLEMENT_JSON_SERIALIZATION()
2977 IMPLEMENT_JSON_DOCUMENTATION(NetworkDeviceDescriptor)
2978
2979 public:
2985
2987 std::string name;
2988
2990 std::string manufacturer;
2991
2993 std::string model;
2994
2996 std::string hardwareId;
2997
2999 std::string serialNumber;
3000
3002 std::string type;
3003
3005 std::string extra;
3006
3008 {
3009 clear();
3010 }
3011
3012 void clear()
3013 {
3014 deviceId = 0;
3015
3016 name.clear();
3017 manufacturer.clear();
3018 model.clear();
3019 hardwareId.clear();
3020 serialNumber.clear();
3021 type.clear();
3022 extra.clear();
3023 }
3024
3025 virtual std::string toString()
3026 {
3027 char buff[2048];
3028
3029 snprintf(buff, sizeof(buff), "deviceId=%d, name=%s, manufacturer=%s, model=%s, hardwareId=%s, serialNumber=%s, type=%s, extra=%s",
3030 deviceId,
3031 name.c_str(),
3032 manufacturer.c_str(),
3033 model.c_str(),
3034 hardwareId.c_str(),
3035 serialNumber.c_str(),
3036 type.c_str(),
3037 extra.c_str());
3038
3039 return std::string(buff);
3040 }
3041 };
3042
3043 static void to_json(nlohmann::json& j, const NetworkDeviceDescriptor& p)
3044 {
3045 j = nlohmann::json{
3046 TOJSON_IMPL(deviceId),
3047 TOJSON_IMPL(name),
3048 TOJSON_IMPL(manufacturer),
3049 TOJSON_IMPL(model),
3050 TOJSON_IMPL(hardwareId),
3051 TOJSON_IMPL(serialNumber),
3052 TOJSON_IMPL(type),
3053 TOJSON_IMPL(extra)
3054 };
3055 }
3056 static void from_json(const nlohmann::json& j, NetworkDeviceDescriptor& p)
3057 {
3058 p.clear();
3059 getOptional<int>("deviceId", p.deviceId, j, 0);
3060 getOptional("name", p.name, j);
3061 getOptional("manufacturer", p.manufacturer, j);
3062 getOptional("model", p.model, j);
3063 getOptional("hardwareId", p.hardwareId, j);
3064 getOptional("serialNumber", p.serialNumber, j);
3065 getOptional("type", p.type, j);
3066 getOptional("extra", p.extra, j);
3067 }
3068
3069 //-----------------------------------------------------------
3070 JSON_SERIALIZED_CLASS(AudioGate)
3080 {
3081 IMPLEMENT_JSON_SERIALIZATION()
3082 IMPLEMENT_JSON_DOCUMENTATION(AudioGate)
3083
3084 public:
3087
3090
3092 uint32_t hangMs;
3093
3095 uint32_t windowMin;
3096
3098 uint32_t windowMax;
3099
3102
3103
3104 AudioGate()
3105 {
3106 clear();
3107 }
3108
3109 void clear()
3110 {
3111 enabled = false;
3112 useVad = false;
3113 hangMs = 1500;
3114 windowMin = 25;
3115 windowMax = 125;
3116 coefficient = 1.75;
3117 }
3118 };
3119
3120 static void to_json(nlohmann::json& j, const AudioGate& p)
3121 {
3122 j = nlohmann::json{
3123 TOJSON_IMPL(enabled),
3124 TOJSON_IMPL(useVad),
3125 TOJSON_IMPL(hangMs),
3126 TOJSON_IMPL(windowMin),
3127 TOJSON_IMPL(windowMax),
3128 TOJSON_IMPL(coefficient)
3129 };
3130 }
3131 static void from_json(const nlohmann::json& j, AudioGate& p)
3132 {
3133 p.clear();
3134 getOptional<bool>("enabled", p.enabled, j, false);
3135 getOptional<bool>("useVad", p.useVad, j, false);
3136 getOptional<uint32_t>("hangMs", p.hangMs, j, 1500);
3137 getOptional<uint32_t>("windowMin", p.windowMin, j, 25);
3138 getOptional<uint32_t>("windowMax", p.windowMax, j, 125);
3139 getOptional<double>("coefficient", p.coefficient, j, 1.75);
3140 }
3141
3142 //-----------------------------------------------------------
3143 JSON_SERIALIZED_CLASS(TxAudio)
3157 {
3158 IMPLEMENT_JSON_SERIALIZATION()
3159 IMPLEMENT_JSON_DOCUMENTATION(TxAudio)
3160
3161 public:
3167 typedef enum
3168 {
3170 ctExternal = -1,
3171
3173 ctUnknown = 0,
3174
3175 /* G.711 */
3177 ctG711ulaw = 1,
3178
3180 ctG711alaw = 2,
3181
3182
3183 /* GSM */
3185 ctGsm610 = 3,
3186
3187
3188 /* G.729 */
3190 ctG729a = 4,
3191
3192
3193 /* PCM */
3195 ctPcm = 5,
3196
3197 // AMR Narrowband */
3199 ctAmrNb4750 = 10,
3200
3202 ctAmrNb5150 = 11,
3203
3205 ctAmrNb5900 = 12,
3206
3208 ctAmrNb6700 = 13,
3209
3211 ctAmrNb7400 = 14,
3212
3214 ctAmrNb7950 = 15,
3215
3217 ctAmrNb10200 = 16,
3218
3220 ctAmrNb12200 = 17,
3221
3222
3223 /* Opus */
3225 ctOpus6000 = 20,
3226
3228 ctOpus8000 = 21,
3229
3231 ctOpus10000 = 22,
3232
3234 ctOpus12000 = 23,
3235
3237 ctOpus14000 = 24,
3238
3240 ctOpus16000 = 25,
3241
3243 ctOpus18000 = 26,
3244
3246 ctOpus20000 = 27,
3247
3249 ctOpus22000 = 28,
3250
3252 ctOpus24000 = 29,
3253
3254
3255 /* Speex */
3257 ctSpxNb2150 = 30,
3258
3260 ctSpxNb3950 = 31,
3261
3263 ctSpxNb5950 = 32,
3264
3266 ctSpxNb8000 = 33,
3267
3269 ctSpxNb11000 = 34,
3270
3272 ctSpxNb15000 = 35,
3273
3275 ctSpxNb18200 = 36,
3276
3278 ctSpxNb24600 = 37,
3279
3280
3281 /* Codec2 */
3283 ctC2450 = 40,
3284
3286 ctC2700 = 41,
3287
3289 ctC21200 = 42,
3290
3292 ctC21300 = 43,
3293
3295 ctC21400 = 44,
3296
3298 ctC21600 = 45,
3299
3301 ctC22400 = 46,
3302
3304 ctC23200 = 47,
3305
3306
3307 /* MELPe */
3309 ctMelpe600 = 50,
3310
3312 ctMelpe1200 = 51,
3313
3315 ctMelpe2400 = 52
3316 } TxCodec_t;
3317
3320
3323
3325 std::string encoderName;
3326
3329
3332
3334 bool fdx;
3335
3343
3350
3357
3360
3363
3366
3371
3373 uint32_t internalKey;
3374
3377
3380
3382 bool dtx;
3383
3386
3387 TxAudio()
3388 {
3389 clear();
3390 }
3391
3392 void clear()
3393 {
3394 enabled = true;
3395 encoder = TxAudio::TxCodec_t::ctUnknown;
3396 encoderName.clear();
3397 framingMs = 60;
3398 blockCount = 0;
3399 fdx = false;
3400 noHdrExt = false;
3401 maxTxSecs = 0;
3402 extensionSendInterval = 10;
3403 initialHeaderBurst = 5;
3404 trailingHeaderBurst = 5;
3405 startTxNotifications = 5;
3406 customRtpPayloadType = -1;
3407 internalKey = 0;
3408 resetRtpOnTx = true;
3409 enableSmoothing = true;
3410 dtx = false;
3411 smoothedHangTimeMs = 0;
3412 }
3413 };
3414
3415 static void to_json(nlohmann::json& j, const TxAudio& p)
3416 {
3417 j = nlohmann::json{
3418 TOJSON_IMPL(enabled),
3419 TOJSON_IMPL(encoder),
3420 TOJSON_IMPL(encoderName),
3421 TOJSON_IMPL(framingMs),
3422 TOJSON_IMPL(blockCount),
3423 TOJSON_IMPL(fdx),
3424 TOJSON_IMPL(noHdrExt),
3425 TOJSON_IMPL(maxTxSecs),
3426 TOJSON_IMPL(extensionSendInterval),
3427 TOJSON_IMPL(initialHeaderBurst),
3428 TOJSON_IMPL(trailingHeaderBurst),
3429 TOJSON_IMPL(startTxNotifications),
3430 TOJSON_IMPL(customRtpPayloadType),
3431 TOJSON_IMPL(resetRtpOnTx),
3432 TOJSON_IMPL(enableSmoothing),
3433 TOJSON_IMPL(dtx),
3434 TOJSON_IMPL(smoothedHangTimeMs)
3435 };
3436
3437 // internalKey is not serialized
3438 }
3439 static void from_json(const nlohmann::json& j, TxAudio& p)
3440 {
3441 p.clear();
3442 getOptional<bool>("enabled", p.enabled, j, true);
3443 getOptional<TxAudio::TxCodec_t>("encoder", p.encoder, j, TxAudio::TxCodec_t::ctOpus8000);
3444 getOptional<std::string>("encoderName", p.encoderName, j, EMPTY_STRING);
3445 getOptional("framingMs", p.framingMs, j, 60);
3446 getOptional("blockCount", p.blockCount, j, 0);
3447 getOptional("fdx", p.fdx, j, false);
3448 getOptional("noHdrExt", p.noHdrExt, j, false);
3449 getOptional("maxTxSecs", p.maxTxSecs, j, 0);
3450 getOptional("extensionSendInterval", p.extensionSendInterval, j, 10);
3451 getOptional("initialHeaderBurst", p.initialHeaderBurst, j, 5);
3452 getOptional("trailingHeaderBurst", p.trailingHeaderBurst, j, 5);
3453 getOptional("startTxNotifications", p.startTxNotifications, j, 5);
3454 getOptional("customRtpPayloadType", p.customRtpPayloadType, j, -1);
3455 getOptional("resetRtpOnTx", p.resetRtpOnTx, j, true);
3456 getOptional("enableSmoothing", p.enableSmoothing, j, true);
3457 getOptional("dtx", p.dtx, j, false);
3458 getOptional("smoothedHangTimeMs", p.smoothedHangTimeMs, j, 0);
3459
3460 // internalKey is not serialized
3461 }
3462
3463 //-----------------------------------------------------------
3464 JSON_SERIALIZED_CLASS(AudioDeviceDescriptor)
3475 {
3476 IMPLEMENT_JSON_SERIALIZATION()
3477 IMPLEMENT_JSON_DOCUMENTATION(AudioDeviceDescriptor)
3478
3479 public:
3480
3482 typedef enum
3483 {
3485 dirUnknown = 0,
3486
3489
3492
3494 dirBoth
3495 } Direction_t;
3496
3502
3510
3518
3521
3529
3532
3534 std::string name;
3535
3537 std::string manufacturer;
3538
3540 std::string model;
3541
3543 std::string hardwareId;
3544
3546 std::string serialNumber;
3547
3550
3552 std::string type;
3553
3555 std::string extra;
3556
3559
3561 {
3562 clear();
3563 }
3564
3565 void clear()
3566 {
3567 deviceId = 0;
3568 samplingRate = 0;
3569 channels = 0;
3570 direction = dirUnknown;
3571 boostPercentage = 0;
3572 isAdad = false;
3573 isDefault = false;
3574
3575 name.clear();
3576 manufacturer.clear();
3577 model.clear();
3578 hardwareId.clear();
3579 serialNumber.clear();
3580 type.clear();
3581 extra.clear();
3582 isPresent = false;
3583 }
3584
3585 virtual std::string toString()
3586 {
3587 char buff[2048];
3588
3589 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",
3590 deviceId,
3591 samplingRate,
3592 channels,
3593 (int)direction,
3594 boostPercentage,
3595 (int)isAdad,
3596 name.c_str(),
3597 manufacturer.c_str(),
3598 model.c_str(),
3599 hardwareId.c_str(),
3600 serialNumber.c_str(),
3601 (int)isDefault,
3602 type.c_str(),
3603 (int)isPresent,
3604 extra.c_str());
3605
3606 return std::string(buff);
3607 }
3608 };
3609
3610 static void to_json(nlohmann::json& j, const AudioDeviceDescriptor& p)
3611 {
3612 j = nlohmann::json{
3613 TOJSON_IMPL(deviceId),
3614 TOJSON_IMPL(samplingRate),
3615 TOJSON_IMPL(channels),
3616 TOJSON_IMPL(direction),
3617 TOJSON_IMPL(boostPercentage),
3618 TOJSON_IMPL(isAdad),
3619 TOJSON_IMPL(name),
3620 TOJSON_IMPL(manufacturer),
3621 TOJSON_IMPL(model),
3622 TOJSON_IMPL(hardwareId),
3623 TOJSON_IMPL(serialNumber),
3624 TOJSON_IMPL(isDefault),
3625 TOJSON_IMPL(type),
3626 TOJSON_IMPL(extra),
3627 TOJSON_IMPL(isPresent)
3628 };
3629 }
3630 static void from_json(const nlohmann::json& j, AudioDeviceDescriptor& p)
3631 {
3632 p.clear();
3633 getOptional<int>("deviceId", p.deviceId, j, 0);
3634 getOptional<int>("samplingRate", p.samplingRate, j, 0);
3635 getOptional<int>("channels", p.channels, j, 0);
3636 getOptional<AudioDeviceDescriptor::Direction_t>("direction", p.direction, j,
3637 AudioDeviceDescriptor::Direction_t::dirUnknown);
3638 getOptional<int>("boostPercentage", p.boostPercentage, j, 0);
3639
3640 getOptional<bool>("isAdad", p.isAdad, j, false);
3641 getOptional("name", p.name, j);
3642 getOptional("manufacturer", p.manufacturer, j);
3643 getOptional("model", p.model, j);
3644 getOptional("hardwareId", p.hardwareId, j);
3645 getOptional("serialNumber", p.serialNumber, j);
3646 getOptional("isDefault", p.isDefault, j);
3647 getOptional("type", p.type, j);
3648 getOptional("extra", p.extra, j);
3649 getOptional<bool>("isPresent", p.isPresent, j, false);
3650 }
3651
3652 //-----------------------------------------------------------
3653 JSON_SERIALIZED_CLASS(ListOfAudioDeviceDescriptor)
3655 {
3656 IMPLEMENT_JSON_SERIALIZATION()
3657 IMPLEMENT_JSON_DOCUMENTATION(ListOfAudioDeviceDescriptor)
3658
3659 public:
3660 std::vector<AudioDeviceDescriptor> list;
3661
3663 {
3664 clear();
3665 }
3666
3667 void clear()
3668 {
3669 list.clear();
3670 }
3671 };
3672
3673 static void to_json(nlohmann::json& j, const ListOfAudioDeviceDescriptor& p)
3674 {
3675 j = nlohmann::json{
3676 TOJSON_IMPL(list)
3677 };
3678 }
3679 static void from_json(const nlohmann::json& j, ListOfAudioDeviceDescriptor& p)
3680 {
3681 p.clear();
3682 getOptional<std::vector<AudioDeviceDescriptor>>("list", p.list, j);
3683 }
3684
3685 //-----------------------------------------------------------
3686 JSON_SERIALIZED_CLASS(Audio)
3695 {
3696 IMPLEMENT_JSON_SERIALIZATION()
3697 IMPLEMENT_JSON_DOCUMENTATION(Audio)
3698
3699 public:
3702
3705
3708
3711
3714
3717
3720
3723
3724 Audio()
3725 {
3726 clear();
3727 }
3728
3729 void clear()
3730 {
3731 enabled = true;
3732 inputId = 0;
3733 inputGain = 0;
3734 outputId = 0;
3735 outputGain = 0;
3736 outputLevelLeft = 100;
3737 outputLevelRight = 100;
3738 outputMuted = false;
3739 }
3740 };
3741
3742 static void to_json(nlohmann::json& j, const Audio& p)
3743 {
3744 j = nlohmann::json{
3745 TOJSON_IMPL(enabled),
3746 TOJSON_IMPL(inputId),
3747 TOJSON_IMPL(inputGain),
3748 TOJSON_IMPL(outputId),
3749 TOJSON_IMPL(outputLevelLeft),
3750 TOJSON_IMPL(outputLevelRight),
3751 TOJSON_IMPL(outputMuted)
3752 };
3753 }
3754 static void from_json(const nlohmann::json& j, Audio& p)
3755 {
3756 p.clear();
3757 getOptional<bool>("enabled", p.enabled, j, true);
3758 getOptional<int>("inputId", p.inputId, j, 0);
3759 getOptional<int>("inputGain", p.inputGain, j, 0);
3760 getOptional<int>("outputId", p.outputId, j, 0);
3761 getOptional<int>("outputGain", p.outputGain, j, 0);
3762 getOptional<int>("outputLevelLeft", p.outputLevelLeft, j, 100);
3763 getOptional<int>("outputLevelRight", p.outputLevelRight, j, 100);
3764 getOptional<bool>("outputMuted", p.outputMuted, j, false);
3765 }
3766
3767 //-----------------------------------------------------------
3768 JSON_SERIALIZED_CLASS(TalkerInformation)
3779 {
3780 IMPLEMENT_JSON_SERIALIZATION()
3781 IMPLEMENT_JSON_DOCUMENTATION(TalkerInformation)
3782
3783 public:
3787 typedef enum
3788 {
3790 matNone = 0,
3791
3793 matAnonymous = 1,
3794
3796 matSsrcGenerated = 2
3797 } ManufacturedAliasType_t;
3798
3800 std::string alias;
3801
3803 std::string nodeId;
3804
3806 uint16_t rxFlags;
3807
3810
3812 uint32_t txId;
3813
3816
3819
3822
3824 uint32_t ssrc;
3825
3828
3830 {
3831 clear();
3832 }
3833
3834 void clear()
3835 {
3836 alias.clear();
3837 nodeId.clear();
3838 rxFlags = 0;
3839 txPriority = 0;
3840 txId = 0;
3841 duplicateCount = 0;
3842 aliasSpecializer = 0;
3843 rxMuted = false;
3844 manufacturedAliasType = ManufacturedAliasType_t::matNone;
3845 ssrc = 0;
3846 }
3847 };
3848
3849 static void to_json(nlohmann::json& j, const TalkerInformation& p)
3850 {
3851 j = nlohmann::json{
3852 TOJSON_IMPL(alias),
3853 TOJSON_IMPL(nodeId),
3854 TOJSON_IMPL(rxFlags),
3855 TOJSON_IMPL(txPriority),
3856 TOJSON_IMPL(txId),
3857 TOJSON_IMPL(duplicateCount),
3858 TOJSON_IMPL(aliasSpecializer),
3859 TOJSON_IMPL(rxMuted),
3860 TOJSON_IMPL(manufacturedAliasType),
3861 TOJSON_IMPL(ssrc)
3862 };
3863 }
3864 static void from_json(const nlohmann::json& j, TalkerInformation& p)
3865 {
3866 p.clear();
3867 getOptional<std::string>("alias", p.alias, j, EMPTY_STRING);
3868 getOptional<std::string>("nodeId", p.nodeId, j, EMPTY_STRING);
3869 getOptional<uint16_t>("rxFlags", p.rxFlags, j, 0);
3870 getOptional<int>("txPriority", p.txPriority, j, 0);
3871 getOptional<uint32_t>("txId", p.txId, j, 0);
3872 getOptional<int>("duplicateCount", p.duplicateCount, j, 0);
3873 getOptional<uint16_t>("aliasSpecializer", p.aliasSpecializer, j, 0);
3874 getOptional<bool>("rxMuted", p.rxMuted, j, false);
3875 getOptional<TalkerInformation::ManufacturedAliasType_t>("manufacturedAliasType", p.manufacturedAliasType, j, TalkerInformation::ManufacturedAliasType_t::matNone);
3876 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
3877 }
3878
3879 //-----------------------------------------------------------
3880 JSON_SERIALIZED_CLASS(GroupTalkers)
3893 {
3894 IMPLEMENT_JSON_SERIALIZATION()
3895 IMPLEMENT_JSON_DOCUMENTATION(GroupTalkers)
3896
3897 public:
3899 std::vector<TalkerInformation> list;
3900
3901 GroupTalkers()
3902 {
3903 clear();
3904 }
3905
3906 void clear()
3907 {
3908 list.clear();
3909 }
3910 };
3911
3912 static void to_json(nlohmann::json& j, const GroupTalkers& p)
3913 {
3914 j = nlohmann::json{
3915 TOJSON_IMPL(list)
3916 };
3917 }
3918 static void from_json(const nlohmann::json& j, GroupTalkers& p)
3919 {
3920 p.clear();
3921 getOptional<std::vector<TalkerInformation>>("list", p.list, j);
3922 }
3923
3924 //-----------------------------------------------------------
3925 JSON_SERIALIZED_CLASS(Presence)
3936 {
3937 IMPLEMENT_JSON_SERIALIZATION()
3938 IMPLEMENT_JSON_DOCUMENTATION(Presence)
3939
3940 public:
3944 typedef enum
3945 {
3947 pfUnknown = 0,
3948
3950 pfEngage = 1,
3951
3958 pfCot = 2
3959 } Format_t;
3960
3963
3966
3969
3972
3973 Presence()
3974 {
3975 clear();
3976 }
3977
3978 void clear()
3979 {
3980 format = pfUnknown;
3981 intervalSecs = 30;
3982 listenOnly = false;
3983 minIntervalSecs = 5;
3984 }
3985 };
3986
3987 static void to_json(nlohmann::json& j, const Presence& p)
3988 {
3989 j = nlohmann::json{
3990 TOJSON_IMPL(format),
3991 TOJSON_IMPL(intervalSecs),
3992 TOJSON_IMPL(listenOnly),
3993 TOJSON_IMPL(minIntervalSecs)
3994 };
3995 }
3996 static void from_json(const nlohmann::json& j, Presence& p)
3997 {
3998 p.clear();
3999 getOptional<Presence::Format_t>("format", p.format, j, Presence::Format_t::pfEngage);
4000 getOptional<int>("intervalSecs", p.intervalSecs, j, 30);
4001 getOptional<bool>("listenOnly", p.listenOnly, j, false);
4002 getOptional<int>("minIntervalSecs", p.minIntervalSecs, j, 5);
4003 }
4004
4005
4006 //-----------------------------------------------------------
4007 JSON_SERIALIZED_CLASS(Advertising)
4018 {
4019 IMPLEMENT_JSON_SERIALIZATION()
4020 IMPLEMENT_JSON_DOCUMENTATION(Advertising)
4021
4022 public:
4025
4028
4031
4032 Advertising()
4033 {
4034 clear();
4035 }
4036
4037 void clear()
4038 {
4039 enabled = false;
4040 intervalMs = 20000;
4041 alwaysAdvertise = false;
4042 }
4043 };
4044
4045 static void to_json(nlohmann::json& j, const Advertising& p)
4046 {
4047 j = nlohmann::json{
4048 TOJSON_IMPL(enabled),
4049 TOJSON_IMPL(intervalMs),
4050 TOJSON_IMPL(alwaysAdvertise)
4051 };
4052 }
4053 static void from_json(const nlohmann::json& j, Advertising& p)
4054 {
4055 p.clear();
4056 getOptional("enabled", p.enabled, j, false);
4057 getOptional<int>("intervalMs", p.intervalMs, j, 20000);
4058 getOptional<bool>("alwaysAdvertise", p.alwaysAdvertise, j, false);
4059 }
4060
4061 //-----------------------------------------------------------
4062 JSON_SERIALIZED_CLASS(GroupPriorityTranslation)
4073 {
4074 IMPLEMENT_JSON_SERIALIZATION()
4075 IMPLEMENT_JSON_DOCUMENTATION(GroupPriorityTranslation)
4076
4077 public:
4080
4083
4086
4088 {
4089 clear();
4090 }
4091
4092 void clear()
4093 {
4094 rx.clear();
4095 tx.clear();
4096 priority = 0;
4097 }
4098 };
4099
4100 static void to_json(nlohmann::json& j, const GroupPriorityTranslation& p)
4101 {
4102 j = nlohmann::json{
4103 TOJSON_IMPL(rx),
4104 TOJSON_IMPL(tx),
4105 TOJSON_IMPL(priority)
4106 };
4107 }
4108 static void from_json(const nlohmann::json& j, GroupPriorityTranslation& p)
4109 {
4110 p.clear();
4111 j.at("rx").get_to(p.rx);
4112 j.at("tx").get_to(p.tx);
4113 FROMJSON_IMPL(priority, int, 0);
4114 }
4115
4116 //-----------------------------------------------------------
4117 JSON_SERIALIZED_CLASS(GroupTimeline)
4130 {
4131 IMPLEMENT_JSON_SERIALIZATION()
4132 IMPLEMENT_JSON_DOCUMENTATION(GroupTimeline)
4133
4134 public:
4137
4140 bool recordAudio;
4141
4143 {
4144 clear();
4145 }
4146
4147 void clear()
4148 {
4149 enabled = true;
4150 maxAudioTimeMs = 30000;
4151 recordAudio = true;
4152 }
4153 };
4154
4155 static void to_json(nlohmann::json& j, const GroupTimeline& p)
4156 {
4157 j = nlohmann::json{
4158 TOJSON_IMPL(enabled),
4159 TOJSON_IMPL(maxAudioTimeMs),
4160 TOJSON_IMPL(recordAudio)
4161 };
4162 }
4163 static void from_json(const nlohmann::json& j, GroupTimeline& p)
4164 {
4165 p.clear();
4166 getOptional("enabled", p.enabled, j, true);
4167 getOptional<int>("maxAudioTimeMs", p.maxAudioTimeMs, j, 30000);
4168 getOptional("recordAudio", p.recordAudio, j, true);
4169 }
4170
4178 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_INTERNAL = "com.rallytac.engage.internal";
4180 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_CORE = "com.rallytac.magellan.core";
4182 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_CISTECH = "com.rallytac.engage.magellan.cistech";
4184 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_TRELLISWARE = "com.rallytac.engage.magellan.trellisware";
4186 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_SILVUS = "com.rallytac.engage.magellan.silvus";
4188 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_PERSISTENT = "com.rallytac.engage.magellan.persistent";
4190 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_DOMO = "com.rallytac.engage.magellan.domo";
4192 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_KENWOOD = "com.rallytac.engage.magellan.kenwood";
4194 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_TAIT = "com.rallytac.engage.magellan.tait";
4196 ENGAGE_IGNORE_COMPILER_UNUSED_WARNING static const char *GROUP_SOURCE_ENGAGE_MAGELLAN_VOCALITY = "com.rallytac.engage.magellan.vocality";
4217
4242
4258 //-----------------------------------------------------------
4259 JSON_SERIALIZED_CLASS(GroupAppTransport)
4270 {
4271 IMPLEMENT_JSON_SERIALIZATION()
4272 IMPLEMENT_JSON_DOCUMENTATION(GroupAppTransport)
4273
4274 public:
4277
4279 std::string id;
4280
4282 {
4283 clear();
4284 }
4285
4286 void clear()
4287 {
4288 enabled = false;
4289 id.clear();
4290 }
4291 };
4292
4293 static void to_json(nlohmann::json& j, const GroupAppTransport& p)
4294 {
4295 j = nlohmann::json{
4296 TOJSON_IMPL(enabled),
4297 TOJSON_IMPL(id)
4298 };
4299 }
4300 static void from_json(const nlohmann::json& j, GroupAppTransport& p)
4301 {
4302 p.clear();
4303 getOptional<bool>("enabled", p.enabled, j, false);
4304 getOptional<std::string>("id", p.id, j);
4305 }
4306
4307 //-----------------------------------------------------------
4308 JSON_SERIALIZED_CLASS(RtpProfile)
4319 {
4320 IMPLEMENT_JSON_SERIALIZATION()
4321 IMPLEMENT_JSON_DOCUMENTATION(RtpProfile)
4322
4323 public:
4329 typedef enum
4330 {
4332 jmStandard = 0,
4333
4335 jmLowLatency = 1,
4336
4338 jmReleaseOnTxEnd = 2
4339 } JitterMode_t;
4340
4343
4346
4349
4352
4355
4358
4361
4364
4367
4370
4373
4376
4379
4382
4385
4388
4392
4393 RtpProfile()
4394 {
4395 clear();
4396 }
4397
4398 void clear()
4399 {
4400 mode = jmStandard;
4401 jitterMaxMs = 10000;
4402 jitterMinMs = 100;
4403 jitterMaxFactor = 8;
4404 jitterTrimPercentage = 10;
4405 jitterUnderrunReductionThresholdMs = 1500;
4406 jitterUnderrunReductionAger = 100;
4407 latePacketSequenceRange = 5;
4408 latePacketTimestampRangeMs = 2000;
4409 inboundProcessorInactivityMs = 500;
4410 jitterForceTrimAtMs = 0;
4411 rtcpPresenceTimeoutMs = 45000;
4412 jitterMaxExceededClipPerc = 10;
4413 jitterMaxExceededClipHangMs = 1500;
4414 zombieLifetimeMs = 15000;
4415 jitterMaxTrimMs = 250;
4416 signalledInboundProcessorInactivityMs = (inboundProcessorInactivityMs * 4);
4417 }
4418 };
4419
4420 static void to_json(nlohmann::json& j, const RtpProfile& p)
4421 {
4422 j = nlohmann::json{
4423 TOJSON_IMPL(mode),
4424 TOJSON_IMPL(jitterMaxMs),
4425 TOJSON_IMPL(inboundProcessorInactivityMs),
4426 TOJSON_IMPL(jitterMinMs),
4427 TOJSON_IMPL(jitterMaxFactor),
4428 TOJSON_IMPL(jitterTrimPercentage),
4429 TOJSON_IMPL(jitterUnderrunReductionThresholdMs),
4430 TOJSON_IMPL(jitterUnderrunReductionAger),
4431 TOJSON_IMPL(latePacketSequenceRange),
4432 TOJSON_IMPL(latePacketTimestampRangeMs),
4433 TOJSON_IMPL(inboundProcessorInactivityMs),
4434 TOJSON_IMPL(jitterForceTrimAtMs),
4435 TOJSON_IMPL(jitterMaxExceededClipPerc),
4436 TOJSON_IMPL(jitterMaxExceededClipHangMs),
4437 TOJSON_IMPL(zombieLifetimeMs),
4438 TOJSON_IMPL(jitterMaxTrimMs),
4439 TOJSON_IMPL(signalledInboundProcessorInactivityMs)
4440 };
4441 }
4442 static void from_json(const nlohmann::json& j, RtpProfile& p)
4443 {
4444 p.clear();
4445 FROMJSON_IMPL(mode, RtpProfile::JitterMode_t, RtpProfile::JitterMode_t::jmStandard);
4446 FROMJSON_IMPL(jitterMaxMs, int, 10000);
4447 FROMJSON_IMPL(jitterMinMs, int, 20);
4448 FROMJSON_IMPL(jitterMaxFactor, int, 8);
4449 FROMJSON_IMPL(jitterTrimPercentage, int, 10);
4450 FROMJSON_IMPL(jitterUnderrunReductionThresholdMs, int, 1500);
4451 FROMJSON_IMPL(jitterUnderrunReductionAger, int, 100);
4452 FROMJSON_IMPL(latePacketSequenceRange, int, 5);
4453 FROMJSON_IMPL(latePacketTimestampRangeMs, int, 2000);
4454 FROMJSON_IMPL(inboundProcessorInactivityMs, int, 500);
4455 FROMJSON_IMPL(jitterForceTrimAtMs, int, 0);
4456 FROMJSON_IMPL(rtcpPresenceTimeoutMs, int, 45000);
4457 FROMJSON_IMPL(jitterMaxExceededClipPerc, int, 10);
4458 FROMJSON_IMPL(jitterMaxExceededClipHangMs, int, 1500);
4459 FROMJSON_IMPL(zombieLifetimeMs, int, 15000);
4460 FROMJSON_IMPL(jitterMaxTrimMs, int, 250);
4461 FROMJSON_IMPL(signalledInboundProcessorInactivityMs, int, (p.inboundProcessorInactivityMs * 4));
4462 }
4463
4464 //-----------------------------------------------------------
4465 JSON_SERIALIZED_CLASS(Tls)
4476 {
4477 IMPLEMENT_JSON_SERIALIZATION()
4478 IMPLEMENT_JSON_DOCUMENTATION(Tls)
4479
4480 public:
4481
4484
4487
4489 std::vector<std::string> caCertificates;
4490
4493
4496
4498 std::vector<std::string> crlSerials;
4499
4500 Tls()
4501 {
4502 clear();
4503 }
4504
4505 void clear()
4506 {
4507 verifyPeers = true;
4508 allowSelfSignedCertificates = false;
4509 caCertificates.clear();
4510 subjectRestrictions.clear();
4511 issuerRestrictions.clear();
4512 crlSerials.clear();
4513 }
4514 };
4515
4516 static void to_json(nlohmann::json& j, const Tls& p)
4517 {
4518 j = nlohmann::json{
4519 TOJSON_IMPL(verifyPeers),
4520 TOJSON_IMPL(allowSelfSignedCertificates),
4521 TOJSON_IMPL(caCertificates),
4522 TOJSON_IMPL(subjectRestrictions),
4523 TOJSON_IMPL(issuerRestrictions),
4524 TOJSON_IMPL(crlSerials)
4525 };
4526 }
4527 static void from_json(const nlohmann::json& j, Tls& p)
4528 {
4529 p.clear();
4530 getOptional<bool>("verifyPeers", p.verifyPeers, j, true);
4531 getOptional<bool>("allowSelfSignedCertificates", p.allowSelfSignedCertificates, j, false);
4532 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
4533 getOptional<StringRestrictionList>("subjectRestrictions", p.subjectRestrictions, j);
4534 getOptional<StringRestrictionList>("issuerRestrictions", p.issuerRestrictions, j);
4535 getOptional<std::vector<std::string>>("crlSerials", p.crlSerials, j);
4536 }
4537
4538 //-----------------------------------------------------------
4539 JSON_SERIALIZED_CLASS(RangerPackets)
4552 {
4553 IMPLEMENT_JSON_SERIALIZATION()
4554 IMPLEMENT_JSON_DOCUMENTATION(RangerPackets)
4555
4556 public:
4559
4562
4564 {
4565 clear();
4566 }
4567
4568 void clear()
4569 {
4570 hangTimerSecs = -1;
4571 count = 5;
4572 }
4573
4574 virtual void initForDocumenting()
4575 {
4576 }
4577 };
4578
4579 static void to_json(nlohmann::json& j, const RangerPackets& p)
4580 {
4581 j = nlohmann::json{
4582 TOJSON_IMPL(hangTimerSecs),
4583 TOJSON_IMPL(count)
4584 };
4585 }
4586 static void from_json(const nlohmann::json& j, RangerPackets& p)
4587 {
4588 p.clear();
4589 getOptional<int>("hangTimerSecs", p.hangTimerSecs, j, 11);
4590 getOptional<int>("count", p.count, j, 5);
4591 }
4592
4593 //-----------------------------------------------------------
4594 JSON_SERIALIZED_CLASS(Source)
4607 {
4608 IMPLEMENT_JSON_SERIALIZATION()
4609 IMPLEMENT_JSON_DOCUMENTATION(Source)
4610
4611 public:
4613 std::string nodeId;
4614
4615 /* NOTE: Not serialized ! */
4616 uint8_t _internal_binary_nodeId[ENGAGE_MAX_NODE_ID_SIZE];
4617
4619 std::string alias;
4620
4621 /* NOTE: Not serialized ! */
4622 uint8_t _internal_binary_alias[ENGAGE_MAX_ALIAS_SIZE];
4623
4624 Source()
4625 {
4626 clear();
4627 }
4628
4629 void clear()
4630 {
4631 nodeId.clear();
4632 memset(_internal_binary_nodeId, 0, sizeof(_internal_binary_nodeId));
4633
4634 alias.clear();
4635 memset(_internal_binary_alias, 0, sizeof(_internal_binary_alias));
4636 }
4637
4638 virtual void initForDocumenting()
4639 {
4640 }
4641 };
4642
4643 static void to_json(nlohmann::json& j, const Source& p)
4644 {
4645 j = nlohmann::json{
4646 TOJSON_IMPL(nodeId),
4647 TOJSON_IMPL(alias)
4648 };
4649 }
4650 static void from_json(const nlohmann::json& j, Source& p)
4651 {
4652 p.clear();
4653 FROMJSON_IMPL_SIMPLE(nodeId);
4654 FROMJSON_IMPL_SIMPLE(alias);
4655 }
4656
4657 //-----------------------------------------------------------
4658 JSON_SERIALIZED_CLASS(Group)
4670 {
4671 IMPLEMENT_JSON_SERIALIZATION()
4672 IMPLEMENT_JSON_DOCUMENTATION(Group)
4673
4674 public:
4676 typedef enum
4677 {
4679 gtUnknown = 0,
4680
4682 gtAudio = 1,
4683
4685 gtPresence = 2,
4686
4688 gtRaw = 3
4689 } Type_t;
4690
4691
4693 typedef enum
4694 {
4696 bomRaw = 0,
4697
4699 bomPayloadTransformation = 1,
4700
4702 bomAnonymousMixing = 2,
4703
4705 bomLanguageTranslation = 3
4706 } BridgingOpMode_t;
4707
4709 typedef enum
4710 {
4712 iagpAnonymousAlias = 0,
4713
4715 iagpSsrcInHex = 1
4716 } InboundAliasGenerationPolicy_t;
4717
4720
4723
4730 std::string id;
4731
4733 std::string name;
4734
4736 std::string spokenName;
4737
4739 std::string interfaceName;
4740
4743
4746
4749
4752
4755
4757 std::string cryptoPassword;
4758
4761
4763 std::vector<Rallypoint> rallypoints;
4764
4767
4770
4779
4781 std::string alias;
4782
4785
4787 std::string source;
4788
4795
4798
4801
4804
4806 std::vector<std::string> presenceGroupAffinities;
4807
4810
4813
4815 std::vector<RtpPayloadTypeTranslation> inboundRtpPayloadTypeTranslations;
4816
4819
4822
4824 std::string anonymousAlias;
4825
4828
4831
4834
4837
4840
4843
4846
4848 std::vector<uint16_t> specializerAffinities;
4849
4852
4854 std::vector<Source> ignoreSources;
4855
4857 std::string languageCode;
4858
4860 std::string synVoice;
4861
4864
4867
4870
4873
4876
4879
4880 Group()
4881 {
4882 clear();
4883 }
4884
4885 void clear()
4886 {
4887 type = gtUnknown;
4888 bom = bomRaw;
4889 id.clear();
4890 name.clear();
4891 spokenName.clear();
4892 interfaceName.clear();
4893 rx.clear();
4894 tx.clear();
4895 txOptions.clear();
4896 txAudio.clear();
4897 presence.clear();
4898 cryptoPassword.clear();
4899
4900 alias.clear();
4901
4902 rallypoints.clear();
4903 rallypointCluster.clear();
4904
4905 audio.clear();
4906 timeline.clear();
4907
4908 blockAdvertising = false;
4909
4910 source.clear();
4911
4912 maxRxSecs = 0;
4913
4914 enableMulticastFailover = false;
4915 multicastFailoverSecs = 10;
4916
4917 rtcpPresenceRx.clear();
4918
4919 presenceGroupAffinities.clear();
4920 disablePacketEvents = false;
4921
4922 rfc4733RtpPayloadId = 0;
4923 inboundRtpPayloadTypeTranslations.clear();
4924 priorityTranslation.clear();
4925
4926 stickyTidHangSecs = 10;
4927 anonymousAlias.clear();
4928 lbCrypto = false;
4929
4930 appTransport.clear();
4931 allowLoopback = false;
4932
4933 rtpProfile.clear();
4934 rangerPackets.clear();
4935
4936 _wasDeserialized_rtpProfile = false;
4937
4938 txImpairment.clear();
4939 rxImpairment.clear();
4940
4941 specializerAffinities.clear();
4942
4943 securityLevel = 0;
4944
4945 ignoreSources.clear();
4946
4947 languageCode.clear();
4948 synVoice.clear();
4949
4950 rxCapture.clear();
4951 txCapture.clear();
4952
4953 blobRtpPayloadType = ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE;
4954 inboundAliasGenerationPolicy = iagpAnonymousAlias;
4955 gateIn.clear();
4956
4957 ignoreAudioTraffic = false;
4958 }
4959 };
4960
4961 static void to_json(nlohmann::json& j, const Group& p)
4962 {
4963 j = nlohmann::json{
4964 TOJSON_IMPL(type),
4965 TOJSON_IMPL(bom),
4966 TOJSON_IMPL(id),
4967 TOJSON_IMPL(name),
4968 TOJSON_IMPL(spokenName),
4969 TOJSON_IMPL(interfaceName),
4970 TOJSON_IMPL(rx),
4971 TOJSON_IMPL(tx),
4972 TOJSON_IMPL(txOptions),
4973 TOJSON_IMPL(txAudio),
4974 TOJSON_IMPL(presence),
4975 TOJSON_IMPL(cryptoPassword),
4976 TOJSON_IMPL(alias),
4977
4978 // See below
4979 //TOJSON_IMPL(rallypoints),
4980 //TOJSON_IMPL(rallypointCluster),
4981
4982 TOJSON_IMPL(alias),
4983 TOJSON_IMPL(audio),
4984 TOJSON_IMPL(timeline),
4985 TOJSON_IMPL(blockAdvertising),
4986 TOJSON_IMPL(source),
4987 TOJSON_IMPL(maxRxSecs),
4988 TOJSON_IMPL(enableMulticastFailover),
4989 TOJSON_IMPL(multicastFailoverSecs),
4990 TOJSON_IMPL(rtcpPresenceRx),
4991 TOJSON_IMPL(presenceGroupAffinities),
4992 TOJSON_IMPL(disablePacketEvents),
4993 TOJSON_IMPL(rfc4733RtpPayloadId),
4994 TOJSON_IMPL(inboundRtpPayloadTypeTranslations),
4995 TOJSON_IMPL(priorityTranslation),
4996 TOJSON_IMPL(stickyTidHangSecs),
4997 TOJSON_IMPL(anonymousAlias),
4998 TOJSON_IMPL(lbCrypto),
4999 TOJSON_IMPL(appTransport),
5000 TOJSON_IMPL(allowLoopback),
5001 TOJSON_IMPL(rangerPackets),
5002
5003 TOJSON_IMPL(txImpairment),
5004 TOJSON_IMPL(rxImpairment),
5005
5006 TOJSON_IMPL(specializerAffinities),
5007
5008 TOJSON_IMPL(securityLevel),
5009
5010 TOJSON_IMPL(ignoreSources),
5011
5012 TOJSON_IMPL(languageCode),
5013 TOJSON_IMPL(synVoice),
5014
5015 TOJSON_IMPL(rxCapture),
5016 TOJSON_IMPL(txCapture),
5017
5018 TOJSON_IMPL(blobRtpPayloadType),
5019
5020 TOJSON_IMPL(inboundAliasGenerationPolicy),
5021
5022 TOJSON_IMPL(gateIn),
5023
5024 TOJSON_IMPL(ignoreAudioTraffic)
5025 };
5026
5027 TOJSON_BASE_IMPL();
5028
5029 // TODO: need a better way to indicate whether rtpProfile is present
5030 if(p._wasDeserialized_rtpProfile || p.isDocumenting())
5031 {
5032 j["rtpProfile"] = p.rtpProfile;
5033 }
5034
5035 if(p.isDocumenting())
5036 {
5037 j["rallypointCluster"] = p.rallypointCluster;
5038 j["rallypoints"] = p.rallypoints;
5039 }
5040 else
5041 {
5042 // rallypointCluster takes precedence if it has elements
5043 if(!p.rallypointCluster.rallypoints.empty())
5044 {
5045 j["rallypointCluster"] = p.rallypointCluster;
5046 }
5047 else if(!p.rallypoints.empty())
5048 {
5049 j["rallypoints"] = p.rallypoints;
5050 }
5051 }
5052 }
5053 static void from_json(const nlohmann::json& j, Group& p)
5054 {
5055 p.clear();
5056 j.at("type").get_to(p.type);
5057 getOptional<Group::BridgingOpMode_t>("bom", p.bom, j, Group::BridgingOpMode_t::bomRaw);
5058 j.at("id").get_to(p.id);
5059 getOptional<std::string>("name", p.name, j);
5060 getOptional<std::string>("spokenName", p.spokenName, j);
5061 getOptional<std::string>("interfaceName", p.interfaceName, j);
5062 getOptional<NetworkAddress>("rx", p.rx, j);
5063 getOptional<NetworkAddress>("tx", p.tx, j);
5064 getOptional<NetworkTxOptions>("txOptions", p.txOptions, j);
5065 getOptional<std::string>("cryptoPassword", p.cryptoPassword, j);
5066 getOptional<std::string>("alias", p.alias, j);
5067 getOptional<TxAudio>("txAudio", p.txAudio, j);
5068 getOptional<Presence>("presence", p.presence, j);
5069 getOptional<std::vector<Rallypoint>>("rallypoints", p.rallypoints, j);
5070 getOptional<RallypointCluster>("rallypointCluster", p.rallypointCluster, j);
5071 getOptional<Audio>("audio", p.audio, j);
5072 getOptional<GroupTimeline>("timeline", p.timeline, j);
5073 getOptional<bool>("blockAdvertising", p.blockAdvertising, j, false);
5074 getOptional<std::string>("source", p.source, j);
5075 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
5076 getOptional<bool>("enableMulticastFailover", p.enableMulticastFailover, j, false);
5077 getOptional<int>("multicastFailoverSecs", p.multicastFailoverSecs, j, 10);
5078 getOptional<NetworkAddress>("rtcpPresenceRx", p.rtcpPresenceRx, j);
5079 getOptional<std::vector<std::string>>("presenceGroupAffinities", p.presenceGroupAffinities, j);
5080 getOptional<bool>("disablePacketEvents", p.disablePacketEvents, j, false);
5081 getOptional<int>("rfc4733RtpPayloadId", p.rfc4733RtpPayloadId, j, 0);
5082 getOptional<std::vector<RtpPayloadTypeTranslation>>("inboundRtpPayloadTypeTranslations", p.inboundRtpPayloadTypeTranslations, j);
5083 getOptional<GroupPriorityTranslation>("priorityTranslation", p.priorityTranslation, j);
5084 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
5085 getOptional<std::string>("anonymousAlias", p.anonymousAlias, j);
5086 getOptional<bool>("lbCrypto", p.lbCrypto, j, false);
5087 getOptional<GroupAppTransport>("appTransport", p.appTransport, j);
5088 getOptional<bool>("allowLoopback", p.allowLoopback, j, false);
5089 getOptionalWithIndicator<RtpProfile>("rtpProfile", p.rtpProfile, j, &p._wasDeserialized_rtpProfile);
5090 getOptional<RangerPackets>("rangerPackets", p.rangerPackets, j);
5091 getOptional<TransportImpairment>("txImpairment", p.txImpairment, j);
5092 getOptional<TransportImpairment>("rxImpairment", p.rxImpairment, j);
5093 getOptional<std::vector<uint16_t>>("specializerAffinities", p.specializerAffinities, j);
5094 getOptional<uint32_t>("securityLevel", p.securityLevel, j, 0);
5095 getOptional<std::vector<Source>>("ignoreSources", p.ignoreSources, j);
5096 getOptional<std::string>("languageCode", p.languageCode, j);
5097 getOptional<std::string>("synVoice", p.synVoice, j);
5098
5099 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
5100 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
5101
5102 getOptional<uint16_t>("blobRtpPayloadType", p.blobRtpPayloadType, j, ENGAGE_DEFAULT_BLOB_RTP_PAYLOAD_TYPE);
5103
5104 getOptional<Group::InboundAliasGenerationPolicy_t>("inboundAliasGenerationPolicy", p.inboundAliasGenerationPolicy, j, Group::InboundAliasGenerationPolicy_t::iagpAnonymousAlias);
5105
5106 getOptional<AudioGate>("gateIn", p.gateIn, j);
5107
5108 getOptional<bool>("ignoreAudioTraffic", p.ignoreAudioTraffic, j, false);
5109
5110 FROMJSON_BASE_IMPL();
5111 }
5112
5113
5114 //-----------------------------------------------------------
5115 JSON_SERIALIZED_CLASS(Mission)
5117 {
5118 IMPLEMENT_JSON_SERIALIZATION()
5119 IMPLEMENT_JSON_DOCUMENTATION(Mission)
5120
5121 public:
5122 std::string id;
5123 std::string name;
5124 std::vector<Group> groups;
5125 std::chrono::system_clock::time_point begins;
5126 std::chrono::system_clock::time_point ends;
5127 std::string certStoreId;
5128 int multicastFailoverPolicy;
5129 Rallypoint rallypoint;
5130
5131 void clear()
5132 {
5133 id.clear();
5134 name.clear();
5135 groups.clear();
5136 certStoreId.clear();
5137 multicastFailoverPolicy = 0;
5138 rallypoint.clear();
5139 }
5140 };
5141
5142 static void to_json(nlohmann::json& j, const Mission& p)
5143 {
5144 j = nlohmann::json{
5145 TOJSON_IMPL(id),
5146 TOJSON_IMPL(name),
5147 TOJSON_IMPL(groups),
5148 TOJSON_IMPL(certStoreId),
5149 TOJSON_IMPL(multicastFailoverPolicy),
5150 TOJSON_IMPL(rallypoint)
5151 };
5152 }
5153
5154 static void from_json(const nlohmann::json& j, Mission& p)
5155 {
5156 p.clear();
5157 j.at("id").get_to(p.id);
5158 j.at("name").get_to(p.name);
5159
5160 // Groups are optional
5161 try
5162 {
5163 j.at("groups").get_to(p.groups);
5164 }
5165 catch(...)
5166 {
5167 p.groups.clear();
5168 }
5169
5170 FROMJSON_IMPL(certStoreId, std::string, EMPTY_STRING);
5171 FROMJSON_IMPL(multicastFailoverPolicy, int, 0);
5172 getOptional<Rallypoint>("rallypoint", p.rallypoint, j);
5173 }
5174
5175 //-----------------------------------------------------------
5176 JSON_SERIALIZED_CLASS(LicenseDescriptor)
5187 {
5188 IMPLEMENT_JSON_SERIALIZATION()
5189 IMPLEMENT_JSON_DOCUMENTATION(LicenseDescriptor)
5190
5191 public:
5197 static const int STATUS_OK = 0;
5198 static const int ERR_NULL_ENTITLEMENT_KEY = -1;
5199 static const int ERR_NULL_LICENSE_KEY = -2;
5200 static const int ERR_INVALID_LICENSE_KEY_LEN = -3;
5201 static const int ERR_LICENSE_KEY_VERIFICATION_FAILURE = -4;
5202 static const int ERR_ACTIVATION_CODE_VERIFICATION_FAILURE = -5;
5203 static const int ERR_INVALID_EXPIRATION_DATE = -6;
5204 static const int ERR_GENERAL_FAILURE = -7;
5205 static const int ERR_NOT_INITIALIZED = -8;
5206 static const int ERR_REQUIRES_ACTIVATION = -9;
5207 static const int ERR_LICENSE_NOT_SUITED_FOR_ACTIVATION = -10;
5215 static const uint8_t LIC_CARGO_FLAG_LIMIT_TO_FEATURES = 0x01;
5226 std::string entitlement;
5227
5234 std::string key;
5235
5237 std::string activationCode;
5238
5240 std::string deviceId;
5241
5243 int type;
5244
5246 time_t expires;
5247
5249 std::string expiresFormatted;
5250
5255 uint32_t flags;
5256
5258 std::string cargo;
5259
5261 uint8_t cargoFlags;
5262
5268
5270 std::string manufacturerId;
5271
5273 {
5274 clear();
5275 }
5276
5277 void clear()
5278 {
5279 entitlement.clear();
5280 key.clear();
5281 activationCode.clear();
5282 type = 0;
5283 expires = 0;
5284 expiresFormatted.clear();
5285 flags = 0;
5286 cargo.clear();
5287 cargoFlags = 0;
5288 deviceId.clear();
5289 status = ERR_NOT_INITIALIZED;
5290 manufacturerId.clear();
5291 }
5292 };
5293
5294 static void to_json(nlohmann::json& j, const LicenseDescriptor& p)
5295 {
5296 j = nlohmann::json{
5297 //TOJSON_IMPL(entitlement),
5298 {"entitlement", "*entitlement*"},
5299 TOJSON_IMPL(key),
5300 TOJSON_IMPL(activationCode),
5301 TOJSON_IMPL(type),
5302 TOJSON_IMPL(expires),
5303 TOJSON_IMPL(expiresFormatted),
5304 TOJSON_IMPL(flags),
5305 TOJSON_IMPL(deviceId),
5306 TOJSON_IMPL(status),
5307 //TOJSON_IMPL(manufacturerId),
5308 {"manufacturerId", "*manufacturerId*"},
5309 TOJSON_IMPL(cargo),
5310 TOJSON_IMPL(cargoFlags)
5311 };
5312 }
5313
5314 static void from_json(const nlohmann::json& j, LicenseDescriptor& p)
5315 {
5316 p.clear();
5317 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
5318 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
5319 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
5320 FROMJSON_IMPL(type, int, 0);
5321 FROMJSON_IMPL(expires, time_t, 0);
5322 FROMJSON_IMPL(expiresFormatted, std::string, EMPTY_STRING);
5323 FROMJSON_IMPL(flags, uint32_t, 0);
5324 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
5325 FROMJSON_IMPL(status, int, LicenseDescriptor::ERR_NOT_INITIALIZED);
5326 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
5327 FROMJSON_IMPL(cargo, std::string, EMPTY_STRING);
5328 FROMJSON_IMPL(cargoFlags, uint8_t, 0);
5329 }
5330
5331
5332 //-----------------------------------------------------------
5333 JSON_SERIALIZED_CLASS(EngineNetworkingRpUdpStreaming)
5346 {
5347 IMPLEMENT_JSON_SERIALIZATION()
5348 IMPLEMENT_JSON_DOCUMENTATION(EngineNetworkingRpUdpStreaming)
5349
5350 public:
5353
5355 int port;
5356
5359
5362
5364 int ttl;
5365
5367 {
5368 clear();
5369 }
5370
5371 void clear()
5372 {
5373 enabled = false;
5374 port = 0;
5375 keepaliveIntervalSecs = 15;
5376 priority = TxPriority_t::priVoice;
5377 ttl = 64;
5378 }
5379
5380 virtual void initForDocumenting()
5381 {
5382 }
5383 };
5384
5385 static void to_json(nlohmann::json& j, const EngineNetworkingRpUdpStreaming& p)
5386 {
5387 j = nlohmann::json{
5388 TOJSON_IMPL(enabled),
5389 TOJSON_IMPL(port),
5390 TOJSON_IMPL(keepaliveIntervalSecs),
5391 TOJSON_IMPL(priority),
5392 TOJSON_IMPL(ttl)
5393 };
5394 }
5395 static void from_json(const nlohmann::json& j, EngineNetworkingRpUdpStreaming& p)
5396 {
5397 p.clear();
5398 getOptional<bool>("enabled", p.enabled, j, false);
5399 getOptional<int>("port", p.port, j, 0);
5400 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
5401 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
5402 getOptional<int>("ttl", p.ttl, j, 64);
5403 }
5404
5405 //-----------------------------------------------------------
5406 JSON_SERIALIZED_CLASS(EnginePolicyNetworking)
5416 {
5417 IMPLEMENT_JSON_SERIALIZATION()
5418 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNetworking)
5419
5420 public:
5422 std::string defaultNic;
5423
5426
5429
5432
5435
5438
5441
5444
5446 {
5447 clear();
5448 }
5449
5450 void clear()
5451 {
5452 defaultNic.clear();
5453 multicastRejoinSecs = 8;
5454 rallypointRtTestIntervalMs = 60000;
5455 logRtpJitterBufferStats = false;
5456 preventMulticastFailover = false;
5457 addressResolutionPolicy = AddressResolutionPolicy_t::arpIpv6ThenIpv4;
5458
5459 rpUdpStreaming.clear();
5460 rtpProfile.clear();
5461 }
5462 };
5463
5464 static void to_json(nlohmann::json& j, const EnginePolicyNetworking& p)
5465 {
5466 j = nlohmann::json{
5467 TOJSON_IMPL(defaultNic),
5468 TOJSON_IMPL(multicastRejoinSecs),
5469
5470 TOJSON_IMPL(rallypointRtTestIntervalMs),
5471 TOJSON_IMPL(logRtpJitterBufferStats),
5472 TOJSON_IMPL(preventMulticastFailover),
5473
5474 TOJSON_IMPL(rpUdpStreaming),
5475 TOJSON_IMPL(rtpProfile),
5476 TOJSON_IMPL(addressResolutionPolicy)
5477 };
5478 }
5479 static void from_json(const nlohmann::json& j, EnginePolicyNetworking& p)
5480 {
5481 p.clear();
5482 FROMJSON_IMPL(defaultNic, std::string, EMPTY_STRING);
5483 FROMJSON_IMPL(multicastRejoinSecs, int, 8);
5484 FROMJSON_IMPL(rallypointRtTestIntervalMs, int, 60000);
5485 FROMJSON_IMPL(logRtpJitterBufferStats, bool, false);
5486 FROMJSON_IMPL(preventMulticastFailover, bool, false);
5487
5488 getOptional<EngineNetworkingRpUdpStreaming>("rpUdpStreaming", p.rpUdpStreaming, j);
5489 getOptional<RtpProfile>("rtpProfile", p.rtpProfile, j);
5490 getOptional<AddressResolutionPolicy_t>("addressResolutionPolicy", p.addressResolutionPolicy, j, AddressResolutionPolicy_t::arpIpv6ThenIpv4);
5491 }
5492
5493 //-----------------------------------------------------------
5494 JSON_SERIALIZED_CLASS(Aec)
5505 {
5506 IMPLEMENT_JSON_SERIALIZATION()
5507 IMPLEMENT_JSON_DOCUMENTATION(Aec)
5508
5509 public:
5515 typedef enum
5516 {
5518 aecmDefault = 0,
5519
5521 aecmLow = 1,
5522
5524 aecmMedium = 2,
5525
5527 aecmHigh = 3,
5528
5530 aecmVeryHigh = 4,
5531
5533 aecmHighest = 5
5534 } Mode_t;
5535
5538
5541
5544
5546 bool cng;
5547
5548 Aec()
5549 {
5550 clear();
5551 }
5552
5553 void clear()
5554 {
5555 enabled = false;
5556 mode = aecmDefault;
5557 speakerTailMs = 60;
5558 cng = true;
5559 }
5560 };
5561
5562 static void to_json(nlohmann::json& j, const Aec& p)
5563 {
5564 j = nlohmann::json{
5565 TOJSON_IMPL(enabled),
5566 TOJSON_IMPL(mode),
5567 TOJSON_IMPL(speakerTailMs),
5568 TOJSON_IMPL(cng)
5569 };
5570 }
5571 static void from_json(const nlohmann::json& j, Aec& p)
5572 {
5573 p.clear();
5574 FROMJSON_IMPL(enabled, bool, false);
5575 FROMJSON_IMPL(mode, Aec::Mode_t, Aec::Mode_t::aecmDefault);
5576 FROMJSON_IMPL(speakerTailMs, int, 60);
5577 FROMJSON_IMPL(cng, bool, true);
5578 }
5579
5580 //-----------------------------------------------------------
5581 JSON_SERIALIZED_CLASS(Vad)
5592 {
5593 IMPLEMENT_JSON_SERIALIZATION()
5594 IMPLEMENT_JSON_DOCUMENTATION(Vad)
5595
5596 public:
5602 typedef enum
5603 {
5605 vamDefault = 0,
5606
5608 vamLowBitRate = 1,
5609
5611 vamAggressive = 2,
5612
5614 vamVeryAggressive = 3
5615 } Mode_t;
5616
5619
5622
5623 Vad()
5624 {
5625 clear();
5626 }
5627
5628 void clear()
5629 {
5630 enabled = false;
5631 mode = vamDefault;
5632 }
5633 };
5634
5635 static void to_json(nlohmann::json& j, const Vad& p)
5636 {
5637 j = nlohmann::json{
5638 TOJSON_IMPL(enabled),
5639 TOJSON_IMPL(mode)
5640 };
5641 }
5642 static void from_json(const nlohmann::json& j, Vad& p)
5643 {
5644 p.clear();
5645 FROMJSON_IMPL(enabled, bool, false);
5646 FROMJSON_IMPL(mode, Vad::Mode_t, Vad::Mode_t::vamDefault);
5647 }
5648
5649 //-----------------------------------------------------------
5650 JSON_SERIALIZED_CLASS(Bridge)
5661 {
5662 IMPLEMENT_JSON_SERIALIZATION()
5663 IMPLEMENT_JSON_DOCUMENTATION(Bridge)
5664
5665 public:
5667 std::string id;
5668
5670 std::string name;
5671
5673 std::vector<std::string> groups;
5674
5677
5678 Bridge()
5679 {
5680 clear();
5681 }
5682
5683 void clear()
5684 {
5685 id.clear();
5686 name.clear();
5687 groups.clear();
5688 enabled = true;
5689 }
5690 };
5691
5692 static void to_json(nlohmann::json& j, const Bridge& p)
5693 {
5694 j = nlohmann::json{
5695 TOJSON_IMPL(id),
5696 TOJSON_IMPL(name),
5697 TOJSON_IMPL(groups),
5698 TOJSON_IMPL(enabled)
5699 };
5700 }
5701 static void from_json(const nlohmann::json& j, Bridge& p)
5702 {
5703 p.clear();
5704 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
5705 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
5706 getOptional<std::vector<std::string>>("groups", p.groups, j);
5707 FROMJSON_IMPL(enabled, bool, true);
5708 }
5709
5710 //-----------------------------------------------------------
5711 JSON_SERIALIZED_CLASS(AndroidAudio)
5722 {
5723 IMPLEMENT_JSON_SERIALIZATION()
5724 IMPLEMENT_JSON_DOCUMENTATION(AndroidAudio)
5725
5726 public:
5727 constexpr static int INVALID_SESSION_ID = -9999;
5728
5730 int api;
5731
5734
5737
5753
5761
5771
5774
5777
5778
5779 AndroidAudio()
5780 {
5781 clear();
5782 }
5783
5784 void clear()
5785 {
5786 api = 0;
5787 sharingMode = 0;
5788 performanceMode = 12;
5789 usage = 2;
5790 contentType = 1;
5791 inputPreset = 7;
5792 sessionId = AndroidAudio::INVALID_SESSION_ID;
5793 engineMode = 0;
5794 }
5795 };
5796
5797 static void to_json(nlohmann::json& j, const AndroidAudio& p)
5798 {
5799 j = nlohmann::json{
5800 TOJSON_IMPL(api),
5801 TOJSON_IMPL(sharingMode),
5802 TOJSON_IMPL(performanceMode),
5803 TOJSON_IMPL(usage),
5804 TOJSON_IMPL(contentType),
5805 TOJSON_IMPL(inputPreset),
5806 TOJSON_IMPL(sessionId),
5807 TOJSON_IMPL(engineMode)
5808 };
5809 }
5810 static void from_json(const nlohmann::json& j, AndroidAudio& p)
5811 {
5812 p.clear();
5813 FROMJSON_IMPL(api, int, 0);
5814 FROMJSON_IMPL(sharingMode, int, 0);
5815 FROMJSON_IMPL(performanceMode, int, 12);
5816 FROMJSON_IMPL(usage, int, 2);
5817 FROMJSON_IMPL(contentType, int, 1);
5818 FROMJSON_IMPL(inputPreset, int, 7);
5819 FROMJSON_IMPL(sessionId, int, AndroidAudio::INVALID_SESSION_ID);
5820 FROMJSON_IMPL(engineMode, int, 0);
5821 }
5822
5823 //-----------------------------------------------------------
5824 JSON_SERIALIZED_CLASS(EnginePolicyAudio)
5835 {
5836 IMPLEMENT_JSON_SERIALIZATION()
5837 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyAudio)
5838
5839 public:
5842
5845
5848
5851
5854
5857
5860
5863
5866
5869
5872
5875
5878
5881
5882
5884 {
5885 clear();
5886 }
5887
5888 void clear()
5889 {
5890 enabled = true;
5891 hardwareEnabled = true;
5892 internalRate = 16000;
5893 internalChannels = 2;
5894 muteTxOnTx = false;
5895 aec.clear();
5896 vad.clear();
5897 android.clear();
5898 inputAgc.clear();
5899 outputAgc.clear();
5900 denoiseInput = false;
5901 denoiseOutput = false;
5902 saveInputPcm = false;
5903 saveOutputPcm = false;
5904 }
5905 };
5906
5907 static void to_json(nlohmann::json& j, const EnginePolicyAudio& p)
5908 {
5909 j = nlohmann::json{
5910 TOJSON_IMPL(enabled),
5911 TOJSON_IMPL(hardwareEnabled),
5912 TOJSON_IMPL(internalRate),
5913 TOJSON_IMPL(internalChannels),
5914 TOJSON_IMPL(muteTxOnTx),
5915 TOJSON_IMPL(aec),
5916 TOJSON_IMPL(vad),
5917 TOJSON_IMPL(android),
5918 TOJSON_IMPL(inputAgc),
5919 TOJSON_IMPL(outputAgc),
5920 TOJSON_IMPL(denoiseInput),
5921 TOJSON_IMPL(denoiseOutput),
5922 TOJSON_IMPL(saveInputPcm),
5923 TOJSON_IMPL(saveOutputPcm)
5924 };
5925 }
5926 static void from_json(const nlohmann::json& j, EnginePolicyAudio& p)
5927 {
5928 p.clear();
5929 getOptional<bool>("enabled", p.enabled, j, true);
5930 getOptional<bool>("hardwareEnabled", p.hardwareEnabled, j, true);
5931 FROMJSON_IMPL(internalRate, int, 16000);
5932 FROMJSON_IMPL(internalChannels, int, 2);
5933
5934 FROMJSON_IMPL(muteTxOnTx, bool, false);
5935 getOptional<Aec>("aec", p.aec, j);
5936 getOptional<Vad>("vad", p.vad, j);
5937 getOptional<AndroidAudio>("android", p.android, j);
5938 getOptional<Agc>("inputAgc", p.inputAgc, j);
5939 getOptional<Agc>("outputAgc", p.outputAgc, j);
5940 FROMJSON_IMPL(denoiseInput, bool, false);
5941 FROMJSON_IMPL(denoiseOutput, bool, false);
5942 FROMJSON_IMPL(saveInputPcm, bool, false);
5943 FROMJSON_IMPL(saveOutputPcm, bool, false);
5944 }
5945
5946 //-----------------------------------------------------------
5947 JSON_SERIALIZED_CLASS(SecurityCertificate)
5958 {
5959 IMPLEMENT_JSON_SERIALIZATION()
5960 IMPLEMENT_JSON_DOCUMENTATION(SecurityCertificate)
5961
5962 public:
5963
5969 std::string certificate;
5970
5972 std::string key;
5973
5975 {
5976 clear();
5977 }
5978
5979 void clear()
5980 {
5981 certificate.clear();
5982 key.clear();
5983 }
5984 };
5985
5986 static void to_json(nlohmann::json& j, const SecurityCertificate& p)
5987 {
5988 j = nlohmann::json{
5989 TOJSON_IMPL(certificate),
5990 TOJSON_IMPL(key)
5991 };
5992 }
5993 static void from_json(const nlohmann::json& j, SecurityCertificate& p)
5994 {
5995 p.clear();
5996 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
5997 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
5998 }
5999
6000 // This is where spell checking stops
6001 //-----------------------------------------------------------
6002 JSON_SERIALIZED_CLASS(EnginePolicySecurity)
6003
6004
6014 {
6015 IMPLEMENT_JSON_SERIALIZATION()
6016 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicySecurity)
6017
6018 public:
6019
6031
6039 std::vector<std::string> caCertificates;
6040
6042 {
6043 clear();
6044 }
6045
6046 void clear()
6047 {
6048 certificate.clear();
6049 caCertificates.clear();
6050 }
6051 };
6052
6053 static void to_json(nlohmann::json& j, const EnginePolicySecurity& p)
6054 {
6055 j = nlohmann::json{
6056 TOJSON_IMPL(certificate),
6057 TOJSON_IMPL(caCertificates)
6058 };
6059 }
6060 static void from_json(const nlohmann::json& j, EnginePolicySecurity& p)
6061 {
6062 p.clear();
6063 getOptional("certificate", p.certificate, j);
6064 getOptional<std::vector<std::string>>("caCertificates", p.caCertificates, j);
6065 }
6066
6067 //-----------------------------------------------------------
6068 JSON_SERIALIZED_CLASS(EnginePolicyLogging)
6079 {
6080 IMPLEMENT_JSON_SERIALIZATION()
6081 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyLogging)
6082
6083 public:
6084
6101
6104
6106 {
6107 clear();
6108 }
6109
6110 void clear()
6111 {
6112 maxLevel = 4; // ILogger::Level::debug
6113 enableSyslog = false;
6114 }
6115 };
6116
6117 static void to_json(nlohmann::json& j, const EnginePolicyLogging& p)
6118 {
6119 j = nlohmann::json{
6120 TOJSON_IMPL(maxLevel),
6121 TOJSON_IMPL(enableSyslog)
6122 };
6123 }
6124 static void from_json(const nlohmann::json& j, EnginePolicyLogging& p)
6125 {
6126 p.clear();
6127 getOptional("maxLevel", p.maxLevel, j, 4); // ILogger::Level::debug
6128 getOptional("enableSyslog", p.enableSyslog, j);
6129 }
6130
6131
6132 //-----------------------------------------------------------
6133 JSON_SERIALIZED_CLASS(EnginePolicyDatabase)
6135 {
6136 IMPLEMENT_JSON_SERIALIZATION()
6137 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyDatabase)
6138
6139 public:
6140 typedef enum
6141 {
6142 dbtFixedMemory = 0,
6143 dbtPagedMemory = 1,
6144 dbtFixedFile = 2
6145 } DatabaseType_t;
6146
6147 DatabaseType_t type;
6148 std::string fixedFileName;
6149 bool forceMaintenance;
6150 bool reclaimSpace;
6151
6153 {
6154 clear();
6155 }
6156
6157 void clear()
6158 {
6159 type = DatabaseType_t::dbtFixedMemory;
6160 fixedFileName.clear();
6161 forceMaintenance = false;
6162 reclaimSpace = false;
6163 }
6164 };
6165
6166 static void to_json(nlohmann::json& j, const EnginePolicyDatabase& p)
6167 {
6168 j = nlohmann::json{
6169 TOJSON_IMPL(type),
6170 TOJSON_IMPL(fixedFileName),
6171 TOJSON_IMPL(forceMaintenance),
6172 TOJSON_IMPL(reclaimSpace)
6173 };
6174 }
6175 static void from_json(const nlohmann::json& j, EnginePolicyDatabase& p)
6176 {
6177 p.clear();
6178 FROMJSON_IMPL(type, EnginePolicyDatabase::DatabaseType_t, EnginePolicyDatabase::DatabaseType_t::dbtFixedMemory);
6179 FROMJSON_IMPL(fixedFileName, std::string, EMPTY_STRING);
6180 FROMJSON_IMPL(forceMaintenance, bool, false);
6181 FROMJSON_IMPL(reclaimSpace, bool, false);
6182 }
6183
6184
6185 //-----------------------------------------------------------
6186 JSON_SERIALIZED_CLASS(SecureSignature)
6195 {
6196 IMPLEMENT_JSON_SERIALIZATION()
6197 IMPLEMENT_JSON_DOCUMENTATION(SecureSignature)
6198
6199 public:
6200
6202 std::string certificate;
6203
6204 // /** @brief Contains the PEM-formatted text of the certificate's public key */
6205 //std::string publicKey;
6206
6208 std::string signature;
6209
6211 {
6212 clear();
6213 }
6214
6215 void clear()
6216 {
6217 certificate.clear();
6218 //publicKey.clear();
6219 signature.clear();
6220 }
6221 };
6222
6223 static void to_json(nlohmann::json& j, const SecureSignature& p)
6224 {
6225 j = nlohmann::json{
6226 TOJSON_IMPL(certificate),
6227 //TOJSON_IMPL(publicKey),
6228 TOJSON_IMPL(signature)
6229 };
6230 }
6231 static void from_json(const nlohmann::json& j, SecureSignature& p)
6232 {
6233 p.clear();
6234 FROMJSON_IMPL(certificate, std::string, EMPTY_STRING);
6235 //FROMJSON_IMPL(publicKey, std::string, EMPTY_STRING);
6236 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
6237 }
6238
6239 //-----------------------------------------------------------
6240 JSON_SERIALIZED_CLASS(NamedAudioDevice)
6242 {
6243 IMPLEMENT_JSON_SERIALIZATION()
6244 IMPLEMENT_JSON_DOCUMENTATION(NamedAudioDevice)
6245
6246 public:
6247 std::string name;
6248 std::string manufacturer;
6249 std::string model;
6250 std::string id;
6251 std::string serialNumber;
6252 std::string type;
6253 std::string extra;
6254 bool isDefault;
6255
6257 {
6258 clear();
6259 }
6260
6261 void clear()
6262 {
6263 name.clear();
6264 manufacturer.clear();
6265 model.clear();
6266 id.clear();
6267 serialNumber.clear();
6268 type.clear();
6269 extra.clear();
6270 isDefault = false;
6271 }
6272 };
6273
6274 static void to_json(nlohmann::json& j, const NamedAudioDevice& p)
6275 {
6276 j = nlohmann::json{
6277 TOJSON_IMPL(name),
6278 TOJSON_IMPL(manufacturer),
6279 TOJSON_IMPL(model),
6280 TOJSON_IMPL(id),
6281 TOJSON_IMPL(serialNumber),
6282 TOJSON_IMPL(type),
6283 TOJSON_IMPL(extra),
6284 TOJSON_IMPL(isDefault),
6285 };
6286 }
6287 static void from_json(const nlohmann::json& j, NamedAudioDevice& p)
6288 {
6289 p.clear();
6290 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
6291 getOptional<std::string>("manufacturer", p.manufacturer, j, EMPTY_STRING);
6292 getOptional<std::string>("model", p.model, j, EMPTY_STRING);
6293 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
6294 getOptional<std::string>("serialNumber", p.serialNumber, j, EMPTY_STRING);
6295 getOptional<std::string>("type", p.type, j, EMPTY_STRING);
6296 getOptional<std::string>("extra", p.extra, j, EMPTY_STRING);
6297 getOptional<bool>("isDefault", p.isDefault, j, false);
6298 }
6299
6300
6301 //-----------------------------------------------------------
6302 JSON_SERIALIZED_CLASS(EnginePolicyNamedAudioDevices)
6304 {
6305 IMPLEMENT_JSON_SERIALIZATION()
6306 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyNamedAudioDevices)
6307
6308 public:
6309 std::vector<NamedAudioDevice> inputs;
6310 std::vector<NamedAudioDevice> outputs;
6311
6313 {
6314 clear();
6315 }
6316
6317 void clear()
6318 {
6319 inputs.clear();
6320 outputs.clear();
6321 }
6322 };
6323
6324 static void to_json(nlohmann::json& j, const EnginePolicyNamedAudioDevices& p)
6325 {
6326 j = nlohmann::json{
6327 TOJSON_IMPL(inputs),
6328 TOJSON_IMPL(outputs)
6329 };
6330 }
6331 static void from_json(const nlohmann::json& j, EnginePolicyNamedAudioDevices& p)
6332 {
6333 p.clear();
6334 getOptional<std::vector<NamedAudioDevice>>("inputs", p.inputs, j);
6335 getOptional<std::vector<NamedAudioDevice>>("outputs", p.outputs, j);
6336 }
6337
6338 //-----------------------------------------------------------
6339 JSON_SERIALIZED_CLASS(Licensing)
6352 {
6353 IMPLEMENT_JSON_SERIALIZATION()
6354 IMPLEMENT_JSON_DOCUMENTATION(Licensing)
6355
6356 public:
6357
6359 std::string entitlement;
6360
6362 std::string key;
6363
6365 std::string activationCode;
6366
6368 std::string deviceId;
6369
6371 std::string manufacturerId;
6372
6373 Licensing()
6374 {
6375 clear();
6376 }
6377
6378 void clear()
6379 {
6380 entitlement.clear();
6381 key.clear();
6382 activationCode.clear();
6383 deviceId.clear();
6384 manufacturerId.clear();
6385 }
6386 };
6387
6388 static void to_json(nlohmann::json& j, const Licensing& p)
6389 {
6390 j = nlohmann::json{
6391 TOJSON_IMPL(entitlement),
6392 TOJSON_IMPL(key),
6393 TOJSON_IMPL(activationCode),
6394 TOJSON_IMPL(deviceId),
6395 TOJSON_IMPL(manufacturerId)
6396 };
6397 }
6398 static void from_json(const nlohmann::json& j, Licensing& p)
6399 {
6400 p.clear();
6401 FROMJSON_IMPL(entitlement, std::string, EMPTY_STRING);
6402 FROMJSON_IMPL(key, std::string, EMPTY_STRING);
6403 FROMJSON_IMPL(activationCode, std::string, EMPTY_STRING);
6404 FROMJSON_IMPL(deviceId, std::string, EMPTY_STRING);
6405 FROMJSON_IMPL(manufacturerId, std::string, EMPTY_STRING);
6406 }
6407
6408 //-----------------------------------------------------------
6409 JSON_SERIALIZED_CLASS(DiscoveryMagellan)
6420 {
6421 IMPLEMENT_JSON_SERIALIZATION()
6422 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryMagellan)
6423
6424 public:
6425
6428
6430 std::string interfaceName;
6431
6434
6437
6439 {
6440 clear();
6441 }
6442
6443 void clear()
6444 {
6445 enabled = false;
6446 interfaceName.clear();
6447 security.clear();
6448 tls.clear();
6449 }
6450 };
6451
6452 static void to_json(nlohmann::json& j, const DiscoveryMagellan& p)
6453 {
6454 j = nlohmann::json{
6455 TOJSON_IMPL(enabled),
6456 TOJSON_IMPL(interfaceName),
6457 TOJSON_IMPL(security),
6458 TOJSON_IMPL(tls)
6459 };
6460 }
6461 static void from_json(const nlohmann::json& j, DiscoveryMagellan& p)
6462 {
6463 p.clear();
6464 getOptional("enabled", p.enabled, j, false);
6465 getOptional<Tls>("tls", p.tls, j);
6466 getOptional<SecurityCertificate>("security", p.security, j);
6467 FROMJSON_IMPL(interfaceName, std::string, EMPTY_STRING);
6468 }
6469
6470 //-----------------------------------------------------------
6471 JSON_SERIALIZED_CLASS(DiscoverySsdp)
6482 {
6483 IMPLEMENT_JSON_SERIALIZATION()
6484 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySsdp)
6485
6486 public:
6487
6490
6492 std::string interfaceName;
6493
6496
6498 std::vector<std::string> searchTerms;
6499
6502
6505
6507 {
6508 clear();
6509 }
6510
6511 void clear()
6512 {
6513 enabled = false;
6514 interfaceName.clear();
6515 address.clear();
6516 searchTerms.clear();
6517 ageTimeoutMs = 30000;
6518 advertising.clear();
6519 }
6520 };
6521
6522 static void to_json(nlohmann::json& j, const DiscoverySsdp& p)
6523 {
6524 j = nlohmann::json{
6525 TOJSON_IMPL(enabled),
6526 TOJSON_IMPL(interfaceName),
6527 TOJSON_IMPL(address),
6528 TOJSON_IMPL(searchTerms),
6529 TOJSON_IMPL(ageTimeoutMs),
6530 TOJSON_IMPL(advertising)
6531 };
6532 }
6533 static void from_json(const nlohmann::json& j, DiscoverySsdp& p)
6534 {
6535 p.clear();
6536 getOptional("enabled", p.enabled, j, false);
6537 getOptional<std::string>("interfaceName", p.interfaceName, j);
6538
6539 getOptional<NetworkAddress>("address", p.address, j);
6540 if(p.address.address.empty())
6541 {
6542 p.address.address = "255.255.255.255";
6543 }
6544 if(p.address.port <= 0)
6545 {
6546 p.address.port = 1900;
6547 }
6548
6549 getOptional<std::vector<std::string>>("searchTerms", p.searchTerms, j);
6550 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
6551 getOptional<Advertising>("advertising", p.advertising, j);
6552 }
6553
6554 //-----------------------------------------------------------
6555 JSON_SERIALIZED_CLASS(DiscoverySap)
6566 {
6567 IMPLEMENT_JSON_SERIALIZATION()
6568 IMPLEMENT_JSON_DOCUMENTATION(DiscoverySap)
6569
6570 public:
6573
6575 std::string interfaceName;
6576
6579
6582
6585
6586 DiscoverySap()
6587 {
6588 clear();
6589 }
6590
6591 void clear()
6592 {
6593 enabled = false;
6594 interfaceName.clear();
6595 address.clear();
6596 ageTimeoutMs = 30000;
6597 advertising.clear();
6598 }
6599 };
6600
6601 static void to_json(nlohmann::json& j, const DiscoverySap& p)
6602 {
6603 j = nlohmann::json{
6604 TOJSON_IMPL(enabled),
6605 TOJSON_IMPL(interfaceName),
6606 TOJSON_IMPL(address),
6607 TOJSON_IMPL(ageTimeoutMs),
6608 TOJSON_IMPL(advertising)
6609 };
6610 }
6611 static void from_json(const nlohmann::json& j, DiscoverySap& p)
6612 {
6613 p.clear();
6614 getOptional("enabled", p.enabled, j, false);
6615 getOptional<std::string>("interfaceName", p.interfaceName, j);
6616 getOptional<NetworkAddress>("address", p.address, j);
6617 if(p.address.address.empty())
6618 {
6619 p.address.address = "224.2.127.254";
6620 }
6621 if(p.address.port <= 0)
6622 {
6623 p.address.port = 9875;
6624 }
6625
6626 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
6627 getOptional<Advertising>("advertising", p.advertising, j);
6628 }
6629
6630 //-----------------------------------------------------------
6631 JSON_SERIALIZED_CLASS(DiscoveryCistech)
6644 {
6645 IMPLEMENT_JSON_SERIALIZATION()
6646 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryCistech)
6647
6648 public:
6649 bool enabled;
6650 std::string interfaceName;
6651 NetworkAddress address;
6652 int ageTimeoutMs;
6653
6655 {
6656 clear();
6657 }
6658
6659 void clear()
6660 {
6661 enabled = false;
6662 interfaceName.clear();
6663 address.clear();
6664 ageTimeoutMs = 30000;
6665 }
6666 };
6667
6668 static void to_json(nlohmann::json& j, const DiscoveryCistech& p)
6669 {
6670 j = nlohmann::json{
6671 TOJSON_IMPL(enabled),
6672 TOJSON_IMPL(interfaceName),
6673 TOJSON_IMPL(address),
6674 TOJSON_IMPL(ageTimeoutMs)
6675 };
6676 }
6677 static void from_json(const nlohmann::json& j, DiscoveryCistech& p)
6678 {
6679 p.clear();
6680 getOptional("enabled", p.enabled, j, false);
6681 getOptional<std::string>("interfaceName", p.interfaceName, j);
6682 getOptional<NetworkAddress>("address", p.address, j);
6683 getOptional<int>("ageTimeoutMs", p.ageTimeoutMs, j, 30000);
6684 }
6685
6686
6687 //-----------------------------------------------------------
6688 JSON_SERIALIZED_CLASS(DiscoveryTrellisware)
6699 {
6700 IMPLEMENT_JSON_SERIALIZATION()
6701 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryTrellisware)
6702
6703 public:
6704
6707
6710
6712 {
6713 clear();
6714 }
6715
6716 void clear()
6717 {
6718 enabled = false;
6719 security.clear();
6720 }
6721 };
6722
6723 static void to_json(nlohmann::json& j, const DiscoveryTrellisware& p)
6724 {
6725 j = nlohmann::json{
6726 TOJSON_IMPL(enabled),
6727 TOJSON_IMPL(security)
6728 };
6729 }
6730 static void from_json(const nlohmann::json& j, DiscoveryTrellisware& p)
6731 {
6732 p.clear();
6733 getOptional("enabled", p.enabled, j, false);
6734 getOptional<SecurityCertificate>("security", p.security, j);
6735 }
6736
6737 //-----------------------------------------------------------
6738 JSON_SERIALIZED_CLASS(DiscoveryConfiguration)
6749 {
6750 IMPLEMENT_JSON_SERIALIZATION()
6751 IMPLEMENT_JSON_DOCUMENTATION(DiscoveryConfiguration)
6752
6753 public:
6756
6759
6762
6765
6768
6770 {
6771 clear();
6772 }
6773
6774 void clear()
6775 {
6776 magellan.clear();
6777 ssdp.clear();
6778 sap.clear();
6779 cistech.clear();
6780 }
6781 };
6782
6783 static void to_json(nlohmann::json& j, const DiscoveryConfiguration& p)
6784 {
6785 j = nlohmann::json{
6786 TOJSON_IMPL(magellan),
6787 TOJSON_IMPL(ssdp),
6788 TOJSON_IMPL(sap),
6789 TOJSON_IMPL(cistech),
6790 TOJSON_IMPL(trellisware)
6791 };
6792 }
6793 static void from_json(const nlohmann::json& j, DiscoveryConfiguration& p)
6794 {
6795 p.clear();
6796 getOptional<DiscoveryMagellan>("magellan", p.magellan, j);
6797 getOptional<DiscoverySsdp>("ssdp", p.ssdp, j);
6798 getOptional<DiscoverySap>("sap", p.sap, j);
6799 getOptional<DiscoveryCistech>("cistech", p.cistech, j);
6800 getOptional<DiscoveryTrellisware>("trellisware", p.trellisware, j);
6801 }
6802
6803
6804 //-----------------------------------------------------------
6805 JSON_SERIALIZED_CLASS(EnginePolicyInternals)
6818 {
6819 IMPLEMENT_JSON_SERIALIZATION()
6820 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyInternals)
6821
6822 public:
6825
6828
6831
6832 int maxRxSecs;
6833
6834 int logTaskQueueStatsIntervalMs;
6835
6836 bool enableLazySpeakerClosure;
6837
6840
6843
6846
6849
6852
6855
6858
6861
6863 {
6864 clear();
6865 }
6866
6867 void clear()
6868 {
6869 watchdog.clear();
6870 housekeeperIntervalMs = 1000;
6871 logTaskQueueStatsIntervalMs = 0;
6872 maxTxSecs = 30;
6873 maxRxSecs = 0;
6874 enableLazySpeakerClosure = false;
6875 rpClusterStrategy = RallypointCluster::ConnectionStrategy_t::csRoundRobin;
6876 rpClusterRolloverSecs = 10;
6877 rtpExpirationCheckIntervalMs = 250;
6878 rpConnectionTimeoutSecs = 5;
6879 stickyTidHangSecs = 10;
6880 uriStreamingIntervalMs = 60;
6881 delayedMicrophoneClosureSecs = 15;
6882 tuning.clear();
6883 }
6884 };
6885
6886 static void to_json(nlohmann::json& j, const EnginePolicyInternals& p)
6887 {
6888 j = nlohmann::json{
6889 TOJSON_IMPL(watchdog),
6890 TOJSON_IMPL(housekeeperIntervalMs),
6891 TOJSON_IMPL(logTaskQueueStatsIntervalMs),
6892 TOJSON_IMPL(maxTxSecs),
6893 TOJSON_IMPL(maxRxSecs),
6894 TOJSON_IMPL(enableLazySpeakerClosure),
6895 TOJSON_IMPL(rpClusterStrategy),
6896 TOJSON_IMPL(rpClusterRolloverSecs),
6897 TOJSON_IMPL(rtpExpirationCheckIntervalMs),
6898 TOJSON_IMPL(rpConnectionTimeoutSecs),
6899 TOJSON_IMPL(stickyTidHangSecs),
6900 TOJSON_IMPL(uriStreamingIntervalMs),
6901 TOJSON_IMPL(delayedMicrophoneClosureSecs),
6902 TOJSON_IMPL(tuning)
6903 };
6904 }
6905 static void from_json(const nlohmann::json& j, EnginePolicyInternals& p)
6906 {
6907 p.clear();
6908 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
6909 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
6910 getOptional<int>("logTaskQueueStatsIntervalMs", p.logTaskQueueStatsIntervalMs, j, 0);
6911 getOptional<int>("maxTxSecs", p.maxTxSecs, j, 30);
6912 getOptional<int>("maxRxSecs", p.maxRxSecs, j, 0);
6913 getOptional<bool>("enableLazySpeakerClosure", p.enableLazySpeakerClosure, j, false);
6914 getOptional<RallypointCluster::ConnectionStrategy_t>("rpClusterStrategy", p.rpClusterStrategy, j, RallypointCluster::ConnectionStrategy_t::csRoundRobin);
6915 getOptional<int>("rpClusterRolloverSecs", p.rpClusterRolloverSecs, j, 10);
6916 getOptional<int>("rtpExpirationCheckIntervalMs", p.rtpExpirationCheckIntervalMs, j, 250);
6917 getOptional<int>("rpConnectionTimeoutSecs", p.rpConnectionTimeoutSecs, j, 5);
6918 getOptional<int>("stickyTidHangSecs", p.stickyTidHangSecs, j, 10);
6919 getOptional<int>("uriStreamingIntervalMs", p.uriStreamingIntervalMs, j, 60);
6920 getOptional<int>("delayedMicrophoneClosureSecs", p.delayedMicrophoneClosureSecs, j, 15);
6921 getOptional<TuningSettings>("tuning", p.tuning, j);
6922 }
6923
6924 //-----------------------------------------------------------
6925 JSON_SERIALIZED_CLASS(EnginePolicyTimelines)
6938 {
6939 IMPLEMENT_JSON_SERIALIZATION()
6940 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicyTimelines)
6941
6942 public:
6943
6950
6952 std::string storageRoot;
6953
6956
6959
6962
6965
6968
6971
6974
6983
6986
6989
6992
6994 {
6995 clear();
6996 }
6997
6998 void clear()
6999 {
7000 enabled = true;
7001 storageRoot.clear();
7002 maxStorageMb = 1024; // 1 Gigabyte
7003 maxMemMb = maxStorageMb;
7004 maxAudioEventMemMb = maxMemMb;
7005 maxDiskMb = maxStorageMb;
7006 maxEventAgeSecs = (86400 * 30); // 30 days
7007 groomingIntervalSecs = (60 * 30); // 30 minutes
7008 maxEvents = 1000;
7009 autosaveIntervalSecs = 5;
7010 security.clear();
7011 disableSigningAndVerification = false;
7012 ephemeral = false;
7013 }
7014 };
7015
7016 static void to_json(nlohmann::json& j, const EnginePolicyTimelines& p)
7017 {
7018 j = nlohmann::json{
7019 TOJSON_IMPL(enabled),
7020 TOJSON_IMPL(storageRoot),
7021 TOJSON_IMPL(maxMemMb),
7022 TOJSON_IMPL(maxAudioEventMemMb),
7023 TOJSON_IMPL(maxDiskMb),
7024 TOJSON_IMPL(maxEventAgeSecs),
7025 TOJSON_IMPL(maxEvents),
7026 TOJSON_IMPL(groomingIntervalSecs),
7027 TOJSON_IMPL(autosaveIntervalSecs),
7028 TOJSON_IMPL(security),
7029 TOJSON_IMPL(disableSigningAndVerification),
7030 TOJSON_IMPL(ephemeral)
7031 };
7032 }
7033 static void from_json(const nlohmann::json& j, EnginePolicyTimelines& p)
7034 {
7035 p.clear();
7036 getOptional<bool>("enabled", p.enabled, j, true);
7037 getOptional<std::string>("storageRoot", p.storageRoot, j, EMPTY_STRING);
7038
7039 getOptional<int>("maxStorageMb", p.maxStorageMb, j, 1024);
7040 getOptional<int>("maxMemMb", p.maxMemMb, j, p.maxStorageMb);
7041 getOptional<int>("maxAudioEventMemMb", p.maxAudioEventMemMb, j, p.maxMemMb);
7042 getOptional<int>("maxDiskMb", p.maxDiskMb, j, p.maxStorageMb);
7043 getOptional<long>("maxEventAgeSecs", p.maxEventAgeSecs, j, (86400 * 30));
7044 getOptional<long>("groomingIntervalSecs", p.groomingIntervalSecs, j, (60 * 30));
7045 getOptional<long>("autosaveIntervalSecs", p.autosaveIntervalSecs, j, 5);
7046 getOptional<int>("maxEvents", p.maxEvents, j, 1000);
7047 getOptional<SecurityCertificate>("security", p.security, j);
7048 getOptional<bool>("disableSigningAndVerification", p.disableSigningAndVerification, j, false);
7049 getOptional<bool>("ephemeral", p.ephemeral, j, false);
7050 }
7051
7052
7053 //-----------------------------------------------------------
7054 JSON_SERIALIZED_CLASS(RtpMapEntry)
7065 {
7066 IMPLEMENT_JSON_SERIALIZATION()
7067 IMPLEMENT_JSON_DOCUMENTATION(RtpMapEntry)
7068
7069 public:
7071 std::string name;
7072
7075
7078
7079 RtpMapEntry()
7080 {
7081 clear();
7082 }
7083
7084 void clear()
7085 {
7086 name.clear();
7087 engageType = -1;
7088 rtpPayloadType = -1;
7089 }
7090 };
7091
7092 static void to_json(nlohmann::json& j, const RtpMapEntry& p)
7093 {
7094 j = nlohmann::json{
7095 TOJSON_IMPL(name),
7096 TOJSON_IMPL(engageType),
7097 TOJSON_IMPL(rtpPayloadType)
7098 };
7099 }
7100 static void from_json(const nlohmann::json& j, RtpMapEntry& p)
7101 {
7102 p.clear();
7103 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7104 getOptional<int>("engageType", p.engageType, j, -1);
7105 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
7106 }
7107
7108 //-----------------------------------------------------------
7109 JSON_SERIALIZED_CLASS(ExternalModule)
7120 {
7121 IMPLEMENT_JSON_SERIALIZATION()
7122 IMPLEMENT_JSON_DOCUMENTATION(ExternalModule)
7123
7124 public:
7126 std::string name;
7127
7129 std::string file;
7130
7132 nlohmann::json configuration;
7133
7135 {
7136 clear();
7137 }
7138
7139 void clear()
7140 {
7141 name.clear();
7142 file.clear();
7143 configuration.clear();
7144 }
7145 };
7146
7147 static void to_json(nlohmann::json& j, const ExternalModule& p)
7148 {
7149 j = nlohmann::json{
7150 TOJSON_IMPL(name),
7151 TOJSON_IMPL(file)
7152 };
7153
7154 if(!p.configuration.empty())
7155 {
7156 j["configuration"] = p.configuration;
7157 }
7158 }
7159 static void from_json(const nlohmann::json& j, ExternalModule& p)
7160 {
7161 p.clear();
7162 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
7163 getOptional<std::string>("file", p.file, j, EMPTY_STRING);
7164
7165 try
7166 {
7167 p.configuration = j.at("configuration");
7168 }
7169 catch(...)
7170 {
7171 p.configuration.clear();
7172 }
7173 }
7174
7175
7176 //-----------------------------------------------------------
7177 JSON_SERIALIZED_CLASS(ExternalCodecDescriptor)
7188 {
7189 IMPLEMENT_JSON_SERIALIZATION()
7190 IMPLEMENT_JSON_DOCUMENTATION(ExternalCodecDescriptor)
7191
7192 public:
7195
7198
7201
7204
7206 {
7207 clear();
7208 }
7209
7210 void clear()
7211 {
7212 rtpPayloadType = -1;
7213 samplingRate = -1;
7214 channels = -1;
7215 rtpTsMultiplier = 0;
7216 }
7217 };
7218
7219 static void to_json(nlohmann::json& j, const ExternalCodecDescriptor& p)
7220 {
7221 j = nlohmann::json{
7222 TOJSON_IMPL(rtpPayloadType),
7223 TOJSON_IMPL(samplingRate),
7224 TOJSON_IMPL(channels),
7225 TOJSON_IMPL(rtpTsMultiplier)
7226 };
7227 }
7228 static void from_json(const nlohmann::json& j, ExternalCodecDescriptor& p)
7229 {
7230 p.clear();
7231
7232 getOptional<int>("rtpPayloadType", p.rtpPayloadType, j, -1);
7233 getOptional<int>("samplingRate", p.samplingRate, j, -1);
7234 getOptional<int>("channels", p.channels, j, -1);
7235 getOptional<int>("rtpTsMultiplier", p.rtpTsMultiplier, j, -1);
7236 }
7237
7238 //-----------------------------------------------------------
7239 JSON_SERIALIZED_CLASS(EngineStatusReportConfiguration)
7250 {
7251 IMPLEMENT_JSON_SERIALIZATION()
7252 IMPLEMENT_JSON_DOCUMENTATION(EngineStatusReportConfiguration)
7253
7254 public:
7256 std::string fileName;
7257
7260
7263
7265 std::string runCmd;
7266
7269
7272
7274 {
7275 clear();
7276 }
7277
7278 void clear()
7279 {
7280 fileName.clear();
7281 intervalSecs = 60;
7282 enabled = false;
7283 includeMemoryDetail = false;
7284 includeTaskQueueDetail = false;
7285 runCmd.clear();
7286 }
7287 };
7288
7289 static void to_json(nlohmann::json& j, const EngineStatusReportConfiguration& p)
7290 {
7291 j = nlohmann::json{
7292 TOJSON_IMPL(fileName),
7293 TOJSON_IMPL(intervalSecs),
7294 TOJSON_IMPL(enabled),
7295 TOJSON_IMPL(includeMemoryDetail),
7296 TOJSON_IMPL(includeTaskQueueDetail),
7297 TOJSON_IMPL(runCmd)
7298 };
7299 }
7300 static void from_json(const nlohmann::json& j, EngineStatusReportConfiguration& p)
7301 {
7302 p.clear();
7303 getOptional<std::string>("fileName", p.fileName, j);
7304 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
7305 getOptional<bool>("enabled", p.enabled, j, false);
7306 getOptional<std::string>("runCmd", p.runCmd, j);
7307 getOptional<bool>("includeMemoryDetail", p.includeMemoryDetail, j, false);
7308 getOptional<bool>("includeTaskQueueDetail", p.includeTaskQueueDetail, j, false);
7309 }
7310
7311 //-----------------------------------------------------------
7312 JSON_SERIALIZED_CLASS(EnginePolicy)
7325 {
7326 IMPLEMENT_JSON_SERIALIZATION()
7327 IMPLEMENT_JSON_DOCUMENTATION(EnginePolicy)
7328
7329 public:
7330
7332 std::string dataDirectory;
7333
7336
7339
7342
7345
7348
7351
7354
7357
7360
7363
7366
7368 std::vector<ExternalModule> externalCodecs;
7369
7371 std::vector<RtpMapEntry> rtpMap;
7372
7375
7376 EnginePolicy()
7377 {
7378 clear();
7379 }
7380
7381 void clear()
7382 {
7383 dataDirectory.clear();
7384 licensing.clear();
7385 security.clear();
7386 networking.clear();
7387 audio.clear();
7388 discovery.clear();
7389 logging.clear();
7390 internals.clear();
7391 timelines.clear();
7392 database.clear();
7393 featureset.clear();
7394 namedAudioDevices.clear();
7395 externalCodecs.clear();
7396 rtpMap.clear();
7397 statusReport.clear();
7398 }
7399 };
7400
7401 static void to_json(nlohmann::json& j, const EnginePolicy& p)
7402 {
7403 j = nlohmann::json{
7404 TOJSON_IMPL(dataDirectory),
7405 TOJSON_IMPL(licensing),
7406 TOJSON_IMPL(security),
7407 TOJSON_IMPL(networking),
7408 TOJSON_IMPL(audio),
7409 TOJSON_IMPL(discovery),
7410 TOJSON_IMPL(logging),
7411 TOJSON_IMPL(internals),
7412 TOJSON_IMPL(timelines),
7413 TOJSON_IMPL(database),
7414 TOJSON_IMPL(featureset),
7415 TOJSON_IMPL(namedAudioDevices),
7416 TOJSON_IMPL(externalCodecs),
7417 TOJSON_IMPL(rtpMap),
7418 TOJSON_IMPL(statusReport)
7419 };
7420 }
7421 static void from_json(const nlohmann::json& j, EnginePolicy& p)
7422 {
7423 p.clear();
7424 FROMJSON_IMPL_SIMPLE(dataDirectory);
7425 FROMJSON_IMPL_SIMPLE(licensing);
7426 FROMJSON_IMPL_SIMPLE(security);
7427 FROMJSON_IMPL_SIMPLE(networking);
7428 FROMJSON_IMPL_SIMPLE(audio);
7429 FROMJSON_IMPL_SIMPLE(discovery);
7430 FROMJSON_IMPL_SIMPLE(logging);
7431 FROMJSON_IMPL_SIMPLE(internals);
7432 FROMJSON_IMPL_SIMPLE(timelines);
7433 FROMJSON_IMPL_SIMPLE(database);
7434 FROMJSON_IMPL_SIMPLE(featureset);
7435 FROMJSON_IMPL_SIMPLE(namedAudioDevices);
7436 FROMJSON_IMPL_SIMPLE(externalCodecs);
7437 FROMJSON_IMPL_SIMPLE(rtpMap);
7438 FROMJSON_IMPL_SIMPLE(statusReport);
7439 }
7440
7441
7442 //-----------------------------------------------------------
7443 JSON_SERIALIZED_CLASS(TalkgroupAsset)
7454 {
7455 IMPLEMENT_JSON_SERIALIZATION()
7456 IMPLEMENT_JSON_DOCUMENTATION(TalkgroupAsset)
7457
7458 public:
7459
7461 std::string nodeId;
7462
7465
7467 {
7468 clear();
7469 }
7470
7471 void clear()
7472 {
7473 nodeId.clear();
7474 group.clear();
7475 }
7476 };
7477
7478 static void to_json(nlohmann::json& j, const TalkgroupAsset& p)
7479 {
7480 j = nlohmann::json{
7481 TOJSON_IMPL(nodeId),
7482 TOJSON_IMPL(group)
7483 };
7484 }
7485 static void from_json(const nlohmann::json& j, TalkgroupAsset& p)
7486 {
7487 p.clear();
7488 getOptional<std::string>("nodeId", p.nodeId, j);
7489 getOptional<Group>("group", p.group, j);
7490 }
7491
7492 //-----------------------------------------------------------
7493 JSON_SERIALIZED_CLASS(EngageDiscoveredGroup)
7502 {
7503 IMPLEMENT_JSON_SERIALIZATION()
7504 IMPLEMENT_JSON_DOCUMENTATION(EngageDiscoveredGroup)
7505
7506 public:
7508 std::string id;
7509
7511 int type;
7512
7515
7518
7520 {
7521 clear();
7522 }
7523
7524 void clear()
7525 {
7526 id.clear();
7527 type = 0;
7528 rx.clear();
7529 tx.clear();
7530 }
7531 };
7532
7533 static void to_json(nlohmann::json& j, const EngageDiscoveredGroup& p)
7534 {
7535 j = nlohmann::json{
7536 TOJSON_IMPL(id),
7537 TOJSON_IMPL(type),
7538 TOJSON_IMPL(rx),
7539 TOJSON_IMPL(tx)
7540 };
7541 }
7542 static void from_json(const nlohmann::json& j, EngageDiscoveredGroup& p)
7543 {
7544 p.clear();
7545 getOptional<std::string>("id", p.id, j);
7546 getOptional<int>("type", p.type, j, 0);
7547 getOptional<NetworkAddress>("rx", p.rx, j);
7548 getOptional<NetworkAddress>("tx", p.tx, j);
7549 }
7550
7551 //-----------------------------------------------------------
7552 JSON_SERIALIZED_CLASS(RallypointPeer)
7563 {
7564 IMPLEMENT_JSON_SERIALIZATION()
7565 IMPLEMENT_JSON_DOCUMENTATION(RallypointPeer)
7566
7567 public:
7569 std::string id;
7570
7573
7576
7579
7582
7585
7587 {
7588 clear();
7589 }
7590
7591 void clear()
7592 {
7593 id.clear();
7594 enabled = true;
7595 host.clear();
7596 certificate.clear();
7597 connectionTimeoutSecs = 0;
7598 forceIsMeshLeaf = false;
7599 }
7600 };
7601
7602 static void to_json(nlohmann::json& j, const RallypointPeer& p)
7603 {
7604 j = nlohmann::json{
7605 TOJSON_IMPL(id),
7606 TOJSON_IMPL(enabled),
7607 TOJSON_IMPL(host),
7608 TOJSON_IMPL(certificate),
7609 TOJSON_IMPL(connectionTimeoutSecs),
7610 TOJSON_IMPL(forceIsMeshLeaf)
7611 };
7612 }
7613 static void from_json(const nlohmann::json& j, RallypointPeer& p)
7614 {
7615 p.clear();
7616 j.at("id").get_to(p.id);
7617 getOptional<bool>("enabled", p.enabled, j, true);
7618 getOptional<NetworkAddress>("host", p.host, j);
7619 getOptional<SecurityCertificate>("certificate", p.certificate, j);
7620 getOptional<int>("connectionTimeoutSecs", p.connectionTimeoutSecs, j, 0);
7621 getOptional<bool>("forceIsMeshLeaf", p.forceIsMeshLeaf, j, false);
7622 }
7623
7624 //-----------------------------------------------------------
7625 JSON_SERIALIZED_CLASS(RallypointServerLimits)
7636 {
7637 IMPLEMENT_JSON_SERIALIZATION()
7638 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLimits)
7639
7640 public:
7642 uint32_t maxClients;
7643
7645 uint32_t maxPeers;
7646
7649
7652
7655
7658
7661
7664
7667
7670
7673
7676
7679
7682
7685
7687 {
7688 clear();
7689 }
7690
7691 void clear()
7692 {
7693 maxClients = 0;
7694 maxPeers = 0;
7695 maxMulticastReflectors = 0;
7696 maxRegisteredStreams = 0;
7697 maxStreamPaths = 0;
7698 maxRxPacketsPerSec = 0;
7699 maxTxPacketsPerSec = 0;
7700 maxRxBytesPerSec = 0;
7701 maxTxBytesPerSec = 0;
7702 maxQOpsPerSec = 0;
7703 maxInboundBacklog = 64;
7704 lowPriorityQueueThreshold = 64;
7705 normalPriorityQueueThreshold = 256;
7706 denyNewConnectionCpuThreshold = 75;
7707 warnAtCpuThreshold = 65;
7708 }
7709 };
7710
7711 static void to_json(nlohmann::json& j, const RallypointServerLimits& p)
7712 {
7713 j = nlohmann::json{
7714 TOJSON_IMPL(maxClients),
7715 TOJSON_IMPL(maxPeers),
7716 TOJSON_IMPL(maxMulticastReflectors),
7717 TOJSON_IMPL(maxRegisteredStreams),
7718 TOJSON_IMPL(maxStreamPaths),
7719 TOJSON_IMPL(maxRxPacketsPerSec),
7720 TOJSON_IMPL(maxTxPacketsPerSec),
7721 TOJSON_IMPL(maxRxBytesPerSec),
7722 TOJSON_IMPL(maxTxBytesPerSec),
7723 TOJSON_IMPL(maxQOpsPerSec),
7724 TOJSON_IMPL(maxInboundBacklog),
7725 TOJSON_IMPL(lowPriorityQueueThreshold),
7726 TOJSON_IMPL(normalPriorityQueueThreshold),
7727 TOJSON_IMPL(denyNewConnectionCpuThreshold),
7728 TOJSON_IMPL(warnAtCpuThreshold)
7729 };
7730 }
7731 static void from_json(const nlohmann::json& j, RallypointServerLimits& p)
7732 {
7733 p.clear();
7734 getOptional<uint32_t>("maxClients", p.maxClients, j, 0);
7735 getOptional<uint32_t>("maxPeers", p.maxPeers, j, 0);
7736 getOptional<uint32_t>("maxMulticastReflectors", p.maxMulticastReflectors, j, 0);
7737 getOptional<uint32_t>("maxRegisteredStreams", p.maxRegisteredStreams, j, 0);
7738 getOptional<uint32_t>("maxStreamPaths", p.maxStreamPaths, j, 0);
7739 getOptional<uint32_t>("maxRxPacketsPerSec", p.maxRxPacketsPerSec, j, 0);
7740 getOptional<uint32_t>("maxTxPacketsPerSec", p.maxTxPacketsPerSec, j, 0);
7741 getOptional<uint32_t>("maxRxBytesPerSec", p.maxRxBytesPerSec, j, 0);
7742 getOptional<uint32_t>("maxTxBytesPerSec", p.maxTxBytesPerSec, j, 0);
7743 getOptional<uint32_t>("maxQOpsPerSec", p.maxQOpsPerSec, j, 0);
7744 getOptional<uint32_t>("maxInboundBacklog", p.maxInboundBacklog, j, 64);
7745 getOptional<uint32_t>("lowPriorityQueueThreshold", p.lowPriorityQueueThreshold, j, 64);
7746 getOptional<uint32_t>("normalPriorityQueueThreshold", p.normalPriorityQueueThreshold, j, 256);
7747 getOptional<uint32_t>("denyNewConnectionCpuThreshold", p.denyNewConnectionCpuThreshold, j, 75);
7748 getOptional<uint32_t>("warnAtCpuThreshold", p.warnAtCpuThreshold, j, 65);
7749 }
7750
7751 //-----------------------------------------------------------
7752 JSON_SERIALIZED_CLASS(RallypointServerStatusReportConfiguration)
7763 {
7764 IMPLEMENT_JSON_SERIALIZATION()
7765 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerStatusReportConfiguration)
7766
7767 public:
7769 std::string fileName;
7770
7773
7776
7779
7782
7785
7787 std::string runCmd;
7788
7790 {
7791 clear();
7792 }
7793
7794 void clear()
7795 {
7796 fileName.clear();
7797 intervalSecs = 60;
7798 enabled = false;
7799 includeLinks = false;
7800 includePeerLinkDetails = false;
7801 includeClientLinkDetails = false;
7802 runCmd.clear();
7803 }
7804 };
7805
7806 static void to_json(nlohmann::json& j, const RallypointServerStatusReportConfiguration& p)
7807 {
7808 j = nlohmann::json{
7809 TOJSON_IMPL(fileName),
7810 TOJSON_IMPL(intervalSecs),
7811 TOJSON_IMPL(enabled),
7812 TOJSON_IMPL(includeLinks),
7813 TOJSON_IMPL(includePeerLinkDetails),
7814 TOJSON_IMPL(includeClientLinkDetails),
7815 TOJSON_IMPL(runCmd)
7816 };
7817 }
7818 static void from_json(const nlohmann::json& j, RallypointServerStatusReportConfiguration& p)
7819 {
7820 p.clear();
7821 getOptional<std::string>("fileName", p.fileName, j);
7822 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
7823 getOptional<bool>("enabled", p.enabled, j, false);
7824 getOptional<bool>("includeLinks", p.includeLinks, j, false);
7825 getOptional<bool>("includePeerLinkDetails", p.includePeerLinkDetails, j, false);
7826 getOptional<bool>("includeClientLinkDetails", p.includeClientLinkDetails, j, false);
7827 getOptional<std::string>("runCmd", p.runCmd, j);
7828 }
7829
7830 //-----------------------------------------------------------
7831 JSON_SERIALIZED_CLASS(RallypointServerLinkGraph)
7833 {
7834 IMPLEMENT_JSON_SERIALIZATION()
7835 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerLinkGraph)
7836
7837 public:
7839 std::string fileName;
7840
7843
7846
7849
7854
7856 std::string coreRpStyling;
7857
7859 std::string leafRpStyling;
7860
7862 std::string clientStyling;
7863
7865 std::string runCmd;
7866
7868 {
7869 clear();
7870 }
7871
7872 void clear()
7873 {
7874 fileName.clear();
7875 minRefreshSecs = 5;
7876 enabled = false;
7877 includeDigraphEnclosure = true;
7878 includeClients = false;
7879 coreRpStyling = "[shape=hexagon color=firebrick style=filled]";
7880 leafRpStyling = "[shape=box color=gray style=filled]";
7881 clientStyling.clear();
7882 runCmd.clear();
7883 }
7884 };
7885
7886 static void to_json(nlohmann::json& j, const RallypointServerLinkGraph& p)
7887 {
7888 j = nlohmann::json{
7889 TOJSON_IMPL(fileName),
7890 TOJSON_IMPL(minRefreshSecs),
7891 TOJSON_IMPL(enabled),
7892 TOJSON_IMPL(includeDigraphEnclosure),
7893 TOJSON_IMPL(includeClients),
7894 TOJSON_IMPL(coreRpStyling),
7895 TOJSON_IMPL(leafRpStyling),
7896 TOJSON_IMPL(clientStyling),
7897 TOJSON_IMPL(runCmd)
7898 };
7899 }
7900 static void from_json(const nlohmann::json& j, RallypointServerLinkGraph& p)
7901 {
7902 p.clear();
7903 getOptional<std::string>("fileName", p.fileName, j);
7904 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
7905 getOptional<bool>("enabled", p.enabled, j, false);
7906 getOptional<bool>("includeDigraphEnclosure", p.includeDigraphEnclosure, j, true);
7907 getOptional<bool>("includeClients", p.includeClients, j, false);
7908 getOptional<std::string>("coreRpStyling", p.coreRpStyling, j, "[shape=hexagon color=firebrick style=filled]");
7909 getOptional<std::string>("leafRpStyling", p.leafRpStyling, j, "[shape=box color=gray style=filled]");
7910 getOptional<std::string>("clientStyling", p.clientStyling, j);
7911 getOptional<std::string>("runCmd", p.runCmd, j);
7912 }
7913
7914
7915 //-----------------------------------------------------------
7916 JSON_SERIALIZED_CLASS(RallypointServerRouteMap)
7918 {
7919 IMPLEMENT_JSON_SERIALIZATION()
7920 IMPLEMENT_JSON_DOCUMENTATION(RallypointServerRouteMap)
7921
7922 public:
7924 std::string fileName;
7925
7928
7931
7933 std::string runCmd;
7934
7936 {
7937 clear();
7938 }
7939
7940 void clear()
7941 {
7942 fileName.clear();
7943 minRefreshSecs = 5;
7944 enabled = false;
7945 }
7946 };
7947
7948 static void to_json(nlohmann::json& j, const RallypointServerRouteMap& p)
7949 {
7950 j = nlohmann::json{
7951 TOJSON_IMPL(fileName),
7952 TOJSON_IMPL(minRefreshSecs),
7953 TOJSON_IMPL(enabled),
7954 TOJSON_IMPL(runCmd)
7955 };
7956 }
7957 static void from_json(const nlohmann::json& j, RallypointServerRouteMap& p)
7958 {
7959 p.clear();
7960 getOptional<std::string>("fileName", p.fileName, j);
7961 getOptional<int>("minRefreshSecs", p.minRefreshSecs, j, 5);
7962 getOptional<bool>("enabled", p.enabled, j, false);
7963 getOptional<std::string>("runCmd", p.runCmd, j);
7964 }
7965
7966
7967 //-----------------------------------------------------------
7968 JSON_SERIALIZED_CLASS(ExternalHealthCheckResponder)
7979 {
7980 IMPLEMENT_JSON_SERIALIZATION()
7981 IMPLEMENT_JSON_DOCUMENTATION(ExternalHealthCheckResponder)
7982
7983 public:
7984
7987
7990
7992 {
7993 clear();
7994 }
7995
7996 void clear()
7997 {
7998 listenPort = 0;
7999 immediateClose = true;
8000 }
8001 };
8002
8003 static void to_json(nlohmann::json& j, const ExternalHealthCheckResponder& p)
8004 {
8005 j = nlohmann::json{
8006 TOJSON_IMPL(listenPort),
8007 TOJSON_IMPL(immediateClose)
8008 };
8009 }
8010 static void from_json(const nlohmann::json& j, ExternalHealthCheckResponder& p)
8011 {
8012 p.clear();
8013 getOptional<int>("listenPort", p.listenPort, j, 0);
8014 getOptional<bool>("immediateClose", p.immediateClose, j, true);
8015 }
8016
8017
8018 //-----------------------------------------------------------
8019 JSON_SERIALIZED_CLASS(PeeringConfiguration)
8028 {
8029 IMPLEMENT_JSON_SERIALIZATION()
8030 IMPLEMENT_JSON_DOCUMENTATION(PeeringConfiguration)
8031
8032 public:
8033
8035 std::string id;
8036
8039
8041 std::string comments;
8042
8044 std::vector<RallypointPeer> peers;
8045
8047 {
8048 clear();
8049 }
8050
8051 void clear()
8052 {
8053 id.clear();
8054 version = 0;
8055 comments.clear();
8056 }
8057 };
8058
8059 static void to_json(nlohmann::json& j, const PeeringConfiguration& p)
8060 {
8061 j = nlohmann::json{
8062 TOJSON_IMPL(id),
8063 TOJSON_IMPL(version),
8064 TOJSON_IMPL(comments),
8065 TOJSON_IMPL(peers)
8066 };
8067 }
8068 static void from_json(const nlohmann::json& j, PeeringConfiguration& p)
8069 {
8070 p.clear();
8071 getOptional<std::string>("id", p.id, j);
8072 getOptional<int>("version", p.version, j, 0);
8073 getOptional<std::string>("comments", p.comments, j);
8074 getOptional<std::vector<RallypointPeer>>("peers", p.peers, j);
8075 }
8076
8077 //-----------------------------------------------------------
8078 JSON_SERIALIZED_CLASS(IgmpSnooping)
8087 {
8088 IMPLEMENT_JSON_SERIALIZATION()
8089 IMPLEMENT_JSON_DOCUMENTATION(IgmpSnooping)
8090
8091 public:
8092
8095
8098
8101
8102
8103 IgmpSnooping()
8104 {
8105 clear();
8106 }
8107
8108 void clear()
8109 {
8110 enabled = false;
8111 queryIntervalMs = 125000;
8112 subscriptionTimeoutMs = 0;
8113 }
8114 };
8115
8116 static void to_json(nlohmann::json& j, const IgmpSnooping& p)
8117 {
8118 j = nlohmann::json{
8119 TOJSON_IMPL(enabled),
8120 TOJSON_IMPL(queryIntervalMs),
8121 TOJSON_IMPL(subscriptionTimeoutMs)
8122 };
8123 }
8124 static void from_json(const nlohmann::json& j, IgmpSnooping& p)
8125 {
8126 p.clear();
8127 getOptional<bool>("enabled", p.enabled, j);
8128 getOptional<int>("queryIntervalMs", p.queryIntervalMs, j, 125000);
8129 getOptional<int>("subscriptionTimeoutMs", p.subscriptionTimeoutMs, j, 0);
8130 }
8131
8132
8133 //-----------------------------------------------------------
8134 JSON_SERIALIZED_CLASS(RallypointReflector)
8142 {
8143 IMPLEMENT_JSON_SERIALIZATION()
8144 IMPLEMENT_JSON_DOCUMENTATION(RallypointReflector)
8145
8146 public:
8148 typedef enum
8149 {
8151 drNone = 0,
8152
8154 drRxOnly = 1,
8155
8157 drTxOnly = 2
8158 } DirectionRestriction_t;
8159
8163 std::string id;
8164
8167
8170
8173
8175 std::vector<NetworkAddress> additionalTx;
8176
8179
8181 {
8182 clear();
8183 }
8184
8185 void clear()
8186 {
8187 id.clear();
8188 rx.clear();
8189 tx.clear();
8190 multicastInterfaceName.clear();
8191 additionalTx.clear();
8192 directionRestriction = drNone;
8193 }
8194 };
8195
8196 static void to_json(nlohmann::json& j, const RallypointReflector& p)
8197 {
8198 j = nlohmann::json{
8199 TOJSON_IMPL(id),
8200 TOJSON_IMPL(rx),
8201 TOJSON_IMPL(tx),
8202 TOJSON_IMPL(multicastInterfaceName),
8203 TOJSON_IMPL(additionalTx),
8204 TOJSON_IMPL(directionRestriction)
8205 };
8206 }
8207 static void from_json(const nlohmann::json& j, RallypointReflector& p)
8208 {
8209 p.clear();
8210 j.at("id").get_to(p.id);
8211 j.at("rx").get_to(p.rx);
8212 j.at("tx").get_to(p.tx);
8213 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
8214 getOptional<std::vector<NetworkAddress>>("additionalTx", p.additionalTx, j);
8215 getOptional<RallypointReflector::DirectionRestriction_t>("directionRestriction", p.directionRestriction, j, RallypointReflector::DirectionRestriction_t::drNone);
8216 }
8217
8218
8219 //-----------------------------------------------------------
8220 JSON_SERIALIZED_CLASS(RallypointUdpStreamingIpvX)
8228 {
8229 IMPLEMENT_JSON_SERIALIZATION()
8230 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreamingIpvX)
8231
8232 public:
8235
8238
8240 {
8241 clear();
8242 }
8243
8244 void clear()
8245 {
8246 enabled = true;
8247 external.clear();
8248 }
8249 };
8250
8251 static void to_json(nlohmann::json& j, const RallypointUdpStreamingIpvX& p)
8252 {
8253 j = nlohmann::json{
8254 TOJSON_IMPL(enabled),
8255 TOJSON_IMPL(external)
8256 };
8257 }
8258 static void from_json(const nlohmann::json& j, RallypointUdpStreamingIpvX& p)
8259 {
8260 p.clear();
8261 getOptional<bool>("enabled", p.enabled, j, true);
8262 getOptional<NetworkAddress>("external", p.external, j);
8263 }
8264
8265 //-----------------------------------------------------------
8266 JSON_SERIALIZED_CLASS(RallypointUdpStreaming)
8274 {
8275 IMPLEMENT_JSON_SERIALIZATION()
8276 IMPLEMENT_JSON_DOCUMENTATION(RallypointUdpStreaming)
8277
8278 public:
8280 typedef enum
8281 {
8283 ctUnknown = 0,
8284
8286 ctSharedKeyAes256FullIv = 1,
8287
8289 ctSharedKeyAes256IdxIv = 2,
8290
8292 ctSharedKeyChaCha20FullIv = 3,
8293
8295 ctSharedKeyChaCha20IdxIv = 4
8296 } CryptoType_t;
8297
8300
8303
8306
8309
8312
8315
8318
8320 int ttl;
8321
8322
8324 {
8325 clear();
8326 }
8327
8328 void clear()
8329 {
8330 enabled = true;
8331 cryptoType = CryptoType_t::ctSharedKeyAes256FullIv;
8332 listenPort = 7444;
8333 ipv4.clear();
8334 ipv6.clear();
8335 keepaliveIntervalSecs = 15;
8336 priority = TxPriority_t::priVoice;
8337 ttl = 64;
8338 }
8339 };
8340
8341 static void to_json(nlohmann::json& j, const RallypointUdpStreaming& p)
8342 {
8343 j = nlohmann::json{
8344 TOJSON_IMPL(enabled),
8345 TOJSON_IMPL(cryptoType),
8346 TOJSON_IMPL(listenPort),
8347 TOJSON_IMPL(keepaliveIntervalSecs),
8348 TOJSON_IMPL(ipv4),
8349 TOJSON_IMPL(ipv6),
8350 TOJSON_IMPL(priority),
8351 TOJSON_IMPL(ttl)
8352 };
8353 }
8354 static void from_json(const nlohmann::json& j, RallypointUdpStreaming& p)
8355 {
8356 p.clear();
8357 getOptional<bool>("enabled", p.enabled, j, true);
8358 getOptional<RallypointUdpStreaming::CryptoType_t>("cryptoType", p.cryptoType, j, RallypointUdpStreaming::CryptoType_t::ctSharedKeyAes256FullIv);
8359 getOptional<int>("listenPort", p.listenPort, j, 7444);
8360 getOptional<int>("keepaliveIntervalSecs", p.keepaliveIntervalSecs, j, 15);
8361 getOptional<RallypointUdpStreamingIpvX>("ipv4", p.ipv4, j);
8362 getOptional<RallypointUdpStreamingIpvX>("ipv6", p.ipv6, j);
8363 getOptional<TxPriority_t>("priority", p.priority, j, TxPriority_t::priVoice);
8364 getOptional<int>("ttl", p.ttl, j, 64);
8365 }
8366
8367 //-----------------------------------------------------------
8368 JSON_SERIALIZED_CLASS(RallypointRpRtTimingBehavior)
8376 {
8377 IMPLEMENT_JSON_SERIALIZATION()
8378 IMPLEMENT_JSON_DOCUMENTATION(RallypointRpRtTimingBehavior)
8379
8380 public:
8382 typedef enum
8383 {
8386
8389
8392
8395
8397 btDrop = 99
8398 } BehaviorType_t;
8399
8402
8404 uint32_t atOrAboveMs;
8405
8407 std::string runCmd;
8408
8410 {
8411 clear();
8412 }
8413
8414 void clear()
8415 {
8416 behavior = btNone;
8417 atOrAboveMs = 0;
8418 runCmd.clear();
8419 }
8420 };
8421
8422 static void to_json(nlohmann::json& j, const RallypointRpRtTimingBehavior& p)
8423 {
8424 j = nlohmann::json{
8425 TOJSON_IMPL(behavior),
8426 TOJSON_IMPL(atOrAboveMs),
8427 TOJSON_IMPL(runCmd)
8428 };
8429 }
8430 static void from_json(const nlohmann::json& j, RallypointRpRtTimingBehavior& p)
8431 {
8432 p.clear();
8433 getOptional<RallypointRpRtTimingBehavior::BehaviorType_t>("behavior", p.behavior, j, RallypointRpRtTimingBehavior::BehaviorType_t::btNone);
8434 getOptional<uint32_t>("atOrAboveMs", p.atOrAboveMs, j, 0);
8435 getOptional<std::string>("runCmd", p.runCmd, j);
8436 }
8437
8438
8439 //-----------------------------------------------------------
8440 JSON_SERIALIZED_CLASS(RallypointWebsocketSettings)
8448 {
8449 IMPLEMENT_JSON_SERIALIZATION()
8450 IMPLEMENT_JSON_DOCUMENTATION(RallypointWebsocketSettings)
8451
8452 public:
8455
8458
8461
8463 {
8464 clear();
8465 }
8466
8467 void clear()
8468 {
8469 enabled = false;
8470 listenPort = 8443;
8471 certificate.clear();
8472 }
8473 };
8474
8475 static void to_json(nlohmann::json& j, const RallypointWebsocketSettings& p)
8476 {
8477 j = nlohmann::json{
8478 TOJSON_IMPL(enabled),
8479 TOJSON_IMPL(listenPort),
8480 TOJSON_IMPL(certificate)
8481 };
8482 }
8483 static void from_json(const nlohmann::json& j, RallypointWebsocketSettings& p)
8484 {
8485 p.clear();
8486 getOptional<bool>("enabled", p.enabled, j, false);
8487 getOptional<int>("listenPort", p.listenPort, j, 8443);
8488 getOptional<SecurityCertificate>("certificate", p.certificate, j);
8489 }
8490
8491
8492
8493 //-----------------------------------------------------------
8494 JSON_SERIALIZED_CLASS(RallypointAdvertisingSettings)
8502 {
8503 IMPLEMENT_JSON_SERIALIZATION()
8504 IMPLEMENT_JSON_DOCUMENTATION(RallypointAdvertisingSettings)
8505
8506 public:
8509
8511 std::string hostName;
8512
8514 std::string serviceName;
8515
8517 std::string interfaceName;
8518
8520 int port;
8521
8523 int ttl;
8524
8526 {
8527 clear();
8528 }
8529
8530 void clear()
8531 {
8532 enabled = false;
8533 hostName.clear();
8534 serviceName = "_rallypoint._tcp.local.";
8535 interfaceName.clear();
8536 port = 0;
8537 ttl = 60;
8538 }
8539 };
8540
8541 static void to_json(nlohmann::json& j, const RallypointAdvertisingSettings& p)
8542 {
8543 j = nlohmann::json{
8544 TOJSON_IMPL(enabled),
8545 TOJSON_IMPL(hostName),
8546 TOJSON_IMPL(serviceName),
8547 TOJSON_IMPL(interfaceName),
8548 TOJSON_IMPL(port),
8549 TOJSON_IMPL(ttl)
8550 };
8551 }
8552 static void from_json(const nlohmann::json& j, RallypointAdvertisingSettings& p)
8553 {
8554 p.clear();
8555 getOptional<bool>("enabled", p.enabled, j, false);
8556 getOptional<std::string>("hostName", p.hostName, j);
8557 getOptional<std::string>("serviceName", p.serviceName, j, "_rallypoint._tcp.local.");
8558 getOptional<std::string>("interfaceName", p.interfaceName, j);
8559
8560 getOptional<int>("port", p.port, j, 0);
8561 getOptional<int>("ttl", p.ttl, j, 60);
8562 }
8563
8564
8565 //-----------------------------------------------------------
8566 JSON_SERIALIZED_CLASS(RallypointExtendedGroupRestriction)
8574 {
8575 IMPLEMENT_JSON_SERIALIZATION()
8576 IMPLEMENT_JSON_DOCUMENTATION(RallypointExtendedGroupRestriction)
8577
8578 public:
8580 std::string id;
8581
8583 std::vector<StringRestrictionList> restrictions;
8584
8586 {
8587 clear();
8588 }
8589
8590 void clear()
8591 {
8592 id.clear();
8593 restrictions.clear();
8594 }
8595 };
8596
8597 static void to_json(nlohmann::json& j, const RallypointExtendedGroupRestriction& p)
8598 {
8599 j = nlohmann::json{
8600 TOJSON_IMPL(id),
8601 TOJSON_IMPL(restrictions)
8602 };
8603 }
8604 static void from_json(const nlohmann::json& j, RallypointExtendedGroupRestriction& p)
8605 {
8606 p.clear();
8607 getOptional<std::string>("id", p.id, j);
8608 getOptional<std::vector<StringRestrictionList>>("restrictions", p.restrictions, j);
8609 }
8610
8611
8612 //-----------------------------------------------------------
8613 JSON_SERIALIZED_CLASS(RallypointServer)
8623 {
8624 IMPLEMENT_JSON_SERIALIZATION()
8625 IMPLEMENT_JSON_DOCUMENTATION(RallypointServer)
8626
8627 public:
8630
8633
8635 std::string id;
8636
8639
8642
8644 std::string interfaceName;
8645
8648
8651
8654
8657
8660
8663
8666
8669
8672
8675
8678
8681
8684
8687
8690
8693
8695 PeeringConfiguration peeringConfiguration; // NOTE: This is NOT serialized
8696
8699
8702
8705
8708
8710 std::vector<RallypointReflector> staticReflectors;
8711
8714
8717
8720
8723
8726
8729
8731 std::vector<RallypointExtendedGroupRestriction> extendedGroupRestrictions;
8732
8735
8738
8741
8744
8746 uint32_t sysFlags;
8747
8750
8753
8756
8759
8762
8765
8768
8770 std::vector<RallypointRpRtTimingBehavior> peerRtBehaviors;
8771
8774
8777
8780
8783
8786
8788 std::string meshName;
8789
8791 std::vector<std::string> extraMeshes;
8792
8795
8797 {
8798 clear();
8799 }
8800
8801 void clear()
8802 {
8803 fipsCrypto.clear();
8804 watchdog.clear();
8805 id.clear();
8806 listenPort = 7443;
8807 interfaceName.clear();
8808 certificate.clear();
8809 allowMulticastForwarding = false;
8810 peeringConfiguration.clear();
8811 peeringConfigurationFileName.clear();
8812 peeringConfigurationFileCommand.clear();
8813 peeringConfigurationFileCheckSecs = 60;
8814 ioPools = -1;
8815 statusReport.clear();
8816 limits.clear();
8817 linkGraph.clear();
8818 externalHealthCheckResponder.clear();
8819 allowPeerForwarding = false;
8820 multicastInterfaceName.clear();
8821 tls.clear();
8822 discovery.clear();
8823 forwardDiscoveredGroups = false;
8824 forwardMulticastAddressing = false;
8825 isMeshLeaf = false;
8826 disableMessageSigning = false;
8827 multicastRestrictions.clear();
8828 igmpSnooping.clear();
8829 staticReflectors.clear();
8830 tcpTxOptions.clear();
8831 multicastTxOptions.clear();
8832 certStoreFileName.clear();
8833 certStorePasswordHex.clear();
8834 groupRestrictions.clear();
8835 configurationCheckSignalName = "rts.7b392d1.${id}";
8836 licensing.clear();
8837 featureset.clear();
8838 udpStreaming.clear();
8839 sysFlags = 0;
8840 normalTaskQueueBias = 0;
8841 enableLeafReflectionReverseSubscription = false;
8842 disableLoopDetection = false;
8843 maxSecurityLevel = 0;
8844 routeMap.clear();
8845 maxOutboundPeerConnectionIntervalDeltaSecs = 15;
8846 peerRtTestIntervalMs = 60000;
8847 peerRtBehaviors.clear();
8848 websocket.clear();
8849 nsm.clear();
8850 advertising.clear();
8851 extendedGroupRestrictions.clear();
8852 groupRestrictionAccessPolicyType = GroupRestrictionAccessPolicyType_t::graptPermissive;
8853 ipFamily = IpFamilyType_t::ifIpUnspec;
8854 rxCapture.clear();
8855 txCapture.clear();
8856 meshName.clear();
8857 extraMeshes.clear();
8858 tuning.clear();
8859 }
8860 };
8861
8862 static void to_json(nlohmann::json& j, const RallypointServer& p)
8863 {
8864 j = nlohmann::json{
8865 TOJSON_IMPL(fipsCrypto),
8866 TOJSON_IMPL(watchdog),
8867 TOJSON_IMPL(id),
8868 TOJSON_IMPL(listenPort),
8869 TOJSON_IMPL(interfaceName),
8870 TOJSON_IMPL(certificate),
8871 TOJSON_IMPL(allowMulticastForwarding),
8872 // TOJSON_IMPL(peeringConfiguration), // NOTE: Not serialized!
8873 TOJSON_IMPL(peeringConfigurationFileName),
8874 TOJSON_IMPL(peeringConfigurationFileCommand),
8875 TOJSON_IMPL(peeringConfigurationFileCheckSecs),
8876 TOJSON_IMPL(ioPools),
8877 TOJSON_IMPL(statusReport),
8878 TOJSON_IMPL(limits),
8879 TOJSON_IMPL(linkGraph),
8880 TOJSON_IMPL(externalHealthCheckResponder),
8881 TOJSON_IMPL(allowPeerForwarding),
8882 TOJSON_IMPL(multicastInterfaceName),
8883 TOJSON_IMPL(tls),
8884 TOJSON_IMPL(discovery),
8885 TOJSON_IMPL(forwardDiscoveredGroups),
8886 TOJSON_IMPL(forwardMulticastAddressing),
8887 TOJSON_IMPL(isMeshLeaf),
8888 TOJSON_IMPL(disableMessageSigning),
8889 TOJSON_IMPL(multicastRestrictions),
8890 TOJSON_IMPL(igmpSnooping),
8891 TOJSON_IMPL(staticReflectors),
8892 TOJSON_IMPL(tcpTxOptions),
8893 TOJSON_IMPL(multicastTxOptions),
8894 TOJSON_IMPL(certStoreFileName),
8895 TOJSON_IMPL(certStorePasswordHex),
8896 TOJSON_IMPL(groupRestrictions),
8897 TOJSON_IMPL(configurationCheckSignalName),
8898 TOJSON_IMPL(featureset),
8899 TOJSON_IMPL(licensing),
8900 TOJSON_IMPL(udpStreaming),
8901 TOJSON_IMPL(sysFlags),
8902 TOJSON_IMPL(normalTaskQueueBias),
8903 TOJSON_IMPL(enableLeafReflectionReverseSubscription),
8904 TOJSON_IMPL(disableLoopDetection),
8905 TOJSON_IMPL(maxSecurityLevel),
8906 TOJSON_IMPL(routeMap),
8907 TOJSON_IMPL(maxOutboundPeerConnectionIntervalDeltaSecs),
8908 TOJSON_IMPL(peerRtTestIntervalMs),
8909 TOJSON_IMPL(peerRtBehaviors),
8910 TOJSON_IMPL(websocket),
8911 TOJSON_IMPL(nsm),
8912 TOJSON_IMPL(advertising),
8913 TOJSON_IMPL(extendedGroupRestrictions),
8914 TOJSON_IMPL(groupRestrictionAccessPolicyType),
8915 TOJSON_IMPL(ipFamily),
8916 TOJSON_IMPL(rxCapture),
8917 TOJSON_IMPL(txCapture),
8918 TOJSON_IMPL(meshName),
8919 TOJSON_IMPL(extraMeshes),
8920 TOJSON_IMPL(tuning)
8921 };
8922 }
8923 static void from_json(const nlohmann::json& j, RallypointServer& p)
8924 {
8925 p.clear();
8926 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
8927 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
8928 getOptional<std::string>("id", p.id, j);
8929 getOptional<SecurityCertificate>("certificate", p.certificate, j);
8930 getOptional<std::string>("interfaceName", p.interfaceName, j);
8931 getOptional<int>("listenPort", p.listenPort, j, 7443);
8932 getOptional<bool>("allowMulticastForwarding", p.allowMulticastForwarding, j, false);
8933 //getOptional<PeeringConfiguration>("peeringConfiguration", p.peeringConfiguration, j); // NOTE: Not serialized!
8934 getOptional<std::string>("peeringConfigurationFileName", p.peeringConfigurationFileName, j);
8935 getOptional<std::string>("peeringConfigurationFileCommand", p.peeringConfigurationFileCommand, j);
8936 getOptional<int>("peeringConfigurationFileCheckSecs", p.peeringConfigurationFileCheckSecs, j, 60);
8937 getOptional<int>("ioPools", p.ioPools, j, -1);
8938 getOptional<RallypointServerStatusReportConfiguration>("statusReport", p.statusReport, j);
8939 getOptional<RallypointServerLimits>("limits", p.limits, j);
8940 getOptional<RallypointServerLinkGraph>("linkGraph", p.linkGraph, j);
8941 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
8942 getOptional<bool>("allowPeerForwarding", p.allowPeerForwarding, j, false);
8943 getOptional<std::string>("multicastInterfaceName", p.multicastInterfaceName, j);
8944 getOptional<Tls>("tls", p.tls, j);
8945 getOptional<DiscoveryConfiguration>("discovery", p.discovery, j);
8946 getOptional<bool>("forwardDiscoveredGroups", p.forwardDiscoveredGroups, j, false);
8947 getOptional<bool>("forwardMulticastAddressing", p.forwardMulticastAddressing, j, false);
8948 getOptional<bool>("isMeshLeaf", p.isMeshLeaf, j, false);
8949 getOptional<bool>("disableMessageSigning", p.disableMessageSigning, j, false);
8950 getOptional<NetworkAddressRestrictionList>("multicastRestrictions", p.multicastRestrictions, j);
8951 getOptional<IgmpSnooping>("igmpSnooping", p.igmpSnooping, j);
8952 getOptional<std::vector<RallypointReflector>>("staticReflectors", p.staticReflectors, j);
8953 getOptional<TcpNetworkTxOptions>("tcpTxOptions", p.tcpTxOptions, j);
8954 getOptional<NetworkTxOptions>("multicastTxOptions", p.multicastTxOptions, j);
8955 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
8956 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
8957 getOptional<StringRestrictionList>("groupRestrictions", p.groupRestrictions, j);
8958 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.7b392d1.${id}");
8959 getOptional<Licensing>("licensing", p.licensing, j);
8960 getOptional<Featureset>("featureset", p.featureset, j);
8961 getOptional<RallypointUdpStreaming>("udpStreaming", p.udpStreaming, j);
8962 getOptional<uint32_t>("sysFlags", p.sysFlags, j, 0);
8963 getOptional<uint32_t>("normalTaskQueueBias", p.normalTaskQueueBias, j, 0);
8964 getOptional<bool>("enableLeafReflectionReverseSubscription", p.enableLeafReflectionReverseSubscription, j, false);
8965 getOptional<bool>("disableLoopDetection", p.disableLoopDetection, j, false);
8966 getOptional<uint32_t>("maxSecurityLevel", p.maxSecurityLevel, j, 0);
8967 getOptional<RallypointServerRouteMap>("routeMap", p.routeMap, j);
8968 getOptional<uint32_t>("maxOutboundPeerConnectionIntervalDeltaSecs", p.maxOutboundPeerConnectionIntervalDeltaSecs, j, 15);
8969 getOptional<int>("peerRtTestIntervalMs", p.peerRtTestIntervalMs, j, 60000);
8970 getOptional<std::vector<RallypointRpRtTimingBehavior>>("peerRtBehaviors", p.peerRtBehaviors, j);
8971 getOptional<RallypointWebsocketSettings>("websocket", p.websocket, j);
8972 getOptional<NsmConfiguration>("nsm", p.nsm, j);
8973 getOptional<RallypointAdvertisingSettings>("advertising", p.advertising, j);
8974 getOptional<std::vector<RallypointExtendedGroupRestriction>>("extendedGroupRestrictions", p.extendedGroupRestrictions, j);
8975 getOptional<GroupRestrictionAccessPolicyType_t>("groupRestrictionAccessPolicyType", p.groupRestrictionAccessPolicyType, j, GroupRestrictionAccessPolicyType_t::graptPermissive);
8976 getOptional<IpFamilyType_t>("ipFamily", p.ipFamily, j, IpFamilyType_t::ifIpUnspec);
8977 getOptional<PacketCapturer>("rxCapture", p.rxCapture, j);
8978 getOptional<PacketCapturer>("txCapture", p.txCapture, j);
8979 getOptional<std::string>("meshName", p.meshName, j);
8980 getOptional<std::vector<std::string>>("extraMeshes", p.extraMeshes, j);
8981 getOptional<TuningSettings>("tuning", p.tuning, j);
8982 }
8983
8984 //-----------------------------------------------------------
8985 JSON_SERIALIZED_CLASS(PlatformDiscoveredService)
8996 {
8997 IMPLEMENT_JSON_SERIALIZATION()
8998 IMPLEMENT_JSON_DOCUMENTATION(PlatformDiscoveredService)
8999
9000 public:
9001
9003 std::string id;
9004
9006 std::string type;
9007
9009 std::string name;
9010
9013
9015 std::string uri;
9016
9019
9021 {
9022 clear();
9023 }
9024
9025 void clear()
9026 {
9027 id.clear();
9028 type.clear();
9029 name.clear();
9030 address.clear();
9031 uri.clear();
9032 configurationVersion = 0;
9033 }
9034 };
9035
9036 static void to_json(nlohmann::json& j, const PlatformDiscoveredService& p)
9037 {
9038 j = nlohmann::json{
9039 TOJSON_IMPL(id),
9040 TOJSON_IMPL(type),
9041 TOJSON_IMPL(name),
9042 TOJSON_IMPL(address),
9043 TOJSON_IMPL(uri),
9044 TOJSON_IMPL(configurationVersion)
9045 };
9046 }
9047 static void from_json(const nlohmann::json& j, PlatformDiscoveredService& p)
9048 {
9049 p.clear();
9050 getOptional<std::string>("id", p.id, j);
9051 getOptional<std::string>("type", p.type, j);
9052 getOptional<std::string>("name", p.name, j);
9053 getOptional<NetworkAddress>("address", p.address, j);
9054 getOptional<std::string>("uri", p.uri, j);
9055 getOptional<uint32_t>("configurationVersion", p.configurationVersion, j, 0);
9056 }
9057
9058
9059 //-----------------------------------------------------------
9061 {
9062 public:
9063 typedef enum
9064 {
9065 etUndefined = 0,
9066 etAudio = 1,
9067 etLocation = 2,
9068 etUser = 3
9069 } EventType_t;
9070
9071 typedef enum
9072 {
9073 dNone = 0,
9074 dInbound = 1,
9075 dOutbound = 2,
9076 dBoth = 3,
9077 dUndefined = 4,
9078 } Direction_t;
9079 };
9080
9081
9082 //-----------------------------------------------------------
9083 JSON_SERIALIZED_CLASS(TimelineQueryParameters)
9094 {
9095 IMPLEMENT_JSON_SERIALIZATION()
9096 IMPLEMENT_JSON_DOCUMENTATION(TimelineQueryParameters)
9097
9098 public:
9099
9102
9105
9108
9111
9114
9117
9120
9122 std::string onlyAlias;
9123
9125 std::string onlyNodeId;
9126
9129
9131 std::string sql;
9132
9134 {
9135 clear();
9136 }
9137
9138 void clear()
9139 {
9140 maxCount = 50;
9141 mostRecentFirst = true;
9142 startedOnOrAfter = 0;
9143 endedOnOrBefore = 0;
9144 onlyDirection = 0;
9145 onlyType = 0;
9146 onlyCommitted = true;
9147 onlyAlias.clear();
9148 onlyNodeId.clear();
9149 sql.clear();
9150 onlyTxId = 0;
9151 }
9152 };
9153
9154 static void to_json(nlohmann::json& j, const TimelineQueryParameters& p)
9155 {
9156 j = nlohmann::json{
9157 TOJSON_IMPL(maxCount),
9158 TOJSON_IMPL(mostRecentFirst),
9159 TOJSON_IMPL(startedOnOrAfter),
9160 TOJSON_IMPL(endedOnOrBefore),
9161 TOJSON_IMPL(onlyDirection),
9162 TOJSON_IMPL(onlyType),
9163 TOJSON_IMPL(onlyCommitted),
9164 TOJSON_IMPL(onlyAlias),
9165 TOJSON_IMPL(onlyNodeId),
9166 TOJSON_IMPL(onlyTxId),
9167 TOJSON_IMPL(sql)
9168 };
9169 }
9170 static void from_json(const nlohmann::json& j, TimelineQueryParameters& p)
9171 {
9172 p.clear();
9173 getOptional<long>("maxCount", p.maxCount, j, 50);
9174 getOptional<bool>("mostRecentFirst", p.mostRecentFirst, j, false);
9175 getOptional<uint64_t>("startedOnOrAfter", p.startedOnOrAfter, j, 0);
9176 getOptional<uint64_t>("endedOnOrBefore", p.endedOnOrBefore, j, 0);
9177 getOptional<int>("onlyDirection", p.onlyDirection, j, 0);
9178 getOptional<int>("onlyType", p.onlyType, j, 0);
9179 getOptional<bool>("onlyCommitted", p.onlyCommitted, j, true);
9180 getOptional<std::string>("onlyAlias", p.onlyAlias, j, EMPTY_STRING);
9181 getOptional<std::string>("onlyNodeId", p.onlyNodeId, j, EMPTY_STRING);
9182 getOptional<int>("onlyTxId", p.onlyTxId, j, 0);
9183 getOptional<std::string>("sql", p.sql, j, EMPTY_STRING);
9184 }
9185
9186 //-----------------------------------------------------------
9187 JSON_SERIALIZED_CLASS(CertStoreCertificate)
9195 {
9196 IMPLEMENT_JSON_SERIALIZATION()
9197 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificate)
9198
9199 public:
9201 std::string id;
9202
9204 std::string certificatePem;
9205
9207 std::string privateKeyPem;
9208
9211
9213 std::string tags;
9214
9216 {
9217 clear();
9218 }
9219
9220 void clear()
9221 {
9222 id.clear();
9223 certificatePem.clear();
9224 privateKeyPem.clear();
9225 internalData = nullptr;
9226 tags.clear();
9227 }
9228 };
9229
9230 static void to_json(nlohmann::json& j, const CertStoreCertificate& p)
9231 {
9232 j = nlohmann::json{
9233 TOJSON_IMPL(id),
9234 TOJSON_IMPL(certificatePem),
9235 TOJSON_IMPL(privateKeyPem),
9236 TOJSON_IMPL(tags)
9237 };
9238 }
9239 static void from_json(const nlohmann::json& j, CertStoreCertificate& p)
9240 {
9241 p.clear();
9242 j.at("id").get_to(p.id);
9243 j.at("certificatePem").get_to(p.certificatePem);
9244 getOptional<std::string>("privateKeyPem", p.privateKeyPem, j, EMPTY_STRING);
9245 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
9246 }
9247
9248 //-----------------------------------------------------------
9249 JSON_SERIALIZED_CLASS(CertStore)
9257 {
9258 IMPLEMENT_JSON_SERIALIZATION()
9259 IMPLEMENT_JSON_DOCUMENTATION(CertStore)
9260
9261 public:
9263 std::string id;
9264
9266 std::vector<CertStoreCertificate> certificates;
9267
9268 CertStore()
9269 {
9270 clear();
9271 }
9272
9273 void clear()
9274 {
9275 id.clear();
9276 certificates.clear();
9277 }
9278 };
9279
9280 static void to_json(nlohmann::json& j, const CertStore& p)
9281 {
9282 j = nlohmann::json{
9283 TOJSON_IMPL(id),
9284 TOJSON_IMPL(certificates)
9285 };
9286 }
9287 static void from_json(const nlohmann::json& j, CertStore& p)
9288 {
9289 p.clear();
9290 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
9291 getOptional<std::vector<CertStoreCertificate>>("certificates", p.certificates, j);
9292 }
9293
9294 //-----------------------------------------------------------
9295 JSON_SERIALIZED_CLASS(CertStoreCertificateElement)
9303 {
9304 IMPLEMENT_JSON_SERIALIZATION()
9305 IMPLEMENT_JSON_DOCUMENTATION(CertStoreCertificateElement)
9306
9307 public:
9309 std::string id;
9310
9313
9315 std::string certificatePem;
9316
9318 std::string tags;
9319
9321 {
9322 clear();
9323 }
9324
9325 void clear()
9326 {
9327 id.clear();
9328 hasPrivateKey = false;
9329 tags.clear();
9330 }
9331 };
9332
9333 static void to_json(nlohmann::json& j, const CertStoreCertificateElement& p)
9334 {
9335 j = nlohmann::json{
9336 TOJSON_IMPL(id),
9337 TOJSON_IMPL(hasPrivateKey),
9338 TOJSON_IMPL(tags)
9339 };
9340
9341 if(!p.certificatePem.empty())
9342 {
9343 j["certificatePem"] = p.certificatePem;
9344 }
9345 }
9346 static void from_json(const nlohmann::json& j, CertStoreCertificateElement& p)
9347 {
9348 p.clear();
9349 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
9350 getOptional<bool>("hasPrivateKey", p.hasPrivateKey, j, false);
9351 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
9352 getOptional<std::string>("tags", p.tags, j, EMPTY_STRING);
9353 }
9354
9355 //-----------------------------------------------------------
9356 JSON_SERIALIZED_CLASS(CertStoreDescriptor)
9364 {
9365 IMPLEMENT_JSON_SERIALIZATION()
9366 IMPLEMENT_JSON_DOCUMENTATION(CertStoreDescriptor)
9367
9368 public:
9370 std::string id;
9371
9373 std::string fileName;
9374
9377
9380
9382 std::vector<CertStoreCertificateElement> certificates;
9383
9385 {
9386 clear();
9387 }
9388
9389 void clear()
9390 {
9391 id.clear();
9392 fileName.clear();
9393 version = 0;
9394 flags = 0;
9395 certificates.clear();
9396 }
9397 };
9398
9399 static void to_json(nlohmann::json& j, const CertStoreDescriptor& p)
9400 {
9401 j = nlohmann::json{
9402 TOJSON_IMPL(id),
9403 TOJSON_IMPL(fileName),
9404 TOJSON_IMPL(version),
9405 TOJSON_IMPL(flags),
9406 TOJSON_IMPL(certificates)
9407 };
9408 }
9409 static void from_json(const nlohmann::json& j, CertStoreDescriptor& p)
9410 {
9411 p.clear();
9412 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
9413 getOptional<std::string>("fileName", p.fileName, j, EMPTY_STRING);
9414 getOptional<int>("version", p.version, j, 0);
9415 getOptional<int>("flags", p.flags, j, 0);
9416 getOptional<std::vector<CertStoreCertificateElement>>("certificates", p.certificates, j);
9417 }
9418
9419 //-----------------------------------------------------------
9420 JSON_SERIALIZED_CLASS(CertificateSubjectElement)
9428 {
9429 IMPLEMENT_JSON_SERIALIZATION()
9430 IMPLEMENT_JSON_DOCUMENTATION(CertificateSubjectElement)
9431
9432 public:
9434 std::string name;
9435
9437 std::string value;
9438
9440 {
9441 clear();
9442 }
9443
9444 void clear()
9445 {
9446 name.clear();
9447 value.clear();
9448 }
9449 };
9450
9451 static void to_json(nlohmann::json& j, const CertificateSubjectElement& p)
9452 {
9453 j = nlohmann::json{
9454 TOJSON_IMPL(name),
9455 TOJSON_IMPL(value)
9456 };
9457 }
9458 static void from_json(const nlohmann::json& j, CertificateSubjectElement& p)
9459 {
9460 p.clear();
9461 getOptional<std::string>("name", p.name, j, EMPTY_STRING);
9462 getOptional<std::string>("value", p.value, j, EMPTY_STRING);
9463 }
9464
9465
9466 //-----------------------------------------------------------
9467 JSON_SERIALIZED_CLASS(CertificateDescriptor)
9475 {
9476 IMPLEMENT_JSON_SERIALIZATION()
9477 IMPLEMENT_JSON_DOCUMENTATION(CertificateDescriptor)
9478
9479 public:
9481 std::string subject;
9482
9484 std::string issuer;
9485
9488
9491
9493 std::string notBefore;
9494
9496 std::string notAfter;
9497
9499 std::string serial;
9500
9502 std::string fingerprint;
9503
9505 std::vector<CertificateSubjectElement> subjectElements;
9506
9508 std::string certificatePem;
9509
9511 std::string publicKeyPem;
9512
9514 {
9515 clear();
9516 }
9517
9518 void clear()
9519 {
9520 subject.clear();
9521 issuer.clear();
9522 selfSigned = false;
9523 version = 0;
9524 notBefore.clear();
9525 notAfter.clear();
9526 serial.clear();
9527 fingerprint.clear();
9528 subjectElements.clear();
9529 certificatePem.clear();
9530 publicKeyPem.clear();
9531 }
9532 };
9533
9534 static void to_json(nlohmann::json& j, const CertificateDescriptor& p)
9535 {
9536 j = nlohmann::json{
9537 TOJSON_IMPL(subject),
9538 TOJSON_IMPL(issuer),
9539 TOJSON_IMPL(selfSigned),
9540 TOJSON_IMPL(version),
9541 TOJSON_IMPL(notBefore),
9542 TOJSON_IMPL(notAfter),
9543 TOJSON_IMPL(serial),
9544 TOJSON_IMPL(fingerprint),
9545 TOJSON_IMPL(subjectElements),
9546 TOJSON_IMPL(certificatePem),
9547 TOJSON_IMPL(publicKeyPem)
9548 };
9549 }
9550 static void from_json(const nlohmann::json& j, CertificateDescriptor& p)
9551 {
9552 p.clear();
9553 getOptional<std::string>("subject", p.subject, j, EMPTY_STRING);
9554 getOptional<std::string>("issuer", p.issuer, j, EMPTY_STRING);
9555 getOptional<bool>("selfSigned", p.selfSigned, j, false);
9556 getOptional<int>("version", p.version, j, 0);
9557 getOptional<std::string>("notBefore", p.notBefore, j, EMPTY_STRING);
9558 getOptional<std::string>("notAfter", p.notAfter, j, EMPTY_STRING);
9559 getOptional<std::string>("serial", p.serial, j, EMPTY_STRING);
9560 getOptional<std::string>("fingerprint", p.fingerprint, j, EMPTY_STRING);
9561 getOptional<std::string>("certificatePem", p.certificatePem, j, EMPTY_STRING);
9562 getOptional<std::string>("publicKeyPem", p.publicKeyPem, j, EMPTY_STRING);
9563 getOptional<std::vector<CertificateSubjectElement>>("subjectElements", p.subjectElements, j);
9564 }
9565
9566
9567 //-----------------------------------------------------------
9568 JSON_SERIALIZED_CLASS(RiffDescriptor)
9579 {
9580 IMPLEMENT_JSON_SERIALIZATION()
9581 IMPLEMENT_JSON_DOCUMENTATION(RiffDescriptor)
9582
9583 public:
9585 std::string file;
9586
9589
9592
9595
9597 std::string meta;
9598
9600 std::string certPem;
9601
9604
9606 std::string signature;
9607
9609 {
9610 clear();
9611 }
9612
9613 void clear()
9614 {
9615 file.clear();
9616 verified = false;
9617 channels = 0;
9618 sampleCount = 0;
9619 meta.clear();
9620 certPem.clear();
9621 certDescriptor.clear();
9622 signature.clear();
9623 }
9624 };
9625
9626 static void to_json(nlohmann::json& j, const RiffDescriptor& p)
9627 {
9628 j = nlohmann::json{
9629 TOJSON_IMPL(file),
9630 TOJSON_IMPL(verified),
9631 TOJSON_IMPL(channels),
9632 TOJSON_IMPL(sampleCount),
9633 TOJSON_IMPL(meta),
9634 TOJSON_IMPL(certPem),
9635 TOJSON_IMPL(certDescriptor),
9636 TOJSON_IMPL(signature)
9637 };
9638 }
9639
9640 static void from_json(const nlohmann::json& j, RiffDescriptor& p)
9641 {
9642 p.clear();
9643 FROMJSON_IMPL(file, std::string, EMPTY_STRING);
9644 FROMJSON_IMPL(verified, bool, false);
9645 FROMJSON_IMPL(channels, int, 0);
9646 FROMJSON_IMPL(sampleCount, int, 0);
9647 FROMJSON_IMPL(meta, std::string, EMPTY_STRING);
9648 FROMJSON_IMPL(certPem, std::string, EMPTY_STRING);
9649 getOptional<CertificateDescriptor>("certDescriptor", p.certDescriptor, j);
9650 FROMJSON_IMPL(signature, std::string, EMPTY_STRING);
9651 }
9652
9653
9654 //-----------------------------------------------------------
9655 JSON_SERIALIZED_CLASS(BridgeCreationDetail)
9663 {
9664 IMPLEMENT_JSON_SERIALIZATION()
9665 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(BridgeCreationDetail)
9666 IMPLEMENT_JSON_DOCUMENTATION(BridgeCreationDetail)
9667
9668 public:
9670 typedef enum
9671 {
9673 csUndefined = 0,
9674
9676 csOk = 1,
9677
9679 csNoJson = -1,
9680
9682 csAlreadyExists = -3,
9683
9685 csInvalidConfiguration = -4,
9686
9688 csInvalidJson = -5,
9689
9691 csInsufficientGroups = -6,
9692
9694 csTooManyGroups = -7,
9695
9697 csDuplicateGroup = -8,
9698
9700 csLocalLoopDetected = -9,
9701 } CreationStatus_t;
9702
9704 std::string id;
9705
9708
9710 {
9711 clear();
9712 }
9713
9714 void clear()
9715 {
9716 id.clear();
9717 status = csUndefined;
9718 }
9719 };
9720
9721 static void to_json(nlohmann::json& j, const BridgeCreationDetail& p)
9722 {
9723 j = nlohmann::json{
9724 TOJSON_IMPL(id),
9725 TOJSON_IMPL(status)
9726 };
9727 }
9728 static void from_json(const nlohmann::json& j, BridgeCreationDetail& p)
9729 {
9730 p.clear();
9731 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
9732 getOptional<BridgeCreationDetail::CreationStatus_t>("status", p.status, j, BridgeCreationDetail::CreationStatus_t::csUndefined);
9733 }
9734 //-----------------------------------------------------------
9735 JSON_SERIALIZED_CLASS(GroupConnectionDetail)
9743 {
9744 IMPLEMENT_JSON_SERIALIZATION()
9745 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupConnectionDetail)
9746 IMPLEMENT_JSON_DOCUMENTATION(GroupConnectionDetail)
9747
9748 public:
9750 typedef enum
9751 {
9753 ctUndefined = 0,
9754
9756 ctDirectDatagram = 1,
9757
9759 ctRallypoint = 2
9760 } ConnectionType_t;
9761
9763 std::string id;
9764
9767
9769 std::string peer;
9770
9773
9775 std::string reason;
9776
9778 {
9779 clear();
9780 }
9781
9782 void clear()
9783 {
9784 id.clear();
9785 connectionType = ctUndefined;
9786 peer.clear();
9787 asFailover = false;
9788 reason.clear();
9789 }
9790 };
9791
9792 static void to_json(nlohmann::json& j, const GroupConnectionDetail& p)
9793 {
9794 j = nlohmann::json{
9795 TOJSON_IMPL(id),
9796 TOJSON_IMPL(connectionType),
9797 TOJSON_IMPL(peer),
9798 TOJSON_IMPL(asFailover),
9799 TOJSON_IMPL(reason)
9800 };
9801
9802 if(p.asFailover)
9803 {
9804 j["asFailover"] = p.asFailover;
9805 }
9806 }
9807 static void from_json(const nlohmann::json& j, GroupConnectionDetail& p)
9808 {
9809 p.clear();
9810 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
9811 getOptional<GroupConnectionDetail::ConnectionType_t>("connectionType", p.connectionType, j, GroupConnectionDetail::ConnectionType_t::ctUndefined);
9812 getOptional<std::string>("peer", p.peer, j, EMPTY_STRING);
9813 getOptional<bool>("asFailover", p.asFailover, j, false);
9814 getOptional<std::string>("reason", p.reason, j, EMPTY_STRING);
9815 }
9816
9817 //-----------------------------------------------------------
9818 JSON_SERIALIZED_CLASS(GroupTxDetail)
9826 {
9827 IMPLEMENT_JSON_SERIALIZATION()
9828 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupTxDetail)
9829 IMPLEMENT_JSON_DOCUMENTATION(GroupTxDetail)
9830
9831 public:
9833 typedef enum
9834 {
9836 txsUndefined = 0,
9837
9839 txsTxStarted = 1,
9840
9842 txsTxEnded = 2,
9843
9845 txsNotAnAudioGroup = -1,
9846
9848 txsNotJoined = -2,
9849
9851 txsNotConnected = -3,
9852
9854 txsAlreadyTransmitting = -4,
9855
9857 txsInvalidParams = -5,
9858
9860 txsPriorityTooLow = -6,
9861
9863 txsRxActiveOnNonFdx = -7,
9864
9866 txsCannotSubscribeToInput = -8,
9867
9869 txsInvalidId = -9,
9870
9872 txsTxEndedWithFailure = -10,
9873 } TxStatus_t;
9874
9876 std::string id;
9877
9880
9883
9886
9889
9891 uint32_t txId;
9892
9894 {
9895 clear();
9896 }
9897
9898 void clear()
9899 {
9900 id.clear();
9901 status = txsUndefined;
9902 localPriority = 0;
9903 remotePriority = 0;
9904 nonFdxMsHangRemaining = 0;
9905 txId = 0;
9906 }
9907 };
9908
9909 static void to_json(nlohmann::json& j, const GroupTxDetail& p)
9910 {
9911 j = nlohmann::json{
9912 TOJSON_IMPL(id),
9913 TOJSON_IMPL(status),
9914 TOJSON_IMPL(localPriority),
9915 TOJSON_IMPL(txId)
9916 };
9917
9918 // Include remote priority if status is related to that
9919 if(p.status == GroupTxDetail::TxStatus_t::txsPriorityTooLow)
9920 {
9921 j["remotePriority"] = p.remotePriority;
9922 }
9923 else if(p.status == GroupTxDetail::TxStatus_t::txsRxActiveOnNonFdx)
9924 {
9925 j["nonFdxMsHangRemaining"] = p.nonFdxMsHangRemaining;
9926 }
9927 }
9928 static void from_json(const nlohmann::json& j, GroupTxDetail& p)
9929 {
9930 p.clear();
9931 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
9932 getOptional<GroupTxDetail::TxStatus_t>("status", p.status, j, GroupTxDetail::TxStatus_t::txsUndefined);
9933 getOptional<int>("localPriority", p.localPriority, j, 0);
9934 getOptional<int>("remotePriority", p.remotePriority, j, 0);
9935 getOptional<long>("nonFdxMsHangRemaining", p.nonFdxMsHangRemaining, j, 0);
9936 getOptional<uint32_t>("txId", p.txId, j, 0);
9937 }
9938
9939 //-----------------------------------------------------------
9940 JSON_SERIALIZED_CLASS(GroupCreationDetail)
9948 {
9949 IMPLEMENT_JSON_SERIALIZATION()
9950 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupCreationDetail)
9951 IMPLEMENT_JSON_DOCUMENTATION(GroupCreationDetail)
9952
9953 public:
9955 typedef enum
9956 {
9958 csUndefined = 0,
9959
9961 csOk = 1,
9962
9964 csNoJson = -1,
9965
9967 csConflictingRpListAndCluster = -2,
9968
9970 csAlreadyExists = -3,
9971
9973 csInvalidConfiguration = -4,
9974
9976 csInvalidJson = -5,
9977
9979 csCryptoFailure = -6,
9980
9982 csAudioInputFailure = -7,
9983
9985 csAudioOutputFailure = -8,
9986
9988 csUnsupportedAudioEncoder = -9,
9989
9991 csNoLicense = -10,
9992
9994 csInvalidTransport = -11,
9995 } CreationStatus_t;
9996
9998 std::string id;
9999
10002
10004 {
10005 clear();
10006 }
10007
10008 void clear()
10009 {
10010 id.clear();
10011 status = csUndefined;
10012 }
10013 };
10014
10015 static void to_json(nlohmann::json& j, const GroupCreationDetail& p)
10016 {
10017 j = nlohmann::json{
10018 TOJSON_IMPL(id),
10019 TOJSON_IMPL(status)
10020 };
10021 }
10022 static void from_json(const nlohmann::json& j, GroupCreationDetail& p)
10023 {
10024 p.clear();
10025 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10026 getOptional<GroupCreationDetail::CreationStatus_t>("status", p.status, j, GroupCreationDetail::CreationStatus_t::csUndefined);
10027 }
10028
10029
10030 //-----------------------------------------------------------
10031 JSON_SERIALIZED_CLASS(GroupReconfigurationDetail)
10039 {
10040 IMPLEMENT_JSON_SERIALIZATION()
10041 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupReconfigurationDetail)
10042 IMPLEMENT_JSON_DOCUMENTATION(GroupReconfigurationDetail)
10043
10044 public:
10046 typedef enum
10047 {
10049 rsUndefined = 0,
10050
10052 rsOk = 1,
10053
10055 rsNoJson = -1,
10056
10058 rsInvalidConfiguration = -2,
10059
10061 rsInvalidJson = -3,
10062
10064 rsAudioInputFailure = -4,
10065
10067 rsAudioOutputFailure = -5,
10068
10070 rsDoesNotExist = -6,
10071
10073 rsAudioInputInUse = -7,
10074
10076 rsAudioDisabledForGroup = -8,
10077
10079 rsGroupIsNotAudio = -9
10080 } ReconfigurationStatus_t;
10081
10083 std::string id;
10084
10087
10089 {
10090 clear();
10091 }
10092
10093 void clear()
10094 {
10095 id.clear();
10096 status = rsUndefined;
10097 }
10098 };
10099
10100 static void to_json(nlohmann::json& j, const GroupReconfigurationDetail& p)
10101 {
10102 j = nlohmann::json{
10103 TOJSON_IMPL(id),
10104 TOJSON_IMPL(status)
10105 };
10106 }
10107 static void from_json(const nlohmann::json& j, GroupReconfigurationDetail& p)
10108 {
10109 p.clear();
10110 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10111 getOptional<GroupReconfigurationDetail::ReconfigurationStatus_t>("status", p.status, j, GroupReconfigurationDetail::ReconfigurationStatus_t::rsUndefined);
10112 }
10113
10114
10115 //-----------------------------------------------------------
10116 JSON_SERIALIZED_CLASS(GroupHealthReport)
10124 {
10125 IMPLEMENT_JSON_SERIALIZATION()
10126 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupHealthReport)
10127 IMPLEMENT_JSON_DOCUMENTATION(GroupHealthReport)
10128
10129 public:
10130 std::string id;
10131 uint64_t lastErrorTs;
10132 uint64_t decryptionErrors;
10133 uint64_t encryptionErrors;
10134 uint64_t unsupportDecoderErrors;
10135 uint64_t decoderFailures;
10136 uint64_t decoderStartFailures;
10137 uint64_t inboundRtpPacketAllocationFailures;
10138 uint64_t inboundRtpPacketLoadFailures;
10139 uint64_t latePacketsDiscarded;
10140 uint64_t jitterBufferInsertionFailures;
10141 uint64_t presenceDeserializationFailures;
10142 uint64_t notRtpErrors;
10143 uint64_t generalErrors;
10144 uint64_t inboundRtpProcessorAllocationFailures;
10145
10147 {
10148 clear();
10149 }
10150
10151 void clear()
10152 {
10153 id.clear();
10154 lastErrorTs = 0;
10155 decryptionErrors = 0;
10156 encryptionErrors = 0;
10157 unsupportDecoderErrors = 0;
10158 decoderFailures = 0;
10159 decoderStartFailures = 0;
10160 inboundRtpPacketAllocationFailures = 0;
10161 inboundRtpPacketLoadFailures = 0;
10162 latePacketsDiscarded = 0;
10163 jitterBufferInsertionFailures = 0;
10164 presenceDeserializationFailures = 0;
10165 notRtpErrors = 0;
10166 generalErrors = 0;
10167 inboundRtpProcessorAllocationFailures = 0;
10168 }
10169 };
10170
10171 static void to_json(nlohmann::json& j, const GroupHealthReport& p)
10172 {
10173 j = nlohmann::json{
10174 TOJSON_IMPL(id),
10175 TOJSON_IMPL(lastErrorTs),
10176 TOJSON_IMPL(decryptionErrors),
10177 TOJSON_IMPL(encryptionErrors),
10178 TOJSON_IMPL(unsupportDecoderErrors),
10179 TOJSON_IMPL(decoderFailures),
10180 TOJSON_IMPL(decoderStartFailures),
10181 TOJSON_IMPL(inboundRtpPacketAllocationFailures),
10182 TOJSON_IMPL(inboundRtpPacketLoadFailures),
10183 TOJSON_IMPL(latePacketsDiscarded),
10184 TOJSON_IMPL(jitterBufferInsertionFailures),
10185 TOJSON_IMPL(presenceDeserializationFailures),
10186 TOJSON_IMPL(notRtpErrors),
10187 TOJSON_IMPL(generalErrors),
10188 TOJSON_IMPL(inboundRtpProcessorAllocationFailures)
10189 };
10190 }
10191 static void from_json(const nlohmann::json& j, GroupHealthReport& p)
10192 {
10193 p.clear();
10194 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10195 getOptional<uint64_t>("lastErrorTs", p.lastErrorTs, j, 0);
10196 getOptional<uint64_t>("decryptionErrors", p.decryptionErrors, j, 0);
10197 getOptional<uint64_t>("encryptionErrors", p.encryptionErrors, j, 0);
10198 getOptional<uint64_t>("unsupportDecoderErrors", p.unsupportDecoderErrors, j, 0);
10199 getOptional<uint64_t>("decoderFailures", p.decoderFailures, j, 0);
10200 getOptional<uint64_t>("decoderStartFailures", p.decoderStartFailures, j, 0);
10201 getOptional<uint64_t>("inboundRtpPacketAllocationFailures", p.inboundRtpPacketAllocationFailures, j, 0);
10202 getOptional<uint64_t>("inboundRtpPacketLoadFailures", p.inboundRtpPacketLoadFailures, j, 0);
10203 getOptional<uint64_t>("latePacketsDiscarded", p.latePacketsDiscarded, j, 0);
10204 getOptional<uint64_t>("jitterBufferInsertionFailures", p.jitterBufferInsertionFailures, j, 0);
10205 getOptional<uint64_t>("presenceDeserializationFailures", p.presenceDeserializationFailures, j, 0);
10206 getOptional<uint64_t>("notRtpErrors", p.notRtpErrors, j, 0);
10207 getOptional<uint64_t>("generalErrors", p.generalErrors, j, 0);
10208 getOptional<uint64_t>("inboundRtpProcessorAllocationFailures", p.inboundRtpProcessorAllocationFailures, j, 0);
10209 }
10210
10211 //-----------------------------------------------------------
10212 JSON_SERIALIZED_CLASS(InboundProcessorStats)
10220 {
10221 IMPLEMENT_JSON_SERIALIZATION()
10222 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(InboundProcessorStats)
10223 IMPLEMENT_JSON_DOCUMENTATION(InboundProcessorStats)
10224
10225 public:
10226 uint32_t ssrc;
10227 double jitter;
10228 uint64_t minRtpSamplesInQueue;
10229 uint64_t maxRtpSamplesInQueue;
10230 uint64_t totalSamplesTrimmed;
10231 uint64_t underruns;
10232 uint64_t overruns;
10233 uint64_t samplesInQueue;
10234 uint64_t totalPacketsReceived;
10235 uint64_t totalPacketsLost;
10236 uint64_t totalPacketsDiscarded;
10237
10239 {
10240 clear();
10241 }
10242
10243 void clear()
10244 {
10245 ssrc = 0;
10246 jitter = 0.0;
10247 minRtpSamplesInQueue = 0;
10248 maxRtpSamplesInQueue = 0;
10249 totalSamplesTrimmed = 0;
10250 underruns = 0;
10251 overruns = 0;
10252 samplesInQueue = 0;
10253 totalPacketsReceived = 0;
10254 totalPacketsLost = 0;
10255 totalPacketsDiscarded = 0;
10256 }
10257 };
10258
10259 static void to_json(nlohmann::json& j, const InboundProcessorStats& p)
10260 {
10261 j = nlohmann::json{
10262 TOJSON_IMPL(ssrc),
10263 TOJSON_IMPL(jitter),
10264 TOJSON_IMPL(minRtpSamplesInQueue),
10265 TOJSON_IMPL(maxRtpSamplesInQueue),
10266 TOJSON_IMPL(totalSamplesTrimmed),
10267 TOJSON_IMPL(underruns),
10268 TOJSON_IMPL(overruns),
10269 TOJSON_IMPL(samplesInQueue),
10270 TOJSON_IMPL(totalPacketsReceived),
10271 TOJSON_IMPL(totalPacketsLost),
10272 TOJSON_IMPL(totalPacketsDiscarded)
10273 };
10274 }
10275 static void from_json(const nlohmann::json& j, InboundProcessorStats& p)
10276 {
10277 p.clear();
10278 getOptional<uint32_t>("ssrc", p.ssrc, j, 0);
10279 getOptional<double>("jitter", p.jitter, j, 0.0);
10280 getOptional<uint64_t>("minRtpSamplesInQueue", p.minRtpSamplesInQueue, j, 0);
10281 getOptional<uint64_t>("maxRtpSamplesInQueue", p.maxRtpSamplesInQueue, j, 0);
10282 getOptional<uint64_t>("totalSamplesTrimmed", p.totalSamplesTrimmed, j, 0);
10283 getOptional<uint64_t>("underruns", p.underruns, j, 0);
10284 getOptional<uint64_t>("overruns", p.overruns, j, 0);
10285 getOptional<uint64_t>("samplesInQueue", p.samplesInQueue, j, 0);
10286 getOptional<uint64_t>("totalPacketsReceived", p.totalPacketsReceived, j, 0);
10287 getOptional<uint64_t>("totalPacketsLost", p.totalPacketsLost, j, 0);
10288 getOptional<uint64_t>("totalPacketsDiscarded", p.totalPacketsDiscarded, j, 0);
10289 }
10290
10291 //-----------------------------------------------------------
10292 JSON_SERIALIZED_CLASS(TrafficCounter)
10300 {
10301 IMPLEMENT_JSON_SERIALIZATION()
10302 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(TrafficCounter)
10303 IMPLEMENT_JSON_DOCUMENTATION(TrafficCounter)
10304
10305 public:
10306 uint64_t packets;
10307 uint64_t bytes;
10308 uint64_t errors;
10309
10311 {
10312 clear();
10313 }
10314
10315 void clear()
10316 {
10317 packets = 0;
10318 bytes = 0;
10319 errors = 0;
10320 }
10321 };
10322
10323 static void to_json(nlohmann::json& j, const TrafficCounter& p)
10324 {
10325 j = nlohmann::json{
10326 TOJSON_IMPL(packets),
10327 TOJSON_IMPL(bytes),
10328 TOJSON_IMPL(errors)
10329 };
10330 }
10331 static void from_json(const nlohmann::json& j, TrafficCounter& p)
10332 {
10333 p.clear();
10334 getOptional<uint64_t>("packets", p.packets, j, 0);
10335 getOptional<uint64_t>("bytes", p.bytes, j, 0);
10336 getOptional<uint64_t>("errors", p.errors, j, 0);
10337 }
10338
10339 //-----------------------------------------------------------
10340 JSON_SERIALIZED_CLASS(GroupStats)
10348 {
10349 IMPLEMENT_JSON_SERIALIZATION()
10350 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(GroupStats)
10351 IMPLEMENT_JSON_DOCUMENTATION(GroupStats)
10352
10353 public:
10354 std::string id;
10355 //std::vector<InboundProcessorStats> rtpInbounds;
10356 TrafficCounter rxTraffic;
10357 TrafficCounter txTraffic;
10358
10359 GroupStats()
10360 {
10361 clear();
10362 }
10363
10364 void clear()
10365 {
10366 id.clear();
10367 //rtpInbounds.clear();
10368 rxTraffic.clear();
10369 txTraffic.clear();
10370 }
10371 };
10372
10373 static void to_json(nlohmann::json& j, const GroupStats& p)
10374 {
10375 j = nlohmann::json{
10376 TOJSON_IMPL(id),
10377 //TOJSON_IMPL(rtpInbounds),
10378 TOJSON_IMPL(rxTraffic),
10379 TOJSON_IMPL(txTraffic)
10380 };
10381 }
10382 static void from_json(const nlohmann::json& j, GroupStats& p)
10383 {
10384 p.clear();
10385 getOptional<std::string>("id", p.id, j, EMPTY_STRING);
10386 //getOptional<std::vector<InboundProcessorStats>>("rtpInbounds", p.rtpInbounds, j);
10387 getOptional<TrafficCounter>("rxTraffic", p.rxTraffic, j);
10388 getOptional<TrafficCounter>("txTraffic", p.txTraffic, j);
10389 }
10390
10391 //-----------------------------------------------------------
10392 JSON_SERIALIZED_CLASS(RallypointConnectionDetail)
10400 {
10401 IMPLEMENT_JSON_SERIALIZATION()
10402 IMPLEMENT_WRAPPED_JSON_SERIALIZATION(RallypointConnectionDetail)
10403 IMPLEMENT_JSON_DOCUMENTATION(RallypointConnectionDetail)
10404
10405 public:
10407 std::string internalId;
10408
10410 std::string host;
10411
10413 int port;
10414
10417
10420
10422 {
10423 clear();
10424 }
10425
10426 void clear()
10427 {
10428 internalId.clear();
10429 host.clear();
10430 port = 0;
10431 msToNextConnectionAttempt = 0;
10432 serverProcessingMs = -1.0f;
10433 }
10434 };
10435
10436 static void to_json(nlohmann::json& j, const RallypointConnectionDetail& p)
10437 {
10438 j = nlohmann::json{
10439 TOJSON_IMPL(internalId),
10440 TOJSON_IMPL(host),
10441 TOJSON_IMPL(port)
10442 };
10443
10444 if(p.msToNextConnectionAttempt > 0)
10445 {
10446 j["msToNextConnectionAttempt"] = p.msToNextConnectionAttempt;
10447 }
10448
10449 if(p.serverProcessingMs >= 0.0)
10450 {
10451 j["serverProcessingMs"] = p.serverProcessingMs;
10452 }
10453 }
10454 static void from_json(const nlohmann::json& j, RallypointConnectionDetail& p)
10455 {
10456 p.clear();
10457 getOptional<std::string>("internalId", p.internalId, j, EMPTY_STRING);
10458 getOptional<std::string>("host", p.host, j, EMPTY_STRING);
10459 getOptional<int>("port", p.port, j, 0);
10460 getOptional<uint64_t>("msToNextConnectionAttempt", p.msToNextConnectionAttempt, j, 0);
10461 getOptional<float>("serverProcessingMs", p.serverProcessingMs, j, -1.0);
10462 }
10463
10464 //-----------------------------------------------------------
10465 JSON_SERIALIZED_CLASS(TranslationSession)
10476 {
10477 IMPLEMENT_JSON_SERIALIZATION()
10478 IMPLEMENT_JSON_DOCUMENTATION(TranslationSession)
10479
10480 public:
10482 std::string id;
10483
10485 std::string name;
10486
10488 std::vector<std::string> groups;
10489
10492
10494 {
10495 clear();
10496 }
10497
10498 void clear()
10499 {
10500 id.clear();
10501 name.clear();
10502 groups.clear();
10503 enabled = true;
10504 }
10505 };
10506
10507 static void to_json(nlohmann::json& j, const TranslationSession& p)
10508 {
10509 j = nlohmann::json{
10510 TOJSON_IMPL(id),
10511 TOJSON_IMPL(name),
10512 TOJSON_IMPL(groups),
10513 TOJSON_IMPL(enabled)
10514 };
10515 }
10516 static void from_json(const nlohmann::json& j, TranslationSession& p)
10517 {
10518 p.clear();
10519 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
10520 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
10521 getOptional<std::vector<std::string>>("groups", p.groups, j);
10522 FROMJSON_IMPL(enabled, bool, true);
10523 }
10524
10525 //-----------------------------------------------------------
10526 JSON_SERIALIZED_CLASS(TranslationConfiguration)
10537 {
10538 IMPLEMENT_JSON_SERIALIZATION()
10539 IMPLEMENT_JSON_DOCUMENTATION(TranslationConfiguration)
10540
10541 public:
10543 std::vector<TranslationSession> sessions;
10544
10546 std::vector<Group> groups;
10547
10549 {
10550 clear();
10551 }
10552
10553 void clear()
10554 {
10555 sessions.clear();
10556 groups.clear();
10557 }
10558 };
10559
10560 static void to_json(nlohmann::json& j, const TranslationConfiguration& p)
10561 {
10562 j = nlohmann::json{
10563 TOJSON_IMPL(sessions),
10564 TOJSON_IMPL(groups)
10565 };
10566 }
10567 static void from_json(const nlohmann::json& j, TranslationConfiguration& p)
10568 {
10569 p.clear();
10570 getOptional<std::vector<TranslationSession>>("sessions", p.sessions, j);
10571 getOptional<std::vector<Group>>("groups", p.groups, j);
10572 }
10573
10574 //-----------------------------------------------------------
10575 JSON_SERIALIZED_CLASS(LingoServerStatusReportConfiguration)
10586 {
10587 IMPLEMENT_JSON_SERIALIZATION()
10588 IMPLEMENT_JSON_DOCUMENTATION(LingoServerStatusReportConfiguration)
10589
10590 public:
10592 std::string fileName;
10593
10596
10599
10601 std::string runCmd;
10602
10605
10608
10611
10613 {
10614 clear();
10615 }
10616
10617 void clear()
10618 {
10619 fileName.clear();
10620 intervalSecs = 60;
10621 enabled = false;
10622 includeGroupDetail = false;
10623 includeSessionDetail = false;
10624 includeSessionGroupDetail = false;
10625 runCmd.clear();
10626 }
10627 };
10628
10629 static void to_json(nlohmann::json& j, const LingoServerStatusReportConfiguration& p)
10630 {
10631 j = nlohmann::json{
10632 TOJSON_IMPL(fileName),
10633 TOJSON_IMPL(intervalSecs),
10634 TOJSON_IMPL(enabled),
10635 TOJSON_IMPL(includeGroupDetail),
10636 TOJSON_IMPL(includeSessionDetail),
10637 TOJSON_IMPL(includeSessionGroupDetail),
10638 TOJSON_IMPL(runCmd)
10639 };
10640 }
10641 static void from_json(const nlohmann::json& j, LingoServerStatusReportConfiguration& p)
10642 {
10643 p.clear();
10644 getOptional<std::string>("fileName", p.fileName, j);
10645 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
10646 getOptional<bool>("enabled", p.enabled, j, false);
10647 getOptional<std::string>("runCmd", p.runCmd, j);
10648 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
10649 getOptional<bool>("includeSessionDetail", p.includeSessionDetail, j, false);
10650 getOptional<bool>("includeSessionGroupDetail", p.includeSessionGroupDetail, j, false);
10651 }
10652
10653 //-----------------------------------------------------------
10654 JSON_SERIALIZED_CLASS(LingoServerInternals)
10667 {
10668 IMPLEMENT_JSON_SERIALIZATION()
10669 IMPLEMENT_JSON_DOCUMENTATION(LingoServerInternals)
10670
10671 public:
10674
10677
10680
10682 {
10683 clear();
10684 }
10685
10686 void clear()
10687 {
10688 watchdog.clear();
10689 tuning.clear();
10690 housekeeperIntervalMs = 1000;
10691 }
10692 };
10693
10694 static void to_json(nlohmann::json& j, const LingoServerInternals& p)
10695 {
10696 j = nlohmann::json{
10697 TOJSON_IMPL(watchdog),
10698 TOJSON_IMPL(housekeeperIntervalMs),
10699 TOJSON_IMPL(tuning)
10700 };
10701 }
10702 static void from_json(const nlohmann::json& j, LingoServerInternals& p)
10703 {
10704 p.clear();
10705 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
10706 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
10707 getOptional<TuningSettings>("tuning", p.tuning, j);
10708 }
10709
10710 //-----------------------------------------------------------
10711 JSON_SERIALIZED_CLASS(LingoServerConfiguration)
10721 {
10722 IMPLEMENT_JSON_SERIALIZATION()
10723 IMPLEMENT_JSON_DOCUMENTATION(LingoServerConfiguration)
10724
10725 public:
10727 std::string id;
10728
10731
10734
10737
10740
10743
10746
10749
10752
10755
10758
10761
10764
10767
10770
10772 {
10773 clear();
10774 }
10775
10776 void clear()
10777 {
10778 id.clear();
10779 serviceConfigurationFileCheckSecs = 60;
10780 lingoConfigurationFileName.clear();
10781 lingoConfigurationFileCommand.clear();
10782 lingoConfigurationFileCheckSecs = 60;
10783 statusReport.clear();
10784 externalHealthCheckResponder.clear();
10785 internals.clear();
10786 certStoreFileName.clear();
10787 certStorePasswordHex.clear();
10788 enginePolicy.clear();
10789 configurationCheckSignalName = "rts.22f4ec3.${id}";
10790 fipsCrypto.clear();
10791 proxy.clear();
10792 nsm.clear();
10793 }
10794 };
10795
10796 static void to_json(nlohmann::json& j, const LingoServerConfiguration& p)
10797 {
10798 j = nlohmann::json{
10799 TOJSON_IMPL(id),
10800 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
10801 TOJSON_IMPL(lingoConfigurationFileName),
10802 TOJSON_IMPL(lingoConfigurationFileCommand),
10803 TOJSON_IMPL(lingoConfigurationFileCheckSecs),
10804 TOJSON_IMPL(statusReport),
10805 TOJSON_IMPL(externalHealthCheckResponder),
10806 TOJSON_IMPL(internals),
10807 TOJSON_IMPL(certStoreFileName),
10808 TOJSON_IMPL(certStorePasswordHex),
10809 TOJSON_IMPL(enginePolicy),
10810 TOJSON_IMPL(configurationCheckSignalName),
10811 TOJSON_IMPL(fipsCrypto),
10812 TOJSON_IMPL(proxy),
10813 TOJSON_IMPL(nsm)
10814 };
10815 }
10816 static void from_json(const nlohmann::json& j, LingoServerConfiguration& p)
10817 {
10818 p.clear();
10819 getOptional<std::string>("id", p.id, j);
10820 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
10821 getOptional<std::string>("lingoConfigurationFileName", p.lingoConfigurationFileName, j);
10822 getOptional<std::string>("lingoConfigurationFileCommand", p.lingoConfigurationFileCommand, j);
10823 getOptional<int>("lingoConfigurationFileCheckSecs", p.lingoConfigurationFileCheckSecs, j, 60);
10824 getOptional<LingoServerStatusReportConfiguration>("statusReport", p.statusReport, j);
10825 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
10826 getOptional<LingoServerInternals>("internals", p.internals, j);
10827 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
10828 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
10829 j.at("enginePolicy").get_to(p.enginePolicy);
10830 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.22f4ec3.${id}");
10831 getOptional<FipsCryptoSettings>("fipsCrypo", p.fipsCrypto, j);
10832 getOptional<NetworkAddress>("proxy", p.proxy, j);
10833 getOptional<NsmConfiguration>("nsm", p.nsm, j);
10834 }
10835
10836
10837 //-----------------------------------------------------------
10838 JSON_SERIALIZED_CLASS(VoiceToVoiceSession)
10849 {
10850 IMPLEMENT_JSON_SERIALIZATION()
10851 IMPLEMENT_JSON_DOCUMENTATION(VoiceToVoiceSession)
10852
10853 public:
10855 std::string id;
10856
10858 std::string name;
10859
10861 std::vector<std::string> groups;
10862
10865
10867 {
10868 clear();
10869 }
10870
10871 void clear()
10872 {
10873 id.clear();
10874 name.clear();
10875 groups.clear();
10876 enabled = true;
10877 }
10878 };
10879
10880 static void to_json(nlohmann::json& j, const VoiceToVoiceSession& p)
10881 {
10882 j = nlohmann::json{
10883 TOJSON_IMPL(id),
10884 TOJSON_IMPL(name),
10885 TOJSON_IMPL(groups),
10886 TOJSON_IMPL(enabled)
10887 };
10888 }
10889 static void from_json(const nlohmann::json& j, VoiceToVoiceSession& p)
10890 {
10891 p.clear();
10892 FROMJSON_IMPL(id, std::string, EMPTY_STRING);
10893 FROMJSON_IMPL(name, std::string, EMPTY_STRING);
10894 getOptional<std::vector<std::string>>("groups", p.groups, j);
10895 FROMJSON_IMPL(enabled, bool, true);
10896 }
10897
10898 //-----------------------------------------------------------
10899 JSON_SERIALIZED_CLASS(LingoConfiguration)
10910 {
10911 IMPLEMENT_JSON_SERIALIZATION()
10912 IMPLEMENT_JSON_DOCUMENTATION(LingoConfiguration)
10913
10914 public:
10916 std::vector<VoiceToVoiceSession> voiceToVoiceSessions;
10917
10919 std::vector<Group> groups;
10920
10922 {
10923 clear();
10924 }
10925
10926 void clear()
10927 {
10928 voiceToVoiceSessions.clear();
10929 groups.clear();
10930 }
10931 };
10932
10933 static void to_json(nlohmann::json& j, const LingoConfiguration& p)
10934 {
10935 j = nlohmann::json{
10936 TOJSON_IMPL(voiceToVoiceSessions),
10937 TOJSON_IMPL(groups)
10938 };
10939 }
10940 static void from_json(const nlohmann::json& j, LingoConfiguration& p)
10941 {
10942 p.clear();
10943 getOptional<std::vector<VoiceToVoiceSession>>("voiceToVoiceSessions", p.voiceToVoiceSessions, j);
10944 getOptional<std::vector<Group>>("groups", p.groups, j);
10945 }
10946
10947 //-----------------------------------------------------------
10948 JSON_SERIALIZED_CLASS(BridgingConfiguration)
10959 {
10960 IMPLEMENT_JSON_SERIALIZATION()
10961 IMPLEMENT_JSON_DOCUMENTATION(BridgingConfiguration)
10962
10963 public:
10965 std::vector<Bridge> bridges;
10966
10968 std::vector<Group> groups;
10969
10971 {
10972 clear();
10973 }
10974
10975 void clear()
10976 {
10977 bridges.clear();
10978 groups.clear();
10979 }
10980 };
10981
10982 static void to_json(nlohmann::json& j, const BridgingConfiguration& p)
10983 {
10984 j = nlohmann::json{
10985 TOJSON_IMPL(bridges),
10986 TOJSON_IMPL(groups)
10987 };
10988 }
10989 static void from_json(const nlohmann::json& j, BridgingConfiguration& p)
10990 {
10991 p.clear();
10992 getOptional<std::vector<Bridge>>("bridges", p.bridges, j);
10993 getOptional<std::vector<Group>>("groups", p.groups, j);
10994 }
10995
10996 //-----------------------------------------------------------
10997 JSON_SERIALIZED_CLASS(BridgingServerStatusReportConfiguration)
11008 {
11009 IMPLEMENT_JSON_SERIALIZATION()
11010 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerStatusReportConfiguration)
11011
11012 public:
11014 std::string fileName;
11015
11018
11021
11023 std::string runCmd;
11024
11027
11030
11033
11035 {
11036 clear();
11037 }
11038
11039 void clear()
11040 {
11041 fileName.clear();
11042 intervalSecs = 60;
11043 enabled = false;
11044 includeGroupDetail = false;
11045 includeBridgeDetail = false;
11046 includeBridgeGroupDetail = false;
11047 runCmd.clear();
11048 }
11049 };
11050
11051 static void to_json(nlohmann::json& j, const BridgingServerStatusReportConfiguration& p)
11052 {
11053 j = nlohmann::json{
11054 TOJSON_IMPL(fileName),
11055 TOJSON_IMPL(intervalSecs),
11056 TOJSON_IMPL(enabled),
11057 TOJSON_IMPL(includeGroupDetail),
11058 TOJSON_IMPL(includeBridgeDetail),
11059 TOJSON_IMPL(includeBridgeGroupDetail),
11060 TOJSON_IMPL(runCmd)
11061 };
11062 }
11063 static void from_json(const nlohmann::json& j, BridgingServerStatusReportConfiguration& p)
11064 {
11065 p.clear();
11066 getOptional<std::string>("fileName", p.fileName, j);
11067 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
11068 getOptional<bool>("enabled", p.enabled, j, false);
11069 getOptional<std::string>("runCmd", p.runCmd, j);
11070 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
11071 getOptional<bool>("includeBridgeDetail", p.includeBridgeDetail, j, false);
11072 getOptional<bool>("includeBridgeGroupDetail", p.includeBridgeGroupDetail, j, false);
11073 }
11074
11075 //-----------------------------------------------------------
11076 JSON_SERIALIZED_CLASS(BridgingServerInternals)
11089 {
11090 IMPLEMENT_JSON_SERIALIZATION()
11091 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerInternals)
11092
11093 public:
11096
11099
11102
11104 {
11105 clear();
11106 }
11107
11108 void clear()
11109 {
11110 watchdog.clear();
11111 tuning.clear();
11112 housekeeperIntervalMs = 1000;
11113 }
11114 };
11115
11116 static void to_json(nlohmann::json& j, const BridgingServerInternals& p)
11117 {
11118 j = nlohmann::json{
11119 TOJSON_IMPL(watchdog),
11120 TOJSON_IMPL(housekeeperIntervalMs),
11121 TOJSON_IMPL(tuning)
11122 };
11123 }
11124 static void from_json(const nlohmann::json& j, BridgingServerInternals& p)
11125 {
11126 p.clear();
11127 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
11128 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
11129 getOptional<TuningSettings>("tuning", p.tuning, j);
11130 }
11131
11132 //-----------------------------------------------------------
11133 JSON_SERIALIZED_CLASS(BridgingServerConfiguration)
11143 {
11144 IMPLEMENT_JSON_SERIALIZATION()
11145 IMPLEMENT_JSON_DOCUMENTATION(BridgingServerConfiguration)
11146
11147 public:
11149 typedef enum
11150 {
11152 omRaw = 0,
11153
11155 omPayloadTransformation = 1,
11156
11158 omAnonymousMixing = 2,
11159
11161 omLanguageTranslation = 3
11162 } OpMode_t;
11163
11165 std::string id;
11166
11169
11172
11175
11178
11181
11184
11187
11190
11193
11196
11199
11202
11205
11208
11210 {
11211 clear();
11212 }
11213
11214 void clear()
11215 {
11216 id.clear();
11217 mode = omRaw;
11218 serviceConfigurationFileCheckSecs = 60;
11219 bridgingConfigurationFileName.clear();
11220 bridgingConfigurationFileCommand.clear();
11221 bridgingConfigurationFileCheckSecs = 60;
11222 statusReport.clear();
11223 externalHealthCheckResponder.clear();
11224 internals.clear();
11225 certStoreFileName.clear();
11226 certStorePasswordHex.clear();
11227 enginePolicy.clear();
11228 configurationCheckSignalName = "rts.6cc0651.${id}";
11229 fipsCrypto.clear();
11230 nsm.clear();
11231 }
11232 };
11233
11234 static void to_json(nlohmann::json& j, const BridgingServerConfiguration& p)
11235 {
11236 j = nlohmann::json{
11237 TOJSON_IMPL(id),
11238 TOJSON_IMPL(mode),
11239 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
11240 TOJSON_IMPL(bridgingConfigurationFileName),
11241 TOJSON_IMPL(bridgingConfigurationFileCommand),
11242 TOJSON_IMPL(bridgingConfigurationFileCheckSecs),
11243 TOJSON_IMPL(statusReport),
11244 TOJSON_IMPL(externalHealthCheckResponder),
11245 TOJSON_IMPL(internals),
11246 TOJSON_IMPL(certStoreFileName),
11247 TOJSON_IMPL(certStorePasswordHex),
11248 TOJSON_IMPL(enginePolicy),
11249 TOJSON_IMPL(configurationCheckSignalName),
11250 TOJSON_IMPL(fipsCrypto),
11251 TOJSON_IMPL(nsm)
11252 };
11253 }
11254 static void from_json(const nlohmann::json& j, BridgingServerConfiguration& p)
11255 {
11256 p.clear();
11257 getOptional<std::string>("id", p.id, j);
11258 getOptional<BridgingServerConfiguration::OpMode_t>("mode", p.mode, j, BridgingServerConfiguration::OpMode_t::omRaw);
11259 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
11260 getOptional<std::string>("bridgingConfigurationFileName", p.bridgingConfigurationFileName, j);
11261 getOptional<std::string>("bridgingConfigurationFileCommand", p.bridgingConfigurationFileCommand, j);
11262 getOptional<int>("bridgingConfigurationFileCheckSecs", p.bridgingConfigurationFileCheckSecs, j, 60);
11263 getOptional<BridgingServerStatusReportConfiguration>("statusReport", p.statusReport, j);
11264 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
11265 getOptional<BridgingServerInternals>("internals", p.internals, j);
11266 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
11267 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
11268 j.at("enginePolicy").get_to(p.enginePolicy);
11269 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.6cc0651.${id}");
11270 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
11271 getOptional<NsmConfiguration>("nsm", p.nsm, j);
11272 }
11273
11274
11275 //-----------------------------------------------------------
11276 JSON_SERIALIZED_CLASS(EarGroupsConfiguration)
11287 {
11288 IMPLEMENT_JSON_SERIALIZATION()
11289 IMPLEMENT_JSON_DOCUMENTATION(EarGroupsConfiguration)
11290
11291 public:
11293 std::vector<Group> groups;
11294
11296 {
11297 clear();
11298 }
11299
11300 void clear()
11301 {
11302 groups.clear();
11303 }
11304 };
11305
11306 static void to_json(nlohmann::json& j, const EarGroupsConfiguration& p)
11307 {
11308 j = nlohmann::json{
11309 TOJSON_IMPL(groups)
11310 };
11311 }
11312 static void from_json(const nlohmann::json& j, EarGroupsConfiguration& p)
11313 {
11314 p.clear();
11315 getOptional<std::vector<Group>>("groups", p.groups, j);
11316 }
11317
11318 //-----------------------------------------------------------
11319 JSON_SERIALIZED_CLASS(EarServerStatusReportConfiguration)
11330 {
11331 IMPLEMENT_JSON_SERIALIZATION()
11332 IMPLEMENT_JSON_DOCUMENTATION(EarServerStatusReportConfiguration)
11333
11334 public:
11336 std::string fileName;
11337
11340
11343
11345 std::string runCmd;
11346
11349
11351 {
11352 clear();
11353 }
11354
11355 void clear()
11356 {
11357 fileName.clear();
11358 intervalSecs = 60;
11359 enabled = false;
11360 includeGroupDetail = false;
11361 runCmd.clear();
11362 }
11363 };
11364
11365 static void to_json(nlohmann::json& j, const EarServerStatusReportConfiguration& p)
11366 {
11367 j = nlohmann::json{
11368 TOJSON_IMPL(fileName),
11369 TOJSON_IMPL(intervalSecs),
11370 TOJSON_IMPL(enabled),
11371 TOJSON_IMPL(includeGroupDetail),
11372 TOJSON_IMPL(runCmd)
11373 };
11374 }
11375 static void from_json(const nlohmann::json& j, EarServerStatusReportConfiguration& p)
11376 {
11377 p.clear();
11378 getOptional<std::string>("fileName", p.fileName, j);
11379 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
11380 getOptional<bool>("enabled", p.enabled, j, false);
11381 getOptional<std::string>("runCmd", p.runCmd, j);
11382 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
11383 }
11384
11385 //-----------------------------------------------------------
11386 JSON_SERIALIZED_CLASS(EarServerInternals)
11399 {
11400 IMPLEMENT_JSON_SERIALIZATION()
11401 IMPLEMENT_JSON_DOCUMENTATION(EarServerInternals)
11402
11403 public:
11406
11409
11412
11414 {
11415 clear();
11416 }
11417
11418 void clear()
11419 {
11420 watchdog.clear();
11421 tuning.clear();
11422 housekeeperIntervalMs = 1000;
11423 }
11424 };
11425
11426 static void to_json(nlohmann::json& j, const EarServerInternals& p)
11427 {
11428 j = nlohmann::json{
11429 TOJSON_IMPL(watchdog),
11430 TOJSON_IMPL(housekeeperIntervalMs),
11431 TOJSON_IMPL(tuning)
11432 };
11433 }
11434 static void from_json(const nlohmann::json& j, EarServerInternals& p)
11435 {
11436 p.clear();
11437 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
11438 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
11439 getOptional<TuningSettings>("tuning", p.tuning, j);
11440 }
11441
11442 //-----------------------------------------------------------
11443 JSON_SERIALIZED_CLASS(EarServerConfiguration)
11453 {
11454 IMPLEMENT_JSON_SERIALIZATION()
11455 IMPLEMENT_JSON_DOCUMENTATION(EarServerConfiguration)
11456
11457 public:
11458
11460 std::string id;
11461
11464
11467
11470
11473
11476
11479
11482
11485
11488
11491
11494
11497
11500
11502 {
11503 clear();
11504 }
11505
11506 void clear()
11507 {
11508 id.clear();
11509 serviceConfigurationFileCheckSecs = 60;
11510 groupsConfigurationFileName.clear();
11511 groupsConfigurationFileCommand.clear();
11512 groupsConfigurationFileCheckSecs = 60;
11513 statusReport.clear();
11514 externalHealthCheckResponder.clear();
11515 internals.clear();
11516 certStoreFileName.clear();
11517 certStorePasswordHex.clear();
11518 enginePolicy.clear();
11519 configurationCheckSignalName = "rts.9a164fa.${id}";
11520 fipsCrypto.clear();
11521 nsm.clear();
11522 }
11523 };
11524
11525 static void to_json(nlohmann::json& j, const EarServerConfiguration& p)
11526 {
11527 j = nlohmann::json{
11528 TOJSON_IMPL(id),
11529 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
11530 TOJSON_IMPL(groupsConfigurationFileName),
11531 TOJSON_IMPL(groupsConfigurationFileCommand),
11532 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
11533 TOJSON_IMPL(statusReport),
11534 TOJSON_IMPL(externalHealthCheckResponder),
11535 TOJSON_IMPL(internals),
11536 TOJSON_IMPL(certStoreFileName),
11537 TOJSON_IMPL(certStorePasswordHex),
11538 TOJSON_IMPL(enginePolicy),
11539 TOJSON_IMPL(configurationCheckSignalName),
11540 TOJSON_IMPL(fipsCrypto),
11541 TOJSON_IMPL(nsm)
11542 };
11543 }
11544 static void from_json(const nlohmann::json& j, EarServerConfiguration& p)
11545 {
11546 p.clear();
11547 getOptional<std::string>("id", p.id, j);
11548 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
11549 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
11550 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
11551 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
11552 getOptional<EarServerStatusReportConfiguration>("statusReport", p.statusReport, j);
11553 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
11554 getOptional<EarServerInternals>("internals", p.internals, j);
11555 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
11556 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
11557 j.at("enginePolicy").get_to(p.enginePolicy);
11558 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
11559 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
11560 getOptional<NsmConfiguration>("nsm", p.nsm, j);
11561 }
11562
11563//-----------------------------------------------------------
11564 JSON_SERIALIZED_CLASS(EngageSemGroupsConfiguration)
11575 {
11576 IMPLEMENT_JSON_SERIALIZATION()
11577 IMPLEMENT_JSON_DOCUMENTATION(EngageSemGroupsConfiguration)
11578
11579 public:
11581 std::vector<Group> groups;
11582
11584 {
11585 clear();
11586 }
11587
11588 void clear()
11589 {
11590 groups.clear();
11591 }
11592 };
11593
11594 static void to_json(nlohmann::json& j, const EngageSemGroupsConfiguration& p)
11595 {
11596 j = nlohmann::json{
11597 TOJSON_IMPL(groups)
11598 };
11599 }
11600 static void from_json(const nlohmann::json& j, EngageSemGroupsConfiguration& p)
11601 {
11602 p.clear();
11603 getOptional<std::vector<Group>>("groups", p.groups, j);
11604 }
11605
11606 //-----------------------------------------------------------
11607 JSON_SERIALIZED_CLASS(EngageSemServerStatusReportConfiguration)
11618 {
11619 IMPLEMENT_JSON_SERIALIZATION()
11620 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerStatusReportConfiguration)
11621
11622 public:
11624 std::string fileName;
11625
11628
11631
11633 std::string runCmd;
11634
11637
11639 {
11640 clear();
11641 }
11642
11643 void clear()
11644 {
11645 fileName.clear();
11646 intervalSecs = 60;
11647 enabled = false;
11648 includeGroupDetail = false;
11649 runCmd.clear();
11650 }
11651 };
11652
11653 static void to_json(nlohmann::json& j, const EngageSemServerStatusReportConfiguration& p)
11654 {
11655 j = nlohmann::json{
11656 TOJSON_IMPL(fileName),
11657 TOJSON_IMPL(intervalSecs),
11658 TOJSON_IMPL(enabled),
11659 TOJSON_IMPL(includeGroupDetail),
11660 TOJSON_IMPL(runCmd)
11661 };
11662 }
11663 static void from_json(const nlohmann::json& j, EngageSemServerStatusReportConfiguration& p)
11664 {
11665 p.clear();
11666 getOptional<std::string>("fileName", p.fileName, j);
11667 getOptional<int>("intervalSecs", p.intervalSecs, j, 60);
11668 getOptional<bool>("enabled", p.enabled, j, false);
11669 getOptional<std::string>("runCmd", p.runCmd, j);
11670 getOptional<bool>("includeGroupDetail", p.includeGroupDetail, j, false);
11671 }
11672
11673 //-----------------------------------------------------------
11674 JSON_SERIALIZED_CLASS(EngageSemServerInternals)
11687 {
11688 IMPLEMENT_JSON_SERIALIZATION()
11689 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerInternals)
11690
11691 public:
11694
11697
11700
11702 {
11703 clear();
11704 }
11705
11706 void clear()
11707 {
11708 watchdog.clear();
11709 tuning.clear();
11710 housekeeperIntervalMs = 1000;
11711 }
11712 };
11713
11714 static void to_json(nlohmann::json& j, const EngageSemServerInternals& p)
11715 {
11716 j = nlohmann::json{
11717 TOJSON_IMPL(watchdog),
11718 TOJSON_IMPL(housekeeperIntervalMs),
11719 TOJSON_IMPL(tuning)
11720 };
11721 }
11722 static void from_json(const nlohmann::json& j, EngageSemServerInternals& p)
11723 {
11724 p.clear();
11725 getOptional<WatchdogSettings>("watchdog", p.watchdog, j);
11726 getOptional<int>("housekeeperIntervalMs", p.housekeeperIntervalMs, j, 1000);
11727 getOptional<TuningSettings>("tuning", p.tuning, j);
11728 }
11729
11730 //-----------------------------------------------------------
11731 JSON_SERIALIZED_CLASS(EngageSemServerConfiguration)
11741 {
11742 IMPLEMENT_JSON_SERIALIZATION()
11743 IMPLEMENT_JSON_DOCUMENTATION(EngageSemServerConfiguration)
11744
11745 public:
11746
11748 std::string id;
11749
11752
11755
11758
11761
11764
11767
11770
11773
11776
11779
11782
11785
11788
11789 int maxQueueLen;
11790 int minQueuingMs;
11791 int maxQueuingMs;
11792 int minPriority;
11793 int maxPriority;
11794
11796 {
11797 clear();
11798 }
11799
11800 void clear()
11801 {
11802 id.clear();
11803 serviceConfigurationFileCheckSecs = 60;
11804 groupsConfigurationFileName.clear();
11805 groupsConfigurationFileCommand.clear();
11806 groupsConfigurationFileCheckSecs = 60;
11807 statusReport.clear();
11808 externalHealthCheckResponder.clear();
11809 internals.clear();
11810 certStoreFileName.clear();
11811 certStorePasswordHex.clear();
11812 enginePolicy.clear();
11813 configurationCheckSignalName = "rts.9a164fa.${id}";
11814 fipsCrypto.clear();
11815 nsm.clear();
11816
11817 maxQueueLen = 64;
11818 minQueuingMs = 0;
11819 maxQueuingMs = 15000;
11820 minPriority = 0;
11821 maxPriority = 255;
11822 }
11823 };
11824
11825 static void to_json(nlohmann::json& j, const EngageSemServerConfiguration& p)
11826 {
11827 j = nlohmann::json{
11828 TOJSON_IMPL(id),
11829 TOJSON_IMPL(serviceConfigurationFileCheckSecs),
11830 TOJSON_IMPL(groupsConfigurationFileName),
11831 TOJSON_IMPL(groupsConfigurationFileCommand),
11832 TOJSON_IMPL(groupsConfigurationFileCheckSecs),
11833 TOJSON_IMPL(statusReport),
11834 TOJSON_IMPL(externalHealthCheckResponder),
11835 TOJSON_IMPL(internals),
11836 TOJSON_IMPL(certStoreFileName),
11837 TOJSON_IMPL(certStorePasswordHex),
11838 TOJSON_IMPL(enginePolicy),
11839 TOJSON_IMPL(configurationCheckSignalName),
11840 TOJSON_IMPL(fipsCrypto),
11841 TOJSON_IMPL(nsm),
11842 TOJSON_IMPL(maxQueueLen),
11843 TOJSON_IMPL(minQueuingMs),
11844 TOJSON_IMPL(maxQueuingMs),
11845 TOJSON_IMPL(minPriority),
11846 TOJSON_IMPL(maxPriority)
11847 };
11848 }
11849 static void from_json(const nlohmann::json& j, EngageSemServerConfiguration& p)
11850 {
11851 p.clear();
11852 getOptional<std::string>("id", p.id, j);
11853 getOptional<int>("serviceConfigurationFileCheckSecs", p.serviceConfigurationFileCheckSecs, j, 60);
11854 getOptional<std::string>("groupsConfigurationFileName", p.groupsConfigurationFileName, j);
11855 getOptional<std::string>("groupsConfigurationFileCommand", p.groupsConfigurationFileCommand, j);
11856 getOptional<int>("groupsConfigurationFileCheckSecs", p.groupsConfigurationFileCheckSecs, j, 60);
11857 getOptional<EngageSemServerStatusReportConfiguration>("statusReport", p.statusReport, j);
11858 getOptional<ExternalHealthCheckResponder>("externalHealthCheckResponder", p.externalHealthCheckResponder, j);
11859 getOptional<EngageSemServerInternals>("internals", p.internals, j);
11860 getOptional<std::string>("certStoreFileName", p.certStoreFileName, j);
11861 getOptional<std::string>("certStorePasswordHex", p.certStorePasswordHex, j);
11862 j.at("enginePolicy").get_to(p.enginePolicy);
11863 getOptional<std::string>("configurationCheckSignalName", p.configurationCheckSignalName, j, "rts.9a164fa.${id}");
11864 getOptional<FipsCryptoSettings>("fipsCrypto", p.fipsCrypto, j);
11865 getOptional<NsmConfiguration>("nsm", p.nsm, j);
11866 getOptional<int>("maxQueueLen", p.maxQueueLen, j, 64);
11867 getOptional<int>("minQueuingMs", p.minQueuingMs, j, 0);
11868 getOptional<int>("maxQueuingMs", p.maxQueuingMs, j, 15000);
11869 getOptional<int>("minPriority", p.minPriority, j, 0);
11870 getOptional<int>("maxPriority", p.maxPriority, j, 255);
11871 }
11872
11873 //-----------------------------------------------------------
11874 static inline void dumpExampleConfigurations(const char *path)
11875 {
11876 WatchdogSettings::document();
11877 FileRecordingRequest::document();
11878 Feature::document();
11879 Featureset::document();
11880 Agc::document();
11881 RtpPayloadTypeTranslation::document();
11882 NetworkInterfaceDevice::document();
11883 ListOfNetworkInterfaceDevice::document();
11884 RtpHeader::document();
11885 BlobInfo::document();
11886 TxAudioUri::document();
11887 AdvancedTxParams::document();
11888 Identity::document();
11889 Location::document();
11890 Power::document();
11891 Connectivity::document();
11892 PresenceDescriptorGroupItem::document();
11893 PresenceDescriptor::document();
11894 NetworkTxOptions::document();
11895 TcpNetworkTxOptions::document();
11896 NetworkAddress::document();
11897 NetworkAddressRxTx::document();
11898 NetworkAddressRestrictionList::document();
11899 StringRestrictionList::document();
11900 Rallypoint::document();
11901 RallypointCluster::document();
11902 NetworkDeviceDescriptor::document();
11903 TxAudio::document();
11904 AudioDeviceDescriptor::document();
11905 ListOfAudioDeviceDescriptor::document();
11906 Audio::document();
11907 TalkerInformation::document();
11908 GroupTalkers::document();
11909 Presence::document();
11910 Advertising::document();
11911 GroupPriorityTranslation::document();
11912 GroupTimeline::document();
11913 GroupAppTransport::document();
11914 RtpProfile::document();
11915 Group::document();
11916 Mission::document();
11917 LicenseDescriptor::document();
11918 EngineNetworkingRpUdpStreaming::document();
11919 EnginePolicyNetworking::document();
11920 Aec::document();
11921 Vad::document();
11922 Bridge::document();
11923 AndroidAudio::document();
11924 EnginePolicyAudio::document();
11925 SecurityCertificate::document();
11926 EnginePolicySecurity::document();
11927 EnginePolicyLogging::document();
11928 EnginePolicyDatabase::document();
11929 NamedAudioDevice::document();
11930 EnginePolicyNamedAudioDevices::document();
11931 Licensing::document();
11932 DiscoveryMagellan::document();
11933 DiscoverySsdp::document();
11934 DiscoverySap::document();
11935 DiscoveryCistech::document();
11936 DiscoveryTrellisware::document();
11937 DiscoveryConfiguration::document();
11938 EnginePolicyInternals::document();
11939 EnginePolicyTimelines::document();
11940 RtpMapEntry::document();
11941 ExternalModule::document();
11942 ExternalCodecDescriptor::document();
11943 EnginePolicy::document();
11944 TalkgroupAsset::document();
11945 EngageDiscoveredGroup::document();
11946 RallypointPeer::document();
11947 RallypointServerLimits::document();
11948 RallypointServerStatusReportConfiguration::document();
11949 RallypointServerLinkGraph::document();
11950 ExternalHealthCheckResponder::document();
11951 Tls::document();
11952 PeeringConfiguration::document();
11953 IgmpSnooping::document();
11954 RallypointReflector::document();
11955 RallypointUdpStreaming::document();
11956 RallypointServer::document();
11957 PlatformDiscoveredService::document();
11958 TimelineQueryParameters::document();
11959 CertStoreCertificate::document();
11960 CertStore::document();
11961 CertStoreCertificateElement::document();
11962 CertStoreDescriptor::document();
11963 CertificateDescriptor::document();
11964 BridgeCreationDetail::document();
11965 GroupConnectionDetail::document();
11966 GroupTxDetail::document();
11967 GroupCreationDetail::document();
11968 GroupReconfigurationDetail::document();
11969 GroupHealthReport::document();
11970 InboundProcessorStats::document();
11971 TrafficCounter::document();
11972 GroupStats::document();
11973 RallypointConnectionDetail::document();
11974 BridgingConfiguration::document();
11975 BridgingServerStatusReportConfiguration::document();
11976 BridgingServerInternals::document();
11977 BridgingServerConfiguration::document();
11978 EarGroupsConfiguration::document();
11979 EarServerStatusReportConfiguration::document();
11980 EarServerInternals::document();
11981 EarServerConfiguration::document();
11982 RangerPackets::document();
11983 TransportImpairment::document();
11984
11985 EngageSemGroupsConfiguration::document();
11986 EngageSemServerStatusReportConfiguration::document();
11987 EngageSemServerInternals::document();
11988 EngageSemServerConfiguration::document();
11989 }
11990}
11991
11992#ifndef WIN32
11993 #pragma GCC diagnostic pop
11994#endif
11995
11996#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 curves
[Optional] Specifies the NIST-approved curves to be used for FIPS
std::string path
Path where the crypto engine module is located
std::string ciphers
[Optional] Specifies the NIST-approved ciphers to be used for FIPS
Configuration for the optional custom transport functionality for Group.
bool enabled
[Optional, Default: false] Enables custom feature.
std::string id
The id/name of the transport. This must match the id/name supplied when registering the app transport...
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.
int queryIntervalMs
[Optional, Default 125000] Interval between sending IGMP membership queries. If 0,...
int subscriptionTimeoutMs
[Optional, Default 0] Typically calculated according to RFC specifications. Set a value here to manua...
bool enabled
Enables IGMP. Default is false.
Detailed statistics for an inbound processor.
Helper class for serializing and deserializing the LicenseDescriptor JSON.
std::string entitlement
Entitlement key to use for the product.
std::string cargo
Reserved for internal use.
std::string manufacturerId
[Read only] Manufacturer ID.
std::string key
License Key to be used for the application.
uint8_t cargoFlags
Reserved for internal use.
int type
[Read only] 0 = unknown, 1 = perpetual, 2 = expires
std::string deviceId
[Read only] Unique device identifier generated by the Engine.
time_t expires
[Read only] The time that the license key or activation code expires in Unix timestamp - Zulu/UTC.
std::string activationCode
If the key required activation, this is the activation code generated using the entitlement,...
std::string expiresFormatted
[Read only] The time that the license key or activation code expires formatted in ISO 8601 format,...
std::string deviceId
Device Identifier. See LicenseDescriptor::deviceId for details.
std::string manufacturerId
Manufacturer ID to use for the product. See LicenseDescriptor::manufacturerId for details.
std::string activationCode
Activation Code issued for the license key. See LicenseDescriptor::activationCode for details.
std::string key
License key. See LicenseDescriptor::key for details.
std::string entitlement
Entitlement key to use for the product. See LicenseDescriptor::entitlement for details.
std::vector< Group > groups
Array of groups in the configuration.
std::vector< VoiceToVoiceSession > voiceToVoiceSessions
Array of voiceToVoice sessions in the configuration.
Configuration for the linguistics server.
LingoServerStatusReportConfiguration statusReport
Details for producing a status report.
std::string lingoConfigurationFileName
Name of a file containing the linguistics configuration.
std::string configurationCheckSignalName
Name to use for signalling a configuration check.
std::string id
A unqiue identifier for the linguistics server.
ExternalHealthCheckResponder externalHealthCheckResponder
Details concerning the server's interaction with an external health-checker such as a load-balancer.
NsmConfiguration nsm
[Optional] Settings for NSM.
std::string certStorePasswordHex
Hex password for the certificate store (if any)
std::string lingoConfigurationFileCommand
Command-line to execute that returns a linguistics configuration.
LingoServerInternals internals
Internal settings.
EnginePolicy enginePolicy
The policy to be used for the underlying Engage Engine.
int lingoConfigurationFileCheckSecs
Number of seconds between checks to see if the linguistics configuration has been updated....
std::string certStoreFileName
Path to the certificate store.
FipsCryptoSettings fipsCrypto
[Optional] Settings for the FIPS crypto.
NetworkAddress proxy
Address and port of the proxy.
int serviceConfigurationFileCheckSecs
Number of seconds between checks to see if the service configuration has been updated....
int housekeeperIntervalMs
[Optional, Default: 1000] Interval at which to run the housekeeper thread.
WatchdogSettings watchdog
[Optional] Settings for the watchdog.
TuningSettings tuning
[Optional] Low-level tuning
TODO: Configuration for the translation server status report file.
Location information used as part of the PresenceDescriptor.
double longitude
Its the longitudinal position using the Signed degrees format (DDD.dddd) format. Valid range is -180 ...
double altitude
[Optional, Default: INVALID_LOCATION_VALUE] The altitude above sea level in meters.
uint32_t ts
[Read Only: Unix timestamp - Zulu/UTC] Indicates the timestamp that the location was recorded.
double latitude
Its the latitude position using the using the Signed degrees format (DDD.dddd). Valid range is -90 to...
double direction
[Optional, Default: INVALID_LOCATION_VALUE] Direction the endpoint is traveling in degrees....
double speed
[Optional, Default: INVALID_LOCATION_VALUE] The speed the endpoint is traveling at in meters per seco...
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.
float serverProcessingMs
Server processing time in milliseconds - used for roundtrip reports.
uint64_t msToNextConnectionAttempt
Milliseconds until next connection attempt.
Defines settings for Rallypoint extended group restrictions.
std::vector< StringRestrictionList > restrictions
Restrictions.
int transactionTimeoutMs
[Optional, Default 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...