XDK API  3.6.0
Documentation
Files | Data Structures | Typedefs | Enumerations | Functions

Interface header file for the LWM2M feature. It supports the following standard OMA objects. More...

+ Collaboration diagram for LWM2M:

Files

file  XDK_LWM2M.h
 

Data Structures

struct  LWM2M_SecurityPreSharedKeyInfo_S
 Structure to configure the LWM2M security mode -Pre-Shared Key values. More...
 
struct  LWM2M_Setup_S
 struct to represent the LWM2M setup features. More...
 

Typedefs

typedef enum
LWM2M_ConnectivityMonitoring_E 
LWM2M_ConnectivityMonitoring_T
 Typedef to represent the LWM2M Connectivity Monitoring parameter configurable by the user. More...
 
typedef enum LWM2M_LedMixMode_E LWM2M_LedMixMode_T
 Typedef to represent the possible safe LED configuration for the application when the Light control is not confined only with the LWM2M module, but also shared for the application. More...
 
typedef enum LWM2M_SecurityMode_E LWM2M_SecurityMode_T
 Typedef to represent the supported LWM2M security mode. More...
 
typedef struct
LWM2M_SecurityPreSharedKeyInfo_S 
LWM2M_SecurityPreSharedKeyInfo_T
 Typedef to configure the LWM2M security mode -Pre-Shared Key value. More...
 
typedef struct LWM2M_Setup_S LWM2M_Setup_T
 Typedef to represent the LWM2M setup feature. More...
 
typedef enum
LWM2M_StatusNotification_E 
LWM2M_StatusNotification_T
 Typedef to represent the LWM2M status notification. More...
 
typedef void(* LWM2M_StatusNotificationCB_T )(LWM2M_StatusNotification_T status)
 Typedef of the LWM2M status notification callback. More...
 
typedef enum LWM2M_TestMode_E LWM2M_TestMode_T
 Enum to represent the LWM2M test mode. More...
 

Enumerations

enum  LWM2M_ConnectivityMonitoring_E
 Enum to represent the LWM2M Connectivity Monitoring parameters configurable by the user. More...
 
enum  LWM2M_LedMixMode_E
 Enum to represent the possible safe LED configurations for the application when the Light control is not confined only with the LWM2M module, but also shared for the application. More...
 
enum  LWM2M_SecurityMode_E
 Enum to represent the supported LWM2M security modes. More...
 
enum  LWM2M_StatusNotification_E
 Enum to represent the LWM2M status notifications. More...
 
enum  LWM2M_TestMode_E
 Enum to represent the LWM2M test mode. More...
 

Functions

Retcode_T LWM2M_AlertNotification (char *value)
 The function initiates an alert notification. More...
 
Retcode_T LWM2M_ConnectivityMonitoring (LWM2M_ConnectivityMonitoring_T notify, void *value)
 The function sets LWM2M Connectivity Monitoring parameters. More...
 
Retcode_T LWM2M_Enable (void)
 This will enable the LWM2M. More...
 
Retcode_T LWM2M_LedMixModeControl (LWM2M_LedMixMode_T state)
 The function initiates provides a safe LED configuration for the application when the Light control is not confined only with the LWM2M module, but also shared for the application. More...
 
Retcode_T LWM2M_Register (void)
 The function initiates the LWM2M registration of the node to the LWM2M Server. More...
 
Retcode_T LWM2M_Setup (LWM2M_Setup_T *setup)
 This will setup the LWM2M. More...
 
Retcode_T LWM2M_TriggerForceRegister (void)
 The function forcefully triggers the LWM2M registration of the node to the LWM2M Server irrespective of the current node status. More...
 

Detailed Description


Data Structure Documentation

struct LWM2M_SecurityPreSharedKeyInfo_S

Data Fields

const char * Identity
 
const char * Key
 
uint32_t KeyLength
 

Field Documentation

const char* Identity

Pre-Shared Key - Identity value

const char* Key

Pre-Shared Key - Key value

uint32_t KeyLength

