A simple IoTHub sample using HTTP as transport

Dependencies:   EthernetInterface NTPClient iothub_client iothub_http_transport mbed-rtos mbed wolfSSL serializer azure_c_shared_utility

This sample showcases the usage of Azure IoT client libraries with the HTTP transport for sending/receiving raw messages from an IoT Hub.

main.cpp

Committer:
AzureIoTClient
Date:
2016-01-26
Revision:
22:3acb69edee6b
Parent:
17:3abbcd6aac9f
Child:
23:39fcc72c3963

File content as of revision 22:3acb69edee6b:

// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#include <stdio.h>
#include "EthernetInterface.h"
#include "simplesample_http.h"
#include "NTPClient.h"
#include "azureiot_common/platform.h"

int main(void)
{
	int result;
    (void)printf("Initializing mbed specific things...\r\n");

    /* These are needed in order to initialize the time provider for Proton-C */
    mbed_log_init();
    mbedtime_init();

	if ((result = platform_init()) != 0)
	{
		(void)printf("Error initializing the platform: %d\r\n",result);
		return -1;
	}

    simplesample_http_run();

	platform_deinit();
	
	return 0;
}