www.pudn.com > IEC104MasterSlave.rar > IEC104Types.h, change:2008-01-15,size:1573b


// 
//	IEC-104 data types declarations 
// 
 
#ifndef _IEC104_TYPES 
#define _IEC104_TYPES 
 
// single point information w/quality 
struct SIQ104{ 
	unsigned char	spi : 1,		// off=0 / on=1 
					rs1 : 1,		// reserve 
					rs2 : 1,		// reserve 
					rs3 : 1,		// reserve 
					bl  : 1,		// not blocked=0 / blocked=1 
					sb  : 1,		// not substituted=0 / substituted=1 
					nt  : 1,		// topical=0 / not topical=1  
					iv  : 1;		// valid=0 / not valid=1 
}; 
 
// quality descriptor 
struct QDS104{ 
	unsigned char	ov	: 1,		// no overflow=0 / overflow=1 
					rs1 : 1,		// reserve 
					rs2 : 1,		// reserve 
					rs3 : 1,		// reserve 
					bl  : 1,		// not blocked=0 / blocked=1 
					sb  : 1,		// not substituted=0 / substituted=1 
					nt  : 1,		// topical=0 / not topical=1  
					iv  : 1;		// valid=0 / not valid=1 
}; 
 
// single point value 
struct SP104{ 
	unsigned char	addr0; 
	unsigned char	addr1; 
	unsigned char	addr2; 
	struct SIQ104	siq; 
}; 
 
// single point value w/time tag CP56Time2a 
struct SP104_T{ 
	unsigned char	addr0; 
	unsigned char	addr1; 
	unsigned char	addr2; 
	struct SIQ104	siq; 
	unsigned char	time[7]; 
}; 
 
//	short floating point value 
struct SFP104{ 
	unsigned char	addr0; 
	unsigned char	addr1; 
	unsigned char	addr2; 
	//float			value; 
	unsigned char	val[4]; 
	struct QDS104	qds; 
}; 
 
//	short floating point value w/time tag CP56Time2a 
struct SFP104_T{ 
	unsigned char	addr0; 
	unsigned char	addr1; 
	unsigned char	addr2; 
	//float			value; 
	unsigned char	val[4]; 
	struct QDS104	qds; 
	unsigned char	time[7]; 
}; 
#endif