| Demo HCI Implementation for WiMOD-LR Devices V2.0.3

WiMOD_SAP_SensorApp_IDs.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
31 //------------------------------------------------------------------------------
32
33
34 #ifndef ARDUINO_SAP_WIMOD_SAP_SENSORAPP_IDS_H_
35 #define ARDUINO_SAP_WIMOD_SAP_SENSORAPP_IDS_H_
36
37 //------------------------------------------------------------------------------
38 //
39 // Section Includes Files
40 //
41 //------------------------------------------------------------------------------
42
43 #include "utils/WMDefs.h"
44
45 //------------------------------------------------------------------------------
46 //
47 // Service Access Point Identifier
48 //
49 //------------------------------------------------------------------------------
50
52 #define SENSORAPP_SAP_ID 0x05
53
54 //------------------------------------------------------------------------------
55 //
56 // Sensor App Services Identifier
57 //
58 //------------------------------------------------------------------------------
60
61 #define SENSORAPP_MSG_SET_CONFIG_REQ 0x09
62 #define SENSORAPP_MSG_SET_CONFIG_RSP 0x0A
63 #define SENSORAPP_MSG_GET_CONFIG_REQ 0x0B
64 #define SENSORAPP_MSG_GET_CONFIG_RSP 0x0C
65 #define SENSORAPP_MSG_SEND_DATA_IND 0x06
66 #define SENSORAPP_MSG_ACK_IND 0x08
67
69
70 //------------------------------------------------------------------------------
71 //
72 // SensorApp Status Codes
73 //
74 //------------------------------------------------------------------------------
75
76 #define SENSORAPP_STATUS_OK 0x00
77 #define SENSORAPP_STATUS_ERROR 0x01
78 #define SENSORAPP_STATUS_WRONG_DEVICEMODE 0x04
80 // extended HCI format for optional fiels in the SensorApp
81 #define SENSORAPP_FORMAT_EXT_HCI_OUT_ACTIVE 0x01
83 //------------------------------------------------------------------------------
84 //
85 // Options
86 //
87 //------------------------------------------------------------------------------
88 #define SENSORAPP_OPTION_SENSOR_ACK_MSG BV(0)
89 #define SENSORAPP_OPTION_ACK_MSG_HCI_OUTPUT BV(1)
90 #define SENSORAPP_OPTION_LINK_MON_SIGNAL_OUTPUT BV(2)
91 #define SENSORAPP_OPTION_PUSH_BUTTON_ONE BV(3)
94 #define SENSORAPP_DIGITAL_INPUT_ONE_SET BV(0)
95 #define SENSORAPP_DIGITAL_INPUT_TWO_SET BV(1)
96 #define SENSORAPP_DIGITAL_INPUT_THREE_SET BV(2)
97 //#define SENSORAPP_DIGITAL_INPUT_DIP_SW1_SET BV(3)
98 #define SENSORAPP_ANALOG_INPUT_ONE_SET BV(3)
101 //------------------------------------------------------------------------------
102 //
103 // structures
104 //
105 //------------------------------------------------------------------------------
106
107
111 typedef enum TSensorApp_Mode {
112 SensorApp_Mode_Off = 0,
113 SensorApp_Mode_SensorDataTransmitter = 1,
114 SensorApp_Mode_SensorDataReceiver = 2,
115 } TSensorApp_Mode;
116
117
121 typedef struct TWiMODLR_SensorApp_Config
122 {
123 // only for RX
124 UINT8 Status;
126 TSensorApp_Mode Mode;
127 UINT8 Options;
128 UINT32 SendingPeriod;
129 UINT32 LinkTimeout;
130 } TWiMODLR_SensorApp_Config;
131
132
133
137 typedef struct TWiMODLR_SensorApp_SensorData
138 {
139 // only for RX
140 UINT8 StatusFormat;
141 UINT8 DestGroupAddress;
142 UINT16 DestDevAddress;
143 UINT8 SourceGroupAddress;
144 UINT16 SourceDevAddress;
146 UINT16 Voltage;
147 UINT16 AdcValue;
148 UINT8 Temperature;
149 UINT8 DigitalInputs;
151 //optional
152 INT16 RSSI;
153 INT8 SNR;
154 UINT32 RxTime;
156 // not part of the HCI message
157 bool OptionalInfoAvaiable;
159 } TWiMODLR_SensorApp_SensorData;
160
164 typedef struct TWiMODLR_SensorApp_AckSensorData
165 {
166 // only for RX
167 UINT8 StatusFormat;
168 UINT8 DestGroupAddress;
169 UINT16 DestDevAddress;
170 UINT8 SourceGroupAddress;
171 UINT16 SourceDevAddress;
173 UINT8 DigitalInputs;
175 //optional
176 INT16 RSSI;
177 INT8 SNR;
178 UINT32 RxTime;
180 // not part of the HCI message
181 bool OptionalInfoAvaiable;
183 } TWiMODLR_SensorApp_AckSensorData;
184
185
186 #endif /* ARDUINO_SAP_WIMOD_SAP_SENSORAPP_IDS_H_ */
TWiMODLR_SensorApp_SensorData::StatusFormat
UINT8 StatusFormat
Definition: WiMOD_SAP_SensorApp_IDs.h:140
TWiMODLR_SensorApp_SensorData::AdcValue
UINT16 AdcValue
Definition: WiMOD_SAP_SensorApp_IDs.h:147
TWiMODLR_SensorApp_AckSensorData::DigitalInputs
UINT8 DigitalInputs
Definition: WiMOD_SAP_SensorApp_IDs.h:173
TWiMODLR_SensorApp_AckSensorData::DestDevAddress
UINT16 DestDevAddress
Definition: WiMOD_SAP_SensorApp_IDs.h:169
TWiMODLR_SensorApp_SensorData::Temperature
UINT8 Temperature
Definition: WiMOD_SAP_SensorApp_IDs.h:148
TWiMODLR_SensorApp_AckSensorData::DestGroupAddress
UINT8 DestGroupAddress
Definition: WiMOD_SAP_SensorApp_IDs.h:168
TWiMODLR_SensorApp_SensorData::SourceDevAddress
UINT16 SourceDevAddress
Definition: WiMOD_SAP_SensorApp_IDs.h:144
TWiMODLR_SensorApp_AckSensorData::SourceDevAddress
UINT16 SourceDevAddress
Definition: WiMOD_SAP_SensorApp_IDs.h:171
TWiMODLR_SensorApp_Config
Structure containing a general RadioLink HCI message.
Definition: WiMOD_SAP_SensorApp_IDs.h:121
TWiMODLR_SensorApp_AckSensorData
Structure containing the data of an Ack of the SensorApp.
Definition: WiMOD_SAP_SensorApp_IDs.h:164
TWiMODLR_SensorApp_SensorData
Structure containing SensorApp Data information.
Definition: WiMOD_SAP_SensorApp_IDs.h:137
TSensorApp_Mode
TSensorApp_Mode
SensorApp Modes.
Definition: WiMOD_SAP_SensorApp_IDs.h:111
TWiMODLR_SensorApp_SensorData::DestDevAddress
UINT16 DestDevAddress
Definition: WiMOD_SAP_SensorApp_IDs.h:142
TWiMODLR_SensorApp_Config::Mode
TSensorApp_Mode Mode
Definition: WiMOD_SAP_SensorApp_IDs.h:126
TWiMODLR_SensorApp_SensorData::DigitalInputs
UINT8 DigitalInputs
Definition: WiMOD_SAP_SensorApp_IDs.h:149
TWiMODLR_SensorApp_AckSensorData::RxTime
UINT32 RxTime
Definition: WiMOD_SAP_SensorApp_IDs.h:178
TWiMODLR_SensorApp_AckSensorData::SourceGroupAddress
UINT8 SourceGroupAddress
Definition: WiMOD_SAP_SensorApp_IDs.h:170
TWiMODLR_SensorApp_SensorData
struct TWiMODLR_SensorApp_SensorData TWiMODLR_SensorApp_SensorData
Structure containing SensorApp Data information.
SensorApp_Mode_SensorDataTransmitter
@ SensorApp_Mode_SensorDataTransmitter
Definition: WiMOD_SAP_SensorApp_IDs.h:113
SensorApp_Mode_Off
@ SensorApp_Mode_Off
Definition: WiMOD_SAP_SensorApp_IDs.h:112
TWiMODLR_SensorApp_SensorData::DestGroupAddress
UINT8 DestGroupAddress
Definition: WiMOD_SAP_SensorApp_IDs.h:141
TWiMODLR_SensorApp_SensorData::RSSI
INT16 RSSI
Definition: WiMOD_SAP_SensorApp_IDs.h:152
TWiMODLR_SensorApp_SensorData::Voltage
UINT16 Voltage
Definition: WiMOD_SAP_SensorApp_IDs.h:146
TWiMODLR_SensorApp_AckSensorData::RSSI
INT16 RSSI
Definition: WiMOD_SAP_SensorApp_IDs.h:176
TWiMODLR_SensorApp_SensorData::RxTime
UINT32 RxTime
Definition: WiMOD_SAP_SensorApp_IDs.h:154
TWiMODLR_SensorApp_SensorData::SourceGroupAddress
UINT8 SourceGroupAddress
Definition: WiMOD_SAP_SensorApp_IDs.h:143
TWiMODLR_SensorApp_AckSensorData::SNR
INT8 SNR
Definition: WiMOD_SAP_SensorApp_IDs.h:177
TWiMODLR_SensorApp_AckSensorData::StatusFormat
UINT8 StatusFormat
Definition: WiMOD_SAP_SensorApp_IDs.h:167
TWiMODLR_SensorApp_Config
struct TWiMODLR_SensorApp_Config TWiMODLR_SensorApp_Config
Structure containing a general RadioLink HCI message.
TWiMODLR_SensorApp_Config::LinkTimeout
UINT32 LinkTimeout
Definition: WiMOD_SAP_SensorApp_IDs.h:129
TWiMODLR_SensorApp_SensorData::SNR
INT8 SNR
Definition: WiMOD_SAP_SensorApp_IDs.h:153
TWiMODLR_SensorApp_SensorData::OptionalInfoAvaiable
bool OptionalInfoAvaiable
Definition: WiMOD_SAP_SensorApp_IDs.h:157
TWiMODLR_SensorApp_AckSensorData::OptionalInfoAvaiable
bool OptionalInfoAvaiable
Definition: WiMOD_SAP_SensorApp_IDs.h:181
TWiMODLR_SensorApp_Config::Options
UINT8 Options
Definition: WiMOD_SAP_SensorApp_IDs.h:127
SensorApp_Mode_SensorDataReceiver
@ SensorApp_Mode_SensorDataReceiver
Definition: WiMOD_SAP_SensorApp_IDs.h:114
TWiMODLR_SensorApp_Config::SendingPeriod
UINT32 SendingPeriod
Definition: WiMOD_SAP_SensorApp_IDs.h:128
TWiMODLR_SensorApp_Config::Status
UINT8 Status
Definition: WiMOD_SAP_SensorApp_IDs.h:124
TWiMODLR_SensorApp_AckSensorData
struct TWiMODLR_SensorApp_AckSensorData TWiMODLR_SensorApp_AckSensorData
Structure containing the data of an Ack of the SensorApp.