* Data structure for the user application, available as decodedIRData. * Filled by decoders and read by print functions or user application. */
| 165 | * Filled by decoders and read by print functions or user application. |
| 166 | */ |
| 167 | struct IRData { |
| 168 | decode_type_t protocol; ///< UNKNOWN, NEC, SONY, RC5, PULSE_DISTANCE, ... |
| 169 | uint16_t address; ///< Decoded address, Distance protocol (tMarkTicksLong (if tMarkTicksLong == 0, then tMarkTicksShort) << 8) | tSpaceTicksLong |
| 170 | uint16_t command; ///< Decoded command, Distance protocol (tMarkTicksShort << 8) | tSpaceTicksShort |
| 171 | uint16_t extra; ///< Contains upper 16 bit of Magiquest WandID, Kaseikyo unknown vendor ID and Distance protocol (HeaderMarkTicks << 8) | HeaderSpaceTicks. |
| 172 | IRDecodedRawDataType decodedRawData; ///< Up to 32/64 bit decoded raw data, to be used for send<protocol>Raw functions. |
| 173 | #if defined(DECODE_DISTANCE_WIDTH) |
| 174 | // This replaces the address, command, extra and decodedRawData in case of protocol == PULSE_DISTANCE or -rather seldom- protocol == PULSE_WIDTH. |
| 175 | DistanceWidthTimingInfoStruct DistanceWidthTimingInfo; // 12 bytes |
| 176 | IRDecodedRawDataType decodedRawDataArray[DECODED_RAW_DATA_ARRAY_SIZE]; ///< 32/64 bit decoded raw data, to be used for sendPulseDistanceWidthFromArray functions. |
| 177 | #endif |
| 178 | uint16_t numberOfBits; ///< Number of bits received for data (address + command + parity) - to determine protocol length if different length are possible. |
| 179 | uint8_t flags; ///< IRDATA_FLAGS_IS_REPEAT, IRDATA_FLAGS_WAS_OVERFLOW etc. See IRDATA_FLAGS_* definitions above |
| 180 | |
| 181 | /* |
| 182 | * These 2 variables allow to call resume() directly after decode. |
| 183 | * After resume(), irparams.initialGapTicks and irparams.rawlen are |
| 184 | * the first variables, which are overwritten by the next received frame. |
| 185 | * since 4.3.0. |
| 186 | */ |
| 187 | IRRawlenType rawlen; ///< Counter of entries in rawbuf of last received frame. |
| 188 | uint16_t initialGapTicks; ///< Contains the initial gap (pre 4.4: the value in rawbuf[0]) of the last received frame. |
| 189 | }; |
| 190 | |
| 191 | /**************************************************** |
| 192 | * RECEIVING |
nothing calls this directly
no outgoing calls
no test coverage detected