Skip to content
Snippets Groups Projects
Commit 1c930488 authored by fxk8y's avatar fxk8y :spider:
Browse files

Moar polishing

parent 326c82ac
No related branches found
No related tags found
No related merge requests found
......@@ -35,63 +35,53 @@ Not all commands will publish a result, but there may be an `ERROR`-topic in the
In the following list, `argument` stands for the message content received on the topic, `NS` and `KEY` denote the used namespace and key.
- `ls` - **list namespaces**
request: `REQUEST/ls`
response: `RESPONSE/ls`
topic: `REQUEST/ls`
argument: used as delimiter for concatenating the list (default: `' '`)
description: returns a list of the namespaces found in `NVS`
- `ls` - **list keys**
request: `REQUEST/ls/NS`
response: `RESPONSE/ls/NS`
topic: `REQUEST/ls/NS`
argument: used as delimiter for concatenating the list (default: `' '`)
description: returns a list of the keys found in namespace `NS`
- `get` - **get generic value**
request: `REQUEST/get/NS/KEY`
response: `RESPONSE/get/NS/KEY`
topic: `REQUEST/get/NS/KEY`
description: reads the value and returns it in its natural form
- `get_type` - **get type of key**
request: `REQUEST/get_type/NS/KEY`
response: `RESPONSE/get_type/NS/KEY`
description: reads the type and converts it to `string`; returns `void` in case of non-existing `key`
topic: `REQUEST/get_type/NS/KEY`
description: reads the type and converts it to `string`
returns `void` in case of non-existing `key`
possible return values: `u8`, `u16`, `u32`, `u64`, `i8`, `i16`, `i32`, `i64`, `str`, `blob`, `any`, `void`
- `get_raw` - **get generic value**
request: `REQUEST/get_raw/NS/KEY`
response: `RESPONSE/get_raw/NS/KEY`
topic: `REQUEST/get_raw/NS/KEY`
description: returns the value in its binary form, for example `2 bytes` in case of `u16`
- `get_<float|double>` - **get floating point value**
request: `REQUEST/get_<float|double>/NS/KEY`
response: `RESPONSE/get_<float|double>/NS/KEY`
topic: `REQUEST/get_<float|double>/NS/KEY`
description: reads the value, `reinterpret_cast`s it to `float` or `double` and returns it converted to `string`
- `set_<float|double>` - **get floating point value**
request: `REQUEST/get_<float|double>/NS/KEY`
response: `RESPONSE/get_<float|double>/NS/KEY`
topic: `REQUEST/get_<float|double>/NS/KEY`
argument: the value to set
description: converts the value from `string` to floating point; `reinterpret_cast`s it to `u32` or `u64` and write it to the `key`
- `get_<u8|i8|u16|i16|u32|i32|u64|i64>` - **get integer value** (`signed` and `unsigned`)
request: `REQUEST/get_<u8|i8|u16|i16|u32|i32|u64|i64>/NS/KEY`
response: `RESPONSE/get_<u8|i8|u16|i16|u32|i32|u64|i64>/NS/KEY`
topic: `REQUEST/get_<u8|i8|u16|i16|u32|i32|u64|i64>/NS/KEY`
description: reads the value, and returns it converted to `string`
- `set_<u8|i8|u16|i16|u32|i32|u64|i64>` - **set integer value** (`signed` and `unsigned`)
request: `REQUEST/set_<u8|i8|u16|i16|u32|i32|u64|i64>/NS/KEY`
response: `RESPONSE/set_<u8|i8|u16|i16|u32|i32|u64|i64>/NS/KEY`
topic: `REQUEST/set_<u8|i8|u16|i16|u32|i32|u64|i64>/NS/KEY`
argument: the value to set
description: converts the message from `string` to `int` and writes it into the `key`; the value is capped to the bounds of the specified type, e.g. `[0, 128]` in case of `set_u8`
- `get_str` - **get string value**
request: `REQUEST/get_str/NS/KEY`
response: `RESPONSE/get_str/NS/KEY`
topic: `REQUEST/get_str/NS/KEY`
description: returns the stored `string` value
- `get_strlen` - **get string length**
request: `REQUEST/get_strlen/NS/KEY`
response: `RESPONSE/get_strlen/NS/KEY`
topic: `REQUEST/get_strlen/NS/KEY`
description: returns the length of a stored `string` value
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment