mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
RPC calls
This commit is contained in:
27
components/flatbuffers/include/CallBuilder.h
Normal file
27
components/flatbuffers/include/CallBuilder.h
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
#ifndef CALLBUILDER_H
|
||||
#define CALLBUILDER_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "SerializedMessage.h"
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
#include "flatbuffers_generated/ReturnCall_generated.h"
|
||||
#include "flatbuffers_generated/SendCall_generated.h"
|
||||
|
||||
namespace Flatbuffers {
|
||||
|
||||
class CallBuilder {
|
||||
public:
|
||||
CallBuilder() : builder_(1024) {}
|
||||
|
||||
SerializedMessage build_return_call(uint8_t unique_id, const std::vector<uint8_t> &return_value);
|
||||
|
||||
static const Messaging::SendCall *parse_send_call(const uint8_t *buffer);
|
||||
|
||||
private:
|
||||
flatbuffers::FlatBufferBuilder builder_;
|
||||
};
|
||||
} // namespace Flatbuffers
|
||||
|
||||
#endif // CALLBUILDER_H
|
||||
Reference in New Issue
Block a user