Comms CCF
This is a simple communication layer based on COBS, CBOR and FNV-1A
Loading...
Searching...
No Matches
Rpc< Calls > Class Template Reference

Public Member Functions

 Rpc (Calls &&... calls_)
bool schema (std::span< uint8_t > &buf) const
 Encode the schema for all the RPC functions onto buf.
bool call (size_t n, std::span< uint8_t > &args, std::span< uint8_t > &ret) const

Public Attributes

std::tuple< Calls... > tuple
std::array< std::reference_wrapper< NonTemplatedCall >, sizeof...(Calls)> calls

Member Function Documentation

◆ call()

template<typename... Calls>
bool Rpc< Calls >::call ( size_t n,
std::span< uint8_t > & args,
std::span< uint8_t > & ret ) const
inline

Calls the given RPC function (by index n) using the encoded arguments in args and encodes the result into ret.


The documentation for this class was generated from the following file: