EnOcean Link  1.14.0.0
Middleware to Connect EnOcean easily to other Projects
eoUTEHelper.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 EO_UTE_HELPER_H_
34 #define EO_UTE_HELPER_H_
35 #include "eoHalTypes.h"
36 #include "eoMessage.h"
37 
39 typedef enum
40 {
43  TEACH_IN_ACCEPTED = 1,
45  TEACH_OUT_ACCEPTED = 2,
49 } UTE_RESPONSE;
50 
52 typedef enum
53 {
56  TEACH_OUT_REQUEST = 1,
61 } UTE_REQUEST;
62 
64 typedef enum
65 {
70 } UTE_COMMAND;
71 
73 typedef enum
74 {
80 
82 typedef struct
83 {
84  uint8_t rorg;
85  uint8_t func;
86  uint8_t type;
87  uint8_t numberOfChannel;
88  uint16_t manufacturerID;
92 
94 typedef struct
95 {
96  uint8_t rorg;
97  uint8_t func;
98  uint8_t type;
99  uint8_t numberOfChannel;
100  uint16_t manufacturerID;
104 
105 class eoUTEHelper
106 {
107 public:
114 static eoReturn ParseUTE(eoMessage &msg, UTE_EEP_TEACH_IN_QUERY &uteQuery);
123 static eoReturn CreateUTEResponse(UTE_EEP_TEACH_IN_RESPONSE &uteResponse, eoMessage &responseMessage);
132 static eoReturn CreateUTEResponseFromQuery(UTE_EEP_TEACH_IN_QUERY &uteQuery, eoMessage &responseMessage, UTE_RESPONSE type, UTE_DIRECTION direction);
133 };
134 #endif
0 - EEP Teach In Query
Definition: eoUTEHelper.h:67
UTE_REQUEST request
Request.
Definition: eoUTEHelper.h:90
uint16_t manufacturerID
Manufacturer ID.
Definition: eoUTEHelper.h:100
uint8_t type
Type of the profile to be teached in.
Definition: eoUTEHelper.h:98
UTE_REQUEST
UTE Request codes.
Definition: eoUTEHelper.h:52
Message Class for communication.
Definition: eoMessage.h:47
1 - Bidirectional
Definition: eoUTEHelper.h:78
UTE_DIRECTION
UTE Direction response codes.
Definition: eoUTEHelper.h:73
UTE_RESPONSE
UTE Response codes.
Definition: eoUTEHelper.h:39
1 - EEP teach in response
Definition: eoUTEHelper.h:69
uint8_t rorg
Rorg of the profile to be teached in.
Definition: eoUTEHelper.h:84
uint8_t type
Type of the profile to be teached in.
Definition: eoUTEHelper.h:86
2 - Teach-in or deletion of teach-in, not specified
Definition: eoUTEHelper.h:59
1 - Request accepted, teach-in successful
Definition: eoUTEHelper.h:44
2 - Request accepted, deletion of teach-in successful
Definition: eoUTEHelper.h:46
uint8_t func
Func of the profile to be teached in.
Definition: eoUTEHelper.h:97
Helper Structure for eep teach in Response.
Definition: eoUTEHelper.h:94
uint8_t rorg
Rorg of the profile to be teached in.
Definition: eoUTEHelper.h:96
UTE_DIRECTION direction
Communication capabilities.
Definition: eoUTEHelper.h:89
eoReturn
contains all the return values from different functions
Definition: eoApiDef.h:40
uint8_t numberOfChannel
Number of individual channel to be taught in.
Definition: eoUTEHelper.h:99
0 - Request not accepted because of general reason
Definition: eoUTEHelper.h:42
UTE_COMMAND
UTE Command.
Definition: eoUTEHelper.h:64
uint8_t func
Func of the profile to be teached in.
Definition: eoUTEHelper.h:85
uint16_t manufacturerID
Manufacturer ID.
Definition: eoUTEHelper.h:88
3 - Request not accepted, EEP not supported
Definition: eoUTEHelper.h:48
0 - Teach-in request
Definition: eoUTEHelper.h:55
uint8_t numberOfChannel
Number of individual channel to be taught in.
Definition: eoUTEHelper.h:87
UTE_RESPONSE response
Request.
Definition: eoUTEHelper.h:102
UTE_DIRECTION direction
Communication capabilities.
Definition: eoUTEHelper.h:101
UTE_NOT_USED_TEACH.
Definition: eoUTEHelper.h:60
0 - Unidirectional
Definition: eoUTEHelper.h:76
Helper Structure for eep teach in Queries.
Definition: eoUTEHelper.h:82
1 - Deletion of teached in device reqeusted
Definition: eoUTEHelper.h:57