Skip to content

Commit

Permalink
Add documentation on backend custom status.
Browse files Browse the repository at this point in the history
  • Loading branch information
lPrimemaster committed Feb 21, 2025
1 parent ed0dd9e commit 07cd221
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include(cmake/InstallMulex.cmake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

# Version configuration
project(mulex-fk VERSION 0.4.1)
project(mulex-fk VERSION 0.4.2)
set(PROJECT_VNAME Wise)

set(CMAKE_CXX_STANDARD 20)
Expand Down
15 changes: 15 additions & 0 deletions docs/backends.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,18 @@ int main(int argc, char* argv[])
return 0;
}
```
## Setting custom status
The `MxBackend` interface allows you to set a custom status that
will appear on the project's frontend page. This is usefull to
quickly the state of a backend to the user. Here's how to do it:
```cpp
void some_method()
{
// ...
// Status name followed by a custom RGB triplet
setStatus("MyCustomStatus", "#ff0000");
}
```
The custom status is reset upon backend disconnect / exit.

0 comments on commit 07cd221

Please sign in to comment.