FastLED 3.9.15
Loading...
Searching...
No Matches

◆ bind() [2/2]

template<typename Callable>
void fl::Rpc::bind ( const Config< Callable > & config)
inline

Bind a method with configuration (name, function, optional metadata).

Supports dot notation for namespacing: "led.setBrightness", "system.status" Use get() to retrieve a callable if you need to invoke the method from C++ code.

Definition at line 234 of file rpc.h.

234 {
235 using Sig = typename callable_traits<typename decay<Callable>::type>::signature;
236 RpcFn<Sig> wrapped(config.fn);
237 registerMethod<Sig>(config.name.c_str(), wrapped, config.params, config.description, config.tags, config.mode);
238 }
bool registerMethod(const char *name, RpcFn< Sig > fn, const fl::vector< fl::string > &paramNames, const fl::string &description, const fl::vector< fl::string > &tags, fl::RpcMode mode=fl::RpcMode::SYNC)
Definition rpc.h:346
fl::function< Sig > RpcFn
Definition rpc_handle.h:14

References bind(), and registerMethod().

Referenced by bind(), and bind().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: