remotenode.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 REMOTENODE_H
22 #define REMOTENODE_H
23 
24 #include <QObject>
25 
26 namespace QtXBee {
27 
31 class RemoteNode : public QObject
32 {
33  Q_OBJECT
34 public:
35  explicit RemoteNode (QObject *parent = 0);
36  ~RemoteNode ();
37 
38  void setAddress (const quint16 my);
39  void setSerialNumberHigh (const quint32 sh);
40  void setSerialNumberLow (const quint32 sl);
41  void setNodeIdentifier (const QString & ni);
42  void setRssi (const qint8 rssi);
43 
44  quint16 address () const;
45  quint32 serialNumberHigh () const;
46  quint32 serialNumberLow () const;
47  quint64 serialNumber () const;
48  qint8 rssi () const;
49  QString nodeIdentifier () const;
50 
51  virtual QString toString();
52 
53 signals:
54  void addressChanged ();
55  void serialNumberHighChanged ();
56  void serialNumberLowChanged ();
57  void rssiChanged ();
58  void nodeIdentifierChanged ();
60 protected:
61  quint16 m_my;
62  quint32 m_sh;
63  quint32 m_sl;
64  qint8 m_rssi;
65  QString m_ni;
66 };
67 
68 } // END namepsace
69 
70 #endif // REMOTENODE_H