libhomegear-base  0.7
Base library for Homegear and Homegear family modules.
ServiceMessage.h
Go to the documentation of this file.
1 /* Copyright 2013-2019 Homegear GmbH
2  *
3  * libhomegear-base is free software: you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public License as
5  * published by the Free Software Foundation, either version 3 of the
6  * License, or (at your option) any later version.
7  *
8  * libhomegear-base is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with libhomegear-base. If not, see
15  * <http://www.gnu.org/licenses/>.
16  *
17  * In addition, as a special exception, the copyright holders give
18  * permission to link the code of portions of this program with the
19  * OpenSSL library under certain conditions as described in each
20  * individual source file, and distribute linked combinations
21  * including the two.
22  * You must obey the GNU Lesser General Public License in all respects
23  * for all of the code used other than OpenSSL. If you modify
24  * file(s) with this exception, you may extend this exception to your
25  * version of the file(s), but you are not obligated to do so. If you
26  * do not wish to do so, delete this exception statement from your
27  * version. If you delete this exception statement from all source
28  * files in the program, then also delete it here.
29 */
30 
31 #ifndef LIBHOMEGEAR_BASE_SRC_SYSTEMS_SERVICEMESSAGE_H_
32 #define LIBHOMEGEAR_BASE_SRC_SYSTEMS_SERVICEMESSAGE_H_
33 
34 #include "../Variable.h"
35 #include "../Managers/TranslationManager.h"
36 
37 namespace BaseLib {
38 
39 enum class ServiceMessageType {
40  kGlobal = 0,
41  kFamily = 1,
42  kDevice = 2
43 };
44 
46  kUndefined = 0,
47  kCritical = 1,
48  kError = 2,
49  kWarning = 3,
50  kInfo = 4,
51  kDebug = 5
52 };
53 
55  public:
56  uint64_t databaseId = 0;
58  int32_t familyId = 0;
59  uint64_t peerId = 0;
60  int32_t channel = -1;
61  std::string variable;
62  std::string interface;
63  int32_t messageId = 0;
64  std::string messageSubId;
65  int32_t timestamp = 0;
66  std::string message;
67  std::list<std::string> variables;
68  int64_t value = 0;
71 
72  PVariable serialize();
73 };
74 typedef std::shared_ptr<ServiceMessage> PServiceMessage;
75 
76 }
77 
78 #endif //LIBHOMEGEAR_BASE_SRC_SYSTEMS_SERVICEMESSAGE_H_
Definition: BaseLib.cpp:34
std::string interface
Definition: ServiceMessage.h:62
PVariable value
Definition: UiElements.h:217
std::shared_ptr< Variable > PVariable
Definition: PhysicalInterfaceSettings.h:41
int32_t channel
Definition: UiElements.h:215
std::list< std::string > variables
Definition: ServiceMessage.h:67
ServiceMessageType
Definition: ServiceMessage.h:39
uint64_t peerId
Definition: UiElements.h:214
int32_t familyId
Definition: Licensing.h:380
ServiceMessagePriority
Definition: ServiceMessage.h:45
Definition: ServiceMessage.h:54
std::string variable
Definition: ServiceMessage.h:61
std::string messageSubId
Definition: ServiceMessage.h:64
std::string message
Definition: ServiceMessage.h:66
PVariable data
Definition: ServiceMessage.h:70
std::shared_ptr< ServiceMessage > PServiceMessage
Definition: ServiceMessage.h:74