OpenZWave Library 1.6.1914
Loading...
Searching...
No Matches
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
38namespace OpenZWave
39{
40 namespace Internal
41 {
42
44 {
45 public:
47 {
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 bool 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
unsigned int uint32
Definition Defs.h:91
std::map< uint32, string > ListItems
Definition NotificationCCTypes.h:62
NotificationEventParamTypes type
Definition NotificationCCTypes.h:61
uint32 id
Definition NotificationCCTypes.h:67
string name
Definition NotificationCCTypes.h:68
std::map< uint32, std::shared_ptr< NotificationCCTypes::NotificationEventParams > > EventParams
Definition NotificationCCTypes.h:69
string name
Definition NotificationCCTypes.h:75
uint32 id
Definition NotificationCCTypes.h:74
std::map< uint32, std::shared_ptr< NotificationCCTypes::NotificationEvents > > Events
Definition NotificationCCTypes.h:76
Definition NotificationCCTypes.h:44
NotificationEventParamTypes
Definition NotificationCCTypes.h:47
@ NEPT_String
Definition NotificationCCTypes.h:52
@ NEPT_List
Definition NotificationCCTypes.h:49
@ NEPT_Byte
Definition NotificationCCTypes.h:51
@ NEPT_Location
Definition NotificationCCTypes.h:48
@ NEPT_UserCodeReport
Definition NotificationCCTypes.h:50
@ NEPT_Time
Definition NotificationCCTypes.h:53
const std::map< uint32, std::shared_ptr< NotificationCCTypes::NotificationEventParams > > GetAlarmNotificationEventParams(uint32, uint32)
Definition NotificationCCTypes.cpp:361
static bool Create()
Definition NotificationCCTypes.cpp:374
string GetAlarmType(uint32)
Definition NotificationCCTypes.cpp:315
const std::shared_ptr< NotificationCCTypes::NotificationTypes > GetAlarmNotificationTypes(uint32)
Definition NotificationCCTypes.cpp:335
static string GetEventParamNames(NotificationEventParamTypes)
Definition NotificationCCTypes.cpp:289
static NotificationCCTypes * Get()
Definition NotificationCCTypes.cpp:388
const std::shared_ptr< NotificationEvents > GetAlarmNotificationEvents(uint32, uint32)
Definition NotificationCCTypes.cpp:348
string GetEventForAlarmType(uint32, uint32)
Definition NotificationCCTypes.cpp:325
Definition Bitfield.cpp:31