/*
*========================================================================
*
*   SYSTEM   : GREEN_NAMSAN APP
*   FILE     : lo_packet_format.h
*   Progrmer : JBY (baarong@neighbor21.co.kr)
*   Date     : 2019.04.29
*   Modified :
*   Remark   : Definition of the packet format received from the lane.
*
*========================================================================
*/

#ifndef    _LO_PACKET
#define    _LO_PACKET
#pragma pack(push, 1)
/* 1.1 전송연번요구 */
struct    rq_seq_no {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    io_div;
};

/* 1.2 전송연번데이터 */
struct    seq_no_data {
    unsigned char   seq_no[4];
    unsigned char   kind;
    unsigned char   rq_seq_no[4];
    unsigned char   wrk_no[2];
    unsigned char   start_year[2];
    unsigned char   start_month;
    unsigned char   start_day;
    unsigned char   lane_no;
    unsigned char   dummy[5];
};

/* 2.1 교신재개요구 */
struct    comm_continue_rq {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    dummy1;
    unsigned char    lane_no;
    unsigned char    dummy2[2];
    unsigned char    plz_id;
    unsigned char    io_div;
    unsigned char    dummy3;
};

/* 2.2 축적데이터전송요구 */
struct    rq_accuml_data {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    rq_seq_no[4];
    unsigned char    year[2];
    unsigned char    month;
    unsigned char    day;
    unsigned char    lane_no;
    unsigned char    dummy;
};

/* 2.3 축적데이터전송완료  */
struct    accuml_data_ok {
    unsigned char    seq_no[4];
    unsigned char    kind;
};

/* 3 확인응답 */
struct    confrm_reply {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    reply_typ;
    unsigned char    warr_seq_no[4];
    unsigned char    dummy;
};

/* 4.1 시각요구 */
struct    tm_rq {
    unsigned char    seq_no[4];
    unsigned char    kind;
};

/* 4.2 시각데이터  */
struct    tm_data {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    year[2];
    unsigned char    month;
    unsigned char    day;
    unsigned char    hour;
    unsigned char    min;
    unsigned char    sec;
};

/* 5.1 테이블지령 */
struct    tbl_cmd {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    dummy;
    unsigned char    dump_tbl_div;

    struct {
        unsigned char    rvs_no;
      } rvs_no_tbl[20];

    unsigned char    dummy1[3];
    unsigned char    bl_seq_no[4];
    unsigned char    bef_seq_no[4];
    unsigned char    imm_carno_seq_no[4];
    unsigned char    rfid_seq_no[4];
    unsigned char    red_carno_seq_no[4];
};


/* 5.2  테이블지령응답 */
struct    cmd_reply {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    reply_typ;
};

/* 6  테이블요구 */
struct    tbl_order {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    data_div;
    unsigned char    frame_no[4];
    unsigned char    req_seq_no[4];
};

/* 7.0 TABLE DATA */
struct    tbl_data {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    data[1005];
};

/* 7.1 기초(정수) Header */
struct    bas_tbl {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    frame_cnt[4];
    unsigned char    rvs_no;
    unsigned char    plz_id;
    unsigned char    plz_name[14];
    
    unsigned char    lane_no;
    unsigned char    io_div;
/* 징수유형 건수 추가 */
    unsigned char    fare_cnt;
    struct {
        unsigned char    fare_div;
        unsigned char    dc_typ;
        unsigned char    fare[3];
        unsigned char    start_dt[4];
        unsigned char    end_dt[4];
        unsigned char    fare_dc[3];
        unsigned char    penalty[3];
    } fare_info[48];

    unsigned char    plz_tel1[15];
    unsigned char    plz_tel2[15];
    unsigned char    dummy1[8];
    unsigned char    bas_aply_year[2];
    unsigned char    bas_aply_month;
    unsigned char    bas_aply_day;
    unsigned char    bas_aply_hour;
    unsigned char    bas_aply_min;

