/*
 * NessLab.h
 *
 *  Created on: Aug 3, 2020
 *      Author: parkyj
 */

#ifndef NESSLAB_H_
#define NESSLAB_H_

#include "main.h"

typedef struct{
	uint8_t Header0;
	uint8_t Header1;
	uint8_t MsgId;
	uint8_t MsgSn0;
	uint8_t MsgSn1;
	uint8_t MsgReserve0;
	uint8_t MsgDataLength;
	uint8_t DownLink_Forward_Det_H;
	uint8_t DownLink_Forward_Det_L;
	uint8_t DownLink_Reverse_Det_H;
	uint8_t DownLink_Reverse_Det_L;
	uint8_t DC_Fail_Alarm;
	uint8_t Downlink_Status;
	uint8_t Over_Power_Alarm;
	uint8_t VSWR_Alarm;
	uint8_t Over_Input_Alarm;
	uint8_t Over_Temp_Alarm;
	uint8_t Temp_Monitor;
	uint8_t ALC_Alarm;
	uint8_t Checksum;
	uint8_t Tail0;
	uint8_t Tail1;
}Nesslab_Prot;


typedef enum{
	NessLab_STATUS_REQ = 101,
	NessLab_STATUS_RES,
}NessLabDataType_t;

typedef enum{
	NessLab_DownLink_Tx,
	NessLab_DownLink_Rx,
	NessLab_Temperature,
}Adc_Index_t;
typedef enum{
	NessLab_Header0,
	NessLab_Header1,
	NessLab_MsgID0,
	NessLab_MsgSN0,
	NessLab_MsgSN1,
	NessLab_Reserve0,
	NessLab_DataLength,
	NessLab_Data_ADC0_H,
	NessLab_Data_ADC0_L,
	NessLab_Data_ADC1_H,
	NessLab_Data_ADC1_L,
	DC_FAIL_ALARM,
	NessLab_DownLink_Status,
	NessLab_Over_Power_Alarm,
	NessLab_VSWR_ALARM,
	NessLab_Over_Input_Alarm,
	NessLab_Over_Temp_Alarm,
	NessLab_Temp_Monitor,
	NessLab_ALC_ALARM,
	NessLab_ChecksumVal,

}NessLabProtIndex_t;


extern void NessLab_Operate(uint8_t* data);
#endif /* NESSLAB_H_ */

