#ifndef COMPLIB_SERVER_MESSAGEBUILDER_HPP #define COMPLIB_SERVER_MESSAGEBUILDER_HPP #include #include #include "CompLib.pb.h" #include "include/Robot.hpp" class MessageBuilder { public: static CompLib::Header *header(const std::string &message_type); static CompLib::Status *status(bool successful, const std::string &error_message); static CompLib::GenericResponse *generic_response(bool successful, const std::string &error_message); static CompLib::Status *default_successful_status(); static CompLib::GenericResponse *default_successful_generic_response(); static CompLib::EncoderReadPositionsResponse *encoder_read_positions_response(std::array positions); static CompLib::EncoderReadVelocitiesResponse *encoder_read_velocities_response(std::array velocities); static CompLib::IRSensorsReadAllResponse *ir_sensors_read_all_response(std::array data); }; #endif //COMPLIB_SERVER_MESSAGEBUILDER_HPP