mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
28 lines
619 B
C++
28 lines
619 B
C++
|
|
#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
|