Vergil Cola
/
MQTTGatewayK64
Fork of my MQTTGateway
XbeeMonitor/XBeeLib/FrameHandlers/FH_IoDataSample802.h@0:f1d3878b8dd9, 2017-04-08 (annotated)
- Committer:
- vpcola
- Date:
- Sat Apr 08 14:45:51 2017 +0000
- Revision:
- 0:f1d3878b8dd9
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vpcola | 0:f1d3878b8dd9 | 1 | /** |
vpcola | 0:f1d3878b8dd9 | 2 | * Copyright (c) 2015 Digi International Inc., |
vpcola | 0:f1d3878b8dd9 | 3 | * All rights not expressly granted are reserved. |
vpcola | 0:f1d3878b8dd9 | 4 | * |
vpcola | 0:f1d3878b8dd9 | 5 | * This Source Code Form is subject to the terms of the Mozilla Public |
vpcola | 0:f1d3878b8dd9 | 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
vpcola | 0:f1d3878b8dd9 | 7 | * You can obtain one at http://mozilla.org/MPL/2.0/. |
vpcola | 0:f1d3878b8dd9 | 8 | * |
vpcola | 0:f1d3878b8dd9 | 9 | * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343 |
vpcola | 0:f1d3878b8dd9 | 10 | * ======================================================================= |
vpcola | 0:f1d3878b8dd9 | 11 | */ |
vpcola | 0:f1d3878b8dd9 | 12 | |
vpcola | 0:f1d3878b8dd9 | 13 | #if !defined(__FH_IO_DATA_SAMPLE_802_H_) |
vpcola | 0:f1d3878b8dd9 | 14 | #define __FH_IO_DATA_SAMPLE_802_H_ |
vpcola | 0:f1d3878b8dd9 | 15 | |
vpcola | 0:f1d3878b8dd9 | 16 | #include "FrameHandler.h" |
vpcola | 0:f1d3878b8dd9 | 17 | #include "RemoteXBee/RemoteXBee.h" |
vpcola | 0:f1d3878b8dd9 | 18 | |
vpcola | 0:f1d3878b8dd9 | 19 | namespace XBeeLib { |
vpcola | 0:f1d3878b8dd9 | 20 | |
vpcola | 0:f1d3878b8dd9 | 21 | class IOSample802; |
vpcola | 0:f1d3878b8dd9 | 22 | |
vpcola | 0:f1d3878b8dd9 | 23 | /** |
vpcola | 0:f1d3878b8dd9 | 24 | * @defgroup callback_types "Callback types declaration" |
vpcola | 0:f1d3878b8dd9 | 25 | * @{ |
vpcola | 0:f1d3878b8dd9 | 26 | */ |
vpcola | 0:f1d3878b8dd9 | 27 | /** IO Data Sample reception (802.15.4 modules) callback type declaration |
vpcola | 0:f1d3878b8dd9 | 28 | * @param remote the remote module that sent the data |
vpcola | 0:f1d3878b8dd9 | 29 | * @param sample_data a referece to an @ref IOSample802 that can be queried for the IoLines' values |
vpcola | 0:f1d3878b8dd9 | 30 | */ |
vpcola | 0:f1d3878b8dd9 | 31 | typedef void (*io_data_cb_802_t)(const RemoteXBee802& remote, const IOSample802& sample_data); |
vpcola | 0:f1d3878b8dd9 | 32 | /** |
vpcola | 0:f1d3878b8dd9 | 33 | * @} |
vpcola | 0:f1d3878b8dd9 | 34 | */ |
vpcola | 0:f1d3878b8dd9 | 35 | |
vpcola | 0:f1d3878b8dd9 | 36 | |
vpcola | 0:f1d3878b8dd9 | 37 | class FH_IoDataSampe64b802 : public FrameHandler |
vpcola | 0:f1d3878b8dd9 | 38 | { |
vpcola | 0:f1d3878b8dd9 | 39 | public: |
vpcola | 0:f1d3878b8dd9 | 40 | /** Class constructor */ |
vpcola | 0:f1d3878b8dd9 | 41 | FH_IoDataSampe64b802(); |
vpcola | 0:f1d3878b8dd9 | 42 | |
vpcola | 0:f1d3878b8dd9 | 43 | /** Class destructor */ |
vpcola | 0:f1d3878b8dd9 | 44 | virtual ~FH_IoDataSampe64b802(); |
vpcola | 0:f1d3878b8dd9 | 45 | |
vpcola | 0:f1d3878b8dd9 | 46 | virtual void process_frame_data(const ApiFrame *const frame); |
vpcola | 0:f1d3878b8dd9 | 47 | |
vpcola | 0:f1d3878b8dd9 | 48 | void register_io_data_cb(io_data_cb_802_t function); |
vpcola | 0:f1d3878b8dd9 | 49 | void unregister_io_data_cb(); |
vpcola | 0:f1d3878b8dd9 | 50 | |
vpcola | 0:f1d3878b8dd9 | 51 | private: |
vpcola | 0:f1d3878b8dd9 | 52 | /** Callback function, invoked if registered */ |
vpcola | 0:f1d3878b8dd9 | 53 | io_data_cb_802_t io_data_cb; |
vpcola | 0:f1d3878b8dd9 | 54 | |
vpcola | 0:f1d3878b8dd9 | 55 | }; |
vpcola | 0:f1d3878b8dd9 | 56 | |
vpcola | 0:f1d3878b8dd9 | 57 | class FH_IoDataSampe16b802 : public FrameHandler |
vpcola | 0:f1d3878b8dd9 | 58 | { |
vpcola | 0:f1d3878b8dd9 | 59 | public: |
vpcola | 0:f1d3878b8dd9 | 60 | /** Class constructor */ |
vpcola | 0:f1d3878b8dd9 | 61 | FH_IoDataSampe16b802(); |
vpcola | 0:f1d3878b8dd9 | 62 | |
vpcola | 0:f1d3878b8dd9 | 63 | /** Class destructor */ |
vpcola | 0:f1d3878b8dd9 | 64 | virtual ~FH_IoDataSampe16b802(); |
vpcola | 0:f1d3878b8dd9 | 65 | |
vpcola | 0:f1d3878b8dd9 | 66 | virtual void process_frame_data(const ApiFrame *const frame); |
vpcola | 0:f1d3878b8dd9 | 67 | |
vpcola | 0:f1d3878b8dd9 | 68 | void register_io_data_cb(io_data_cb_802_t function); |
vpcola | 0:f1d3878b8dd9 | 69 | |
vpcola | 0:f1d3878b8dd9 | 70 | void unregister_io_data_cb(); |
vpcola | 0:f1d3878b8dd9 | 71 | |
vpcola | 0:f1d3878b8dd9 | 72 | private: |
vpcola | 0:f1d3878b8dd9 | 73 | /** Callback function, invoked if registered */ |
vpcola | 0:f1d3878b8dd9 | 74 | io_data_cb_802_t io_data_cb; |
vpcola | 0:f1d3878b8dd9 | 75 | }; |
vpcola | 0:f1d3878b8dd9 | 76 | |
vpcola | 0:f1d3878b8dd9 | 77 | } /* namespace XBeeLib */ |
vpcola | 0:f1d3878b8dd9 | 78 | |
vpcola | 0:f1d3878b8dd9 | 79 | #endif /* __FH_IO_DATA_SAMPLE_802_H_ */ |