/*
*========================================================================
*
*   SYSTEM   : AZN_PLAZA_LANE APP
*   FILE     : bas_tbl.h
*   Progrmer : JBY (baarong@neighbor21.co.kr)
*   Date     : 2018.07.13
*   Modified :
*   Remark   : Basic definition of operation.
*
*========================================================================
*/

#ifndef    _BAS_TBL
#define    _BAS_TBL

#include "file_ctrl.h"

struct basic_tbl {
    unsigned char   plz_id[2];                /* Plaza Code                      */
    unsigned char   plz_nm[14];               /* Plaza Name                      */

    struct {                                  /* TABLE INFO RECORD               */
        unsigned char   apl_year[4];          /* Apply Year                      */
        unsigned char   apl_mon[2];           /*       Month                     */
        unsigned char   apl_day[2];           /*       Day                       */
        unsigned char   apl_hr[2];            /*       Hour                      */
        unsigned char   apl_min[2];           /*       Minute                    */
        unsigned char   modf_year[4];         /* Modified Year                   */
        unsigned char   modf_mon[2];          /*          Month                  */
        unsigned char   modf_day[2];          /*          Day                    */
        unsigned char   modf_hr[2];           /*          Hour                   */
        unsigned char   modf_min[2];          /*          Minute                 */
        unsigned char   rvs_no[2];            /* Revision Number                 */
    } rvs_tbl_info[20];                       /* TABLE STATUS                    */

    struct {
        unsigned char    phgc_lane_no[2];     /* Physical Lane Number            */
        unsigned char    lane_nm[20];         /* Physical Lane Name              */
        unsigned char    io_div[2];           /* 01: In 02: Out                 */
        unsigned char    ip_addr[16];         /* IP Address                      */
        unsigned char    port[8];             /* Real Port Number                */
        unsigned char    sub_port1[8];        /* Background Port Number1         */
        unsigned char    sub_port2[8];        /* Background Port Number2         */
    } lane_info[MAX_LANE];

    struct {
        unsigned char    fare_div[2];
        unsigned char    dc_typ;
        unsigned char    fare[6];
        unsigned char    start_dt[8];
        unsigned char    end_dt[8];
        unsigned char    fare_dc[6];
        unsigned char    penalty[6];
    } fare_info[50];

    unsigned char    fare_cnt[2];              /* Total Fare Count */
	unsigned char    rcv_str_dt[4];            /* 징수 시작시간 */
	unsigned char    rcv_end_dt[4];            /* 징수 종료시간 */
};
#if 0
static struct keydesc basic_tbl_key[] = { 
    {ISNODUPS,  1, {{0, 2, CHARTYPE}}, 2, 0},        /* Plaza Number                   */
    {-1,        0, {{0, 0, 0}}, 0, 0}
};
#endif
#endif
