欢迎来到天天文库
浏览记录
ID:37758277
大小:75.00 KB
页数:12页
时间:2019-05-30
《定义晶振频率为8000KHZ》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、一、宏定义//定义晶振频率为8000KHZ#defineXTAL8000//定义定时器1的分时复用标志#defineT1_Interval1#defineT1_Period2#defineT1_NonPeriod3//定义网络中包的长度的上下限#defineMax_Size200#defineMin_Size60//定义域下载数据的最大可能长度(2+70)*2#defineDomainDownload_Max_Size144//定义设备本身的信息,用户组态程序对这些参数只能读,不能写#defineMy_
2、DeviceID_Len24#defineDevice_Type_ID'T'#defineDevice_Version_ID114//定义组态信息,通过域下载服务发给仪表节点#defineResponse_Time30#defineMacro_Cycle200#defineNonPeriodic_Offset100#defineSendtime_Offset50//定义消息类型#defineMessage_REQ(0<<6)#defineMessage_REP(1<<6)#defineMessage_E
3、RR(2<<6)//定义服务标识#defineEM_FindTagQuery_ID1#defineEM_FindTagReply_ID2#defineEM_GetDeviceAttribute_ID3#defineEM_DeviceAnnunciation_ID4#defineEM_SetDeviceAttribute_ID5#defineEM_ClearDeviceAttribute_ID6#defineDomainDownload_ID10#defineDomainUpload_ID11#defin
4、eRead_ID12#defineWrite_ID13#defineDistribute_ID14#defineEventNotification_ID15#defineAcknowledgeEventNotification_ID16#defineAlterEventCondition_ID17#defineConfiguration_ID18//定义相关的AppID和ObjectID#defineMIB_AppID0#defineDomain_Application_Information_Obje
5、ctID4000#defineAAE_AppID1#defineDistribute_ObjectID8//定义时间同步对象中的时间同步精度#defineTime_None0#defineTime_1s1#defineTime_100ms2#defineTime_10ms3#defineTime_1ms4#defineTime_100us5#defineTime_10us6#defineTime_1us7//定义链接对象中本地设备的通信角色#defineRole_Transmitter0#defineR
6、ole_Receiver1#defineRole_None0xff//定义设备声明时的三种状态#defineWithout_My_IP0#defineStandby1#defineReady2//relevanttoEtherheader#defineEther_Type_ARP0x0806#defineEther_Type_IP0x0800//relevanttoARPmessage#defineARP_REQ0x0001#defineARP_ACK0x0002//relevanttoIPmessag
7、e#defineIP_Version4#defineIP_Header_MinLen20#defineIP_Header_Len((R_Pip->IP_VerLen&0x0f)<<2)#defineIP_Tos_Value0#defineIP_TTL_Value255#defineIP_ICMP1#defineIP_TCP6#defineIP_UDP17//revelanttoICMPmessage#defineICMP_Num32#defineICMP_Type_REQ8#defineICMP_Typ
8、e_ACK0//revelanttoUDPmessage#defineUDP_Header_Len8#defineEPA_Port0x88bc//定义节点相关信息#defineNode_Number2#defineNULL0//定义声明报文标识#defineNonPeriodDataAnnunciation_ID0x20#defineEndofNonPeriodDataSending_ID0x21二、报文结构体//组态信息报文格式struc
此文档下载收益归作者所有