Simulated product dispenser

Dependencies:   HTS221

Fork of mbed-cloud-workshop-connect-HTS221 by Jim Carver

Embed: (wiki syntax)

« Back to documentation index

sn_grs.c File Reference

sn_grs.c File Reference

General resource server. More...

Go to the source code of this file.

Functions

int8_t sn_nsdl_build_registration_body (struct nsdl_s *handle, sn_coap_hdr_s *message_ptr, uint8_t updating_registeration)
 To build GRS resources to registration message payload.
sn_nsdl_dynamic_resource_parameters_ssn_grs_search_resource (struct grs_s *handle, const char *path, uint8_t search_method)
 Searches given resource from linked list.

Detailed Description

General resource server.

Definition in file sn_grs.c.


Function Documentation

sn_nsdl_dynamic_resource_parameters_s* sn_grs_search_resource ( struct grs_s *  handle,
const char *  path,
uint8_t  search_method 
)

Searches given resource from linked list.

Search either precise path, or subresources, eg. dr/x -> returns dr/x/1, dr/x/2 etc...

Parameters:
pathlenLength of the path to be search
*pathPointer to the path string to be search
search_methodSearch method, SEARCH or DELETE
Returns:
Pointer to the resource. If resource not found, return value is NULL

Definition at line 574 of file sn_grs.c.

int8_t sn_nsdl_build_registration_body ( struct nsdl_s *  handle,
sn_coap_hdr_s message_ptr,
uint8_t  updating_registeration 
)

To build GRS resources to registration message payload.

Parameters:
*handlePointer to nsdl-library handle
*message_ptrPointer to CoAP message header
Returns:
SN_NSDL_SUCCESS = 0, Failed = -1

Definition at line 985 of file sn_nsdl.c.