Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of XBeeLib by
FH_RxPacketZB.h
00001 /** 00002 * Copyright (c) 2015 Digi International Inc., 00003 * All rights not expressly granted are reserved. 00004 * 00005 * This Source Code Form is subject to the terms of the Mozilla Public 00006 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 00007 * You can obtain one at http://mozilla.org/MPL/2.0/. 00008 * 00009 * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343 00010 * ======================================================================= 00011 */ 00012 00013 #if !defined(__FH_RX_PACKET_ZB_H_) 00014 #define __FH_RX_PACKET_ZB_H_ 00015 00016 #include "FrameHandler.h" 00017 #include "RemoteXBee/RemoteXBee.h" 00018 00019 namespace XBeeLib { 00020 00021 /** 00022 * @defgroup callback_types "Callback types declaration" 00023 * @{ 00024 */ 00025 /** receive callback type declaration 00026 * @param remote the remote module that sent the data 00027 * @param broadcast a boolean to tell if the message was broadcast (true) or unicast (false) 00028 * @param data a pointer to data sent by @b remote. 00029 * @param len length (in bytes) of @b data buffer 00030 */ 00031 typedef void (*receive_zb_cb_t)(const RemoteXBeeZB& remote, bool broadcast, const uint8_t *const data, uint16_t len); 00032 /** 00033 * @} 00034 */ 00035 00036 class FH_RxPacketZB : public FrameHandler 00037 { 00038 private: 00039 /** Callback function, invoked if registered */ 00040 receive_zb_cb_t receive_cb; 00041 00042 public: 00043 /** Class constructor */ 00044 FH_RxPacketZB(); 00045 00046 /** Class destructor */ 00047 virtual ~FH_RxPacketZB(); 00048 00049 /** Method called by the stack to process the modem status frame data 00050 00051 \param frame pointer pointing to api frame that must be processed */ 00052 virtual void process_frame_data(const ApiFrame* const frame); 00053 00054 void register_receive_cb(receive_zb_cb_t function); 00055 00056 void unregister_receive_cb(); 00057 }; 00058 00059 } /* namespace XBeeLib */ 00060 00061 #endif /* __FH_RX_PACKET_ZB_H_ */
Generated on Tue Jul 12 2022 20:40:23 by
