nx_server_plugin_sdk  1.0
Server Plugin SDK
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
nx::sdk::cloud_storage::MotionFilter Struct Reference

#include <data.h>

Public Member Functions

 MotionFilter (const char *jsonData) noexcept(false)
 
 MotionFilter (const nx::kit::Json &json) noexcept(false)
 
template<typename T >
 MotionFilter (const T &)=delete
 
bool operator== (const MotionFilter &) const
 
nx::kit::Json to_json () const
 

Static Public Member Functions

static ValueOrError< MotionFilterfromJson (const char *jsonStr) noexcept
 
static ValueOrError< MotionFilterfromJson (const nx::kit::Json &json) noexcept
 

Public Attributes

std::vector< std::string > deviceIds
 
TimePeriod timePeriod
 
std::vector< Rectregions
 
std::optional< int > limit
 
SortOrder order = SortOrder::ascending
 
std::chrono::milliseconds detailLevel
 

Detailed Description

This filter will be passed to the Plugin when motion is queried by the Server. For processing example, refer to nx/sdk/cloud_storage/algorithm.cpp.

Member Data Documentation

◆ detailLevel

std::chrono::milliseconds nx::sdk::cloud_storage::MotionFilter::detailLevel

If distance between two time periods less than this value, then those periods must be merged ignoring the gap.

◆ limit

std::optional<int> nx::sdk::cloud_storage::MotionFilter::limit

Maximum number of objects to return.

◆ order

SortOrder nx::sdk::cloud_storage::MotionFilter::order = SortOrder::ascending

Found periods are sorted by the start timestamp using this order.

◆ regions

std::vector<Rect> nx::sdk::cloud_storage::MotionFilter::regions

Regions of screen which should be matched against the motion data.

Motion matches if motion.data intersected with any of rectangles in regions contains at least one cell of motion i.e. the corresponding bit in the motion.data is set to 1.


The documentation for this struct was generated from the following files: