nx_server_plugin_sdk 1.0 Server Plugin SDK

time_periods.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2
3 #pragma once
4
5 #include <list>
6 #include <utility>
7
8 #include <camera/camera_plugin.h>
9 #include <plugins/plugin_tools.h>
10
11 class TimePeriods
12 :
13 public nxcip::TimePeriods
14 {
15 public:
16 typedef std::list<std::pair<nxcip::UsecUTCTimestamp, nxcip::UsecUTCTimestamp> > container_type;
17 container_type timePeriods;
18
19 TimePeriods();
20
22 virtual void* queryInterface( const nxpl::NX_GUID& interfaceID ) override;
24 virtual int addRef() const override;
26 virtual int releaseRef() const override;
27
29 virtual bool get( nxcip::UsecUTCTimestamp* start, nxcip::UsecUTCTimestamp* end ) const override;
31 virtual void goToBeginning() override;
33 virtual bool next() override;
35 virtual bool atEnd() const override;
36
37 private:
38 nxpt::CommonRefManager m_refManager;
39 container_type::const_iterator m_pos;
40 };
TimePeriods
Definition: time_periods.h:11
TimePeriods::goToBeginning
virtual void goToBeginning() override
Implementation of nxcip::TimePeriods::goToBeginning.
Definition: time_periods.cpp:44
nxpl::NX_GUID
GUID of plugin interface.
Definition: plugin_api.h:26
TimePeriods::atEnd
virtual bool atEnd() const override
Implementation of nxcip::TimePeriods::atEnd.
Definition: time_periods.cpp:54
TimePeriods::addRef
virtual int addRef() const override
Implementation of nxpl::PluginInterface::addRef.
Definition: time_periods.cpp:23
TimePeriods::releaseRef
virtual int releaseRef() const override
Implementation of nxpl::PluginInterface::releaseRef.
Definition: time_periods.cpp:29
TimePeriods::queryInterface
virtual void * queryInterface(const nxpl::NX_GUID &interfaceID) override
Implementation of nxpl::PluginInterface::queryInterface.
Definition: time_periods.cpp:12
nxpt::CommonRefManager
Definition: plugin_tools.h:67
plugin_tools.h
TimePeriods::next
virtual bool next() override
Implementation of nxcip::TimePeriods::next.
Definition: time_periods.cpp:49
nxcip::TimePeriods
Array of time periods.
Definition: camera_plugin.h:687