    unsigned char    bas_modf_year[2];
    unsigned char    bas_modf_month;
    unsigned char    bas_modf_day;
    unsigned char    bas_modf_hour;
    unsigned char    bas_modf_min;
/* 2019.06.03 징수 시작시간/종료시간 추가 */
    unsigned char    rcv_str_dt[2];
    unsigned char    rcv_end_dt[2];

    unsigned char    dummy[16];
};

/* 7.2.1 근무자 Header */
struct    wrkr_tbl_h {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    frame_cnt[4];
    unsigned char    rvs_no;

    unsigned char    tbl_aply_year[2];
    unsigned char    tbl_aply_mon;
    unsigned char    tbl_aply_day;
    unsigned char    tbl_aply_hour;
    unsigned char    tbl_aply_min;

    unsigned char    tbl_modf_year[2];
    unsigned char    tbl_modf_mon;
    unsigned char    tbl_modf_day;
    unsigned char    tbl_modf_hour;
    unsigned char    tbl_modf_min;

    unsigned char    wrkr_crd_cnt[2];
    unsigned char    dummy1[986];
};

/* 7.2.2 근무자 Frame */
struct    wrkr_tbl_f {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    struct{
        unsigned char    wrkr_no[2];
        unsigned char    wrkr_nm[10];
    }wrkr_crd_no[83];
    unsigned char    dummy[9];
};

/* 7.3.1 요금 Header */
struct    fare_tbl_h    {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    frame_cnt[4];
    unsigned char    rvs_no;

    unsigned char    new_fare_rvs_year[2];
    unsigned char    new_fare_rvs_month;
    unsigned char    new_fare_rvs_day;
    unsigned char    new_fare_rvs_hour;
    unsigned char    new_fare_rvs_min;

    unsigned char    old_fare_close_year[2];
    unsigned char    old_fare_close_month;
    unsigned char    old_fare_close_day;
    unsigned char    old_fare_close_hour;
    unsigned char    old_fare_close_min;

    unsigned char    fare_modf_year[2];
    unsigned char    fare_modf_month;
    unsigned char    fare_modf_day;
    unsigned char    fare_modf_hour;
    unsigned char    fare_modf_min;

    unsigned char    rgst_plz_cnt[2];
    unsigned char    dummy[980];
};

/* 7.3.2 요금 Frame */
struct    fare_tbl_f {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    
    struct {
        unsigned char    fare_div;
        unsigned char    dc_typ;
        unsigned char    fare[3];
        unsigned char    start_dt[4];
        unsigned char    end_dt[4];
        unsigned char    fare_dc[3];
        unsigned char    penalty[3];
    } fare_info[52];
    unsigned char    dummy[17];
};

/* 7.3.1 휴일정보 Header */
struct    holi_tbl_h    {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    frame_cnt[4];
    unsigned char    rvs_no;

    unsigned char    new_holi_rvs_year[2];
    unsigned char    new_holi_rvs_month;
    unsigned char    new_holi_rvs_day;
    unsigned char    new_holi_rvs_hour;
    unsigned char    new_holi_rvs_min;

    unsigned char    holi_modf_year[2];
    unsigned char    holi_modf_month;
    unsigned char    holi_modf_day;
    unsigned char    holi_modf_hour;
    unsigned char    holi_modf_min;

    unsigned char    dummy[988];
};

/* 7.3.2 휴일정보 Frame */
struct    holi_tbl_f {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    
    struct {
        unsigned char    year[2];
        unsigned char    mon;
        unsigned char    day;
    }holi[250];
    unsigned char    dummy[5];
};

/* 7.4.1 발행사 Header */
struct    iss_comp_info_h {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    frame_cnt[4];
    unsigned char    rvs_no;
    unsigned char    rgst_iss_cnt[4];

    unsigned char    iss_aply_year[2];
    unsigned char    iss_aply_month;
    unsigned char    iss_aply_day;
    unsigned char    iss_aply_hour;
    unsigned char    iss_aply_min;

