IoTHub raw messaging client sample using AMQP
Dependencies: iothub_client EthernetInterface NTPClient iothub_amqp_transport azure_c_shared_utility mbed-rtos mbed azure_uamqp_c wolfSSL
This sample showcases the usage of Azure IoT client libraries with the AMQP transport for sending/receiving raw messages from an IoT Hub.
Diff: iothub_client_sample_amqp.c
- Revision:
- 81:e7cc4a10410d
- Parent:
- 80:ea6f6bd92023
- Child:
- 85:9809a1635421
--- a/iothub_client_sample_amqp.c Mon Sep 25 13:40:29 2017 -0700 +++ b/iothub_client_sample_amqp.c Sat Oct 21 20:14:34 2017 +0000 @@ -7,6 +7,7 @@ #include "azure_c_shared_utility/platform.h" #include "azure_c_shared_utility/threadapi.h" #include "azure_c_shared_utility/crt_abstractions.h" +#include "azure_c_shared_utility/shared_util_options.h" #include "iothub_client.h" #include "iothub_client_options.h" #include "iothub_message.h" @@ -173,7 +174,7 @@ else { bool traceOn = true; - IoTHubClient_LL_SetOption(iotHubClientHandle, "logtrace", &traceOn); + IoTHubClient_LL_SetOption(iotHubClientHandle, OPTION_LOG_TRACE, &traceOn); // Set keep alive is optional. If it is not set the default (240 secs) will be used. uint32_t c2d_keep_alive_freq_secs = 120; @@ -181,7 +182,7 @@ #ifdef SET_TRUSTED_CERT_IN_SAMPLES // For mbed add the certificate information - if (IoTHubClient_LL_SetOption(iotHubClientHandle, "TrustedCerts", certificates) != IOTHUB_CLIENT_OK) + if (IoTHubClient_LL_SetOption(iotHubClientHandle, OPTION_TRUSTED_CERT, certificates) != IOTHUB_CLIENT_OK) { printf("failure to set option \"TrustedCerts\"\r\n"); }