13 #include <aws/iotdevice/device_defender.h>
22 namespace Iotdevicedefenderv1
70 void StopTask() noexcept;
75 int StartTask() noexcept;
84 void *cancellationUserdata;
89 int LastError() const noexcept {
return m_lastError; }
98 void RegisterCustomMetricNumber(
110 void RegisterCustomMetricNumberList(
123 void RegisterCustomMetricStringList(
135 void RegisterCustomMetricIpAddressList(
142 aws_iotdevice_defender_task_config *m_taskConfig;
143 aws_iotdevice_defender_task *m_owningTask;
145 std::shared_ptr<Crt::Mqtt::MqttConnection> m_mqttConnection;
150 std::shared_ptr<Crt::Mqtt::MqttConnection> mqttConnection,
154 uint32_t taskPeriodSeconds,
155 uint32_t networkConnectionSamplePeriodSeconds,
157 void *cancellationUserdata =
nullptr) noexcept;
159 static
void s_onDefenderV1TaskCancelled(
void *userData);
174 std::shared_ptr<Crt::Mqtt::MqttConnection> mqttConnection,
180 std::shared_ptr<Crt::Mqtt5::Mqtt5Client> mqtt5Client,
198 uint32_t networkConnectionSamplePeriodSeconds) noexcept;
208 ReportTaskBuilder &WithTaskCancellationUserData(
void *cancellationUserdata) noexcept;
213 std::shared_ptr<ReportTask> Build() noexcept;
217 std::shared_ptr<Crt::Mqtt::MqttConnection> m_mqttConnection;
221 uint32_t m_taskPeriodSeconds;
222 uint32_t m_networkConnectionSamplePeriodSeconds;
224 void *m_cancellationUserdata;