KNX IoT
KNX IoT Point API stack implementation
|
generic knx helpers More...
Go to the source code of this file.
Macros | |
#define | PAGE_SIZE 20 |
Functions | |
int | add_next_page_indicator (char *url, int next_page_num) |
helper function to frame next page indicator, if more requests (pages) are needed to get the full list More... | |
int | check_if_query_l_exist (oc_request_t *request, bool *ps_exists, bool *total_exists) |
helper function to check if query parameter l exists More... | |
bool | check_if_query_pn_exist (oc_request_t *request, int *pn_value, int *ps_value) |
helper function to check if query parameter pn exists More... | |
int | oc_frame_integer (int value) |
helper function to frame an integer in the response: More... | |
int | oc_frame_query_l (char *url, bool ps_exists, int ps, bool total_exists, int total) |
helper function to frame url part of query response: spec 1.0: More... | |
generic knx helpers
Definition in file oc_knx_helpers.h.
int add_next_page_indicator | ( | char * | url, |
int | next_page_num | ||
) |
helper function to frame next page indicator, if more requests (pages) are needed to get the full list
url | the url to be framed |
next_page_num | the next page number to be framed |
int check_if_query_l_exist | ( | oc_request_t * | request, |
bool * | ps_exists, | ||
bool * | total_exists | ||
) |
helper function to check if query parameter l exists
example: /fp/r?l=total&l=ps
request | the request |
ps_exists | return value if l=ps exists |
total_exists | return value if l=total exists |
bool check_if_query_pn_exist | ( | oc_request_t * | request, |
int * | pn_value, | ||
int * | ps_value | ||
) |
helper function to check if query parameter pn exists
example: /dev/ipv6?pn=0&ps=3
request | the request |
pn_value | return -1 if not exist otherwise value |
ps_value | return -1 if not exist otherwise value |
int oc_frame_integer | ( | int | value | ) |
helper function to frame an integer in the response:
value | the value to be framed, max 9 chars |
int oc_frame_query_l | ( | char * | url, |
bool | ps_exists, | ||
int | ps, | ||
bool | total_exists, | ||
int | total | ||
) |
helper function to frame url part of query response: spec 1.0:
url | the url to be framed |
ps_exists | frame ps |
ps | page size |
total_exists | frame total |
total | total items |