monoZ docs
MZ_Lwm2m_public.h File Reference

monoZ LWM2M public Protocol More...

#include "MZ_error_handler.h"

Go to the source code of this file.

Macros

#define MZ_LWM2M_PUBLIC_H_
 Defines monoZ LWM2M Public. More...
 

Enumerations

enum  en_lw_event {
  LW_EV_WRITE_DATA =0 , LW_EV_EXECUTE = 1 , LW_EV_WRITE_ATTRIBUTE = 4 , LW_EV_DISCOVER = 5 ,
  LW_EV_READ = 6 , LW_EV_OBSERVE = 7 , LW_EV_OBSERVE_CANCEL = 8 , LW_EV_CLIENT_OFFLINE = 9 ,
  LW_EV_CLIENT_ONLINE = 10 , LW_EV_CLIENT_NOTIFY_SEND = 11 , LW_EV_CLIENT_WKP_SMS = 12 , LW_EV_CLIENT_NOTIFY_SEND_ACK = 13 ,
  LW_EV_CLIENT_ON = 14 , LW_EV_CLIENT_OFF = 15 , LW_EV_NOTIFY_FAIL = 16 , LW_EV_BOOTSTRAP_COMPLETE = 20 ,
  LW_EV_REG_FINISH = 21 , LW_EV_REG_UPDATE_FINISH = 22 , LW_EV_DEREG_FINISH = 23 , LW_EV_NOTIFY_NOT_SEND = 24 ,
  LW_EV_ENABLE_ALL = 100
}
 Enumeration of LW Events. More...
 

Functions

struct __attribute__ ((packed))
 
void * mz_read_token_Ob19_0_0 (mz_error_t *ret)
 This function reads te token value of 19/0/0. More...
 
void * mz_read_token_Ob19_1_0 (mz_error_t *ret)
 This function reads te token value of 19/1/0. More...
 
mz_error_t mz_set_value_Ob19_0_0 (char *src)
 This function writes 19/0/0 value to internal resource structure. More...
 
mz_error_t mz_set_value_Ob19_1_0 (char *src)
 This function writes 19/1/0 value to internal resource structure. More...
 
void * mz_read_value_Ob19_0_0 (mz_error_t *ret)
 This function Reads internal resource structure value of 19/0/0. More...
 
void * mz_read_value_Ob19_1_0 (mz_error_t *ret)
 This function Reads internal resource structure value of 19/1/0. More...
 
mz_error_t mz_notify_Ob19_0_0 (void)
 This function Notifies internal resource structure value of 19/0/0 to LwM2M server. More...
 
mz_error_t mz_notify_Ob19_1_0 (void)
 This function Notifies internal resource structure value of 19/1/0 to LwM2M server. More...
 
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. More...
 
mz_error_t mz_set_and_notify_Ob19_1_0 (char *src)
 This function writes 19/1/0 value to internal resource structure and then notify to server. More...
 

Variables

 st_lw_event
 

Detailed Description

monoZ LWM2M public Protocol

Date
Jun 7, 2021
Author
SKM

Definition in file MZ_Lwm2m_public.h.

Macro Definition Documentation

◆ MZ_LWM2M_PUBLIC_H_

#define MZ_LWM2M_PUBLIC_H_

Defines monoZ LWM2M Public.

Definition at line 9 of file MZ_Lwm2m_public.h.

Enumeration Type Documentation

◆ en_lw_event

Enumeration of LW Events.

Enumerator
LW_EV_WRITE_DATA 

Write operation was received

LW_EV_EXECUTE 

Execute operation was received

LW_EV_WRITE_ATTRIBUTE 

Write Attributes operation was received

LW_EV_DISCOVER 

Discover operation was received

LW_EV_READ 

Read operation was received

LW_EV_OBSERVE 

Observe operation was received

LW_EV_OBSERVE_CANCEL 

Cancel observation operation was received

LW_EV_CLIENT_OFFLINE 

Client is offline

LW_EV_CLIENT_ONLINE 

Client is online

LW_EV_CLIENT_NOTIFY_SEND 

Client sent observation notification to a server

LW_EV_CLIENT_WKP_SMS 

Client received wakeup SMS

LW_EV_CLIENT_NOTIFY_SEND_ACK 

Client received notification acknowledge

LW_EV_CLIENT_ON 

Client ON: LMM2M client exits Client OFF state and tries to re-connect server due to explicitly AT Command registration request

LW_EV_CLIENT_OFF 

Client OFF: LWM2M client has exhausted server connection retries

LW_EV_NOTIFY_FAIL 

Confirmable NOTIFY failed

LW_EV_BOOTSTRAP_COMPLETE 

Bootstrap finished and completed successfully

LW_EV_REG_FINISH 

Registration finished and completed successfully. All server observation requests are cleared in FW; the host need to clear host object observations

LW_EV_REG_UPDATE_FINISH 

Register update finished and completed successfully

LW_EV_DEREG_FINISH 

De-register finished and completed successfully

LW_EV_NOTIFY_NOT_SEND 

Notification was not saved and not sent to server

LW_EV_ENABLE_ALL 

enable all notifications

Definition at line 18 of file MZ_Lwm2m_public.h.

Function Documentation

◆ __attribute__()

struct __attribute__ ( (packed)  )

< unsolicited event

< serverShortId

< ObjectID

< ObjectInstanceID - Optional

< ResourceID - Optional

< ResourceInstanceID - Optional

< Val - Optional - Max size 511 Bytes

< COAP message ID (for NOTIFY event)

Definition at line 1 of file MZ_Lwm2m_public.h.

Variable Documentation

◆ st_lw_event

Definition at line 57 of file MZ_Lwm2m_public.h.