| 摘 要: 提出了一种基于ZigBee与MQTT的物联网网关协议转换的通信框架的设计方法,主要目的是解决多协议、 多消息格式的兼容与扩展的问题。用C#语言定义了符合框架的传感器设备类和数据类,并利用“观察者模式”和“简 单工厂模式”的设计思想,解决了多协议扩展和通信效率的问题。 | 
			
	         
				| 关键词: ZigBee  MQTT  物联网网关  通信框架  JSON | 
		
			 
                     
			
                | 中图分类号: TP393.03
			 
		
                  文献标识码: A | 
		
	   
            
                | 基金项目: 2016年度苏州市职业大学研究性课程项目《基于互联网+的智能家居安防系统设计》(项目编号:SZDYKC-160601);全国高等院校计算机基础教育研究会2016年度 高职科研规划纵向课题《物联网应用技术专业课程体系与课程标准建设》(项目编号2016GHB02071). | 
	     
          |  | 
           
                | Design and Implementation of the IOT Gateway Communication Framework Based on ZigBee and MQTT | 
           
			
                | TAN Fangyong,WANG Ang,LIU Zining | 
           
		   
                | ( Suzhou Vocational University, Suzhou 215104, China) 
 | 
             
                | Abstract: The paper proposes a design method of the communication framework for internet of things gateway protocol conversion based on ZigBee and MQTT.The main purpose is to solve the compatibility and expansion problems of multi-protocol and multi-message formats.It defines the framework of the sensor device class and data class with the C# language,and solves the low efficiency problem of multi-protocol extension and communication through the design philosophy of Observer Pattern and Simple Factory Pattern. | 
	       
                | Keywords: ZigBee  MQTT  IOT Gateway  communication framework  JSON |