
#ifndef COMMUNICATION_PROTOCOL_H
#define COMMUNICATION_PROTOCOL_H


#include <stdint.h>
#include "IRIS_Method.h"
#include <Communication_struct.h>
// DEFINE The protocol Here
 //Forexample
//  #define MYCOMAN 0x02  //命令全大写
// todo : define your protocol here
/*-------------------------------------------------------------------------------------------------------------*/
// #define Digital_number 0
#define DIGITALNUMBER 0
#define RADIANCE     1
#define REFLECTANCE 2
#define DARKNOISE 3
#define DIRECTIO_UP 0
#define DIRECTION_DOWN 1
#define BANDNUMBER 2048

/// 加时间戳
struct IS11_datastruct
{
    u_int8_t    type = 0; // 0 DN 1 Radiance 2 重采样 3 Reflectance  4 gain 5 offset 6 fanshelv
    u_int8_t    direction = 0; //0 up 1 down 2 dark_up  3 dark_down
    u_int8_t    tuigan_stat =0;//0:伸 1:缩
    u_int8_t    year= 0;
    u_int8_t    month= 0;
    u_int8_t    day= 0;
    u_int8_t    hour= 0;
    u_int8_t    minute= 0;
    u_int8_t    second= 0; 
    u_int8_t    NCa = 0;   //手动对齐，方便解析。
    u_int8_t    NCb = 0;
    u_int8_t    NCc = 0;
    u_int32_t   shutter_time = 0;
    u_int64_t   index = 0;   //在获取重采样值时这个表示有多少位数据
    float temprature[8];
    float data[BANDNUMBER];
};


struct clalidata_struct
{
    uint32_t shutter;
    float    gain[BANDNUMBER];
    float    offset[BANDNUMBER];
};

/*-------------------------------------------------------------------------------------------------------------*/
/*
在此之下开始定义一些函数

*/
#endif

