remoteatcommandresponse.h
1 /*
2  * Copyright (C) 2015 ThomArmax (Thomas COIN)
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * Thomas COIN <esvcorp@gmail.com> 18/04/2015
19  */
20 
21 #ifndef REMOTECOMMANDRESPONSE_H
22 #define REMOTECOMMANDRESPONSE_H
23 
24 #include "ATCommandResponse"
25 
26 #include <QObject>
27 #include <QByteArray>
28 
29 namespace QtXBee {
30 
43 {
44  Q_OBJECT
45 public:
46  explicit RemoteATCommandResponse (QObject *parent = 0);
47  RemoteATCommandResponse (const QByteArray & packet, QObject *parent = 0);
48 
49  // Reimplement from ATCommandResponse
50  virtual QString toString ();
51  virtual void clear ();
52 
53  // Setters
54  void setSourceAddress64 (const quint64 addr);
55  void setSourceAddress16 (const quint32 addr);
56 
57  // Getters
58  quint64 sourceAddress64 () const;
59  quint16 sourceAddress16 () const;
60 
61 protected:
62  virtual bool parseApiSpecificData (const QByteArray &data);
63 
64 private:
65  quint64 m_sourceAddress64;
66  quint16 m_sourceAddress16;
67 };
68 
69 } // END namepsace
70 
71 #endif // REMOTECOMMANDRESPONSE_H