XBee modules

Dependencies:   DigiLogger

Fork of XBeeLib by Digi International Inc.

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers FH_IoDataSample802.h Source File

FH_IoDataSample802.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_IO_DATA_SAMPLE_802_H_)
00014 #define __FH_IO_DATA_SAMPLE_802_H_
00015 
00016 #include "FrameHandler.h"
00017 #include "RemoteXBee/RemoteXBee.h"
00018 
00019 namespace XBeeLib {
00020 
00021 class IOSample802;
00022 
00023 /**
00024  * @defgroup callback_types "Callback types declaration"
00025  * @{
00026  */
00027 /** IO Data Sample reception (802.15.4 modules) callback type declaration
00028   * @param remote the remote module that sent the data
00029   * @param sample_data a referece to an @ref IOSample802 that can be queried for the IoLines' values
00030   */
00031 typedef void (*io_data_cb_802_t)(const RemoteXBee802& remote, const IOSample802& sample_data);
00032 /**
00033  * @}
00034  */
00035 
00036 
00037 class FH_IoDataSampe64b802 : public FrameHandler
00038 {
00039     public:
00040         /** Class constructor */
00041         FH_IoDataSampe64b802();
00042 
00043         /** Class destructor */
00044         virtual ~FH_IoDataSampe64b802();
00045 
00046         virtual void process_frame_data(const ApiFrame *const frame);
00047 
00048         void register_io_data_cb(io_data_cb_802_t function);
00049         void unregister_io_data_cb();
00050 
00051     private:
00052         /** Callback function, invoked if registered */
00053         io_data_cb_802_t io_data_cb;
00054 
00055 };
00056 
00057 class FH_IoDataSampe16b802 : public FrameHandler
00058 {
00059     public:
00060         /** Class constructor */
00061         FH_IoDataSampe16b802();
00062 
00063         /** Class destructor */
00064         virtual ~FH_IoDataSampe16b802();
00065 
00066         virtual void process_frame_data(const ApiFrame *const frame);
00067 
00068         void register_io_data_cb(io_data_cb_802_t function);
00069 
00070         void unregister_io_data_cb();
00071 
00072     private:
00073         /** Callback function, invoked if registered */
00074         io_data_cb_802_t io_data_cb;
00075 };
00076 
00077 }   /* namespace XBeeLib */
00078 
00079 #endif /* __FH_IO_DATA_SAMPLE_802_H_ */