USRP_Server  2.0
A flexible, GPU-accelerated radio-frequency readout software.
USRP_JSON_interpreter.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef USRP_JSON_INCLUDED
3 #define USRP_JSON_INCLUDED
5 #include <boost/property_tree/json_parser.hpp>
6 
7 #define MAX_MSG_LEN = 10000
8 //this function will read the arrays inside a json file and put them in a std vector.
9 template <typename T>
10 std::vector<T> as_vector(boost::property_tree::ptree const& pt,boost::property_tree::ptree::key_type const& key,boost::property_tree::ptree::key_type const& sub_key = "NULL");
11 
12 //convert a json string into a parameter object
13 bool string2param(std::string data, usrp_param &my_parameter);
14 
15 bool is_pfb_active(param ant_parameter);
16 
17 //check if the parameters are physically viable
18 bool chk_param(usrp_param *parameter);
19 
20 std::string server_ack(std::string payload);
21 
22 std::string server_nack(std::string payload);
23 
24 #endif
bool string2param(std::string data, usrp_param &my_parameter)
bool chk_param(usrp_param *parameter)
std::string server_ack(std::string payload)
std::vector< T > as_vector(boost::property_tree::ptree const &pt, boost::property_tree::ptree::key_type const &key, boost::property_tree::ptree::key_type const &sub_key="NULL")
bool is_pfb_active(param ant_parameter)
std::string server_nack(std::string payload)