remoteatcommandrequest.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 REMOTEATCOMMANDREQUEST_H
22 #define REMOTEATCOMMANDREQUEST_H
23 
24 #include "ATCommand"
25 
26 namespace QtXBee {
27 
37 {
38  Q_OBJECT
39 public:
45  ApplyChanges = 0x02,
48  };
49  Q_DECLARE_FLAGS(RemoteCommandOptions, RemoteCommandOption)
50 
51  explicit RemoteATCommandRequest (QObject *parent = 0);
52 
53  // Reimplemented from ATCommand
54  virtual void assemblePacket ();
55  virtual void clear ();
56  virtual QString toString ();
57 
58  // Setters
59  void setDestinationAddress64 (const quint64 dest);
60  void setDestinationAddress16 (const quint32 dest);
61  void setCommandOptions (const RemoteCommandOptions options);
62 
63  // Getters
64  quint64 destinationAddress64 () const;
65  quint16 destinationAddress16 () const;
66  RemoteCommandOptions commandOptions () const;
67 
68 protected:
69  quint64 m_destinationAddress64;
70  quint16 m_destinationAddress16;
71  RemoteCommandOptions m_options;
72 };
73 
74 } // END namepsace
75 
76 #endif // REMOTEATCOMMANDREQUEST_H