Verified Telemetry
nx_vt_fallcurve_component.h
Go to the documentation of this file.
1 /* Copyright (c) Microsoft Corporation.
2  Licensed under the MIT License. */
3 
6 #ifndef NX_VT_FALLCURVE_COMPONENT_H
7 #define NX_VT_FALLCURVE_COMPONENT_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 #include "nx_azure_iot_json_reader.h"
14 #include "nx_azure_iot_json_writer.h"
15 #include "nx_azure_iot_pnp_client.h"
16 
17 #include "vt_fc_api.h"
18 
20 {
21  /* Name of this component */
22  UCHAR component_name_ptr[VT_COMPONENT_NAME_MAX_LENGTH];
23 
24  /* Component Name Length */
25  UINT component_name_length;
26 
27  /* Telemetry associated with the fallcurve signature component*/
28  UCHAR associated_telemetry[VT_ASSOCIATED_TELEMETRY_CSV_MAX_LENGTH];
29 
30  /* Status of the telemetry associated with the fallcurve signature component*/
31  bool telemetry_status;
32 
33  /* Fallcurve Object */
34  VT_FALLCURVE_OBJECT fc_object;
35 
36  /* Status of reported properties sent */
37  UINT property_sent;
38 
39  /* Stores on the scale of 0-100 how much Fingerprint Template can be trusted */
40  UINT template_confidence_metric;
41 
42  /* Compute sensor status when a global command is issued */
43  bool telemetry_status_auto_update;
44 
46 
60  UCHAR* component_name_ptr,
61  VT_DEVICE_DRIVER* device_driver,
62  VT_SENSOR_HANDLE* sensor_handle,
63  UCHAR* associated_telemetry,
64  bool telemetry_status_auto_update);
65 
77  NX_VT_FALLCURVE_COMPONENT* handle, NX_AZURE_IOT_PNP_CLIENT* iotpnp_client_ptr, bool* device_status);
78 
88 UINT nx_vt_fallcurve_fingerprint_type_property(NX_VT_FALLCURVE_COMPONENT* handle, NX_AZURE_IOT_PNP_CLIENT* iotpnp_client_ptr);
89 
107  NX_AZURE_IOT_PNP_CLIENT* iotpnp_client_ptr,
108  UCHAR* component_name_ptr,
109  UINT component_name_length,
110  UCHAR* pnp_command_name_ptr,
111  UINT pnp_command_name_length,
112  NX_AZURE_IOT_JSON_READER* json_reader_ptr,
113  NX_AZURE_IOT_JSON_WRITER* json_response_ptr,
114  UINT* status_code);
115 
130  NX_AZURE_IOT_PNP_CLIENT* iotpnp_client_ptr,
131  const UCHAR* component_name_ptr,
132  UINT component_name_length,
133  NX_AZURE_IOT_JSON_READER* name_value_reader_ptr,
134  UINT version);
135 
145 UINT nx_vt_fallcurve_compute_sensor_status_global(NX_VT_FALLCURVE_COMPONENT* handle, bool toggle_verified_telemetry);
146 
147 #ifdef __cplusplus
148 }
149 #endif
150 
151 #endif /* NX_VT_FALLCURVE_COMPONENT_H */
nx_vt_fallcurve_process_command
UINT nx_vt_fallcurve_process_command(NX_VT_FALLCURVE_COMPONENT *handle, NX_AZURE_IOT_PNP_CLIENT *iotpnp_client_ptr, UCHAR *component_name_ptr, UINT component_name_length, UCHAR *pnp_command_name_ptr, UINT pnp_command_name_length, NX_AZURE_IOT_JSON_READER *json_reader_ptr, NX_AZURE_IOT_JSON_WRITER *json_response_ptr, UINT *status_code)
Process commands related to fallcurve component eg. setResetFingerprintTemplate , retrainFingerprintT...
nx_vt_fallcurve_compute_sensor_status_global
UINT nx_vt_fallcurve_compute_sensor_status_global(NX_VT_FALLCURVE_COMPONENT *handle, bool toggle_verified_telemetry)
Get status of the sensor related to this fallcurve component.
nx_vt_fallcurve_init
UINT nx_vt_fallcurve_init(NX_VT_FALLCURVE_COMPONENT *handle, UCHAR *component_name_ptr, VT_DEVICE_DRIVER *device_driver, VT_SENSOR_HANDLE *sensor_handle, UCHAR *associated_telemetry, bool telemetry_status_auto_update)
Initializes an instance of Verified Telemetry Information Interface for fallcurve component.
nx_vt_fallcurve_fingerprint_type_property
UINT nx_vt_fallcurve_fingerprint_type_property(NX_VT_FALLCURVE_COMPONENT *handle, NX_AZURE_IOT_PNP_CLIENT *iotpnp_client_ptr)
Send "fingerprintType" read-only property to IoT Hub.
nx_vt_fallcurve_telemetry_status_property
UINT nx_vt_fallcurve_telemetry_status_property(NX_VT_FALLCURVE_COMPONENT *handle, NX_AZURE_IOT_PNP_CLIENT *iotpnp_client_ptr, bool *device_status)
Send "telemetryStatus" read-only property to IoT Hub.
nx_vt_fallcurve_process_reported_property_sync
UINT nx_vt_fallcurve_process_reported_property_sync(NX_VT_FALLCURVE_COMPONENT *handle, NX_AZURE_IOT_PNP_CLIENT *iotpnp_client_ptr, const UCHAR *component_name_ptr, UINT component_name_length, NX_AZURE_IOT_JSON_READER *name_value_reader_ptr, UINT version)
Synchronizes on-device fallcurve template database from the digital twin upon startup.
NX_VT_FALLCURVE_COMPONENT_TAG
Definition: nx_vt_fallcurve_component.h:19