Loading SRT/Interfaces/build.log 0 → 100644 +0 −0 Empty file added. SRT/Servers/SRTDBESM/include/CommandSocket.h +11 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,17 @@ private: string get_firm_command(short b_addr); string set_dbeamp_command(const char * out_dbe, const char * amp_val); string get_dbeamp_command(const char * out_dbe); string set_dbeeq_command(const char * out_dbe, const char * eq_val); string get_dbeeq_command(const char * out_dbe); string set_dbebpf_command(const char * out_dbe, const char * bpf_val); string get_dbebpf_command(const char * out_dbe); }; #endif /*COMMANDSOCKET_H_*/ No newline at end of file SRT/Servers/SRTDBESM/include/DBESMprotocol.h +15 −3 Original line number Diff line number Diff line Loading @@ -35,10 +35,16 @@ class CDBESMCommand inline static string comm_set_dbeatt(string out_dbe, string att_val){return Commands::m_set_dbeatt + " " + out_dbe + " " + att_val + TAIL;} inline static string comm_get_dbeatt(string out_dbe){return Commands::m_get_dbeatt + " " + out_dbe + TAIL;} inline static string comm_get_firm(string b_addr){return Commands::m_get_firm + " BOARD " + b_addr + TAIL;} inline static string comm_set_dbeamp(string out_dbe, string amp_val){return Commands::m_set_dbeamp + " " + out_dbe + " " + amp_val + TAIL;} inline static string comm_get_dbeamp(string out_dbe){return Commands::m_get_dbeamp + " " + out_dbe + TAIL;} inline static string comm_set_dbeeq(string out_dbe, string eq_val){return Commands::m_set_dbeeq + " " + out_dbe + " " + eq_val + TAIL;} inline static string comm_get_dbeeq(string out_dbe){return Commands::m_get_dbeeq + " " + out_dbe + TAIL;} inline static string comm_set_dbebpf(string out_dbe, string bpf_val){return Commands::m_set_dbebpf + " " + out_dbe + " " + bpf_val + TAIL;} inline static string comm_get_dbebpf(string out_dbe){return Commands::m_get_dbebpf + " " + out_dbe + TAIL;} private: /* * Commands * Commandsf */ struct Commands{ inline static const string m_set_all {"DBE SETALLMODE"}; Loading @@ -47,13 +53,19 @@ class CDBESMCommand inline static const string m_delete_file { "DBE DELETEFILE" }; inline static const string m_get_status { "DBE GETSTATUS" }; inline static const string m_set_att { "DBE SETATT" }; //inline static const string m_get_diag_all { "DBE ReadALLReadDIAG" }; //inline static const string m_get_diag_all { "DBE ReadALLDIAG" }; inline static const string m_get_diag { "DBE ReadDIAG" }; inline static const string m_get_comp { "DBE GETCOMP" }; inline static const string m_get_cfg { "DBE GETCFG" }; inline static const string m_set_dbeatt { "DBE SETDBEATT" }; inline static const string m_get_dbeatt { "DBE GETDBEATT" }; inline static const string m_get_firm { "DBE FIRM" }; inline static const string m_get_firm { "DBE GETFIRM" }; inline static const string m_set_dbeamp { "DBE SETDBEAMP" }; inline static const string m_get_dbeamp { "DBE GETDBEAMP" }; inline static const string m_set_dbeeq { "DBE SETDBEEQ" }; inline static const string m_get_dbeeq { "DBE GETDBEEQ" }; inline static const string m_set_dbebpf { "DBE SETDBEBPF" }; inline static const string m_get_dbebpf { "DBE GETDBEBPF" }; }; }; //class CDBESMCommand Loading SRT/Servers/SRTDBESM/include/SRTDBESMImpl.h +12 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,18 @@ public: virtual void handle_addr(short * b_addr); virtual void set_dbeampconst char * out_dbe, const char * amp_val); //throw (BackendsErrors::BackendsErrorsEx); virtual void get_dbeamp(const char * out_dbe); //throw (BackendsErrors::BackendsErrorsEx); virtual void set_dbeeq(const char * out_dbe, const char * eq_val); //throw (BackendsErrors::BackendsErrorsEx); virtual void get_dbeeq(const char * out_dbe); //throw (BackendsErrors::BackendsErrorsEx); virtual void set_dbebpf(const char * out_dbe, const char * bpf_val); //throw (BackendsErrors::BackendsErrorsEx); virtual void get_dbebpf(const char * out_dbe); //throw (BackendsErrors::BackendsErrorsEx); /** * Returns a reference to addr_1. * @return pointer to long property addr_1 Loading SRT/Servers/SRTDBESM/src/CommandSocket.cpp +120 −1 Original line number Diff line number Diff line Loading @@ -583,7 +583,7 @@ string CCommandSocket::get_dbeatt_command(const char * out_dbe) //throw (Backend } else if (response.find("ERR") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::get_dbeatt_command()"); impl.setReason("Error in setting dbesm output attenuation, check parameters"); impl.setReason("Error in getting dbesm output attenuation, check parameters"); throw impl; } return response; Loading Loading @@ -613,3 +613,122 @@ string CCommandSocket::get_firm_command(short b_addr) //throw (BackendsErrors::B } return response; } string CCommandSocket::set_dbeamp_command(const char * out_dbe, const char * amp_val) //throw (BackendsErrors::BackendsErrorsEx) { string response; string msg = CDBESMCommand::comm_set_dbeamp(out_dbe, amp_val); //cout << "Message to send is: " << msg << endl; sendCommand(msg, &response, 0); if (response.find("unreachable") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::set_dbeamp_command()"); impl.setReason("DBESM board unreachable, timeout error"); throw impl; } else if (response.find("ERR") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::set_dbeamp_command()"); impl.setReason("Error in setting dbesm output amplification, check parameters"); throw impl; } return response; } string CCommandSocket::get_dbeamp_command(const char * out_dbe) //throw (BackendsErrors::BackendsErrorsEx) { string response; string msg = CDBESMCommand::comm_get_dbeamp(out_dbe); //cout << "Message to send is: " << msg << endl; sendCommand(msg, &response, 0); if (response.find("unreachable") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::get_dbeamp_command()"); impl.setReason("DBESM board unreachable, timeout error"); throw impl; } else if (response.find("ERR") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::get_dbeamp_command()"); impl.setReason("Error in getting dbesm output amplification, check parameters"); throw impl; } return response; } string CCommandSocket::set_dbeeq_command(const char * out_dbe, const char * eq_val) //throw (BackendsErrors::BackendsErrorsEx) { string response; string msg = CDBESMCommand::comm_set_dbeeq(out_dbe, eq_val); //cout << "Message to send is: " << msg << endl; sendCommand(msg, &response, 0); if (response.find("unreachable") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::set_dbeeq_command()"); impl.setReason("DBESM board unreachable, timeout error"); throw impl; } else if (response.find("ERR") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::set_dbeeq_command()"); impl.setReason("Error in setting dbesm output equalization, check parameters"); throw impl; } return response; } string CCommandSocket::get_dbeeq_command(const char * out_dbe) //throw (BackendsErrors::BackendsErrorsEx) { string response; string msg = CDBESMCommand::comm_get_dbeeq(out_dbe); //cout << "Message to send is: " << msg << endl; sendCommand(msg, &response, 0); if (response.find("unreachable") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::get_dbeeq_command()"); impl.setReason("DBESM board unreachable, timeout error"); throw impl; } else if (response.find("ERR") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::get_dbeeq_command()"); impl.setReason("Error in getting dbesm output equalization, check parameters"); throw impl; } return response; string CCommandSocket::set_dbebpf_command(const char * out_dbe, const char * bpf_val) //throw (BackendsErrors::BackendsErrorsEx) { string response; string msg = CDBESMCommand::comm_set_dbebpf(out_dbe, bpf_val); //cout << "Message to send is: " << msg << endl; sendCommand(msg, &response, 0); if (response.find("unreachable") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::set_dbebpf_command()"); impl.setReason("DBESM board unreachable, timeout error"); throw impl; } else if (response.find("ERR") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::set_dbebpf_command()"); impl.setReason("Error in setting dbesm output equalization, check parameters"); throw impl; } return response; } string CCommandSocket::get_dbebpf_command(const char * out_dbe) //throw (BackendsErrors::BackendsErrorsEx) { string response; string msg = CDBESMCommand::comm_get_dbebpf(out_dbe); //cout << "Message to send is: " << msg << endl; sendCommand(msg, &response, 0); if (response.find("unreachable") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::get_dbebpf_command()"); impl.setReason("DBESM board unreachable, timeout error"); throw impl; } else if (response.find("ERR") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::get_dbebpf_command()"); impl.setReason("Error in getting dbesm output equalization, check parameters"); throw impl; } return response; } No newline at end of file Loading
SRT/Servers/SRTDBESM/include/CommandSocket.h +11 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,17 @@ private: string get_firm_command(short b_addr); string set_dbeamp_command(const char * out_dbe, const char * amp_val); string get_dbeamp_command(const char * out_dbe); string set_dbeeq_command(const char * out_dbe, const char * eq_val); string get_dbeeq_command(const char * out_dbe); string set_dbebpf_command(const char * out_dbe, const char * bpf_val); string get_dbebpf_command(const char * out_dbe); }; #endif /*COMMANDSOCKET_H_*/ No newline at end of file
SRT/Servers/SRTDBESM/include/DBESMprotocol.h +15 −3 Original line number Diff line number Diff line Loading @@ -35,10 +35,16 @@ class CDBESMCommand inline static string comm_set_dbeatt(string out_dbe, string att_val){return Commands::m_set_dbeatt + " " + out_dbe + " " + att_val + TAIL;} inline static string comm_get_dbeatt(string out_dbe){return Commands::m_get_dbeatt + " " + out_dbe + TAIL;} inline static string comm_get_firm(string b_addr){return Commands::m_get_firm + " BOARD " + b_addr + TAIL;} inline static string comm_set_dbeamp(string out_dbe, string amp_val){return Commands::m_set_dbeamp + " " + out_dbe + " " + amp_val + TAIL;} inline static string comm_get_dbeamp(string out_dbe){return Commands::m_get_dbeamp + " " + out_dbe + TAIL;} inline static string comm_set_dbeeq(string out_dbe, string eq_val){return Commands::m_set_dbeeq + " " + out_dbe + " " + eq_val + TAIL;} inline static string comm_get_dbeeq(string out_dbe){return Commands::m_get_dbeeq + " " + out_dbe + TAIL;} inline static string comm_set_dbebpf(string out_dbe, string bpf_val){return Commands::m_set_dbebpf + " " + out_dbe + " " + bpf_val + TAIL;} inline static string comm_get_dbebpf(string out_dbe){return Commands::m_get_dbebpf + " " + out_dbe + TAIL;} private: /* * Commands * Commandsf */ struct Commands{ inline static const string m_set_all {"DBE SETALLMODE"}; Loading @@ -47,13 +53,19 @@ class CDBESMCommand inline static const string m_delete_file { "DBE DELETEFILE" }; inline static const string m_get_status { "DBE GETSTATUS" }; inline static const string m_set_att { "DBE SETATT" }; //inline static const string m_get_diag_all { "DBE ReadALLReadDIAG" }; //inline static const string m_get_diag_all { "DBE ReadALLDIAG" }; inline static const string m_get_diag { "DBE ReadDIAG" }; inline static const string m_get_comp { "DBE GETCOMP" }; inline static const string m_get_cfg { "DBE GETCFG" }; inline static const string m_set_dbeatt { "DBE SETDBEATT" }; inline static const string m_get_dbeatt { "DBE GETDBEATT" }; inline static const string m_get_firm { "DBE FIRM" }; inline static const string m_get_firm { "DBE GETFIRM" }; inline static const string m_set_dbeamp { "DBE SETDBEAMP" }; inline static const string m_get_dbeamp { "DBE GETDBEAMP" }; inline static const string m_set_dbeeq { "DBE SETDBEEQ" }; inline static const string m_get_dbeeq { "DBE GETDBEEQ" }; inline static const string m_set_dbebpf { "DBE SETDBEBPF" }; inline static const string m_get_dbebpf { "DBE GETDBEBPF" }; }; }; //class CDBESMCommand Loading
SRT/Servers/SRTDBESM/include/SRTDBESMImpl.h +12 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,18 @@ public: virtual void handle_addr(short * b_addr); virtual void set_dbeampconst char * out_dbe, const char * amp_val); //throw (BackendsErrors::BackendsErrorsEx); virtual void get_dbeamp(const char * out_dbe); //throw (BackendsErrors::BackendsErrorsEx); virtual void set_dbeeq(const char * out_dbe, const char * eq_val); //throw (BackendsErrors::BackendsErrorsEx); virtual void get_dbeeq(const char * out_dbe); //throw (BackendsErrors::BackendsErrorsEx); virtual void set_dbebpf(const char * out_dbe, const char * bpf_val); //throw (BackendsErrors::BackendsErrorsEx); virtual void get_dbebpf(const char * out_dbe); //throw (BackendsErrors::BackendsErrorsEx); /** * Returns a reference to addr_1. * @return pointer to long property addr_1 Loading
SRT/Servers/SRTDBESM/src/CommandSocket.cpp +120 −1 Original line number Diff line number Diff line Loading @@ -583,7 +583,7 @@ string CCommandSocket::get_dbeatt_command(const char * out_dbe) //throw (Backend } else if (response.find("ERR") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::get_dbeatt_command()"); impl.setReason("Error in setting dbesm output attenuation, check parameters"); impl.setReason("Error in getting dbesm output attenuation, check parameters"); throw impl; } return response; Loading Loading @@ -613,3 +613,122 @@ string CCommandSocket::get_firm_command(short b_addr) //throw (BackendsErrors::B } return response; } string CCommandSocket::set_dbeamp_command(const char * out_dbe, const char * amp_val) //throw (BackendsErrors::BackendsErrorsEx) { string response; string msg = CDBESMCommand::comm_set_dbeamp(out_dbe, amp_val); //cout << "Message to send is: " << msg << endl; sendCommand(msg, &response, 0); if (response.find("unreachable") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::set_dbeamp_command()"); impl.setReason("DBESM board unreachable, timeout error"); throw impl; } else if (response.find("ERR") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::set_dbeamp_command()"); impl.setReason("Error in setting dbesm output amplification, check parameters"); throw impl; } return response; } string CCommandSocket::get_dbeamp_command(const char * out_dbe) //throw (BackendsErrors::BackendsErrorsEx) { string response; string msg = CDBESMCommand::comm_get_dbeamp(out_dbe); //cout << "Message to send is: " << msg << endl; sendCommand(msg, &response, 0); if (response.find("unreachable") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::get_dbeamp_command()"); impl.setReason("DBESM board unreachable, timeout error"); throw impl; } else if (response.find("ERR") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::get_dbeamp_command()"); impl.setReason("Error in getting dbesm output amplification, check parameters"); throw impl; } return response; } string CCommandSocket::set_dbeeq_command(const char * out_dbe, const char * eq_val) //throw (BackendsErrors::BackendsErrorsEx) { string response; string msg = CDBESMCommand::comm_set_dbeeq(out_dbe, eq_val); //cout << "Message to send is: " << msg << endl; sendCommand(msg, &response, 0); if (response.find("unreachable") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::set_dbeeq_command()"); impl.setReason("DBESM board unreachable, timeout error"); throw impl; } else if (response.find("ERR") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::set_dbeeq_command()"); impl.setReason("Error in setting dbesm output equalization, check parameters"); throw impl; } return response; } string CCommandSocket::get_dbeeq_command(const char * out_dbe) //throw (BackendsErrors::BackendsErrorsEx) { string response; string msg = CDBESMCommand::comm_get_dbeeq(out_dbe); //cout << "Message to send is: " << msg << endl; sendCommand(msg, &response, 0); if (response.find("unreachable") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::get_dbeeq_command()"); impl.setReason("DBESM board unreachable, timeout error"); throw impl; } else if (response.find("ERR") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::get_dbeeq_command()"); impl.setReason("Error in getting dbesm output equalization, check parameters"); throw impl; } return response; string CCommandSocket::set_dbebpf_command(const char * out_dbe, const char * bpf_val) //throw (BackendsErrors::BackendsErrorsEx) { string response; string msg = CDBESMCommand::comm_set_dbebpf(out_dbe, bpf_val); //cout << "Message to send is: " << msg << endl; sendCommand(msg, &response, 0); if (response.find("unreachable") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::set_dbebpf_command()"); impl.setReason("DBESM board unreachable, timeout error"); throw impl; } else if (response.find("ERR") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::set_dbebpf_command()"); impl.setReason("Error in setting dbesm output equalization, check parameters"); throw impl; } return response; } string CCommandSocket::get_dbebpf_command(const char * out_dbe) //throw (BackendsErrors::BackendsErrorsEx) { string response; string msg = CDBESMCommand::comm_get_dbebpf(out_dbe); //cout << "Message to send is: " << msg << endl; sendCommand(msg, &response, 0); if (response.find("unreachable") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::get_dbebpf_command()"); impl.setReason("DBESM board unreachable, timeout error"); throw impl; } else if (response.find("ERR") != string::npos) { _EXCPT(BackendsErrors::BackendFailExImpl,impl,"CCommandSocket::get_dbebpf_command()"); impl.setReason("Error in getting dbesm output equalization, check parameters"); throw impl; } return response; } No newline at end of file