Class EventsManager
Defined in File EventsManager.hpp
Nested Relationships
Nested Types
Class Documentation
-
class EventsManager
Public Functions
-
explicit EventsManager(bool uploadCachedOnStart = false)
-
~EventsManager()
-
bool sendEvent(const std::string &name, const std::vector<std::string> &tags = {}, const std::unordered_map<std::string, std::string> &extras = {}, const std::string &deviceSerialNo = "", const std::vector<std::string> &associateFiles = {})
Send an event to the events service
- Parameters:
name – Name of the event
tags – List of tags to send
extras – Extra data to send
deviceSerialNo – Device serial number
associateFiles – List of associate files with ids
- Returns:
bool
Send a snap to the events service. Snaps should be used for sending images and other files.
Send a snap to the events service, with an ImgFrame and ImgDetections pair as files
- Parameters:
name – Name of the snap
fileName – File name used to create FileData
imgFrame – ImgFrame to send
imgDetections – ImgDetections to sent
tags – List of tags to send
extras – Extra data to send
deviceSerialNo – Device serial number
- Returns:
bool
-
void setToken(const std::string &token)
Set the token for the events service. By default, the token is taken from the environment variable DEPTHAI_HUB_API_KEY
- Parameters:
token – Token for the events service
- Returns:
void
-
void setLogResponse(bool logResponse)
Set whether to log the responses from the server. By default, logResponse is set to false
- Parameters:
logResponse – bool
- Returns:
void
-
void setVerifySsl(bool verifySsl)
Set whether to verify the SSL certificate. By default, verifySsl is set to false
- Parameters:
verifySsl – bool
- Returns:
void
-
void setCacheDir(const std::string &cacheDir)
Set the cache directory for storing cached data. By default, the cache directory is set to /internal/private
- Parameters:
cacheDir – Cache directory
- Returns:
void
-
void setCacheIfCannotSend(bool cacheIfCannotSend)
Set whether to cache data if it cannot be sent. By default, cacheIfCannotSend is set to false
- Parameters:
cacheIfCannotSend – bool
- Returns:
void
-
explicit EventsManager(bool uploadCachedOnStart = false)