CDSVmsCtlrF.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. //---------------------------------------------------------------------------
  2. #ifndef CDSVmsCtlrFH
  3. #define CDSVmsCtlrFH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <stdio.h>
  7. //---------------------------------------------------------------------------
  8. #include "ITSLibF.h"
  9. //---------------------------------------------------------------------------
  10. typedef enum enVmsState
  11. {
  12. state_normal = 0,
  13. state_error,
  14. state_module,
  15. } EN_VMS_STATE;
  16. //---------------------------------------------------------------------------
  17. typedef enum _e_schedule_mode
  18. {
  19. enScheduleAuto,
  20. enScheduleFix,
  21. enScheduleBase,
  22. enScheduleMax,
  23. } e_schedule_mode;
  24. //---------------------------------------------------------------------------
  25. typedef enum _e_form_type
  26. {
  27. eFormTp_traf_1 = 11, // 소통상황(1단)
  28. eFormTp_traf_2 = 12, // 소통상황(2단)
  29. eFormTp_traf_3 = 13, // 소통상황(3단)
  30. eFormTp_traf_4 = 14, // 소통상황(4단)
  31. eFormtp_figure = 15, // 소통상황(도형식배경소통정보)
  32. eFormTp_congest = 16, // 정체소통상황
  33. eFormTp_incident = 20, // 돌발문안
  34. eFormTp_gongsa = 30, // 공사/행사문안
  35. eFormTp_hongbo = 40, // 홍보문안
  36. eFormTp_deture = 50, // 우회도로
  37. eFormTp_safe = 60, // 재난안전
  38. eFormTp_video = 70, // 동영상
  39. eFormTp_stream = 80, // 스트리밍영상
  40. eFormTp_atmp = 90, // 대기환경
  41. eFormTp_park = 91, // 주차정보
  42. } e_form_type;
  43. typedef enum _e_schedule_type
  44. {
  45. eSchTp_traffic = 0, //0:교통,
  46. eSchTp_incident = 1, //1:돌발,
  47. eSchTp_gongsa = 2, //2:공사행사,
  48. eSchTp_hongbo = 3, //3:홍보,
  49. eSchTp_deture = 4, //4:우회,
  50. eSchTp_congest = 5, //5:정체,
  51. eSchTp_safe = 6, //6:안전,
  52. eSchTp_video = 7, //7:동영상,
  53. eSchTp_stream = 8, //8:스트리밍영상
  54. eSchTp_atmp = 9, //9:대기환경
  55. eSchTp_park = 10, //10:주차정보
  56. eSchTp_max,
  57. } e_schedule_type;
  58. //---------------------------------------------------------------------------
  59. typedef struct tagScheduleUsage
  60. {
  61. int Total[eSchTp_max];
  62. int Use[eSchTp_max];
  63. } SCHEDULE_USAGE, *PSCHEDULE_USAGE;
  64. //---------------------------------------------------------------------------
  65. class TVmsIfscRltn
  66. {
  67. public:
  68. TVmsIfscRltn();
  69. ~TVmsIfscRltn();
  70. public:
  71. String VMS_CTLR_NMBR; //NUMBER(10) N VMS 제어기 번호
  72. int VMS_IFSC_ID; //NUMBER(10) N VMS 정보제공구간 ID
  73. int DSPL_PRRT; //NUMBER(2) Y 표출 우선순위
  74. String CNGS_CNFM_YN; //CHAR(1) Y 'Y' 정체폼 정체판정 여부
  75. int CNGS_CNFM_SPED; //NUMBER(2) Y 5 정체폼 정체판정 속도
  76. };
  77. //---------------------------------------------------------------------------
  78. class TVmsCtlrStts
  79. {
  80. public:
  81. TVmsCtlrStts() {};
  82. ~TVmsCtlrStts(){};
  83. public:
  84. // 상태
  85. String UPDT_DT;
  86. String CMNC_STTS_CD;
  87. String PWER_STTS_CD;
  88. String MODL_STTS_CD;
  89. String CBOX_DOOR_STTS_CD;
  90. String FAN_STTS_CD;
  91. String HETR_STTS_CD;
  92. int CBOX_TMPR;
  93. int BRGH_VAL;
  94. String COMM_STTS_CD;
  95. String MODL_STTS;
  96. String PWER_STTS;
  97. String CMNC_STTS_DESC;
  98. String PWER_STTS_DESC;
  99. String MODL_STTS_DESC;
  100. String CBOX_DOOR_STTS_DESC;
  101. String FAN_STTS_DESC;
  102. String HETR_STTS_DESC;
  103. String COMM_STTS_DESC;
  104. // 정보제공상태
  105. String PROVIDE_TIME;
  106. String PROVIDE_RESULT;
  107. String PROVIDE_SVC;
  108. int PROVIDE_CNT;
  109. int AUTO_TOTAL;
  110. int AUTO_USED;
  111. int FIXED_TOTAL;
  112. int FIXED_USED;
  113. int BASIC_TOTAL;
  114. int BASIC_USED;
  115. };
  116. //---------------------------------------------------------------------------
  117. class TVmsCtlr
  118. {
  119. public:
  120. TVmsCtlr() { STTS = new TVmsCtlrStts(); };
  121. ~TVmsCtlr(){};
  122. public:
  123. String VMS_CTLR_NMBR;
  124. String VMS_CTLR_ID;
  125. String VMS_NM;
  126. String VMS_CTLR_IP;
  127. String VMS_CTLR_PORT;
  128. String VMS_CTLR_LOCAL_NO;
  129. String VMS_TYPE_CD;
  130. String ISTL_LCTN_NM;
  131. String X_CRDN;
  132. String Y_CRDN;
  133. String DEL_YN;
  134. String WEB_CMRA_IP;
  135. String WEB_CMRA_PORT;
  136. String WEB_CMRA_ID;
  137. String WEB_CMRA_PWD;
  138. String STRM_SESN_NM;
  139. String OPER_MODE;
  140. String VMS_MAX_PHSE_NUM;
  141. String DEF_PHSE_CHNG_CYCL;
  142. String PANL_ON_TIME;
  143. String PANL_OFF_TIME;
  144. String PANL_PWER_MODE;
  145. String FAN_MODE;
  146. String FAN_RUN_TMPR;
  147. String HETR_MODE;
  148. String HETR_RUN_TMPR;
  149. String BRGH_MODE;
  150. String BRGH_CURR_STEP;
  151. String BRGH_WEEK_STEP;
  152. String BRGH_NGHT_STEP;
  153. String MODL_ERR_RATE;
  154. String CMNC_FAIL_RATE;
  155. String WEB_CMRA_CMPY;
  156. String WEB_CMRA_MDL;
  157. String ISTL_LCTN_ADDR;
  158. String STRM_HTTP_ADDR;
  159. String STRM_RTSP_ADDR;
  160. String VMS_TYPE_DESC;
  161. String OPER_MODE_DESC;
  162. int VMS_WDTH;
  163. int VMS_HGHT;
  164. int ROWS;
  165. int COLS;
  166. int MODL_ROWS;
  167. int MODL_COLS;
  168. int POWR_ROWS;
  169. int POWR_COLS;
  170. String VMS_CMNC_ERR_BASS_VAL;
  171. String VMS_NGHT_BRGH_STEP;
  172. String VMS_WEEK_BRGH_STEP;
  173. String VMS_PHSE_CHNG_CYCL;
  174. String VMS_MODL_ERR_RATE;
  175. String MISS_STTS_YN;
  176. TVmsCtlrStts *STTS;
  177. };
  178. //---------------------------------------------------------------------------
  179. class TVmsCtlrManager
  180. {
  181. public:
  182. TVmsCtlrManager() { FApiKey = "abcdefg1234567890x"; };
  183. ~TVmsCtlrManager(){ FLists.RemoveAll(); };
  184. private:
  185. String FApiKey;
  186. TStream *FImgStream;
  187. public:
  188. TItsMap<String, TVmsCtlr*> FLists;
  189. int FMinWidth, FMinHeight;
  190. int FMaxWidth, FMaxHeight;
  191. public:
  192. int Load();
  193. int LoadStts();
  194. TVmsCtlr *Find(String AId) { return FLists.Find(AId); };
  195. public:
  196. // VMS Control
  197. bool Reset(String AUserId, String AVmsCtlrNmbr, int ACommand);
  198. bool PowerOnOff(String AUserId, String AVmsCtlrNmbr, int ACommand);
  199. bool LuminanceSet(String AUserId, String AVmsCtlrNmbr, int ACommand, int ACurr, int AWeek, int ANght);
  200. bool OperModeSet(String AUserId, String AVmsCtlrNmbr, String ACommand);
  201. bool ImmediatelyScnrDnld(String AUserId, String AVmsCtlrNmbr);
  202. bool ParamSet(String AUserId, String AVmsCtlrNmbr, int AFanRunTmpr, int AHetrRunTmpr, String AOnTime, String AOffTime);
  203. };
  204. //---------------------------------------------------------------------------
  205. extern TVmsCtlrManager *VmsCtlrManager;
  206. //---------------------------------------------------------------------------
  207. #endif