mbc_master_get_parameter() function
Read parameter from modbus slave device whose name is defined by name and has cid. The additional data for request is taken from parameter description (lookup) table.
Arguments
cid
id of the characteristic for parameter
name
pointer into string name (key) of parameter (null terminated)
value
pointer to data buffer of parameter
type
parameter type associated with the name returned from parameter description table.
Return value
- esp_err_t ESP_OK - request was successful and value buffer contains representation of actual parameter data from slave - esp_err_t ESP_ERR_INVALID_ARG - invalid argument of function or parameter descriptor - esp_err_t ESP_ERR_INVALID_RESPONSE - an invalid response from slave - esp_err_t ESP_ERR_INVALID_STATE - invalid state during data processing or allocation failure - esp_err_t ESP_ERR_TIMEOUT - operation timed out and no response from slave - esp_err_t ESP_ERR_NOT_SUPPORTED - the request command is not supported by slave - esp_err_t ESP_ERR_NOT_FOUND - the parameter is not found in the parameter description table - esp_err_t ESP_FAIL - slave returned an exception or other failure