//---------------------------------------------------------------------------

#ifndef CDSIfscFH
#define CDSIfscFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <stdio.h>
#include <ADODB.hpp>
#include <DB.hpp>
#include <SyncObjs.hpp>
#include <ExtCtrls.hpp>
#include <jpeg.hpp>
#include <GIFimg.hpp>
//---------------------------------------------------------------------------
#include "ITSLibF.h"
#include "CDSItsObjectF.h"
//---------------------------------------------------------------------------

class TCDSIfsc
{
public:
    TCDSIfsc();
    ~TCDSIfsc();

public:
    AnsiString VMS_IFSC_ID;         //NUMBER(10)	N			VMS 정보제공구간 ID
    AnsiString VMS_IFSC_NM;         //VARCHAR2(60)	Y			VMS 정보제공구간 명
    AnsiString DSPL_STRT_NODE_NM;   //VARCHAR2(30)	Y			표출 시작 노드 명
    AnsiString DSPL_END_NODE_NM;    //VARCHAR2(30)	Y			표출 종료 노드 명
    AnsiString DETR_ID;             //NUMBER(10)	Y			우회도로 ID

    AnsiString ROAD_NM;             //VARCHAR2(30)	Y			도로명
    AnsiString SPOT_NM;             //VARCHAR2(30)	Y			지점명
    AnsiString AXIS_YN;             //CHAR(1)	    Y	'N'		축정보 생성용

    AnsiString PRCN_DT;             //NVARCHAR2(14)	Y			가공 일시
    AnsiString CMTR_GRAD_CD;        //NVARCHAR2(7)	Y			소통 등급 코드
    int        SPED;                //NNUMBER(3)	Y	0		속도
    int        TRVL_HH;             //NNUMBER(6)	Y	0		통행 시간

    TDateTime  dtCngst;
    int        CNGST_CNT;           // 연속 정체 횟수(10분이상, 즉 연속해서 2회이상 정체시 정체로 판정)
public:
    void Init();
};
//---------------------------------------------------------------------------

//---------------------------------------------------------------------------
class TCDSIfscManager : public TCDSItsObject
{
public:
    TCDSIfscManager();
    ~TCDSIfscManager();

private:

public:
    TItsMap<AnsiString, TCDSIfsc*> FLists;

public:
    int LoadVmsIfscInfo(TADOConnection *ADbConn);
    int LoadVmsIfscTrafficInfo(TADOConnection *ADbConn);
};
//---------------------------------------------------------------------------
extern TCDSIfscManager *CDSIfscManager;
typedef std::map<AnsiString, TCDSIfsc*>::iterator IfscItr;
//---------------------------------------------------------------------------

#endif
