Library to easily communicate with XBee modules.

Fork of XBeeLib by Digi International Inc.

Committer:
hbujanda
Date:
Thu Jul 28 10:17:20 2016 +0200
Revision:
6:06522f3a6642
Automatic upload

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hbujanda 6:06522f3a6642 1 /**
hbujanda 6:06522f3a6642 2 * Copyright (c) 2015 Digi International Inc.,
hbujanda 6:06522f3a6642 3 * All rights not expressly granted are reserved.
hbujanda 6:06522f3a6642 4 *
hbujanda 6:06522f3a6642 5 * This Source Code Form is subject to the terms of the Mozilla Public
hbujanda 6:06522f3a6642 6 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
hbujanda 6:06522f3a6642 7 * You can obtain one at http://mozilla.org/MPL/2.0/.
hbujanda 6:06522f3a6642 8 *
hbujanda 6:06522f3a6642 9 * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
hbujanda 6:06522f3a6642 10 * =======================================================================
hbujanda 6:06522f3a6642 11 */
hbujanda 6:06522f3a6642 12
hbujanda 6:06522f3a6642 13 #if !defined(__FH_IO_DATA_SAMPLE_DM_H_)
hbujanda 6:06522f3a6642 14 #define __FH_IO_DATA_SAMPLE_DM_H_
hbujanda 6:06522f3a6642 15
hbujanda 6:06522f3a6642 16 #include "FrameHandler.h"
hbujanda 6:06522f3a6642 17 #include "RemoteXBee/RemoteXBee.h"
hbujanda 6:06522f3a6642 18
hbujanda 6:06522f3a6642 19 namespace XBeeLib {
hbujanda 6:06522f3a6642 20
hbujanda 6:06522f3a6642 21 class IOSampleDM;
hbujanda 6:06522f3a6642 22
hbujanda 6:06522f3a6642 23 /**
hbujanda 6:06522f3a6642 24 * @defgroup callback_types "Callback types declaration"
hbujanda 6:06522f3a6642 25 * @{
hbujanda 6:06522f3a6642 26 */
hbujanda 6:06522f3a6642 27 /** IO Data Sample reception (ZigBee modules) callback type declaration
hbujanda 6:06522f3a6642 28 * @param remote the remote module that sent the data
hbujanda 6:06522f3a6642 29 * @param sample_data a referece to an @ref IOSampleDM that can be queried for the IoLines' values
hbujanda 6:06522f3a6642 30 */
hbujanda 6:06522f3a6642 31 typedef void (*io_data_cb_dm_t)(const RemoteXBeeDM& remote, const IOSampleDM& sample_data);
hbujanda 6:06522f3a6642 32 /**
hbujanda 6:06522f3a6642 33 * @}
hbujanda 6:06522f3a6642 34 */
hbujanda 6:06522f3a6642 35
hbujanda 6:06522f3a6642 36 class FH_IoDataSampeDM : public FrameHandler
hbujanda 6:06522f3a6642 37 {
hbujanda 6:06522f3a6642 38 public:
hbujanda 6:06522f3a6642 39 /** Class constructor */
hbujanda 6:06522f3a6642 40 FH_IoDataSampeDM();
hbujanda 6:06522f3a6642 41
hbujanda 6:06522f3a6642 42 /** Class destructor */
hbujanda 6:06522f3a6642 43 virtual ~FH_IoDataSampeDM();
hbujanda 6:06522f3a6642 44
hbujanda 6:06522f3a6642 45 virtual void process_frame_data(const ApiFrame *const frame);
hbujanda 6:06522f3a6642 46
hbujanda 6:06522f3a6642 47 void register_io_data_cb(io_data_cb_dm_t function);
hbujanda 6:06522f3a6642 48
hbujanda 6:06522f3a6642 49 void unregister_io_data_cb();
hbujanda 6:06522f3a6642 50
hbujanda 6:06522f3a6642 51 private:
hbujanda 6:06522f3a6642 52 /** Callback function, invoked if registered */
hbujanda 6:06522f3a6642 53 io_data_cb_dm_t io_data_cb;
hbujanda 6:06522f3a6642 54 };
hbujanda 6:06522f3a6642 55
hbujanda 6:06522f3a6642 56 } /* namespace XBeeLib */
hbujanda 6:06522f3a6642 57
hbujanda 6:06522f3a6642 58 #endif /* __FH_IO_DATA_SAMPLE_DM_H_ */