38 #ifndef DAQS_DATABASESERVER_SESSION_H 39 #define DAQS_DATABASESERVER_SESSION_H 47 #include <messages.pb.h> 48 #include <boost/asio.hpp> 50 #include "src/database-server/data-access/idataaccess.h" 69 void read_body(message::MessageType msg_type, std::size_t b_size);
94 message::ResponseStatus status,
95 message::MessageType* prev_msg =
nullptr);
void send_variables_response(std::vector< Variable > &&variables)
Definition: session.cc:112
Session(boost::asio::ip::tcp::socket socket, IDataAccess *da)
Definition: session.cc:43
void read_get_variables_request(std::size_t b_size)
Definition: session.cc:340
IDataAccess * da_
Definition: session.h:102
virtual std::tuple< std::vector< VarValue >, Err > fetch_variable_values(const std::string &var_name, const std::chrono::system_clock::time_point &start_date, const std::chrono::system_clock::time_point &end_date, size_t max_len=std::numeric_limits< size_t >::infinity()) noexcept=0
fetch_variable_values get values for a variable in a date range.
std::unique_ptr< std::uint8_t[]> build_b_response(std::vector< Variable > &&vars, std::size_t *out_b_size)
Definition: session.cc:153
boost::asio::ip::tcp::socket socket_
Definition: session.h:101
void read_body(message::MessageType msg_type, std::size_t b_size)
Definition: session.cc:218
void send_status_response(const std::string &msg, message::ResponseStatus status, message::MessageType *prev_msg=nullptr)
Definition: session.cc:90
void start()
Definition: session.h:56
void send_msg(std::shared_ptr< uint8_t > f_buf, std::size_t f_size)
Definition: session.cc:201
void send_values_response(std::vector< VarValue > &&values)
Definition: session.cc:102
void read_add_variable_request(std::size_t b_size)
Definition: session.cc:241
void read_get_values_request(std::size_t b_size)
Definition: session.cc:305
void read_header()
Definition: session.cc:46
void do_read()
Definition: session.h:71
void read_save_value_request(std::size_t b_size)
Definition: session.cc:273