Function esp_idf_hal::sys::protocomm_set_version
source ยท pub unsafe extern "C" fn protocomm_set_version(
pc: *mut protocomm,
ep_name: *const i8,
version: *const i8,
) -> i32
Expand description
@brief Set endpoint for version verification
This API can be used for setting an application specific protocol version which can be verified by clients through the endpoint.
@note
- An endpoint must be bound to a valid protocomm instance,
created using
protocomm_new()
.
@param[in] pc Pointer to the protocomm instance @param[in] ep_name Endpoint identifier(name) string @param[in] version Version identifier(name) string
@return
- ESP_OK : Success
- ESP_FAIL : Error adding endpoint / Endpoint with this name already exists
- ESP_ERR_INVALID_STATE : Version endpoint already set
- ESP_ERR_NO_MEM : Error allocating endpoint resource
- ESP_ERR_INVALID_ARG : Null instance/name/handler arguments