OpenZWave Library  1.6.943
NotificationCCTypes.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 //
3 // NotificationCCTypes.h
4 //
5 // NotificationCCTypes for Notification Command Class
6 //
7 // Copyright (c) 2018 Justin Hammond <justin@dynam.ac>
8 //
9 // SOFTWARE NOTICE AND LICENSE
10 //
11 // This file is part of OpenZWave.
12 //
13 // OpenZWave is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU Lesser General Public License as published
15 // by the Free Software Foundation, either version 3 of the License,
16 // or (at your option) any later version.
17 //
18 // OpenZWave is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU Lesser General Public License for more details.
22 //
23 // You should have received a copy of the GNU Lesser General Public License
24 // along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
25 //
26 //-----------------------------------------------------------------------------
27 
28 #ifndef NOTIFICATIONCCTYPES_H
29 #define NOTIFICATIONCCTYPES_H
30 
31 #include <cstdio>
32 #include <string>
33 #include <map>
34 #include "Defs.h"
35 #include "Driver.h"
37 
38 namespace OpenZWave
39 {
40  namespace Internal
41  {
42 
44  {
45  public:
47  {
48  NEPT_Location = 0x01,
54  };
55 
57  {
58  public:
60  string name;
62  std::map<uint32, string> ListItems;
63  };
65  {
66  public:
68  string name;
69  std::map<uint32, std::shared_ptr<NotificationCCTypes::NotificationEventParams> > EventParams;
70  };
72  {
73  public:
75  string name;
76  std::map<uint32, std::shared_ptr<NotificationCCTypes::NotificationEvents> > Events;
77  };
78 
79  //-----------------------------------------------------------------------------
80  // Construction
81  //-----------------------------------------------------------------------------
82  private:
85  static void ReadXML();
86  public:
87  static NotificationCCTypes* Get();
88  static bool Create();
90  string GetAlarmType(uint32);
92  const std::shared_ptr<NotificationCCTypes::NotificationTypes> GetAlarmNotificationTypes(uint32);
93  const std::shared_ptr<NotificationEvents> GetAlarmNotificationEvents(uint32, uint32);
94  const std::map<uint32, std::shared_ptr<NotificationCCTypes::NotificationEventParams>> GetAlarmNotificationEventParams(uint32, uint32);
95 
96  //-----------------------------------------------------------------------------
97  // Instance Functions
98  //-----------------------------------------------------------------------------
99  private:
100  static NotificationCCTypes* m_instance;
101  static std::map<uint32,std::shared_ptr<NotificationCCTypes::NotificationTypes> > Notifications;
102  static uint32 m_revision;
103  };
104  } // namespace Internal
105 } // namespace OpenZWave
106 #endif // NOTIFICATIONCCTYPES_H
const std::shared_ptr< NotificationEvents > GetAlarmNotificationEvents(uint32, uint32)
Definition: NotificationCCTypes.cpp:347
Definition: Bitfield.cpp:30
NotificationEventParamTypes type
Definition: NotificationCCTypes.h:61
Definition: NotificationCCTypes.h:43
Definition: NotificationCCTypes.h:51
static NotificationCCTypes * Get()
Definition: NotificationCCTypes.cpp:384
uint32 id
Definition: NotificationCCTypes.h:74
std::map< uint32, std::shared_ptr< NotificationCCTypes::NotificationEventParams > > EventParams
Definition: NotificationCCTypes.h:69
Definition: NotificationCCTypes.h:53
uint32 id
Definition: NotificationCCTypes.h:67
unsigned int uint32
Definition: Defs.h:91
static bool Create()
Definition: NotificationCCTypes.cpp:373
std::map< uint32, std::shared_ptr< NotificationCCTypes::NotificationEvents > > Events
Definition: NotificationCCTypes.h:76
const std::map< uint32, std::shared_ptr< NotificationCCTypes::NotificationEventParams > > GetAlarmNotificationEventParams(uint32, uint32)
Definition: NotificationCCTypes.cpp:360
string GetAlarmType(uint32)
Definition: NotificationCCTypes.cpp:314
string GetEventForAlarmType(uint32, uint32)
Definition: NotificationCCTypes.cpp:324
static string GetEventParamNames(NotificationEventParamTypes)
Definition: NotificationCCTypes.cpp:288
const std::shared_ptr< NotificationCCTypes::NotificationTypes > GetAlarmNotificationTypes(uint32)
Definition: NotificationCCTypes.cpp:334
std::map< uint32, string > ListItems
Definition: NotificationCCTypes.h:62
Definition: NotificationCCTypes.h:49
Definition: NotificationCCTypes.h:52
string name
Definition: NotificationCCTypes.h:75
string name
Definition: NotificationCCTypes.h:68
NotificationEventParamTypes
Definition: NotificationCCTypes.h:46