FastLED 3.10.8
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 240 of file rpc.h.

240 {
241 using Sig = typename callable_traits<typename decay<Callable>::type>::signature;
242 RpcFn<Sig> wrapped(config.fn);
243 registerMethod<Sig>(config.name.c_str(), wrapped, config.params, config.description, config.tags, config.mode);
244 }
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) FL_NO_EXCEPT
Definition rpc.h:357
fl::function< Sig > RpcFn
Definition rpc_handle.h:14

References bind(), fl::FL_NO_EXCEPT, and registerMethod().

Referenced by bind(), and bind().

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