65#ifndef ZIGPC_GATEWAY_CALL_HPP
66#define ZIGPC_GATEWAY_CALL_HPP
76#include <zigbee_host.h>
214 std::queue<std::shared_ptr<Entry>>
queue;
327 const uint8_t *report_record,
328 unsigned int record_size);
Call to track OTA image by the OTA server plugin.
Definition: zigpc_gateway_request_queue.hpp:381
sl_status_t invoke(void) override
Invoke/execute the ZigbeeHost call using the infomation stored in the object.
~AddOTAImageRequest() override=default
std::string filename
Definition: zigpc_gateway_request_queue.hpp:383
AddOTAImageRequest(std::string &filename)
Call to send one-way bind request from device to the gateway.
Definition: zigpc_gateway_request_queue.hpp:290
sl_status_t invoke(void) override
Invoke/execute the ZigbeeHost call using the infomation stored in the object.
zcl_cluster_id_t cluster_id
Definition: zigpc_gateway_request_queue.hpp:294
bool is_binding_req
Definition: zigpc_gateway_request_queue.hpp:297
BindingRequestRequest(const zigbee_eui64_t source_eui64, zigbee_endpoint_id_t source_endpoint_id, zcl_cluster_id_t cluster_id, const zigbee_eui64_t dest_eui64, zigbee_endpoint_id_t dest_endpoint_id, bool is_binding_req)
zigbee_endpoint_id_t dest_endpoint_id
Definition: zigpc_gateway_request_queue.hpp:296
~BindingRequestRequest() override=default
zigbee_eui64_t dest_eui64
Definition: zigpc_gateway_request_queue.hpp:295
zigbee_eui64_t source_eui64
Definition: zigpc_gateway_request_queue.hpp:292
zigbee_endpoint_id_t source_endpoint_id
Definition: zigpc_gateway_request_queue.hpp:293
Call to remove device on the network.
Definition: zigpc_gateway_request_queue.hpp:274
sl_status_t invoke(void) override
Invoke/execute the ZigbeeHost call using the infomation stored in the object.
DeviceRemoveRequest(const zigbee_eui64_t eui64)
~DeviceRemoveRequest() override=default
zigbee_eui64_t eui64
Definition: zigpc_gateway_request_queue.hpp:276
Call to interview device on the network.
Definition: zigpc_gateway_request_queue.hpp:240
~DiscoverDeviceRequest() override=default
sl_status_t invoke(void) override
Invoke/execute the ZigbeeHost call using the infomation stored in the object.
DiscoverDeviceRequest(const zigbee_eui64_t eui64)
zigbee_eui64_t eui64
Definition: zigpc_gateway_request_queue.hpp:242
Call to discover endpoint on the network.
Definition: zigpc_gateway_request_queue.hpp:256
DiscoverEndpointRequest(const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id)
sl_status_t invoke(void) override
Invoke/execute the ZigbeeHost call using the infomation stored in the object.
zigbee_eui64_t eui64
Definition: zigpc_gateway_request_queue.hpp:258
zigbee_endpoint_id_t endpoint_id
Definition: zigpc_gateway_request_queue.hpp:259
~DiscoverEndpointRequest() override=default
Call to initialize the network.
Definition: zigpc_gateway_request_queue.hpp:227
sl_status_t invoke(void) override
Invoke/execute the ZigbeeHost call using the infomation stored in the object.
~NetworkInitRequest() override=default
Base class used in the RequestQueue to invoke ZigbeeHost API calls.
Definition: zigpc_gateway_request_queue.hpp:126
const char * getLabel(void) const
Get the Name of the call.
virtual sl_status_t invoke(void)=0
Invoke/execute the ZigbeeHost call using the infomation stored in the object.
size_t getSendAttempts(void) const
Get the number of attempts made to send the message.
const char * label
Definition: zigpc_gateway_request_queue.hpp:127
size_t send_attempts
Definition: zigpc_gateway_request_queue.hpp:128
void incrementSendAttempt(void)
Increment send attempts.
The singleton ZigbeeHost Request Queue responsible for storing and dispatching calls.
Definition: zigpc_gateway_request_queue.hpp:86
bool dispatching_allowed
Definition: zigpc_gateway_request_queue.hpp:217
static const size_t DEFER_CYCLES_DEFAULT
Number of cycles to defer under normal circumstances. This is used to increase/decrease the number of...
Definition: zigpc_gateway_request_queue.hpp:94
static const size_t DEFER_CYCLES_START_BACKOFF
Number of cycles to defer when the queue is allowed to send requests either on init or post reset.
Definition: zigpc_gateway_request_queue.hpp:103
static const size_t DEFER_CYCLES_LOST_CONNECTION
Number of cycles to defer when a return status is indicative of a lost connection to the NCP.
Definition: zigpc_gateway_request_queue.hpp:112
void stopDispatching()
Prevent sending any ZigbeeHost requests due to the NCP being reset.
std::queue< std::shared_ptr< Entry > > queue
Definition: zigpc_gateway_request_queue.hpp:214
sl_status_t dispatch(void)
Dispatch a EmberAf/ZigbeeHost call from the queue.
void operator=(const RequestQueue &)=delete
void startDispatching(void)
Configure queue to allow sending ZigbeeHost requests.
size_t defer_cycles
Definition: zigpc_gateway_request_queue.hpp:215
RequestQueue(RequestQueue &other)=delete
static const size_t DEFER_CYCLES_MESSAGE_LIMIT_REACHED
Number of defer cycles when too many messages are in-flight on the network.
Definition: zigpc_gateway_request_queue.hpp:119
void enqueue(std::shared_ptr< Entry > call)
Store call data to the queue that is used to dispatch calls to EmberAf/ZigbeeHost API.
static RequestQueue & getInstance()
Retrieve singleton instance.
Call to send generic ZCL frame to a Zigbee Group on the network.
Definition: zigpc_gateway_request_queue.hpp:361
ZCLFrameMulticastRequest(zigbee_group_id_t group_id, zcl_cluster_id_t cluster_id, const zcl_frame_t &frame)
sl_status_t invoke(void) override
Invoke/execute the ZigbeeHost call using the infomation stored in the object.
zigbee_group_id_t group_id
Definition: zigpc_gateway_request_queue.hpp:363
const zcl_frame_t frame
Definition: zigpc_gateway_request_queue.hpp:365
~ZCLFrameMulticastRequest() override=default
zcl_cluster_id_t cluster_id
Definition: zigpc_gateway_request_queue.hpp:364
Call to send generic ZCL frame to device on the network.
Definition: zigpc_gateway_request_queue.hpp:339
zigbee_endpoint_id_t endpoint_id
Definition: zigpc_gateway_request_queue.hpp:342
ZCLFrameUnicastRequest(const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_id_t cluster_id, const zcl_frame_t &frame)
zigbee_eui64_t eui64
Definition: zigpc_gateway_request_queue.hpp:341
~ZCLFrameUnicastRequest() override=default
const zcl_frame_t frame
Definition: zigpc_gateway_request_queue.hpp:344
zcl_cluster_id_t cluster_id
Definition: zigpc_gateway_request_queue.hpp:343
sl_status_t invoke(void) override
Invoke/execute the ZigbeeHost call using the infomation stored in the object.
uint8_t zigbee_eui64_t[ZIGBEE_EUI64_SIZE]
Zigbee Device EUI64 ID.
Definition: zigpc_common_zigbee.h:193
uint16_t zcl_cluster_id_t
A representation of the endpoint cluster id used in ZCL.
Definition: zigpc_common_zigbee.h:254
uint16_t zigbee_group_id_t
Zigbee Group Id The internal representation of a group_id.
Definition: zigpc_common_zigbee.h:230
uint8_t zigbee_endpoint_id_t
A representation of the endpoint id used on the Zigbee protocol.
Definition: zigpc_common_zigbee.h:248
Definition: zigpc_gateway_request_queue.hpp:79
Definition: zigpc_common_zigbee.h:293