HTTP Server#

Functions#

int16_t
rsi_wlan_nwk_register_json_update_cb(uint32_t callback_id, void(*callback_handler_ptr)(uint8_t *filename, uint8_t *json_object, uint32_t length, uint32_t status))

Register the call backs.This is non blocking API.

int16_t
rsi_wlan_nwk_register_json_event_cb(uint32_t callback_id, void(*callback_handler_ptr)(uint32_t status, uint8_t *json_object, uint32_t length))

Register the event call backs.This is non blocking API.

int16_t
rsi_wlan_nwk_register_webpage_req_cb(uint32_t callback_id, void(*callback_handler_ptr)(uint8_t type, uint8_t *url_name, uint8_t *post_content_buffer, uint32_t post_content_length, uint32_t status))

Register webpage request callbacks.This is non blocking API.

int16_t
rsi_wlan_nwk_register_wireless_fw_upgrade_cb(uint32_t callback_id, void(*callback_handler_ptr)(uint8_t type, uint32_t status))

Register wireless firmware upgrade callbacks.This is non blocking API.

int32_t
rsi_webpage_load(uint8_t flags, uint8_t *file_name, uint8_t *webpage, uint32_t length)

Load the webpage to the HTTP Server's file system that is present in the WiSeConnect module. This is a blocking API.

int32_t
rsi_json_object_create(uint8_t flags, const char *file_name, uint8_t *json_object, uint32_t length)

Create the JSON object to the webpage that is already present in the WiSeConnect module's HTTP server file system. This is a blocking API.

int32_t
rsi_webpage_erase(uint8_t *file_name)

Erase the webpage from HTTP server's file system that is present in the WiSeConnect module. This is a blocking API.

int32_t
rsi_json_object_delete(uint8_t *file_name)

Delete the JSON object of the HTTP server's file system that is already present in the WiSeConnect module. This is a blocking API.

int32_t
rsi_webpage_send(uint8_t flags, uint8_t *webpage, uint32_t length)

Send the webpage to HTTP server's file system. This is a blocking API.

Function Documentation#

rsi_wlan_nwk_register_json_update_cb#

int16_t rsi_wlan_nwk_register_json_update_cb (uint32_t callback_id, void(*callback_handler_ptr)(uint8_t *filename, uint8_t *json_object, uint32_t length, uint32_t status))

Register the call backs.This is non blocking API.

Parameters
[in]callback_id

- call back number which needs to be registered

[in]callback_handler_ptr

- call back handler which needs to be registered for a given call back

[out]filename

- json object filename

[out]json_object

- json object data

[out]length

- This is the length of the response buffer.

[out]status

- This is the response status.

Returns

  • 0 - Success Negative Value - Failure

Note

  • Please refer to Error Codes section for the description of the above error codes Error Codes.


Definition at line 134 of file driver/rsi_nwk.c

rsi_wlan_nwk_register_json_event_cb#

int16_t rsi_wlan_nwk_register_json_event_cb (uint32_t callback_id, void(*callback_handler_ptr)(uint32_t status, uint8_t *json_object, uint32_t length))

Register the event call backs.This is non blocking API.

Parameters
[in]callback_id

- call back number which needs to be registered

[in]callback_handler_ptr

- call back handler which needs to be registered for a given call back

[out]status

- This is the response status.

[out]json_object

- json object data

[out]length

- This is the length of the response buffer.

Returns

  • 0 - Success Positive Value - Failure


Definition at line 167 of file driver/rsi_nwk.c

rsi_wlan_nwk_register_webpage_req_cb#

int16_t rsi_wlan_nwk_register_webpage_req_cb (uint32_t callback_id, void(*callback_handler_ptr)(uint8_t type, uint8_t *url_name, uint8_t *post_content_buffer, uint32_t post_content_length, uint32_t status))

Register webpage request callbacks.This is non blocking API.

Parameters
[in]callback_id

- call back number which needs to be registered

[in]callback_handler_ptr

- call back handler which needs to be registered for a given call back

[out]type

- command type

[out]url_name

- URL address of the domain

