A simple IoTHub sample using AMQP as transport
Dependencies: EthernetInterface NTPClient iothub_amqp_transport iothub_client mbed-rtos mbed azure_c_shared_utility serializer wolfSSL azure_uamqp_c
This sample showcases the usage of Azure IoT client libraries with the AMQP transport for sending/receiving raw messages from an IoT Hub.
Diff: simplesample_amqp.c
- Revision:
- 19:eae21b79ceff
- Parent:
- 18:a3ec1aab72dc
- Child:
- 25:9cb9b0c15218
--- a/simplesample_amqp.c Thu Dec 17 18:24:08 2015 -0800 +++ b/simplesample_amqp.c Fri Jan 15 15:50:02 2016 -0800 @@ -26,7 +26,7 @@ DECLARE_MODEL(ContosoAnemometer, WITH_DATA(ascii_char_ptr, DeviceId), -WITH_DATA(double, WindSpeed), +WITH_DATA(int, WindSpeed), WITH_ACTION(TurnFanOn), WITH_ACTION(TurnFanOff), WITH_ACTION(SetAirResistance, int, Position) @@ -137,7 +137,7 @@ /* Setup IoTHub client configuration */ IOTHUB_CLIENT_HANDLE iotHubClientHandle = IoTHubClient_CreateFromConnectionString(connectionString, AMQP_Protocol); srand((unsigned int)time(NULL)); - double avgWindSpeed = 10.0; + int avgWindSpeed = 10; if (iotHubClientHandle == NULL) {