main.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #include <QCoreApplication>
  2. #include "rdbconn.h"
  3. #include <iostream>
  4. #include "xmlparam.h"
  5. #include "rdbmodulecomm.h"
  6. #define DEFAULT_PORT 48190 /* for image port it should be 48192 */
  7. #define IMAGE_PORT 48192 // TS 2020.12.28
  8. int main(int argc, char *argv[])
  9. {
  10. QCoreApplication a(argc, argv);
  11. std::string strparapath;
  12. if(argc<2)
  13. {
  14. strparapath = "./vtd_rdb.xml";
  15. }
  16. else
  17. {
  18. strparapath = argv[1];
  19. }
  20. iv::xmlparam::Xmlparam xp(strparapath);
  21. std::string strcommonmsgname = xp.GetParam("commonmsgname","rdbcommon");
  22. std::string strpicturemsgname = xp.GetParam("picturemsgname","rdbpicture");
  23. std::string strvtdip = xp.GetParam("vtdip","10.14.0.234");
  24. int ncommonport = xp.GetParam("defaultport",DEFAULT_PORT);
  25. int npictureport = xp.GetParam("pictureport",IMAGE_PORT);
  26. rdbmodulecomm * prm = new rdbmodulecomm(strcommonmsgname,strpicturemsgname,strvtdip,ncommonport,strvtdip,npictureport);
  27. (void)prm;
  28. return a.exec();
  29. }