11 #include "iotcs_virtual_device.h"
19 #define MUTEX_TYPE Mutex
21 #define MUTEX_TYPE std::mutex
56 template <
typename T>
Alert&
set(
const std::string &attributeName,
const T& value)
throw(std::invalid_argument);
67 void raise(void)
throw(std::invalid_argument);
79 Alert(
VirtualDevice* device, iotcs_virtual_device_handle handler,
const std::string &alertName)
throw (std::invalid_argument);
80 static void onErrorCallback(
void* handler, iotcs_virtual_device_error_event *event);
83 iotcs_alert_handle handle;
85 static MUTEX_TYPE mapMutex;
86 static std::map<void*, std::pair<VirtualDevice*, ErrorCallback*> > onErrorCallbacks;
A callback interface for errors in delivery of messages.
Definition: AbstractVirtualDevice.hpp:152
virtual ~Alert()
Destructor.
Definition: VirtualDevice.hpp:38
Alert & set(const std::string &attributeName, const T &value)
Set the value of a field in the.
virtual void setOnError(ErrorCallback *callback)
Set a callback that is invoked if an error occurs when raising an.