6 #include <condition_variable> 12 #include <nx/sdk/analytics/helpers/consuming_device_agent.h> 13 #include <nx/sdk/analytics/i_event_metadata.h> 18 namespace vms_server_plugins {
25 const std::string kDeclareAdditionalEventTypesSetting =
"declareAdditionalEventTypesSetting";
26 const std::string kGenerateEventsSetting =
"generateEvents";
35 virtual void doSetNeededMetadataTypes(
39 virtual std::string manifestString()
const override;
46 int64_t usSinceEpoch()
const;
48 void stopFetchingMetadata();
50 void eventThreadLoop();
51 void startEventThread();
52 void stopEventThread();
55 std::unique_ptr<std::thread> m_eventThread;
56 std::mutex m_eventThreadMutex;
57 std::condition_variable m_eventThreadCondition;
58 std::atomic<bool> m_terminated{
false};
59 std::atomic<bool> m_needToGenerateEvents{
false};
60 std::string m_eventTypeId;
62 struct DeviceAgentSettings
64 std::atomic<bool> declareAdditionalEventTypes{
false};
65 std::atomic<bool> generateEvents{
true};
68 DeviceAgentSettings m_deviceAgentSettings;
72 int currentEventTypeIndex = 0;
77 EventContext m_eventContext;
80 const std::string kLineCrossingEventType =
"nx.stub.lineCrossing";
81 const std::string kObjectInTheAreaEventType =
"nx.stub.objectInTheArea";
82 const std::string kLoiteringEventType =
"nx.stub.loitering";
83 const std::string kIntrusionEventType =
"nx.stub.intrusion";
84 const std::string kGunshotEventType =
"nx.stub.gunshot";
85 const std::string kSuspiciousNoiseEventType =
"nx.stub.suspiciousNoise";
86 const std::string kSoundRelatedEventGroup =
"nx.stub.soundRelated";
87 const std::string kAdditionalEventType =
"nx.stub.additionalEvent1";
88 const std::string kAdditionalEventType2 =
"nx.stub.additionalEvent2";
89 const std::string kEventWithImageEventType =
"nx.stub.eventWithImage";
90 const auto kMixedEventGroup =
"nx.stub.mixed"s;
91 const auto kInstantEventType =
"nx.stub.instant"s;
92 const auto kProlongedEventType =
"nx.stub.prolonged"s;
Definition: consuming_device_agent.h:36
Definition: i_device_info.h:13
Definition: device_agent.h:28
Definition: apple_utils.h:6