#ifndef _GB_DEVICE_INFO_H_
#define _GB_DEVICE_INFO_H_

typedef enum DEV_TYPE {
	DEV_TYPE_COLLECT_STATION = 1,
	DEV_TYPE_GATEWAY,		
	DEV_TYPE_OILTANK_STATION,
	DEV_TYPE_OILTANK_CAR,	
	DEV_TYPE_OILTANK_DEPOT,	
	
	DEV_TYPE_MAX
} DEV_TYPE;

typedef enum ONLINE_TYPE {
	ONLINE_TYPE_LORA = 1,
	ONLINE_TYPE_NB,
	ONLINE_TYPE_LTE,

	ONLINE_TYPE_MAX
} ONLINE_TYPE;

#define SOFT_VERSION	0x01010001
#define HARD_VERSION	0x01010001
#define BOOT_VERSION	0x01010001
#define DEVICE_TYPE		DEV_TYPE_COLLECT_STATION
#define DEVICE_MSG_PERIOD 10

#define DEVICE_ID_LENGTH	4
typedef struct _gb_device_info {
	uint8_t vendor[16];
	uint32_t hw_ver;
	uint32_t manufacture_date;
	uint32_t bootrom_ver;
	uint32_t bootrom_date;
	uint32_t sw_ver;
	uint32_t build_date;
	uint32_t device_type;
	uint32_t device_id;
	uint8_t	imei[16];
	uint8_t iccid[20];
	uint32_t collect_time;
} gb_device_info_t;

#define		STORAGE_POS_DEVICE_TYPE		0
#define		STORAGE_POS_DEVICE_ID		4

int device_type_and_id_cmp(u16 device_type, u32 device_id);
void device_type_and_id_get(u32 *device_type, u32 *device_id);
uint32_t device_type_get(void);
int device_init(u32 dev_type, u32 dev_id);

#endif
