Exemple #1
0
int main(void)
{
	(void)printf("Initializing mbed specific things...\r\n");

	mbed_log_init();
	mbedtime_init();

	if (EthernetInterface::init())
	{
		(void)printf("Error initializing EthernetInterface.\r\n");
		return -1;
	}

	if (setupRealTime() != 0)
	{
		(void)printf("Failed setting up real time clock\r\n");
		return -1;
	}

	if (EthernetInterface::connect())
	{
		(void)printf("Error connecting EthernetInterface.\r\n");
		return -1;
	}

	iothub_client_sample_amqp_run();

	(void)EthernetInterface::disconnect();
}
Exemple #2
0
int main(void)
{
    (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 (EthernetInterface::init())
	{
		(void)printf("Error initializing EthernetInterface.\r\n");
		return -1;
	}

	if (setupRealTime() != 0)
	{
		(void)printf("Failed setting up real time clock\r\n");
		return -1;
	}

	if (EthernetInterface::connect())
	{
		(void)printf("Error connecting EthernetInterface.\r\n");
		return -1;
	}

    remote_monitoring_run();

	(void)EthernetInterface::disconnect();

    return 0;
}
Exemple #3
0
int main(void)
{
	(void)printf("Initializing mbed specific things...\r\n");

	mbed_log_init();
	mbedtime_init();

	if (EthernetInterface::init())
	{
		(void)printf("Error initializing EthernetInterface.\r\n");
		return -1;
	}

	if (platform_init() != 0)
	{
		(void)printf("Failed initializing platform.\r\n");
		return -1;
	}

	if (EthernetInterface::connect())
	{
		(void)printf("Error connecting EthernetInterface.\r\n");
		return -1;
	}

	iothub_client_sample_amqp_websockets_run();

	(void)EthernetInterface::disconnect();
}
Exemple #4
0
int main(void)
{
	(void)printf("Initializing mbed specific things...\r\n");
	
	mbed_log_init();
	mbedtime_init();
	
	EthernetInterface eth;
	if (eth.init() || eth.connect())
	{
		(void)printf("Error initializing EthernetInterface.\r\n");
		return -1;
	}
	
	return run_tests();
}