    unsigned char    iss_modf_year[2];
    unsigned char    iss_modf_month;
    unsigned char    iss_modf_day;
    unsigned char    iss_modf_hour;
    unsigned char    iss_modf_min;
    unsigned char    dummy1[984];
};

/* 7.4.2 발행사 Frame */
struct    iss_comp_info_f {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    struct {
        unsigned char    crd_co;
        unsigned char    bin_code[4];
    } comp[200];
    unsigned char    dummy[5];
};

/* 7.5.1 차량번호면제 Header */
struct    imm_carno_tbl_h {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    frame_cnt[4];
    unsigned char    rvs_no;
    unsigned char    div;

    unsigned char    imm_aply_year[2];
    unsigned char    imm_aply_month;
    unsigned char    imm_aply_day;
    unsigned char    imm_aply_hour;
    unsigned char    imm_aply_min;

    unsigned char    imm_modf_year[2];
    unsigned char    imm_modf_month;
    unsigned char    imm_modf_day;
    unsigned char    imm_modf_hour;
    unsigned char    imm_modf_min;

    unsigned char    dummy[987];
};

/* 7.5.2 차량번호면제 Frame */
struct    imm_carno_tbl_f {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    last_data_seq_no[4];
    unsigned char    item_cnt;
    struct {
        unsigned char    rgst_div;
        unsigned char    imm_div;
        unsigned char    car_no[5];
    } imm_info[142];

    unsigned char    dummy[6];
};

/* 7.6.1 RFID저공해/요일제 Header */
struct    imm_crdno_tbl_h {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    frame_cnt[4];
    unsigned char    rvs_no;
    unsigned char    div;

    unsigned char    imm_aply_year[2];
    unsigned char    imm_aply_month;
    unsigned char    imm_aply_day;
    unsigned char    imm_aply_hour;
    unsigned char    imm_aply_min;

    unsigned char    imm_modf_year[2];
    unsigned char    imm_modf_month;
    unsigned char    imm_modf_day;
    unsigned char    imm_modf_hour;
    unsigned char    imm_modf_min;

    unsigned char    dummy[987];
};

/* 7.6.2 RFID저공해/요일제 Frame */
struct    imm_crdno_tbl_f {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    last_data_seq_no[4];
    unsigned char    item_cnt;
    struct {
        unsigned char    rgst_div;
        unsigned char    car_div;
        unsigned char    crd_no[12];
        unsigned char    car_no[5];
        unsigned char    unap_vio_div;
    }imm_info[49];

    unsigned char    dummy[20];
};

/* 7.7.1 사전결제등록 Header */
struct    adv_payment_tbl_h {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    frame_cnt[4];
    unsigned char    rvs_no;
    unsigned char    div;

    unsigned char    adv_aply_year[2];
    unsigned char    adv_aply_month;
    unsigned char    adv_aply_day;
    unsigned char    adv_aply_hour;
    unsigned char    adv_aply_min;

    unsigned char    adv_modf_year[2];
    unsigned char    adv_modf_month;
    unsigned char    adv_modf_day;
    unsigned char    adv_modf_hour;
    unsigned char    adv_modf_min;

    unsigned char    dummy[987];
};

/* 7.7.2 사전결제등록 Frame */
struct    adv_payment_tbl_f {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    last_data_seq_no[4];
    unsigned char    item_cnt;
    struct {
        unsigned char    rgst_div;
        unsigned char    div;
        unsigned char    car_no[5];
    } adv_info[142];

    unsigned char    dummy[6];
};

/* 7.8.1 교통카드P/L Header */
struct    pl_tbl_h {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    frame_cnt[4];
    unsigned char    rvs_no;
    unsigned char    div;

    unsigned char    pl_aply_year[2];
    unsigned char    pl_aply_month;
    unsigned char    pl_aply_day;
    unsigned char    pl_aply_hour;
    unsigned char    pl_aply_min;

