Vergil Cola
/
MQTTGatewayK64
Fork of my MQTTGateway
XbeeMonitor/XBeeLib/FrameHandlers/FH_ModemStatus.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_MODEM_STATUS_H_) |
vpcola | 0:f1d3878b8dd9 | 14 | #define __FH_MODEM_STATUS_H_ |
vpcola | 0:f1d3878b8dd9 | 15 | |
vpcola | 0:f1d3878b8dd9 | 16 | #include "Frames/AtCmdFrame.h" |
vpcola | 0:f1d3878b8dd9 | 17 | #include "FrameHandler.h" |
vpcola | 0:f1d3878b8dd9 | 18 | |
vpcola | 0:f1d3878b8dd9 | 19 | typedef void (*modem_status_cb_t)(AtCmdFrame::ModemStatus status); |
vpcola | 0:f1d3878b8dd9 | 20 | |
vpcola | 0:f1d3878b8dd9 | 21 | class FH_ModemStatus : public FrameHandler |
vpcola | 0:f1d3878b8dd9 | 22 | { |
vpcola | 0:f1d3878b8dd9 | 23 | private: |
vpcola | 0:f1d3878b8dd9 | 24 | /** Callback function, invoked (if registered) when a modem status packet is received */ |
vpcola | 0:f1d3878b8dd9 | 25 | modem_status_cb_t modem_status_cb; |
vpcola | 0:f1d3878b8dd9 | 26 | |
vpcola | 0:f1d3878b8dd9 | 27 | public: |
vpcola | 0:f1d3878b8dd9 | 28 | /** Class constructor */ |
vpcola | 0:f1d3878b8dd9 | 29 | FH_ModemStatus(); |
vpcola | 0:f1d3878b8dd9 | 30 | |
vpcola | 0:f1d3878b8dd9 | 31 | /** Class destructor */ |
vpcola | 0:f1d3878b8dd9 | 32 | virtual ~FH_ModemStatus(); |
vpcola | 0:f1d3878b8dd9 | 33 | |
vpcola | 0:f1d3878b8dd9 | 34 | /** Method called by the stack to process the modem status frame data |
vpcola | 0:f1d3878b8dd9 | 35 | |
vpcola | 0:f1d3878b8dd9 | 36 | \param frame pointer pointing to api frame that must be processed */ |
vpcola | 0:f1d3878b8dd9 | 37 | virtual void process_frame_data(const ApiFrame *const frame); |
vpcola | 0:f1d3878b8dd9 | 38 | |
vpcola | 0:f1d3878b8dd9 | 39 | virtual void register_modem_status_cb(modem_status_cb_t function); |
vpcola | 0:f1d3878b8dd9 | 40 | |
vpcola | 0:f1d3878b8dd9 | 41 | virtual void unregister_modem_status_cb(void); |
vpcola | 0:f1d3878b8dd9 | 42 | }; |
vpcola | 0:f1d3878b8dd9 | 43 | |
vpcola | 0:f1d3878b8dd9 | 44 | #endif /* __FH_MODEM_STATUS_H_ */ |