Pre-Shared Key - Key length

struct LWM2M_Setup_S
+ Collaboration diagram for LWM2M_Setup_S:

Data Fields

const char * Binding
 
uint16_t ClientPort
 
CmdProcessor_TCmdProcessorHandle
 
bool ConfirmableNotification
 
const char * EndPointName
 
bool IsSecure
 
uint32_t Lifetime
 
const char * MACAddr
 
LWM2M_SecurityMode_T SecurityMode
 
LWM2M_SecurityPreSharedKeyInfo_T SecurityPreSharedKey
 
uint16_t ServerPort
 
const char * ServerURL
 
LWM2M_StatusNotificationCB_T StatusNotificationCB
 
LWM2M_TestMode_T TestMode
 

Field Documentation

const char* Binding

LWM2M Binding type. "U" for UDP or "UQ" for UDP-queued

uint16_t ClientPort

The port number of the LWM2M client

CmdProcessor_T* CmdProcessorHandle

Command processor handle to handle LWM2M stack events and servicing.

bool ConfirmableNotification

boolean representing if the notifications are Confirmable

const char* EndPointName

LWM2M device end point name

bool IsSecure

Boolean representing if we enable DTLS for secure communication.

uint32_t Lifetime

LWM2M lifetime in seconds for a duration of which if there is no data exchange with the server, the registration is invalidated.

const char* MACAddr

Defines the MAC address value for the sensor device object

LWM2M_SecurityMode_T SecurityMode

LWM2M security mode. Unused if IsSecure is false. Only LWM2M_SECURITY_MODE_PRE_SHARED_KEY is supported, yet.

LWM2M_SecurityPreSharedKeyInfo_T SecurityPreSharedKey

LWM2M security mode Pre-Shared Key configurations. Unused if IsSecure is false.

uint16_t ServerPort

The port number of the LWM2M sever

const char* ServerURL

