41#define LW_START_AT_INIT (0)
42#define LW_START_AT_THREAD (1)
51#define LWM2M_EXAMPLE LW_START_AT_THREAD
53#define LWM2M_APP_STACK_SIZE (128)
54#define LWM2M_TX_TIME (pdMS_TO_TICKS(60000))
102 if(
MZ_OK == tm_rd_status)
104 char _tm_string[40] = {0};
106 "Time Now : %02d/%02d/%02d::%02d:%02d:%02d",
125 mz_puts(
"Notify send to SDK\r\n");
137#if(LWM2M_EXAMPLE == LW_START_AT_THREAD)
168 mz_puts(
"Lwm2m Timer Created and started at Application \r\n");
200#if(LWM2M_EXAMPLE == LW_START_AT_INIT)
216 mz_puts(
"Timer Created and started at Initialization \r\n");
244 if(
MZ_OK != _ret)
goto clean;
246 if(
MZ_OK != _ret)
goto clean;
287 mz_puts(
"Write received - Copy here\r\n");
323 mz_puts(
"Observe received\r\n");
332 mz_puts(
"Observe cancel received\r\n");
336 mz_puts(
"Notify send to server\r\n");
340 mz_puts(
"Notify send acknowledge\r\n");
344 mz_puts(
"Notify send failed\r\n");
monoZ LWM2M public Protocol
@ LW_EV_CLIENT_NOTIFY_SEND
@ LW_EV_CLIENT_NOTIFY_SEND_ACK
mz_error_t
Enumeration of monoZ Error Flags.
static void lwm2m_app(void *arg)
Create recursive timer create the timer and starts when main RTOS scheduler started and it will start...
static void lwm2m_timer_cb(TimerHandle_t xTimer)
timer callback function for lwm2m app
static StaticTask_t lwm2m_cb_mem
#define LWM2M_TX_TIME
Defines the Timer size in milliseconds.
#define LWM2M_APP_STACK_SIZE
Defines the App stack size.
static StackType_t lwm2m_stack[LWM2M_APP_STACK_SIZE]
void lwm2m_event_process(void *event)
LWM2M user defined callback function.
static mz_thread_t lwm2m_thread_id
static char sensor_data[11]
mz_error_t lwm2m_app_init(void)
Initiate LWM2M App.
This file is responsible for real time clock operations.
monoZ system CMSIS OS2 This is an abstraction layer and includes FreeRTOS configuration,...
osThreadId_t mz_thread_t
mz_thread_t variable of type osThreadId_t
This file contains APIs for create,delete,start and stop of timers. Maximum 5 timers can be created....
monoZ Type Converter This file contains the APIs used to hex to ascii and ascii to hex conversion
const char * mz_error_to_str(mz_error_t e)
This function is used to convert the monoZ error code to corresponding error message.
mz_error_t mz_set_value_Ob19_0_0(char *src)
This function writes 19/0/0 value to internal resource structure.
mz_error_t mz_set_value_Ob19_1_0(char *src)
This function writes 19/1/0 value to internal resource structure.
mz_error_t mz_set_and_notify_Ob19_0_0(char *src)
This function writes 19/0/0 value to internal resource structure and then notify to server.
void * mz_read_value_Ob19_0_0(mz_error_t *ret)
This function Reads internal resource structure value of 19/0/0.
int mz_puts(void *__ch)
This function prints the given string.
mz_error_t MZ_RTC_read(mzd_time *_dt)
This function Reads the Real Time Clock value.
uint8_t mz_thread_create(mz_thread_t *t, const char *name, mz_fn thread_func, void *const arg, mz_thread_prio_t prio, StackType_t *stack_mem, size_t stack_size, StaticTask_t *cb_mem, uint32_t cb_size)
This function is used to check the message queue object validity Create a thread and add it to Active...
mz_error_t mz_tm_create_start_recursive(char *_name, TickType_t _tick, mz_tm_cb _cb)
Function to Create and Start One Shot Timers.
void mz_hex_to_ascii(void *in, void *out)
This function is used to convert the given Hex value to ASCII value.
void mz_ascii_to_hex(void *in, void *out)
This function is used to convert the given ASCII value to Hex value.
Structure for Defining the Date and time for monoZ.