utility/msgpack/main.c

/*******************************************************************************
* # License
* Copyright 2019 Silicon Laboratories Inc. www.silabs.com
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
******************************************************************************/
/*
* Documentation for this app is available online.
* See https://docs.silabs.com/gecko-os/4/standard/latest/sdk/examples/utility/msgpack
*/
#include "common.h"
#include "example_app_util.h"
#define APPLICATION_START_LINE "\r\nMessagePack Example Starting ..."
/*************************************************************************************************/
void gos_app_init(void)
{
gos_result_t result;
GOS_LOG(APPLICATION_START_LINE);
if(GOS_FAILED(result, example_app_util_network_up(GOS_INTERFACE_ANY, false, network_event_handler)))
{
}
}
/*************************************************************************************************/
static void network_event_handler(bool is_up)
{
if(is_up == true)
{
read_write_buffer();
read_write_stream();
}
}