    unsigned char    pl_modf_year[2];
    unsigned char    pl_modf_month;
    unsigned char    pl_modf_day;
    unsigned char    pl_modf_hour;
    unsigned char    pl_modf_min;
    struct {
        unsigned char block_st_no[4]; /* 블록 시작 Alias_no */
        unsigned char block_cnt[4];   /* 블록 총건수        */
    } pl_block[17];

    unsigned char    dummy1[851];
};

/* 7.8.2 교통카드P/L Frame */
struct    pl_tbl_f {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    item_cnt[2];
    unsigned char    div[1003];
};

/* 7.9.1 교통카드B/L Header */
struct    bl_tbl_h {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    frame_cnt[4];
    unsigned char    rvs_no;
    unsigned char    div;

    unsigned char    bl_aply_year[2];
    unsigned char    bl_aply_month;
    unsigned char    bl_aply_day;
    unsigned char    bl_aply_hour;
    unsigned char    bl_aply_min;

    unsigned char    bl_modf_year[2];
    unsigned char    bl_modf_month;
    unsigned char    bl_modf_day;
    unsigned char    bl_modf_hour;
    unsigned char    bl_modf_min;

    unsigned char    dummy[987];
};

/* 7.9.2 교통카드B/L Frame */
struct    bl_tbl_f {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    last_data_seq_no[4];
    unsigned char    item_cnt;
    struct{
        unsigned char    div;
        unsigned char    crd_no[8];
    }bl_data[111];
    unsigned char    dummy;
};

/* 7.10.1 차량번호감면 Header */
struct    reduce_tbl_h {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    frame_cnt[4];
    unsigned char    rvs_no;
    unsigned char    div;

    unsigned char    red_aply_year[2];
    unsigned char    red_aply_month;
    unsigned char    red_aply_day;
    unsigned char    red_aply_hour;
    unsigned char    red_aply_min;

    unsigned char    red_modf_year[2];
    unsigned char    red_modf_month;
    unsigned char    red_modf_day;
    unsigned char    red_modf_hour;
    unsigned char    red_modf_min;

    unsigned char    dummy[987];
};

/* 7.10.2 차량번호감면 Frame */
struct    reduce_tbl_f {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    last_data_seq_no[4];
    unsigned char    item_cnt;
    struct {
        unsigned char    rgst_div;
        unsigned char    div;
        unsigned char    car_no[5];
    }red_data[142];

    unsigned char    dummy[6];
};
#if 0
/* 7.11.1 교통카드B/L Header */
struct    imbl_tbl_h {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    frame_cnt[4];
    unsigned char    rvs_no;
    unsigned char    div;

    unsigned char    bl_aply_year[2];
    unsigned char    bl_aply_month;
    unsigned char    bl_aply_day;
    unsigned char    bl_aply_hour;
    unsigned char    bl_aply_min;

    unsigned char    bl_modf_year[2];
    unsigned char    bl_modf_month;
    unsigned char    bl_modf_day;
    unsigned char    bl_modf_hour;
    unsigned char    bl_modf_min;

    unsigned char    dummy[987];
};

/* 7.11.2 교통카드B/L Frame */
struct    imbl_tbl_f {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_typ;
    unsigned char    frame_no[4];
    unsigned char    last_data_seq_no[4];
    unsigned char    item_cnt;
    struct{
        unsigned char    div;
        unsigned char    crd_no[8];
    }bl_data[111];
    unsigned char    dummy;
};
#endif
/* 8.1 차로상태정보 */
struct    lane_stat {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    mchi_stat;
    unsigned char    dummy;

    struct {
        unsigned char    stat;
        unsigned char    rvs_no;
    }tbl_stat[20];

    unsigned char    bl_seq_no[4];
    unsigned char    bef_seq_no[4];
    unsigned char    imm_carno_seq_no[4];
    unsigned char    rfid_seq_no[4];
    unsigned char    red_carno_seq_no[4];
    unsigned char    anpr_cam;
    unsigned char    anpr_tempa[4];
    unsigned char    anpr_door_sd;
};

