HTTP Server#
Functions#
Register the call backs.This is non blocking API.
Register the event call backs.This is non blocking API.
Register webpage request callbacks.This is non blocking API.
Register wireless firmware upgrade callbacks.This is non blocking API.
Load the webpage to the HTTP Server's file system that is present in the WiSeConnect module. This is a blocking API.
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.
Erase the webpage from HTTP server's file system that is present in the WiSeConnect module. This is a blocking API.
Delete the JSON object of the HTTP server's file system that is already present in the WiSeConnect module. This is a blocking API.
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(*)(uint8_t *filename, uint8_t *json_object, uint32_t length, uint32_t status) callback_handler_ptr, filename, json_object, length, status)
Register the call backs.This is non blocking API.
[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.
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(*)(uint32_t status, uint8_t *json_object, uint32_t length) callback_handler_ptr, status, json_object, length)
Register the event call backs.This is non blocking API.
[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
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(*)(uint8_t type, uint8_t *url_name, uint8_t *post_content_buffer, uint32_t post_content_length, uint32_t status) callback_handler_ptr, type, url_name, post_content_buffer, post_content_length, status)
Register webpage request callbacks.This is non blocking API.
[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
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(*)(uint8_t type, uint32_t status) callback_handler_ptr, type, status)
Register wireless firmware upgrade callbacks.This is non blocking API.
[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
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.
[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 |
rsi_wireless_init() API needs to be called before this API.
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.
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.
[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 |
rsi_wireless_init() API needs to be called before this API
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.
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.
[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 |
rsi_wireless_init() API needs to be called before this API
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.
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.
[in] | file_name | - Delete a particular JSON object that is already created in the HTTP server's file system |
rsi_wireless_init() API needs to be called before this API.
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.
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.
[in] | flags | - Reserved |
[in] | webpage | - Pointer to the HTML webpage that contains the HTML webpage content |
[in] | length | - Webpage length |
rsi_wlan_connect() API needs to be called before this API.
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.
469
of file network/protocols/http_server/rsi_http_server.c