基于物联网的门禁系统设计内容摘要:
令 是否建立网络 维护网络 N 是否收到串口数据 Y 将数据发送至绑定对方 N 是否收到节点数据 Y 发送至存串口 图 41 协调器工作流程图 本系统只是运用了 zigbee 协议栈,而未升入研究 ZStack 协议栈,在运用过程中只修改应用层函数,所以在此只列出 APP 函数,其他层的程序在此不在叙述。 协调器 APP 函数: /********************************************************************* * @fn TranCenter_ProcessMSGCmd * * @brief Data message processor callback. This function processes * any ining data probably from other devices. Based * on the cluster ID, perform the intended action. * * @param pkt pointer to the ining message packet * * @return TRUE if the 39。 pkt39。 parameter is being used and will be freed later, * FALSE otherwise. */ void TranCenter_ProcessMSGCmd afIningMSGPacket_t *pkt uint8 stat。 uint8 seqnb。 uint8 delay。 switch pkt clusterId // A message with a serial data block to be transmitted on the serial case TranCenter_CLUSTERID1: // Store the address for sending and osal_memcpy amp。 TranCenter_RxAddr, amp。 pkt srcAddr , sizeof afAddrType_t。 seqnb pkt [0]。 // Keep message if not a repeat packet 如果数据包不重复,保持信息 if seqnb TranCenter_RxSeq || // Normal seqnb 0x80 amp。 amp。 TranCenter_RxSeq 0x80 // Wraparound // Transmit the data on the serial port. 在串行端口发送数据 PC if HalUARTWrite SERIAL_APP_PORT, pkt +1, pkt // Save for next ining message TranCenter_RxSeq seqnb。 stat OTA_SUCCESS。 else stat OTA_SER_BUSY。 else stat OTA_DUP_MSG。 // Select approproiate OTA flowcontrol delay. delay stat OTA_SER_BUSY ? TranCenter_NAK_DELAY : TranCenter_ACK_DELAY。 // Build amp。 send OTA response message. TranCenter_RspBuf[0] stat。 TranCenter_RspBuf[1] seqnb。 TranCenter_RspBuf[2] LO_UINT16 delay。 TranCenter_RspBuf[3] HI_UINT16 delay。 osal_set_event TranCenter_TaskID, TranCenter_RESP_EVT。 osal_stop_timerEx TranCenter_TaskID, TranCenter_RESP_EVT。 break。 // A response to a received serial data block. case TranCenter_CLUSTERID2: if pkt [1] TranCenter_TxSeq amp。 amp。 pkt [0] OTA_SUCCESS || pkt [0] OTA_DUP_MSG TranCenter_TxLen 0。 osal_stop_timerEx TranCenter_TaskID, TranCenter_SEND_EVT。 else // Restart timeout according to delay sent from other device. delay BUILD_UINT16 pkt [2], pkt [3]。 osal_start_timerEx TranCenter_TaskID, TranCenter_SEND_EVT, delay。 break。 default: break。 /********************************************************************* * @fn TranCenter_Send * * @brief Send data OTA. * * @param none * * @return none */ static void TranCenter_Send void if SERIAL_APP_LOOPBACK if TranCenter_TxLen SERIAL_APP_TX_ TranCenter_TxLen + HalUARTRead SERIAL_APP_PORT, TranCenter_TxBuf+TranCenter_TxLen+1, SERIAL_APP_TX_TranCenter_TxLen。 if TranCenter_TxLen void TranCenter_TxAddr。 if HalUARTWrite SERIAL_APP_PORT, TranCenter_TxBuf+1, TranCenter_TxLen TranCenter_TxLen 0。 else osal_set_event TranCenter_TaskID, TranCenter_SEND_EVT。 else if !TranCenter_TxLen amp。 amp。 TranCenter_TxLen HalUARTRead SERIAL_APP_PORT, TranCenter_TxBuf+1, SERIAL_APP_TX_ // Prepend sequence number to the Tx message. TranCenter_TxBuf[0] ++TranCenter_TxSeq。 if TranCenter_TxLen HalUARTWrite SERIAL_APP_PORT, TranCenter_TxBuf+1, TranCenter_TxLen。 if afStatus_SUCCESS ! AF_DataRequest amp。 TranCenter_TxAddr, endPointDesc_t * amp。 TranCenter_epDesc, TranCenter_CLUSTERID1, TranCenter_TxLen+1, TranCenter_TxBuf, amp。 TranCenter_MsgID, 0, AF_DEFAULT_RADIUS osal_set_event TranCenter_TaskID, TranCenter_SEND_EVT。 endif 终端工作流程图 图 42 终端工作流程图 终端 APP 函数 /********************************************************************* * @fn TranEnd_ProcessMSGCmd * * @brief Data message processor callback. This function processes * any ining data probably from other devices. Based * on the cluster ID, perform the intended action. * * @param pkt pointer to the ining message packet * * @return TRUE if the 39。 pkt39。 parameter is being used and will be freed later, * FALSE otherwise. */ void TranEnd_ProcessMSGCmd afIningMSGPacket_t *pkt uint8 stat。 uint8 seqnb。 uint8 delay。 switch pkt clusterId // A message with a serial data block to be transmitted on the serial port. case TranEnd_CLUSTERID1: // Store the address for sending and retrying. osal_memcpy amp。 TranEnd_RxAddr, amp。 pkt srcAddr , sizeof afAddrType_t。 seqnb pk。基于物联网的门禁系统设计
相关推荐
说,便脱掉上衣干起来。 聪明的人稍作选择也大干起来。 两个小时过去了,两人均挖了两米深,但均未见到水。 聪明的人断定选择错 了,觉得在原处继续挖下去是愚蠢的,便另选了块地方重挖。 愚顿的人仍在原地吃力地挖着,又两个小时过去了,愚顿人只挖了一米,而聪明的人又挖了两米深。 愚顿人仍在原地吃力地挖着,而聪明的人又开始怀疑自己的选择,就又选了一块地方重挖。 又两个小时过去了,愚顿的人挖了半米
7 月 24 日 《工厂全面改善: TPM 实战教程》 6小时 10 月 31 日 (晚上)、 11月 1日(晚上) 《全面质量管理 TQM 教程》 6小时 4 月 23 日(晚上)、 24日(晚上) 《生产一线成本管控教程》 6小时 6 月 20 日(晚上)、 21日(晚上 ) 《现场七大效率损失改善法》 6小时 8 月 27 日(晚上)、 28日(晚上) 《精益生产之 JIT 管理实战教程》
时就会不由自主地自语道:要活下去。 画家雷诺阿说:只要有点进步,那就是进一步接近死亡。 米开朗基罗临终的话也是:事物好不容易如愿表现出来的时候,也就是死亡。 毋宁说,感受美的能力,发展到一定程度是比较容易的。 光 凭头脑想象是困难的。 美是邂逅所得,是亲近所得,这是需要反复陶冶的。 凝视着壁龛里摆着的一朵插花,我心里想道„„然而,我们仔细观赏画中花,却不怎么留心欣赏真的花。 用心 爱心 专心
浪子回头, 基于物联网的智能窗帘控制系统的设计 第 17 页 共 118 页 可以让弱不禁风的幼苗逐渐承受 风吹雨打,可以让一个人坚持一辈子做好一件事情。 那我们要怎样担起自己的责任呢。 其实很简单,就是要有一颗尽职尽责的心,认认真真的完成分配的任务,不折不扣的实现工作目标。 春蚕到死丝方尽。 蜡炬成灰泪始干。 这就是对奉献的最好注解,几年来涌现在我们设备维修部的优秀人物数不胜数
搭建了 H 桥驱动电路。 通过逻辑设计,可以让电机处于多种模式下工作,经过在赛道上对赛车进行试验,电机的加减速效果很好,完全可以满足赛车对不同赛道加减速的要求。 本设计采用 PWM直流脉宽调速,该方法有效地避免了串电阻调速其调速范围小,平滑性低的缺点,尽管也存在开关过渡过程损耗大,在供电回路中产生谐波等缺点,但可以通过合理选择开关频率等办法弥补不足。 驱动芯片采用飞思卡尔半导体公司的半桥式驱动器
次,预测企业未来的绩效水平,并找出目标期望水平和未来预测水平之间的差距 ;最后,探讨弥补差距的战略方案,综合调整各项战略,并修改对企业未来绩效水平的预测。 (二 )确定关键绩效领域:明确了战略目标,下一步就需要对最有效驱动战略目标的关键绩效领域进行确定。 关键绩效领域是指对企业总体竞争地位和企业战略目标的实现有重大影响的变量、领域。 它是制定关键绩效指标的重要依据。