/* 9.1 보수데이터 */
struct    rpr_data {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    wrk_no[2];
    unsigned char    year[2];
    unsigned char    month;
    unsigned char    day;
    unsigned char    hour;
    unsigned char    min;
    unsigned char    sec;
    unsigned char    lane_no;
    unsigned char    terminal_no[5];
    unsigned char    wrk_stat;
    unsigned char    mchi_kind;
    unsigned char    occ_rest;
    unsigned char    err_code;
    
    unsigned char    anpr_cam;
    unsigned char    anpr_tempa[4];
    unsigned char    anpr_door_sd;
};

/* 10.1 야간계수 */
struct    close_pass {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    wrk_date[4];
    unsigned char    lane_no;
    unsigned char    serial_no[3];

    unsigned char    year[2];
    unsigned char    month;
    unsigned char    day;
    unsigned char    hour;
    unsigned char    min;
    unsigned char    sec;

    unsigned char    io_div;
    unsigned char    plz_id;
    unsigned char    carkind_imageyn;
    unsigned char    car_no[16];
    unsigned char    x_point[2];
    unsigned char    y_point[2];
    unsigned char    img_width[2];
    unsigned char    img_heigh[2];
    
    unsigned char    dummy[10];
};

/* 11.1 근무개시보고 */
struct    wrk_start {
    unsigned char    seq_no[4];
    unsigned char    kind;

    unsigned char    wrk_year[2];
    unsigned char    wrk_month;
    unsigned char    wrk_day;
    unsigned char    wrk_no[2];

    unsigned char    wrk_start_year[2];
    unsigned char    wrk_start_month;
    unsigned char    wrk_start_day;
    unsigned char    wrk_start_hour;
    unsigned char    wrk_start_min;
    unsigned char    wrk_start_sec;

    unsigned char    io_div;
    unsigned char    wrk_div;
    unsigned char    week_holi_yn;
    unsigned char    wrkr_no[3];
    unsigned char    plz_id;
};

/* 12.1 처리 */
struct    hnd_data {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    wrk_date[4];
    unsigned char    wrk_no[2];
    unsigned char    wrkr_no[3];
    unsigned char    serial_no[3];
    unsigned char    io_div;
    unsigned char    plz_id;
    unsigned char    lane_no;
    unsigned char    car_kind;
    unsigned char    sence_seq_no[3];
#if 1
/* 2019.07.26 감지시간 추가 */
    unsigned char    sence_time[3];
    unsigned char    dummy1[9];
#else
	unsigned char    dummy1[12];
#endif
    struct {
        unsigned char    hnd_year[2];
        unsigned char    hnd_month;
        unsigned char    hnd_day;
        unsigned char    hnd_hour;
        unsigned char    hnd_min;
        unsigned char    hnd_sec;
        unsigned char    org_pass_fare[3];
        unsigned char    pass_fare[3];
        unsigned char    rcpt_money[3];
        unsigned char    refund_key_yn;
        unsigned char    rcpt_hnd;
        unsigned char    issue_code[4];
        unsigned char    crd_no[10];
        unsigned char    rcpt_div;
    } hnd_info;

    unsigned char    img_yn;
    unsigned char    car_no1[16];
    unsigned char    car_no2[16];
    unsigned char    x_point[2];
    unsigned char    y_point[2];
    unsigned char    img_width[2];
    unsigned char    img_heigh[2];
    unsigned char    dc_typ;
    unsigned char    tag_id1[12];
    unsigned char    tag_id2[12];
    unsigned char    dummy2[17];
};

/* 13.1 카드처리 */
struct    crd_hnd_data {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    wrk_date[4];
    unsigned char    wrk_no[2];
    unsigned char    wrkr_no[3];
    unsigned char    serial_no[3];
    unsigned char    io_div;
    unsigned char    plz_id;

