Register all RPC methods on a given Remote instance.
Definition at line 3635 of file AutoResearchRemote.cpp.
3635 {
3636
3637
3638
3639
3645 response.set(
"timestamp",
static_cast<int64_t
>(now));
3646 response.set(
"uptimeMs",
static_cast<int64_t
>(now));
3649 });
3650
3651
3652 remote->
bind(
"status", [
this](
const fl::json&
args) -> fl::json {
3654 status.
set(
"ready",
true);
3655 status.
set(
"pinTx",
static_cast<int64_t
>(
mState->pin_tx));
3656 status.
set(
"pinRx",
static_cast<int64_t
>(
mState->pin_rx));
3657 status.
set(
"transport",
"ble");
3658 return status;
3659 });
3660}
fl::unique_ptr< fl::Remote > remote
fl::shared_ptr< AutoResearchState > mState
void bind(const Config< Callable > &config)
Register method with config (name, function, optional metadata)
void set(const fl::string &key, const json &value) FL_NOEXCEPT
static json object() FL_NOEXCEPT
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.
References args, mState, fl::json::object(), remote, and fl::json::set().
Referenced by startBleRemote().