BACnet protocol is a kind of data communication protocol peculiar to autocontrol network in architecture. It is an open, simple and practical procotol, and can be integrated with other networks easily. Therefore it has become the international standard in architectural autocontrol network. BACnet defines a kind of language which controls the transfer and exchange of information, so facilites can communicate with each other conveniently. It has been a hotspot in study to design and implementate a self-contained, transplantable and cropping BACnet workstation, and to avoid developing the same software for different architectural facilities. This thesis is mainly about the design and implementation of the application layer in BACnet workstation.The main contents are as follows:(1) Many studies and research have been done for the whole embedded system after fully understanding the BACnet protocol. Then deeply understand the system of BACnet prtocol and skillfully master the principle of BACnet object model, service model, coding &decoding rule, message transmission rule, net rule, etc.(2) The application layer of BACnet stationwork has been planned and designed. This thesis makes out a detailed plan for the whole application layer and designs its model at first. And then it discusses the design of the message memory, standard object and standard service in BACnet.(3) Introduce the basic principle of BACnet application layer and the state transition rule of BACnet state machine. Then use NS2 emulation software establishing net emulation situation and analyse the transitional characteristics of Bacnet in order to guide the parameter setting of the state machin. At last, offer the function table of state machine after elaborately analyzing and designing the customer state machine and service state machine of application layer.(4) It implementates codes of some workstation application layer by using C, in which it takes the service of read attribute as an example to introduce the implementation of BACnet workstation application layer, with emphasis on the introduction of the implementation of the basic coding-database and source language coding-database of service request and the customer state machine in BACnet. |