    unsigned char    hnd_year[2];
    unsigned char    hnd_month;
    unsigned char    hnd_day;
    unsigned char    hnd_hour;
    unsigned char    hnd_min;
    unsigned char    hnd_sec;
    unsigned char    pass_fare[3];
    unsigned char    rcpt_money[3];
    unsigned char    bef_rcpt_balc[4];
    unsigned char    aft_rcpt_balc[4];
    unsigned char    rcpt_div;
    unsigned char    crd_kind;
    unsigned char    pre_car_kind;
    unsigned char    crd_no[10];
    unsigned char    pay_div;

    unsigned char    terminal_no[5];
    unsigned char    terminal_cnt[5];
    unsigned char    alg_id;
    unsigned char    psam_id[8];
    unsigned char    purch_dt[4];
    unsigned char    deal_div;
    unsigned char    elec_iss_id[3];
    unsigned char    elec_id[5];
    unsigned char    elec_ser_no[4];
    unsigned char    deal_ser_no[4];
    unsigned char    crd_ser_no[5];
    unsigned char    deal_tot[4];

    unsigned char    ind_iss_cnt[2];
    unsigned char    rcpt_deal_ser[4];
    unsigned char    ind_sign1;
    unsigned char    psam_sign1[4];
    unsigned char    ind_sign2;
    unsigned char    psam_sign2[4];
    unsigned char    id_center;
    unsigned char    iss_code[4];
    unsigned char    dummy1;
    unsigned char    another;
    unsigned char    alias_no[5];
    unsigned char    car_no1[16];
    unsigned char    car_no2[16];
    unsigned char    tot_id[6];
    unsigned char    dummy[101];
};

/* 14.1 근무종료 */
struct    wrk_end {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    wrkr_no[3];
    unsigned char    wrk_date[4];
    unsigned char    wrk_no[2];

    unsigned char    wrk_start_year[2];
    unsigned char    wrk_start_month;
    unsigned char    wrk_start_day;
    unsigned char    wrk_start_hour;
    unsigned char    wrk_start_min;
    unsigned char    wrk_start_sec;

    unsigned char    wrk_end_year[2];
    unsigned char    wrk_end_month;
    unsigned char    wrk_end_day;
    unsigned char    wrk_end_hour;
    unsigned char    wrk_end_min;
    unsigned char    wrk_end_sec;

    unsigned char    io_div;
    unsigned char    week_holi_yn;
    unsigned char    input_fare[4];
    unsigned char    output_fare[4];
    unsigned char    over_input[4];
    unsigned char    over_output[4];
    struct {
        unsigned char div;
        unsigned char cnt[2];
        unsigned char fare[4];
    } hnd_cnt[50];
//2019.05.22 추가
    unsigned char    repay_cnt[2];
    unsigned char    repay_fare[4];

    unsigned char    tot_fare[4];
};

/* 15.1 보증전송연번 */
struct    warr_snd_no {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    dummy;
    unsigned char    warr_seq_no[4];
};

/* 16.1 테이블덤프 */
struct    dump_tbl {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tbl_type;
    unsigned char    frame_no[4];
    unsigned char    dummy[1005];
};

/* 17.1 차로측기동회선테스트 */
struct    lane_line_test {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    test_data[1010];
};

/* 17.2 차로측기동회선테스트-응답 */
struct    lane_line_test_reply {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    test_data[1010];
};

/* 18.1 요금소측기동회선테스트 */
struct    plz_line_test {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    test_data[1010];
};

/* 18.2 요금소측기동회선테스트-응답 */
struct    plz_line_test_reply {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    test_data[1010];
};

/* 19.1 원격차로상태요청 */
struct    remote_lane_stat {
    unsigned char    seq_no[4];
    unsigned char    kind;
};

/* 19.2 원격차로상태응답 */
struct    remote_lane_stat_reply {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    lane_stat[4];
    unsigned char    dummy[5];
    unsigned char    tick_stat[2];
    unsigned char    rcpt_stat[2];
    unsigned char    car_div_stat[4];
    unsigned char    crd_terminal[28];
    unsigned char    crd_reader;
    unsigned char    toll_system;
    unsigned char    reserve1;
    unsigned char    reserve2;
    unsigned char    reserve3;
    unsigned char    reserve4;
};

