Ejemplo n.º 1
0
/*******************************************************************************
    Function
*******************************************************************************/
int main(int argc,char_t** argv)
{
    autolink_mcu_init();

    while(1)
    {
        sleep(5);
    }

    gre_io_free_buffer(nbuffer);
  	gre_io_close(send_handle);

    return 0;
}
Ejemplo n.º 2
0
int temp_update(gre_io_t *send_handle, char * target, temp_update_t *event_data)
{
	gre_io_serialized_data_t    *nbuffer = NULL;
	int ret;

	/*
	 * Send a named event with an additional structure payload
	 */
	nbuffer = gre_io_serialize(NULL, target,
				TEMP_UPDATE_EVENT,
				TEMP_UPDATE_FMT,
				 event_data,
				 sizeof(temp_update_t));

	ret = gre_io_send(send_handle, nbuffer);
	//Free the allocated memory buffer for the serialized data
    gre_io_free_buffer(nbuffer);
    
	return ret;
}