[out]post_content_buffer

- This is the response buffer.

[out]post_content_length

- This is the length of the response buffer.

[out]status

- This is the response status.

Returns

  • 0 - Success Positive Value - Failure


Definition at line 205 of file driver/rsi_nwk.c

rsi_wlan_nwk_register_wireless_fw_upgrade_cb#

int16_t rsi_wlan_nwk_register_wireless_fw_upgrade_cb (uint32_t callback_id, void(*callback_handler_ptr)(uint8_t type, uint32_t status))

Register wireless firmware upgrade callbacks.This is non blocking API.

Parameters
[in]callback_id

- call back number which needs to be registered

[in]callback_handler_ptr

- call back handler which needs to be registered for a given call back

[out]type

- command type

[out]status

- This is the response status.

Returns

  • 0 - Success Positive Value - Failure


Definition at line 237 of file driver/rsi_nwk.c

rsi_webpage_load#

int32_t rsi_webpage_load (uint8_t flags, uint8_t *file_name, uint8_t *webpage, uint32_t length)

Load the webpage to the HTTP Server's file system that is present in the WiSeConnect module. This is a blocking API.

Parameters
[in]flags

- BIT (2) is used to set the webpage that is associated with JSON object

[in]file_name

- Filename of the HTML webpage

[in]webpage

- Pointer to the HTML webpage that contains the HTML webpage content

[in]length

- Webpage length

Returns

  • 0 - Success Negative Value - Failure -4 - Buffer not available to serve the command

Note

  • Refer to Error Codes section for the description of the above error codes Error Codes.


Definition at line 39 of file network/protocols/http_server/rsi_http_server.c

rsi_json_object_create#

int32_t rsi_json_object_create (uint8_t flags, const char *file_name, uint8_t *json_object, uint32_t length)

Create the JSON object to the webpage that is already present in the WiSeConnect module's HTTP server file system. This is a blocking API.

Parameters
[in]flags

- Reserved

[in]file_name

- Filename of the JSON object data

[in]json_object

- Pointer to the JSON object data

[in]length

- Length of the JSON object data

Returns

  • 0 - Success Negative Value - Failure -4 - Buffer not available to serve the command

Note

  • Refer to Error Codes section for the description of the above error codes Error Codes.


Definition at line 159 of file network/protocols/http_server/rsi_http_server.c

rsi_webpage_erase#

int32_t rsi_webpage_erase (uint8_t *file_name)

Erase the webpage from HTTP server's file system that is present in the WiSeConnect module. This is a blocking API.

Parameters
[in]file_name

- Erase particular/all loaded webpage files from the HTTP server's file system file_name - Erase a particular webpage file NULL - Erase all loaded webpage files

Returns

  • 0 - Success Negative Value - Failure -4 - Buffer not available to serve the command

Note

  • Refer to Error Codes section for the description of the above error codes Error Codes.


Definition at line 275 of file network/protocols/http_server/rsi_http_server.c

rsi_json_object_delete#

int32_t rsi_json_object_delete (uint8_t *file_name)

Delete the JSON object of the HTTP server's file system that is already present in the WiSeConnect module. This is a blocking API.

Parameters
[in]file_name

- Delete a particular JSON object that is already created in the HTTP server's file system

Returns

  • 0 - Success Negative Value - Failure -4 - Buffer not available to serve the command

Note

  • Refer to Error Codes section for the description of the above error codes Error Codes.


Definition at line 384 of file network/protocols/http_server/rsi_http_server.c

rsi_webpage_send#

int32_t rsi_webpage_send (uint8_t flags, uint8_t *webpage, uint32_t length)

Send the webpage to HTTP server's file system. This is a blocking API.

Parameters
[in]flags

- Reserved

[in]webpage

- Pointer to the HTML webpage that contains the HTML webpage content

[in]length

- Webpage length

Returns

  • 0 - Success Negative Value - Failure -4 - Buffer not available to serve the command

Note

  • Refer to Error Codes section for the description of the above error codes Error Codes.


Definition at line 469 of file network/protocols/http_server/rsi_http_server.c