Verified Telemetry
FreeRTOS_vt_currentsense_component.h
Go to the documentation of this file.
1 /* Copyright (c) Microsoft Corporation.
2  Licensed under the MIT License. */
3 
6 #ifndef FREERTOS_VT_CURRENTSENSE_COMPONENT_H
7 #define FREERTOS_VT_CURRENTSENSE_COMPONENT_H
8 
9 #include "azure_iot_hub_client.h"
10 #include "azure_iot_json_reader.h"
11 #include "azure_iot_json_writer.h"
12 
13 #include "vt_cs_api.h"
14 
16 {
17  /* Name of this component */
18  UCHAR component_name_ptr[30];
19 
20  /* Component Name Length */
21  UINT component_name_length;
22 
23  /* Telemetry associated with the currentsense signature component*/
24  UCHAR associated_telemetry[100];
25 
26  /* Currentsense Object */
27  VT_CURRENTSENSE_OBJECT cs_object;
28 
29  /* Status of reported properties sent */
30  UINT property_sent;
31 
33 
34 AzureIoTResult_t FreeRTOS_vt_currentsense_init(FreeRTOS_VT_CURRENTSENSE_COMPONENT* handle,
35  UCHAR* component_name_ptr,
36  VT_DEVICE_DRIVER* device_driver,
37  VT_SENSOR_HANDLE* sensor_handle,
38  UCHAR* associated_telemetry,
39  CHAR* shared_buffer,
40  UINT shared_buffer_size);
41 
42 AzureIoTResult_t FreeRTOS_vt_currentsense_reported_properties(FreeRTOS_VT_CURRENTSENSE_COMPONENT* handle,
43  AzureIoTHubClient_t* xAzureIoTHubClient,
44  bool* device_status,
45  bool toggle_verified_telemetry);
46 
47 AzureIoTResult_t FreeRTOS_vt_currentsense_process_command(FreeRTOS_VT_CURRENTSENSE_COMPONENT* handle,
48  AzureIoTHubClient_t* xAzureIoTHubClient,
49  UCHAR* component_name_ptr,
50  UINT component_name_length,
51  UCHAR* pnp_command_name_ptr,
52  UINT pnp_command_name_length,
53  UINT* status_code);
54 
55 AzureIoTResult_t FreeRTOS_vt_currentsense_process_reported_property_sync(FreeRTOS_VT_CURRENTSENSE_COMPONENT* handle,
56  const UCHAR* component_name_ptr,
57  UINT component_name_length,
58  AzureIoTJSONReader_t* json_reader_ptr);
59 
60 AzureIoTResult_t FreeRTOS_vt_currentsense_signature_read(FreeRTOS_VT_CURRENTSENSE_COMPONENT* handle,
61  UCHAR* associated_telemetry,
62  UINT associated_telemetry_length,
63  bool toggle_verified_telemetry,UINT mode);
64 
65 AzureIoTResult_t FreeRTOS_vt_currentsense_signature_process(FreeRTOS_VT_CURRENTSENSE_COMPONENT* handle,
66  UCHAR* associated_telemetry,
67  UINT associated_telemetry_length,
68  bool toggle_verified_telemetry);
69 
70 bool FreeRTOS_vt_currentsense_fetch_telemetry_status(FreeRTOS_VT_CURRENTSENSE_COMPONENT* handle, bool toggle_verified_telemetry);
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 #endif /* FreeRTOS_VT_CURRENTSENSE_COMPONENT_H */
FreeRTOS_VT_CURRENTSENSE_COMPONENT_TAG
Definition: FreeRTOS_vt_currentsense_component.h:15