|
Wombat Environmental Node 1.0
An environmental node for SDI-12 and digital sensors.
|
Functions | |
| const char * | stripTrailingZeros (const float value) |
| Returns a pointer to a string representation of value, with trailing zeros removed. More... | |
| size_t | stripLeadingWS (char *str) |
| Removes leading whitespace characters from str. More... | |
| size_t | stripTrailingWS (char *str) |
| Removes trailing whitespace characters from str. More... | |
| size_t | stripWS (char *str) |
| Removes leading and trailing whitespace characters from str. More... | |
| bool | get_cp_destination (const char *input_ptr, const size_t input_len, int &dest, const char **dest_filename_ptr, size_t &dest_output_len) |
| extract the destination type and filename from a string of the form dest:filename. More... | |
| bool wombat::get_cp_destination | ( | const char * | input_ptr, |
| const size_t | input_len, | ||
| int & | dest, | ||
| const char ** | dest_filename_ptr, | ||
| size_t & | dest_output_len | ||
| ) |
extract the destination type and filename from a string of the form dest:filename.
When copying files between the SD card filesystem, SPIFFS, and the modem, the destination filename must be prefixed with the destination device. Eg r5:msg.txt, sd:msg.json, spiffs:msg.json.
| input_ptr | [IN] A pointer to the first character of the dest:filename string. |
| input_len | [IN] The length of input_ptr, excluding any trailing null. |
| dest | [OUT] A reference to a file_copy_dest variable. |
| dest_filename_ptr | [OUT] A pointer to a pointer that will receive the address of the filename portion of dest:filename. |
| dest_output_len | [OUT] The length of the filename portion of dest:filename |
| size_t wombat::stripLeadingWS | ( | char * | str | ) |
Removes leading whitespace characters from str.
Any character with a value of less than space is considered to be whitespace.
| str | the string whose leading whitespace is stripped. |
| size_t wombat::stripTrailingWS | ( | char * | str | ) |
Removes trailing whitespace characters from str.
Any character with a value of less than space is considered to be whitespace.
| str | the string whose trailing whitespace is stripped. |
| const char * wombat::stripTrailingZeros | ( | const float | value | ) |
Returns a pointer to a string representation of value, with trailing zeros removed.
The default f formatter is used to get the initial string representation, so 6 digits after the decimal point. From that, trailing zeros are removed.
The pointer returned from this function must not be passed to free. This function is not re-entrant.
| value | the value to convert to a string. |
| size_t wombat::stripWS | ( | char * | str | ) |
Removes leading and trailing whitespace characters from str.
Any character with a value of less than space is considered to be whitespace.
| str | the string whose leading and trailing whitespace is stripped. |