AzureSphere/AzureSphereSampleDevice/main.c
static void ConnectionStatusCallback(IOTHUB_CLIENT_CONNECTION_STATUS result,
                                     IOTHUB_CLIENT_CONNECTION_STATUS_REASON reason,
                                     void *userContextCallback)
{
    Log_Debug("Azure IoT connection status: %s\n", GetReasonString(reason));

    if (result != IOTHUB_CLIENT_CONNECTION_AUTHENTICATED) {
        iotHubClientAuthenticationState = IoTHubClientAuthenticationState_NotAuthenticated;
        return;
    }

    iotHubClientAuthenticationState = IoTHubClientAuthenticationState_Authenticated;

    // Send static device twin properties when connection is established.
    TwinReportState("{\"manufacturer\":\"Microsoft\",\"model\":\"Azure Sphere Sample Device\"}");
}
/// <summary>
///     Callback when the Azure IoT connection state changes.
///     This can indicate that a new connection attempt has succeeded or failed.
///     It can also indicate than an existing connection has expired due to SAS token expiry.
/// </summary>

Callback when the Azure IoT connection state changes.
This can indicate that a new connection attempt has succeeded or failed.
It can also indicate than an existing connection has expired due to SAS token expiry.
Callback when the Azure IoT connection state changes . This can indicate that a new connection attempt has succeeded or failed . It can also indicate than an existing connection has expired due to SAS token expiry .
static void ConnectionStatusCallback(IOTHUB_CLIENT_CONNECTION_STATUS result,
                                     IOTHUB_CLIENT_CONNECTION_STATUS_REASON reason,
                                     void *userContextCallback)
{
    Log_Debug("Azure IoT connection status: %s\n", GetReasonString(reason));
    if (result != IOTHUB_CLIENT_CONNECTION_AUTHENTICATED) {
        iotHubClientAuthenticationState = IoTHubClientAuthenticationState_NotAuthenticated;
        return;
    }
    iotHubClientAuthenticationState = IoTHubClientAuthenticationState_Authenticated;
    TwinReportState("{\"manufacturer\":\"Microsoft\",\"model\":\"Azure Sphere Sample Device\"}");
}
static void ConnectionStatusCallback ( IOTHUB_CLIENT_CONNECTION_STATUS result , IOTHUB_CLIENT_CONNECTION_STATUS_REASON reason , void * userContextCallback ) { Log_Debug ( " \n " , GetReasonString ( reason ) ) ; if ( result != IOTHUB_CLIENT_CONNECTION_AUTHENTICATED ) { iotHubClientAuthenticationState = IoTHubClientAuthenticationState_NotAuthenticated ; return ; } iotHubClientAuthenticationState = IoTHubClientAuthenticationState_Authenticated ; TwinReportState ( " \" \" \" \" \" \" \" \" " ) ; }
<summary>
Callback when the Azure IoT connection state changes.
<summary > Callback when the Azure IoT connection state changes .
// Send static device twin properties when connection is established.