EnOcean Link  1.14.0.0
Middleware to Connect EnOcean easily to other Projects
eoChannelInfo.h
Go to the documentation of this file.
1 /******************************************************************************
2  DISCLAIMER
3 
4  THIS SOFTWARE PRODUCT ("SOFTWARE") IS PROPRIETARY TO ENOCEAN GMBH, OBERHACHING,
5  GERMANY (THE "OWNER") AND IS PROTECTED BY COPYRIGHT AND INTERNATIONAL TREATIES OR
6  PROTECTED AS TRADE SECRET OR AS OTHER INTELLECTUAL PROPERTY RIGHT. ALL RIGHTS, TITLE AND
7  INTEREST IN AND TO THE SOFTWARE, INCLUDING ANY COPYRIGHT, TRADE SECRET OR ANY OTHER
8  INTELLECTUAL PROPERTY EMBODIED IN THE SOFTWARE, AND ANY RIGHTS TO REPRODUCE,
9  DISTRIBUTE, MODIFY, DISPLAY OR OTHERWISE USE THE SOFTWARE SHALL EXCLUSIVELY VEST IN THE
10  OWNER. ANY UNAUTHORIZED REPRODUCTION, DISTRIBUTION, MODIFICATION, DISPLAY OR OTHER
11  USE OF THE SOFTWARE WITHOUT THE EXPLICIT PERMISSION OF OWNER IS PROHIBITED AND WILL
12  CONSTITUTE AN INFRINGEMENT OF THE OWNER'S RIGHT AND MAY BE SUBJECT TO CIVIL OR
13  CRIMINAL SANCTION.
14 
15  THIS SOFTWARE IS PROVIDED BY THE OWNER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
16  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
17  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN PARTICULAR, THE OWNER DOES NOT WARRANT
18  THAT THE SOFTWARE SHALL BE ERROR FREE AND WORKS WITHOUT INTERRUPTION.
19 
20  IN NO EVENT SHALL THE OWNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  ******************************************************************************/
27 
33 #ifndef _eoCHANNELINFO_H
34 #define _eoCHANNELINFO_H
35 
36 #include "eoHalTypes.h"
37 #include "eoChannelEnums.h"
39 #define UNIT 0x00
40 #define NAME 0x01
42 
43 #include <string>
44 
49 typedef struct
50 {
52  bool exist;
54  uint16_t bitoffs;
56  uint16_t bitsize;
58  uint64_t rangeMin;
60  uint64_t rangeMax;
62  double scaleMin;
64  double scaleMax;
68  uint8_t index;
69 } EEP_ITEM;
70 
71 
78 {
79 private:
80  std::string channelName;
81 public:
87  double min;
89  double max;
95  const char* ToString(uint8_t strType);
96 
97  void SetName(const char* name) { channelName = name; };
99  virtual uint8_t GetSubIndex()
100  {
101  return 0;
102  }
103 };
104 
111 {
112 public:
114  const EEP_ITEM* eepItem = NULL;
115  virtual uint8_t GetSubIndex()
116  {
117  if(eepItem !=NULL)
118  {
119  return eepItem->index;
120  }
121  return 0;
122  };
123 };
124 
125 #endif // _CHANNELINFO_H
VALUE_TYPE signalType
Current, Setpoint Absolute, Setpoint relative.
Definition: eoChannelInfo.h:85
virtual uint8_t GetSubIndex()
Definition: eoChannelInfo.h:115
CHANNEL_TYPE type
CHANNEL_TYPE
Definition: eoChannelInfo.h:83
bool exist
Help flag if channel available.
Definition: eoChannelInfo.h:52
Contains Channel Enums.
uint64_t rangeMax
Range of the data value - maximum.
Definition: eoChannelInfo.h:60
const char * ToString(uint8_t strType)
Abstract class for channel information. Abstract class for channel information. From this class speci...
Definition: eoChannelInfo.h:77
CHANNEL_TYPE type
CHANNEL_TYPE
Definition: eoChannelInfo.h:66
VALUE_TYPE
Value types.
Definition: eoChannelEnums.h:577
Specific class for EEP channel information. Class used to describe the EEP channels. It has the EEP_ITEM to describe the EEP channel values and the subtype - index.
Definition: eoChannelInfo.h:110
uint8_t index
Subchannel type - or index. This is only used if two of the same CHANNEL_TYPE members are available a...
Definition: eoChannelInfo.h:68
double scaleMin
Scaling application for the data value - minimum.
Definition: eoChannelInfo.h:62
virtual uint8_t GetSubIndex()
Definition: eoChannelInfo.h:99
CHANNEL_TYPE
Definition: eoChannelEnums.h:169
double scaleMax
Scaling application for the data value - maximum.
Definition: eoChannelInfo.h:64
uint16_t bitsize
Size of the data value in telegram.
Definition: eoChannelInfo.h:56
uint64_t rangeMin
Range of the data value - minimum.
Definition: eoChannelInfo.h:58
double max
Max as clear value.
Definition: eoChannelInfo.h:89
#define NULL
NULL definition.
Definition: eoHalTypes.h:54
Definition: eoChannelInfo.h:49
uint16_t bitoffs
Offset of the data value in telegram in bits.
Definition: eoChannelInfo.h:54
double min
Min as clear value.
Definition: eoChannelInfo.h:87