Tizen RT Public API
v1.0 D5
Main Page
Modules
Data Structures
Files
File List
Globals
dm_lwm2m.h
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* Copyright 2016 Samsung Electronics All Rights Reserved.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing,
12
* software distributed under the License is distributed on an
13
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14
* either express or implied. See the License for the specific
15
* language governing permissions and limitations under the License.
16
*
17
****************************************************************************/
18
31
#ifndef _DMAPI_H
32
#define _DMAPI_H
33
34
#include "liblwm2m.h"
35
#include "er-coap-13/er-coap-13.h"
36
37
#define IPADDRLEN_MAX 32
38
#define PORTLEN 6
39
47
typedef
enum
{
48
DM_LWM2M_CLIENT_STARTED, DM_LWM2M_CLIENT_STOPPED,
49
}
dm_lwm2m_client_state_e
;
50
55
struct
dm_lwm2m_context_s
{
56
struct
server_info_s
{
57
char
ipAddress[IPADDRLEN_MAX];
58
char
port[PORTLEN];
59
bool
isBootstrap;
60
} server_info;
61
struct
client_info_s
{
62
int
lifetime;
63
} client_info;
64
};
65
75
int
dm_lwm2m_start_client
(
struct
dm_lwm2m_context_s
*dm_context);
76
86
int
dm_lwm2m_stop_client
(
void
);
87
96
int
dm_lwm2m_get_server_address
(
char
*server_ipAddr);
97
106
int
dm_lwm2m_get_server_port
(
char
*server_port);
107
116
int
dm_lwm2m_get_client_lifetime
(
int
*lifetime);
117
126
int
dm_lwm2m_get_client_state
(
dm_lwm2m_client_state_e
*state);
127
137
int
dm_lwm2m_display_client_resource
(
char
*buffer);
138
139
#endif
140
// end of LWM2M group
dm_lwm2m_get_server_port
int dm_lwm2m_get_server_port(char *server_port)
Get server port number.
dm_lwm2m_start_client
int dm_lwm2m_start_client(struct dm_lwm2m_context_s *dm_context)
Start a DM client.
dm_lwm2m_client_state_e
dm_lwm2m_client_state_e
Enumeration of dm client state.
Definition:
dm_lwm2m.h:47
dm_lwm2m_get_server_address
int dm_lwm2m_get_server_address(char *server_ipAddr)
Get server IP address.
dm_lwm2m_context_s
Struct definition of DM context for a LWM2M session.
Definition:
dm_lwm2m.h:55
dm_lwm2m_get_client_lifetime
int dm_lwm2m_get_client_lifetime(int *lifetime)
Get lifetime for a client.
dm_lwm2m_context_s::server_info_s
Definition:
dm_lwm2m.h:56
dm_lwm2m_display_client_resource
int dm_lwm2m_display_client_resource(char *buffer)
Get client resource value.
dm_lwm2m_context_s::client_info_s
Definition:
dm_lwm2m.h:61
dm_lwm2m_stop_client
int dm_lwm2m_stop_client(void)
Close a DM client.
dm_lwm2m_get_client_state
int dm_lwm2m_get_client_state(dm_lwm2m_client_state_e *state)
Get state of client.
include
dm
dm_lwm2m.h
Generated by
1.8.11