The URL pointing to the LWM2M sever without the protocol prefix (coap:// or coaps://) and port number suffix.

LWM2M_StatusNotificationCB_T StatusNotificationCB

LWM2M status notification callback. Can be NULL if the application is not interested.

LWM2M_TestMode_T TestMode

Defines the mode for light control object

Typedef Documentation

typedef struct LWM2M_Setup_S LWM2M_Setup_T
typedef void(* LWM2M_StatusNotificationCB_T)(LWM2M_StatusNotification_T status)
Parameters
[in]statusrun-time status of the LWM2M stack

Enumeration Type Documentation

Enumerator
LWM2M_SET_IP_ADDRESS 
LWM2M_SET_RADIO_SIGNAL_STRENGTH 
Enumerator
LWM2M_LED_MIX_MODE_RED_ON 
LWM2M_LED_MIX_MODE_RED_OFF 
LWM2M_LED_MIX_MODE_YELLOW_ON 
LWM2M_LED_MIX_MODE_YELLOW_OFF 
LWM2M_LED_MIX_MODE_ORANGE_ON 
LWM2M_LED_MIX_MODE_ORANGE_OFF 
Enumerator
LWM2M_SECURITY_MODE_PRE_SHARED_KEY 

Pre-Shared Key

LWM2M_SECURITY_MODE_RAW_PUBLIC_KEY 

Raw Public Key. Only a place holder. Not supported, yet.

LWM2M_SECURITY_MODE_X_509_CERTIFICATE 

X.509 Certificate. Only a place holder. Not supported, yet.

Enumerator
LWM2M_REGISTRATION_SUCCESS 

LWM2M device registration succeeded

LWM2M_REGISTRATION_FAILURE 

LWM2M device registration failed

LWM2M_REGISTRATION_UPDATE_SUCCESS 

LWM2M device registration update succeeded

LWM2M_REGISTRATION_UPDATE_FAILURE 

LWM2M device registration update failed

LWM2M_DEREGISTRATION_SUCCESS 

LWM2M device de-registration succeeded

LWM2M_DEREGISTRATION_FAILURE 

LWM2M device de-registration failed

LWM2M_NOTIFICATION_SUCCESS 

LWM2M device notification succeeded

LWM2M_NOTIFICATION_FAILURE 

LWM2M device notification failed

LWM2M_UNCLASSIFIED_EVENT 

LWM2M device unclassified event

If test mode is LWM2M_TEST_MODE_NO:

  • XDK in-built LEDs are explicitly controlled by the application and Light control object is denied access.
  • Buttons are not expected to notify LWM2M alerts. If they do, they are discarded. If test mode is LWM2M_TEST_MODE_YES:
  • XDK In-built LEDs are explicitly controlled by Light control object (IPSO ID 3310).
  • The LED's are used to indicate the LWM2M registration state.
    LED OFF ON blinking (1s/1s) blinking (3s/1s)
    Yellow x x XDK is running XDK is running, but configuration is not detected properly
    Orange x Device is registered in the LWM2M server Device is updating the registration in the LWM2M server x
    Red x Device is not registered in the LWM2M server Device is registering in the LWM2M server x
    - Buttons are expected to notify LWM2M alerts. If test mode is LWM2M_TEST_MODE_MIX:
  • XDK in-built LEDs are shared by the application and Light control object.
  • When ever the application wants to change a state of an LED, then it is persistent for the below duration:
    • XDK In-built Red LED : 5 seconds
    • XDK In-built Orange LED : 5 seconds
    • XDK In-built Yellow LED : 2 seconds
  • Buttons are expected to notify LWM2M alerts.
Enumerator
LWM2M_TEST_MODE_NO 
LWM2M_TEST_MODE_YES 
LWM2M_TEST_MODE_MIX 

Function Documentation

Retcode_T LWM2M_AlertNotification ( char *  value)
Parameters
[in]valuePointer to the string to be notified to the server via Alert Notification object resource.
Returns
RETCODE_OK on success, or an error code otherwise.
Note
  • LWM2M_Register must have been successful prior.
  • The value is considers as a string and hence must be NULL terminated.
  • The maximum size of value string must not exceed 128 bytes including the NULL terminator.

+ Here is the caller graph for this function:

Retcode_T LWM2M_ConnectivityMonitoring ( LWM2M_ConnectivityMonitoring_T  notify,
void *  value 
)
Parameters
[in]notifyParameter configurable by the user.
[in]valueIf notify is LWM2M_SET_IP_ADDRESS, this is a const char * string value. If notify is LWM2M_SET_RADIO_SIGNAL_STRENGTH, this is a int value.
Returns
RETCODE_OK on success, or an error code otherwise.
Note

+ Here is the caller graph for this function:

Retcode_T LWM2M_Enable ( void  )
Returns
RETCODE_OK on success, or an error code otherwise.
Note
  • LWM2M_Setup must have been successful prior.
  • Do not call this API more than once.

+ Here is the caller graph for this function:

Retcode_T LWM2M_LedMixModeControl ( LWM2M_LedMixMode_T  state)
Parameters
[in]stateUser expected LED state.
Returns
RETCODE_OK on success, or an error code otherwise.
Note
  • LWM2M_Register must have been successful prior.
  • Do not use this when .

+ Here is the caller graph for this function:

Retcode_T LWM2M_Register ( void  )
Returns
RETCODE_OK on success, or an error code otherwise.
Note
  • LWM2M_Enable must have been successful prior.
  • WLAN_Enable must have been successful prior.
  • Do not call this API more than once.

+ Here is the caller graph for this function:

Retcode_T LWM2M_Setup ( LWM2M_Setup_T setup)
Parameters
[in]setupPointer to the LWM2M setup feature
Returns
RETCODE_OK on success, or an error code otherwise.
Note
  • This must be the first API to be called if LWM2M feature is to be used.
  • Do not call this API more than once.

+ Here is the caller graph for this function:

Retcode_T LWM2M_TriggerForceRegister ( void  )
Returns
RETCODE_OK on success, or an error code otherwise.
Note

+ Here is the caller graph for this function:


All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:50 by doxygen 1.8.8