/* 19.3 원격차로제어 */
struct    remote_lane {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    div;
};

/* 20.1 미납조회요청 */
struct    non_pay_srch {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    car_no[16];
    unsigned char    car_code[5];
};

/* 20.2 미납조회결과 */
struct    non_pay_rlt {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    tot_cnt[2];
    unsigned char    tot_fare[4];
    unsigned char    car_no[5];
    struct {
        unsigned char wrk_dt[7];
        unsigned char lane_no;
        unsigned char plz_id;
        unsigned char toll_amt[4];
        unsigned char notice_cnt;
        unsigned char end_date[4];
    } rlt_info[5];

    unsigned char    dummy[10];
};

/* 21.1 카드번호조회 */
struct crd_srch {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    div;
    unsigned char    srch_number[8];
    unsigned char    dummy[16];
};

/* 21.2 카드번호조회결과 */
struct crd_rlt {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    rlt;
    unsigned char    dummy[16];
};

/* 22.1 면제감면정보조회 */
struct immred_srch {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    car_no[16];
    unsigned char    car_no_cd[5];
};

/* 22.2 면제감면정보결과 */
struct immred_rlt {
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    rlt;
    unsigned char    dtl;
    unsigned char    unap_vio_div;
};

/* 23.1 환불처리데이터 */
struct refund_data {
#if 0
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    wrk_date[4];
    unsigned char    wrk_no[2];
    unsigned char    wrkr_no[2];
	unsigned char    serial_no[3];
	unsigned char    plz_id;
	unsigned char    lane_no;

	unsigned char    hnd_year[2];
	unsigned char    hnd_month;
	unsigned char    hnd_day;
	unsigned char    hnd_hour;
	unsigned char    hnd_min;
	unsigned char    hnd_sec;

	unsigned char    org_pass_fare[3];
	unsigned char    pass_fare[3];
	unsigned char    toll_amt[3];

	unsigned char    refund_year[2];
	unsigned char    refund_month;
	unsigned char    refund_day;
	unsigned char    refund_hour;
	unsigned char    refund_min;
	unsigned char    refund_sec;

	unsigned char    refund_key;

	unsigned char    dummy[20];
#else
    unsigned char    seq_no[4];
    unsigned char    kind;
    unsigned char    wrk_date[4];
    unsigned char    wrk_no[2];
    unsigned char    wrkr_no[3];
    unsigned char    serial_no[3];
    unsigned char    io_div;
    unsigned char    plz_id;
    unsigned char    lane_no;
    unsigned char    car_kind;
    unsigned char    sence_seq_no[3];

/* 2019.07.26 감지시간 추가 */
    unsigned char    sence_time[3];
    unsigned char    dummy1[9];

    struct {
        unsigned char    hnd_year[2];
        unsigned char    hnd_month;
        unsigned char    hnd_day;
        unsigned char    hnd_hour;
        unsigned char    hnd_min;
        unsigned char    hnd_sec;
        unsigned char    org_pass_fare[3];
        unsigned char    pass_fare[3];
        unsigned char    rcpt_money[3];
        unsigned char    refund_key_yn;
        unsigned char    rcpt_hnd;
        unsigned char    issue_code[4];
        unsigned char    crd_no[10];
        unsigned char    rcpt_div;
    } hnd_info;

    unsigned char    img_yn;
    unsigned char    car_no1[16];
    unsigned char    car_no2[16];
    unsigned char    x_point[2];
    unsigned char    y_point[2];
    unsigned char    img_width[2];
    unsigned char    img_heigh[2];
    unsigned char    dc_typ;
    unsigned char    tag_id1[12];
    unsigned char    tag_id2[12];
    unsigned char    dummy2[17]; //추후 환불금액 6D 추가
#endif
};

#pragma pack(pop)
#endif