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.

Committer:
Azure.IoT Build
Date:
Thu Feb 04 16:45:32 2016 -0800
Revision:
26:9662f727e974
Parent:
25:9cb9b0c15218
Child:
29:12a5fd69f49e
1.0.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AzureIoTClient 16:b2c6de619743 1 // Copyright (c) Microsoft. All rights reserved.
AzureIoTClient 16:b2c6de619743 2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
AzureIoTClient 16:b2c6de619743 3
AzureIoTClient 16:b2c6de619743 4 #include <stdio.h>
AzureIoTClient 16:b2c6de619743 5 #include "simplesample_amqp.h"
Azure.IoT Build 26:9662f727e974 6 #include "platform.h"
AzureIoTClient 16:b2c6de619743 7
AzureIoTClient 16:b2c6de619743 8
AzureIoTClient 16:b2c6de619743 9 int main(void)
AzureIoTClient 16:b2c6de619743 10 {
AzureIoTClient 21:b8b8782d412f 11 int result;
AzureIoTClient 16:b2c6de619743 12 (void)printf("Initializing mbed specific things...\r\n");
AzureIoTClient 16:b2c6de619743 13
AzureIoTClient 21:b8b8782d412f 14 if ((result = platform_init()) != 0)
AzureIoTClient 16:b2c6de619743 15 {
AzureIoTClient 21:b8b8782d412f 16 (void)printf("Error initializing the platform: %d\r\n",result);
AzureIoTClient 16:b2c6de619743 17 return -1;
AzureIoTClient 16:b2c6de619743 18 }
AzureIoTClient 16:b2c6de619743 19
AzureIoTClient 16:b2c6de619743 20 simplesample_amqp_run();
AzureIoTClient 16:b2c6de619743 21
AzureIoTClient 21:b8b8782d412f 22 platform_deinit();
AzureIoTClient 16:b2c6de619743 23 return 0;
AzureIoTClient 16:b2c6de619743 24 }