Verified Telemetry
Data Structures | Typedefs | Functions
FreeRTOS_vt_fallcurve_component.h File Reference
#include "azure_iot_hub_client.h"
#include "azure_iot_json_reader.h"
#include "azure_iot_json_writer.h"
#include "vt_fc_api.h"

Go to the source code of this file.

Data Structures

struct  FreeRTOS_VT_FALLCURVE_COMPONENT_TAG
 

Typedefs

typedef struct FreeRTOS_VT_FALLCURVE_COMPONENT_TAG FreeRTOS_VT_FALLCURVE_COMPONENT
 

Functions

AzureIoTResult_t FreeRTOS_vt_fallcurve_init (FreeRTOS_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. More...
 
AzureIoTResult_t FreeRTOS_vt_fallcurve_process_command (FreeRTOS_VT_FALLCURVE_COMPONENT *handle, AzureIoTHubClient_t *xAzureIoTHubClient, UCHAR *component_name_ptr, UINT component_name_length, UCHAR *pnp_command_name_ptr, UINT pnp_command_name_length, UINT *status_code)
 Process commands related to fallcurve component eg. setResetFingerprintTemplate , retrainFingerprintTemplate. More...
 
AzureIoTResult_t FreeRTOS_vt_fallcurve_telemetry_status_property (FreeRTOS_VT_FALLCURVE_COMPONENT *handle, AzureIoTHubClient_t *xAzureIoTHubClient, bool *deviceStatus)
 Send "telemetryStatus" read-only property to IoT Hub. More...
 
AzureIoTResult_t FreeRTOS_vt_fallcurve_fingerprint_type_property (FreeRTOS_VT_FALLCURVE_COMPONENT *handle, AzureIoTHubClient_t *xAzureIoTHubClient)
 Send "fingerprintType" read-only property to IoT Hub. More...
 
AzureIoTResult_t FreeRTOS_vt_fallcurve_compute_sensor_status_global (FreeRTOS_VT_FALLCURVE_COMPONENT *handle, bool toggle_verified_telemetry)
 Get status of the sensor related to this fallcurve component. More...
 
AzureIoTResult_t FreeRTOS_vt_fallcurve_process_reported_property_sync (FreeRTOS_VT_FALLCURVE_COMPONENT *handle, const UCHAR *component_name_ptr, UINT component_name_length, AzureIoTJSONReader_t *json_reader_ptr)
 Synchronizes on-device fallcurve template database from the digital twin upon startup. More...
 

Function Documentation

◆ FreeRTOS_vt_fallcurve_compute_sensor_status_global()

AzureIoTResult_t FreeRTOS_vt_fallcurve_compute_sensor_status_global ( FreeRTOS_VT_FALLCURVE_COMPONENT handle,
bool  toggle_verified_telemetry 
)

Get status of the sensor related to this fallcurve component.

Parameters
[in]handleThe currentsense handle created by a call to the initialization function.
[in]toggle_verified_telemetryBool value to enable VT for this component or not.
Return values
NX_AZURE_IOT_SUCCESSupon success or an error code upon failure.

◆ FreeRTOS_vt_fallcurve_fingerprint_type_property()

AzureIoTResult_t FreeRTOS_vt_fallcurve_fingerprint_type_property ( FreeRTOS_VT_FALLCURVE_COMPONENT handle,
AzureIoTHubClient_t *  xAzureIoTHubClient 
)

Send "fingerprintType" read-only property to IoT Hub.

Parameters
[in]handleThe currentsense handle created by a call to the initialization function.
[in]xAzureIoTHubClientPointer to initialized Azure IoT PnP instance.
Return values
NX_AZURE_IOT_SUCCESSupon success or an error code upon failure.

◆ FreeRTOS_vt_fallcurve_init()

AzureIoTResult_t FreeRTOS_vt_fallcurve_init ( FreeRTOS_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.

Parameters
[in]handleThe handle created by a call to the initialization function.
[in]component_name_ptrName of the PNP component.
[in]device_driverThe platform driver functions for interacting with the device hardware.
[in]sensor_handleThe platform driver references for interacting with the device hardware.
[in]associated_telemetryName of the telemetry associated with this component.
[in]telemetry_status_auto_updateBool to compute sensor status when a global command is issued.
Return values
NX_AZURE_IOT_SUCCESSupon success or an error code upon failure.

◆ FreeRTOS_vt_fallcurve_process_command()

AzureIoTResult_t FreeRTOS_vt_fallcurve_process_command ( FreeRTOS_VT_FALLCURVE_COMPONENT handle,
AzureIoTHubClient_t *  xAzureIoTHubClient,
UCHAR *  component_name_ptr,
UINT  component_name_length,
UCHAR *  pnp_command_name_ptr,
UINT  pnp_command_name_length,
UINT *  status_code 
)

Process commands related to fallcurve component eg. setResetFingerprintTemplate , retrainFingerprintTemplate.

Parameters
[in]handleThe currentsense handle created by a call to the initialization function.
[in]xAzureIoTHubClientPointer to initialized Azure IoT PnP instance.
[in]component_name_ptrName of the component.
[in]component_name_lengthLength of name of the component.
[in]pnp_command_name_ptrName of the command invoked.
[in]pnp_command_name_lengthLength of name of the command invoked.
[out]status_codeStatus updated by function based on command execution. S
Return values
NX_AZURE_IOT_SUCCESSupon success or an error code upon failure.

◆ FreeRTOS_vt_fallcurve_process_reported_property_sync()

AzureIoTResult_t FreeRTOS_vt_fallcurve_process_reported_property_sync ( FreeRTOS_VT_FALLCURVE_COMPONENT handle,
const UCHAR *  component_name_ptr,
UINT  component_name_length,
AzureIoTJSONReader_t *  json_reader_ptr 
)

Synchronizes on-device fallcurve template database from the digital twin upon startup.

Parameters
[in]handleThe currentsense handle created by a call to the initialization function.
[in]component_name_ptrName of the component.
[in]component_name_lengthLength of name of the component.
[in]json_reader_ptrPointer to read the JSON payload of command.
Return values
NX_AZURE_IOT_SUCCESSupon success or an error code upon failure.

◆ FreeRTOS_vt_fallcurve_telemetry_status_property()

AzureIoTResult_t FreeRTOS_vt_fallcurve_telemetry_status_property ( FreeRTOS_VT_FALLCURVE_COMPONENT handle,
AzureIoTHubClient_t *  xAzureIoTHubClient,
bool *  deviceStatus 
)

Send "telemetryStatus" read-only property to IoT Hub.

Parameters
[in]handleThe currentsense handle created by a call to the initialization function.
[in]xAzureIoTHubClientPointer to initialized Azure IoT PnP instance.
[out]deviceStatusPointer to update the global bool showing if all devices are working or not.
Return values
NX_AZURE_IOT_SUCCESSupon success or an error code upon failure.