[FL-1398] IRDA: Implement timings encoder, add RC-6 (#570)

* Add RC-6 protocol
* Implement timings Encoder
* Remove Unit-tests from build
This commit is contained in:
Albert Kharisov
2021-07-08 21:20:13 +03:00
committed by GitHub
parent 4ce41a3e6f
commit 9f6e14d005
32 changed files with 1563 additions and 489 deletions

View File

@@ -0,0 +1,224 @@
#include <furi.h>
#include "../minunit.h"
#include "irda.h"
#include "irda_common_i.h"
#include "test_data/irda_nec_test_data.srcdata"
#include "test_data/irda_necext_test_data.srcdata"
#include "test_data/irda_samsung_test_data.srcdata"
#include "test_data/irda_rc6_test_data.srcdata"
#define RUN_ENCODER(data, expected) \
run_encoder((data), COUNT_OF(data), (expected), COUNT_OF(expected))
#define RUN_DECODER(data, expected) \
run_decoder((data), COUNT_OF(data), (expected), COUNT_OF(expected))
static IrdaDecoderHandler* decoder_handler;
static IrdaEncoderHandler* encoder_handler;
static void test_setup(void) {
decoder_handler = irda_alloc_decoder();
encoder_handler = irda_alloc_encoder();
}
static void test_teardown(void) {
irda_free_decoder(decoder_handler);
irda_free_encoder(encoder_handler);
}
static void compare_message_results(
const IrdaMessage* message_decoded,
const IrdaMessage* message_expected) {
mu_check(message_decoded->protocol == message_expected->protocol);
mu_check(message_decoded->command == message_expected->command);
mu_check(message_decoded->address == message_expected->address);
mu_check(message_decoded->repeat == message_expected->repeat);
}
static void
run_encoder_fill_array(IrdaEncoderHandler* handler, uint32_t* timings, uint32_t* timings_len) {
uint32_t duration = 0;
bool level = false; // start from space
bool level_read;
IrdaStatus status = IrdaStatusError;
int i = 0;
while(1) {
status = irda_encode(handler, &duration, &level_read);
if(level_read != level) {
level = level_read;
++i;
}
timings[i] += duration;
furi_assert((status == IrdaStatusOk) || (status == IrdaStatusDone));
if(status == IrdaStatusDone) break;
furi_assert(i < *timings_len);
}
*timings_len = i + 1;
}
// messages in input array for encoder should have one protocol
static void run_encoder(
const IrdaMessage input_messages[],
uint32_t input_messages_len,
const uint32_t expected_timings[],
uint32_t expected_timings_len) {
uint32_t* timings = 0;
uint32_t timings_len = 0;
uint32_t j = 0;
for(uint32_t message_counter = 0; message_counter < input_messages_len; ++message_counter) {
const IrdaMessage* message = &input_messages[message_counter];
if(!message->repeat) {
irda_reset_encoder(encoder_handler, message);
}
timings_len = 200;
timings = furi_alloc(sizeof(uint32_t) * timings_len);
run_encoder_fill_array(encoder_handler, timings, &timings_len);
furi_assert(timings_len <= 200);
for(int i = 0; i < timings_len; ++i, ++j) {
mu_check(MATCH_BIT_TIMING(timings[i], expected_timings[j], 120));
mu_assert(j < expected_timings_len, "encoded more timings than expected");
}
free(timings);
}
mu_assert(j == expected_timings_len, "encoded less timings than expected");
}
static void run_encoder_decoder(const IrdaMessage input_messages[], uint32_t input_messages_len) {
uint32_t* timings = 0;
uint32_t timings_len = 0;
bool level = false;
for(uint32_t message_counter = 0; message_counter < input_messages_len; ++message_counter) {
const IrdaMessage* message_encoded = &input_messages[message_counter];
if(!message_encoded->repeat) {
irda_reset_encoder(encoder_handler, message_encoded);
level = false;
}
timings_len = 200;
timings = furi_alloc(sizeof(uint32_t) * timings_len);
run_encoder_fill_array(encoder_handler, timings, &timings_len);
furi_assert(timings_len <= 200);
const IrdaMessage* message_decoded = 0;
for(int i = 0; i < timings_len; ++i) {
message_decoded = irda_decode(decoder_handler, level, timings[i]);
if(i < timings_len - 1)
mu_check(!message_decoded);
else
mu_check(message_decoded);
level = !level;
}
if(message_decoded) {
compare_message_results(message_decoded, message_encoded);
} else {
mu_check(0);
}
free(timings);
}
}
static void run_decoder(
const uint32_t* input_delays,
uint32_t input_delays_len,
const IrdaMessage* message_expected,
uint32_t message_expected_len) {
const IrdaMessage* message_decoded = 0;
bool level = 0;
uint32_t message_counter = 0;
for(uint32_t i = 0; i < input_delays_len; ++i) {
message_decoded = irda_decode(decoder_handler, level, input_delays[i]);
if(message_decoded) {
mu_assert(message_counter < message_expected_len, "decoded more than expected");
if(message_counter >= message_expected_len) break;
compare_message_results(message_decoded, &message_expected[message_counter]);
++message_counter;
}
level = !level;
}
mu_assert(message_counter == message_expected_len, "decoded less than expected");
}
MU_TEST(test_decoder_samsung32) {
RUN_DECODER(test_decoder_samsung32_input1, test_decoder_samsung32_expected1);
}
MU_TEST(test_mix) {
RUN_DECODER(test_decoder_necext_input1, test_decoder_necext_expected1);
// can use encoder data for decoding, but can't do opposite
RUN_DECODER(test_encoder_rc6_expected1, test_encoder_rc6_input1);
RUN_DECODER(test_decoder_samsung32_input1, test_decoder_samsung32_expected1);
RUN_DECODER(test_decoder_rc6_input1, test_decoder_rc6_expected1);
RUN_DECODER(test_decoder_samsung32_input1, test_decoder_samsung32_expected1);
RUN_DECODER(test_decoder_necext_input1, test_decoder_necext_expected1);
RUN_DECODER(test_decoder_nec_input2, test_decoder_nec_expected2);
RUN_DECODER(test_decoder_rc6_input1, test_decoder_rc6_expected1);
RUN_DECODER(test_decoder_necext_input1, test_decoder_necext_expected1);
RUN_DECODER(test_decoder_samsung32_input1, test_decoder_samsung32_expected1);
}
MU_TEST(test_decoder_nec1) {
RUN_DECODER(test_decoder_nec_input1, test_decoder_nec_expected1);
}
MU_TEST(test_decoder_nec2) {
RUN_DECODER(test_decoder_nec_input2, test_decoder_nec_expected2);
}
MU_TEST(test_decoder_unexpected_end_in_sequence) {
// test_decoder_nec_input1 and test_decoder_nec_input2 shuts unexpected
RUN_DECODER(test_decoder_nec_input1, test_decoder_nec_expected1);
RUN_DECODER(test_decoder_nec_input1, test_decoder_nec_expected1);
RUN_DECODER(test_decoder_nec_input2, test_decoder_nec_expected2);
RUN_DECODER(test_decoder_nec_input2, test_decoder_nec_expected2);
}
MU_TEST(test_decoder_necext1) {
RUN_DECODER(test_decoder_necext_input1, test_decoder_necext_expected1);
RUN_DECODER(test_decoder_necext_input1, test_decoder_necext_expected1);
}
MU_TEST(test_decoder_rc6) {
RUN_DECODER(test_decoder_rc6_input1, test_decoder_rc6_expected1);
}
MU_TEST(test_encoder_rc6) {
RUN_ENCODER(test_encoder_rc6_input1, test_encoder_rc6_expected1);
}
MU_TEST(test_encoder_decoder_all) {
run_encoder_decoder(test_nec_all, COUNT_OF(test_nec_all));
run_encoder_decoder(test_necext_all, COUNT_OF(test_necext_all));
run_encoder_decoder(test_samsung32_all, COUNT_OF(test_samsung32_all));
run_encoder_decoder(test_rc6_all, COUNT_OF(test_rc6_all));
}
MU_TEST_SUITE(test_irda_decoder_encoder) {
MU_SUITE_CONFIGURE(&test_setup, &test_teardown);
MU_RUN_TEST(test_encoder_decoder_all);
MU_RUN_TEST(test_decoder_unexpected_end_in_sequence);
MU_RUN_TEST(test_decoder_nec1);
MU_RUN_TEST(test_decoder_nec2);
MU_RUN_TEST(test_decoder_samsung32);
MU_RUN_TEST(test_decoder_necext1);
MU_RUN_TEST(test_mix);
MU_RUN_TEST(test_decoder_rc6);
MU_RUN_TEST(test_encoder_rc6);
}
int run_minunit_test_irda_decoder_encoder() {
MU_RUN_SUITE(test_irda_decoder_encoder);
MU_REPORT();
return MU_EXIT_CODE;
}

View File

@@ -0,0 +1,212 @@
const uint32_t test_decoder_nec_input1[] = {
/* message */
2640671, 9071, 4445, 601, 497, 578, 500, 604, 501, 603, 502, 581, 496, 615, 498, 606, 499, 584, 493, 610, 1630, 576, 1640, 601, 1615, 605, 1638, 581, 1634, 606, 1610, 610, 1633, 577, 1639, 601, 504, 580, 498, 604, 501, 603, 500, 582, 496, 607, 498, 606, 499, 585, 485, 610, 1633, 576, 1640, 596, 1615, 605, 1638, 582, 1634, 605, 1610, 609, 1634, 586, 1630, 600,
/* repeat */
40015, 9077, 2208, 593,
/* message */
1457713, 9076, 4440, 607, 508, 585, 493, 610, 494, 598, 506, 577, 501, 603, 502, 601, 504, 580, 498, 605, 1638, 582, 1634, 606, 1610, 610, 1633, 577, 1639, 600, 1616, 605, 1638, 582, 1634, 606, 499, 585, 493, 609, 495, 608, 496, 586, 502, 612, 493, 601, 504, 579, 498, 605, 1638, 582, 1633, 606, 1610, 610, 1633, 577, 1639, 602, 1614, 574, 1668, 582, 1634, 606,
/* message */
1415838, 9080, 4436, 611, 494, 600, 505, 578, 500, 608, 501, 602, 502, 580, 498, 606, 508, 605, 500, 583, 1633, 608, 1608, 611, 1631, 578, 1638, 602, 1614, 606, 1637, 583, 1633, 607, 1609, 611, 494, 600, 505, 570, 500, 604, 501, 602, 502, 581, 497, 606, 499, 605, 499, 583, 1633, 617, 1608, 611, 1631, 579, 1638, 602};
const IrdaMessage test_decoder_nec_expected1[] = {
{IrdaProtocolNEC, 0x00, 0, false},
{IrdaProtocolNEC, 0x00, 0, true},
{IrdaProtocolNEC, 0x00, 0, false},
};
const uint32_t test_decoder_nec_input2[] = {
18372093,9030,4495,559,524,585,526,613,496,560,522,595,524,605,504,553,530,578,524,608,1614,581,1668,557,1665,581,1641,585,1664,551,1671,605,1616,578,1670,555,528,581,1668,553,526,582,528,612,498,559,524,585,526,604,507,552,1670,597,504,553,1667,608,1613,582,1667,559,1663,613,1608,586,1662,552,
40067,9026,2219,579,
3060767,9079,4445,606,505,554,530,578,532,608,502,555,528,581,530,610,500,588,495,614,1635,580,1641,604,1617,618,1621,584,1637,608,1612,612,1636,589,1637,602,507,581,1641,605,505,582,501,609,502,607,503,585,498,611,499,609,1612,613,498,612,1610,615,1633,561,1661,606,1615,609,1639,585,1636,610,
40011,9072,2200,588,
96480,9075,2198,560,
96509,9047,2226,552,
96517,9049,2224,555,
96514,9042,2222,556,
96512,9053,2220,558,
96511,9045,2227,561,
96507,9048,2225,554,
96515,9061,2231,565,
96522,9053,2219,559,
96510,9044,2229,560,
96508,9046,2226,562,
96506,9027,2245,553,
96511,9030,2243,555,
96513,9031,2237,557,
96512,9054,2219,559,
570349,9027,4495,608,476,583,529,580,529,558,525,584,527,582,528,560,523,596,524,584,1636,578,1669,555,1667,578,1643,581,1666,558,1663,582,1639,586,1662,552,531,577,1670,554,1667,578,532,563,527,582,528,580,529,558,525,584,1665,561,523,586,525,584,1637,577,1670,554,1668,578,1642,582,1667,558,
40062,9021,2233,585,
172411,9020,4502,559,524,585,526,583,527,551,532,586,523,575,535,553,530,579,532,577,1643,581,1668,557,1664,581,1639,585,1664,552,1670,575,1637,579,1669,556,527,581,529,580,1642,584,536,581,528,560,523,585,524,584,526,552,1670,576,1645,579,530,578,1643,582,1667,558,1663,582,1639,586,1662,545,
40068,9026,2220,578,
226896,9054,4468,578,500,608,502,607,503,585,498,611,500,610,501,588,496,612,497,602,1610,615,1633,581,1640,606,1616,609,1639,585,1635,610,1612,614,1635,580,504,615,495,604,506,582,1639,606,503,585,499,610,501,609,502,587,1635,610,1610,614,1634,581,502,616,1632,582,1648,606,1615,610,1638,587,
40033,9050,2195,614,
249594,9020,4502,560,524,594,525,603,506,552,532,587,521,606,504,554,529,579,532,609,1612,582,1667,557,1654,612,1608,585,1663,552,1670,606,1615,579,1669,554,527,582,529,611,500,558,1663,612,497,560,523,585,524,598,505,552,1670,606,1614,580,1668,557,526,582,1665,558,1662,603,1618,587,1661,553,
40067,9058,2187,621,
97567,9054,4467,584,500,609,501,601,502,586,497,611,499,610,501,588,496,614,497,612,1609,615,1632,582,1640,606,1615,609,1639,586,1636,611,1611,614,1634,581,503,608,493,605,505,583,1639,607,503,586,498,611,500,609,501,588,1634,611,1609,615,1634,582,502,608,1641,553,1668,608,1613,581,1668,558,
112307,9078,4443,608,502,606,504,584,498,610,501,608,502,587,497,612,498,610,499,589,1633,603,1619,607,1642,583,1638,607,1614,611,1638,597,1634,611,1610,615,495,603,506,581,502,607,1642,584,500,609,501,607,503,585,498,611,1637,588,1634,611,1610,615,495,603,1618,607,1641,584,1638,607,1605,611,
112281,9076,4445,606,505,584,499,610,501,608,502,586,497,612,498,610,500,581,494,614,1635,581,1641,604,1617,608,1640,585,1637,609,1610,613,1636,589,1632,603,507,581,503,607,504,604,1617,608,502,607,503,585,498,611,500,609,1613,613,1636,590,1632,603,507,581,1641,605,1616,609,1640,585,1636,609,
94207,9075,4446,605,506,582,501,607,502,606,504,584,500,610,501,608,502,587,497,611,1636,588,1633,612,1610,616,1633,583,1639,604,1615,610,1638,587,1635,610,500,588,495,606,496,602,1619,616,495,605,506,583,501,609,502,606,1614,610,1638,587,1635,611,499,590,1632,603,1618,607,1641,583,1638,608,
103762,9076,4446,605,505,553,531,579,532,607,503,555,528,580,530,609,500,557,527,583,1666,559,1662,603,1609,587,1661,553,1669,608,1614,580,1659,557,1665,612,498,580,504,585,526,604,1617,607,503,606,504,584,499,610,500,609,1613,612,1636,588,1633,602,507,573,1641,605,1617,608,1640,585,1636,619,
76134,9056,4466,585,525,604,506,552,532,577,533,606,504,553,529,579,531,608,501,556,1665,611,1611,584,1665,561,1661,605,1616,578,1671,555,1667,609,1612,582,528,611,499,559,525,584,1664,551,533,586,524,605,505,553,530,578,1670,555,1667,610,1612,582,528,611,1610,584,1664,551,1671,606,1616,578,
112997,9073,4447,603,507,560,523,586,524,605,505,552,531,578,533,607,503,555,529,580,1668,548,1665,611,1611,584,1665,551,1671,615,1616,578,1670,555,1667,610,501,556,527,582,528,611,1609,584,518,604,506,551,533,586,524,606,1615,579,1669,555,1666,610,500,558,1664,612,1609,585,1663,551,1670,606,
84870,9053,4470,582,529,611,500,559,525,583,526,602,507,560,523,586,525,574,536,543,1669,608,1614,580,1668,556,1665,620,1610,585,1664,550,1671,605,1616,578,533,608,503,555,529,580,1677,557,526,582,528,612,498,559,525,585,1664,551,1671,605,1615,578,531,608,1614,581,1668,558,1664,611,1609,585,
76184,9025,4496,555,529,579,531,609,502,556,528,582,529,610,500,559,525,583,526,603,1619,586,1663,552,1669,606,1614,580,1668,556,1665,611,1610,584,1664,550,533,586,524,605,504,553,1669,608,503,555,529,580,530,609,501,557,1664,605,1609,585,1664,551,532,586,1661,553,1668,608,1614,581,1666,558,
96145,9073,4449,612,499,559,524,584,526,603,506,552,532,587,523,606,504,584,499,570,1669,556,1666,610,1611,614,1634,580,1641,605,1617,608,1640,584,1636,609,501,587,497,612,498,611,1611,615,496,602,508,580,503,595,535,614,1627,617,1650,594,1646,604,502,586,1635,611,1618,614,1634,581,1641,604,
86183,9080,4442,610,501,607,502,586,498,611,499,610,501,588,496,613,497,611,498,579,1642,604,1617,608,1641,583,1637,608,1613,611,1637,588,1634,611,1608,615,494,604,506,582,501,617,1641,584,499,610,493,608,502,586,497,612,1636,588,1633,602,1619,615,494,604,1617,608,1640,585,1637,608,1613,613,
234570,9078,4437,607,503,606,505,584,500,608,501,614,502,585,497,611,499,610,509,588,1634,612,1609,616,1633,582,1639,606,1616,610,1639,587,1635,610,1611,614,1634,581,503,606,504,604,1617,608,502,607,503,585,498,611,500,609,501,597,1634,611,1610,615,495,603,1618,607,1642,584,1638,607,1614,611,
112281,9076,4446,605,505,583,501,609,493,606,503,585,498,610,500,609,501,587,497,613,1636,579,1643,602,1618,606,1641,583,1639,607,1614,610,1638,554,1665,611,1611,584,526,603,507,551,1671,597,504,583,500,578,532,607,502,555,528,581,1668,556,1664,611,498,559,1663,604,1618,587,1662,553,1668,608,
130332,9076,4446,615,496,605,507,582,502,608,503,605,512,584,499,609,501,608,502,586,1636,610,1611,613,1635,579,1641,604,1617,608,1641,584,1637,608,1613,611,1636,588,495,614,497,613,1609,616,494,604,506,590,500,608,502,607,503,585,1635,609,1613,612,498,610,1610,614,1634,581,1641,604,1617,608,
886079,9020,4501,560,523,585,525,583,527,552,532,587,523,576,534,554,529,580,531,577,1644,582,1667,559,1663,582,1639,586,1663,553,1669,576,1645,581,1668,557,521,582,529,581,530,559,1663,582,527,551,532,587,523,575,535,553,1669,577,1644,581,1667,557,526,584,1665,560,1662,582,1637,588,1661,554,
76188,9053,4469,583,528,560,523,586,524,585,525,552,531,578,533,576,534,554,528,581,1668,557,1665,581,1631,585,1664,551,1670,575,1646,579,1678,555,1666,579,531,558,1664,581,528,559,1662,584,527,552,532,588,523,575,535,553,1668,578,532,556,1666,580,531,567,1663,582,1639,585,1662,552,1670,575,
76165,9054,4468,583,527,581,529,559,524,585,525,583,526,547,531,587,524,576,535,554,1668,577,1644,581,1667,558,1664,582,1640,586,1663,551,1670,576,1645,579,531,578,533,556,527,582,1666,559,525,583,526,582,528,560,523,586,1663,553,1669,576,1645,580,522,578,1642,582,1666,559,1663,582,1639,586,
40034,9049,2224,585,
114557,9051,4471,581,529,558,525,584,527,582,528,561,522,586,524,585,525,552,531,578,1670,555,1667,579,1643,577,1666,559,1662,583,1638,587,1662,563,1678,587,543,565,537,591,539,589,1651,592,537,591,539,569,533,595,535,593,1647,597,1670,563,1678,587,542,565,1675,589,1651,593,1675,569,1671,593,
40045,9047,2225,553,
114589,9029,4492,559,525,585,526,582,528,550,533,586,524,575,535,553,530,578,532,577,1645,581,1668,557,1664,581,1640,585,1664,552,1670,575,1646,579,1669,556,527,582,529,580,531,557,1663,582,528,560,523,586,524,585,525,552,1669,576,1645,580,1668,556,526,582,1667,559,1663,582,1639,593,1662,553,
40067,9026,4495,556,528,581,529,579,531,557,526,575,527,581,528,561,523,585,525,584,1638,588,1661,554,1667,578,1644,582,1667,559,1663,582,1639,586,1663,552,530,578,1671,555,529,581,1668,556,526,582,529,581,529,559,524,584,1664,550,533,587,1662,553,530,578,1669,555,1667,578,1642,582,1668,559,
58109,9049,4473,578,533,576,534,555,529,580,531,578,532,556,527,582,528,580,529,559,1663,583,1639,586,1662,553,1669,580,1644,581,1668,558,1664,581,1640,582,525,584,527,552,531,588,1670,554,529,579,531,578,532,556,527,582,1666,558,1663,582,1639,587,524,584,1636,578,1671,564,1676,588,1652,592,
263241,9028,4503,557,526,582,528,581,529,559,523,594,526,584,527,552,532,588,527,575,1646,579,1670,556,1666,579,1642,583,1665,560,1662,584,1638,578,1671,554,529,580,1669,559,527,582,1667,559,525,584,526,582,528,560,523,586,1662,552,530,578,1671,555,529,580,1668,556,1665,581,1640,584,1664,551,
40069,9025,2221,588
};
const IrdaMessage test_decoder_nec_expected2[] = {
{IrdaProtocolNEC, 0x00, 0x02, false},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, false},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x06, false},
{IrdaProtocolNEC, 0x00, 0x06, true},
{IrdaProtocolNEC, 0x00, 0x04, false},
{IrdaProtocolNEC, 0x00, 0x04, true},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, true},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, true},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x09, false},
{IrdaProtocolNEC, 0x00, 0x09, false},
{IrdaProtocolNEC, 0x00, 0x09, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x0A, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, true},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, true},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x0A, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x0A, false},
{IrdaProtocolNEC, 0x00, 0x0A, true},
};
const IrdaMessage test_nec_all[] = {
{IrdaProtocolNEC, 0x00, 0x00, false},
{IrdaProtocolNEC, 0x01, 0x00, false},
{IrdaProtocolNEC, 0x01, 0x80, false},
{IrdaProtocolNEC, 0x00, 0x80, false},
{IrdaProtocolNEC, 0x00, 0x00, false},
{IrdaProtocolNEC, 0x00, 0x00, true},
{IrdaProtocolNEC, 0x00, 0x00, false},
{IrdaProtocolNEC, 0x00, 0x00, true},
{IrdaProtocolNEC, 0xFF, 0xFF, false},
{IrdaProtocolNEC, 0xFE, 0xFF, false},
{IrdaProtocolNEC, 0xFE, 0x7F, false},
{IrdaProtocolNEC, 0xFF, 0x7F, false},
{IrdaProtocolNEC, 0xFF, 0xFF, false},
{IrdaProtocolNEC, 0xFF, 0xFF, true},
{IrdaProtocolNEC, 0xAA, 0x55, false},
{IrdaProtocolNEC, 0x55, 0xAA, false},
{IrdaProtocolNEC, 0x55, 0x55, false},
{IrdaProtocolNEC, 0xAA, 0xAA, false},
{IrdaProtocolNEC, 0xAA, 0xAA, true},
{IrdaProtocolNEC, 0xAA, 0xAA, false},
{IrdaProtocolNEC, 0xAA, 0xAA, true},
{IrdaProtocolNEC, 0xAA, 0xAA, true},
{IrdaProtocolNEC, 0x55, 0x55, false},
{IrdaProtocolNEC, 0x55, 0x55, true},
{IrdaProtocolNEC, 0x55, 0x55, true},
{IrdaProtocolNEC, 0x55, 0x55, true},
};

View File

@@ -0,0 +1,257 @@
const uint32_t test_decoder_necext_input1[] = {
1915384, 8967, 4463, 587, 527, 590, 524, 584, 1647, 590, 524, 583, 531, 586, 527, 590, 524, 583, 1646, 589, 1640, 586, 527, 590, 524, 583, 1647, 590, 1640, 587, 1644, 582, 1647, 589, 524, 583, 531, 586, 1644, 593, 521, 586, 527, 589, 1641, 586, 528, 589, 525, 592, 521, 585, 1644, 592, 522, 585, 1645, 592, 1638, 589, 524, 592, 1637, 588, 1641, 585, 1645, 592,
41082, 8965, 2220, 591,
409594, 8972, 4458, 591, 523, 584, 530, 587, 1642, 584, 529, 588, 526, 591, 522, 583, 530, 587, 1643, 584, 1646, 590, 523, 584, 530, 587, 1643, 584, 1647, 590, 1640, 586, 1643, 583, 531, 586, 527, 589, 1641, 586, 528, 589, 524, 593, 1637, 589, 524, 593, 521, 586, 529, 589, 1641, 585, 528, 589, 1640, 586, 1644, 592, 521, 585, 1645, 592, 1638, 588, 1641, 585,
41088, 8968, 2218, 582,
95791, 8971, 2214, 587,
95787, 8965, 2220, 591,
95783, 8971, 2215, 585,
95787, 8964, 2221, 590,
95783, 8971, 2215, 586,
95788, 8965, 2220, 591,
95783, 8969, 2216, 585,
95789, 8965, 2220, 590,
95782, 8970, 2215, 586,
95788, 9047, 2139, 591,
95782, 8970, 2216, 585,
95788, 8966, 2220, 591,
95782, 8972, 2214, 588,
95786, 8964, 2222, 590,
95784, 8971, 2214, 586,
95787, 8967, 2218, 583,
95791, 8964, 2222, 588,
95785, 8969, 2217, 584,
333740, 8967, 4464, 586, 528, 590, 524, 592, 1637, 589, 525, 592, 521, 586, 528, 589, 525, 593, 1637, 588, 1640, 585, 528, 589, 525, 592, 1638, 589, 1641, 586, 1644, 592, 1638, 588, 525, 592, 522, 585, 1644, 592, 522, 585, 528, 588, 1642, 585, 529, 588, 526, 591, 522, 585, 1645, 591, 522, 584, 1646, 591, 1639, 587, 526, 591, 1639, 588, 1642, 583, 1646, 590,
41082, 8963, 2223, 588,
95785, 8967, 2219, 591,
95782, 8968, 2217, 584,
246369, 8972, 4459, 591, 523, 583, 530, 587, 1643, 583, 530, 587, 527, 590, 523, 584, 530, 586, 1643, 583, 1647, 590, 524, 583, 530, 586, 1643, 583, 1646, 589, 1641, 586, 1644, 583, 531, 586, 528, 589, 1640, 585, 528, 588, 525, 592, 1638, 588, 525, 592, 522, 585, 529, 589, 1641, 584, 529, 588, 1642, 585, 1645, 591, 522, 585, 1645, 590, 1639, 587, 1642, 584,
41090, 8966, 2220, 591,
95782, 8966, 2220, 592,
95782, 8967, 2218, 583,
165604, 9017, 4413, 586, 527, 590, 524, 583, 1647, 589, 523, 582, 531, 586, 528, 589, 525, 593, 1637, 589, 1640, 585, 527, 588, 525, 592, 1638, 589, 1641, 585, 1644, 592, 1638, 588, 525, 591, 523, 585, 1645, 591, 522, 584, 529, 588, 1642, 584, 530, 587, 527, 591, 523, 584, 1646, 591, 523, 584, 1646, 591, 1640, 586, 527, 590, 1640, 586, 1643, 583, 1646, 589,
41084, 8972, 2214, 587,
95787, 8967, 2219, 581,
95792, 8971, 2215, 586,
208929, 9016, 4414, 584, 529, 588, 526, 591, 1638, 588, 525, 591, 522, 584, 529, 587, 526, 591, 1639, 587, 1642, 584, 529, 588, 526, 591, 1638, 587, 1643, 584, 1646, 591, 1639, 587, 526, 590, 523, 584, 1646, 590, 524, 583, 530, 587, 1643, 583, 530, 587, 527, 590, 524, 583, 1647, 590, 524, 583, 1647, 590, 1640, 586, 527, 589, 1640, 586, 1644, 592, 1637, 589,
41085, 8972, 2214, 587,
95787, 8964, 2221, 590,
95784, 8965, 2221, 590,
167378, 8969, 4460, 589, 525, 582, 532, 586, 1644, 592, 521, 586, 528, 589, 524, 592, 522, 585, 1645, 592, 1638, 589, 525, 592, 522, 585, 1644, 591, 1639, 588, 1642, 585, 1645, 591, 522, 585, 529, 587, 1641, 584, 530, 587, 526, 591, 1639, 588, 526, 591, 522, 584, 530, 587, 1643, 584, 530, 587, 1642, 584, 1646, 591, 523, 584, 1647, 590, 1640, 587, 1643, 583,
41090, 9017, 2169, 591,
95781, 8969, 2216, 585,
95788, 8964, 2223, 588,
192781, 8969, 4461, 589, 525, 592, 522, 586, 1644, 592, 521, 586, 528, 589, 525, 592, 522, 585, 1644, 592, 1638, 589, 524, 592, 521, 586, 1645, 591, 1638, 588, 1642, 585, 1645, 590, 522, 584, 530, 587, 1642, 584, 530, 587, 526, 591, 1639, 588, 526, 590, 524, 583, 530, 587, 1643, 584, 530, 587, 1643, 584, 1646, 590, 524, 583, 1646, 590, 1640, 587, 1643, 583,
41090, 8967, 2219, 591,
95782, 8970, 2215, 586,
95788, 8963, 2222, 589,
179978, 8967, 4464, 586, 528, 589, 524, 593, 1637, 588, 525, 592, 522, 585, 529, 589, 525, 592, 1638, 589, 1641, 585, 529, 588, 526, 591, 1638, 588, 1641, 585, 1645, 590, 1639, 587, 527, 590, 523, 584, 1646, 591, 523, 584, 530, 587, 1643, 583, 530, 586, 527, 590, 524, 583, 1646, 590, 523, 584, 1646, 589, 1640, 586, 528, 589, 1640, 586, 1644, 593, 1638, 589,
41084, 8971, 2214, 587,
95787, 8964, 2221, 589,
95785, 8966, 2219, 592,
196616, 8967, 4463, 585, 527, 590, 525, 592, 1637, 589, 525, 592, 521, 586, 528, 589, 524, 592, 1638, 588, 1641, 585, 528, 589, 525, 592, 1637, 589, 1641, 585, 1645, 591, 1638, 588, 526, 591, 522, 585, 1645, 591, 522, 584, 530, 587, 1642, 584, 529, 588, 526, 591, 523, 583, 1645, 590, 523, 584, 1646, 590, 1639, 587, 527, 590, 1639, 586, 1644, 583, 1647, 589,
41084, 8971, 2214, 587,
95787, 8964, 2222, 589,
2112164, 8969, 4462, 588, 525, 592, 522, 585, 1645, 591, 523, 584, 529, 588, 526, 591, 523, 584, 1645, 591, 1639, 587, 527, 590, 524, 583, 1646, 590, 1639, 587, 1643, 584, 1673, 563, 524, 583, 531, 586, 1643, 593, 521, 586, 528, 589, 1641, 585, 528, 589, 525, 592, 521, 585, 1644, 592, 522, 584, 1645, 591, 1639, 588, 526, 591, 1639, 588, 1642, 583, 1646, 590,
41082, 8962, 2223, 588,
95785, 8965, 2220, 591,
95783, 8968, 2217, 583,
164778, 8969, 4462, 588, 525, 591, 522, 585, 1645, 591, 522, 585, 530, 587, 527, 591, 523, 584, 1646, 591, 1639, 588, 526, 591, 523, 583, 1646, 590, 1639, 587, 1643, 584, 1672, 564, 523, 584, 531, 586, 1643, 583, 530, 587, 527, 590, 1639, 587, 527, 589, 524, 583, 531, 586, 1644, 583, 531, 586, 1643, 583, 1647, 590, 525, 582, 1647, 589, 1639, 586, 1644, 593,
41081, 8965, 2220, 590,
95784, 8968, 2217, 583,
95790, 8970, 2215, 586,
161053, 8963, 4468, 592, 521, 586, 528, 589, 1641, 585, 529, 588, 526, 591, 522, 585, 529, 588, 1642, 585, 1645, 591, 523, 584, 530, 587, 1642, 584, 1646, 591, 1639, 586, 1669, 557, 531, 586, 527, 590, 1640, 586, 527, 590, 525, 592, 1638, 589, 525, 592, 522, 585, 528, 588, 1641, 585, 528, 588, 1642, 584, 1645, 591, 523, 584, 1645, 591, 1639, 587, 1643, 583,
41090, 8964, 2221, 590,
95784, 8963, 2222, 589,
95785, 8965, 2220, 590,
139334, 8968, 4463, 587, 527, 590, 523, 584, 1646, 590, 523, 583, 531, 586, 527, 589, 524, 583, 1647, 590, 1640, 586, 527, 590, 525, 592, 1637, 589, 1641, 585, 1644, 592, 1665, 562, 524, 591, 522, 584, 1645, 591, 523, 584, 529, 588, 1642, 584, 529, 587, 527, 590, 523, 584, 1646, 590, 523, 584, 1646, 590, 1639, 587, 527, 589, 1640, 586, 1644, 592, 1637, 589,
41085, 8970, 2217, 584,
95789, 8972, 2213, 586,
95787, 8965, 2221, 590,
141444, 8969, 4461, 589, 525, 592, 522, 584, 1644, 591, 522, 585, 529, 588, 526, 591, 522, 585, 1645, 592, 1638, 587, 526, 591, 523, 584, 1646, 591, 1639, 588, 1642, 583, 1672, 564, 523, 584, 530, 587, 1643, 584, 530, 587, 527, 590, 1640, 587, 527, 590, 524, 584, 530, 587, 1643, 584, 530, 586, 1644, 583, 1647, 589, 524, 583, 1647, 590, 1640, 586, 1645, 592,
41081, 8964, 2222, 589,
95784, 8968, 2218, 583,
95790, 8971, 2214, 586,
154119, 8969, 4462, 588, 526, 591, 522, 585, 1645, 592, 522, 585, 529, 589, 526, 591, 522, 584, 1646, 591, 1639, 588, 526, 591, 523, 583, 1645, 590, 1639, 587, 1642, 584, 1671, 564, 523, 584, 529, 587, 1643, 583, 530, 587, 527, 590, 1639, 587, 526, 590, 523, 583, 530, 586, 1643, 583, 529, 586, 1643, 583, 1646, 590, 524, 583, 1648, 589, 1641, 586, 1644, 592,
41081, 8965, 2220, 590,
95784, 8969, 2216, 585,
95790, 8964, 2221, 590,
147134, 8966, 4464, 586, 528, 589, 525, 593, 1637, 589, 524, 593, 522, 585, 529, 589, 525, 592, 1638, 589, 1641, 586, 528, 589, 525, 591, 1638, 588, 1641, 585, 1645, 592, 1664, 561, 525, 592, 523, 584, 1646, 591, 523, 584, 530, 588, 1642, 585, 526, 587, 527, 590, 523, 584, 1646, 591, 523, 584, 1646, 591, 1639, 586, 526, 590, 1640, 587, 1643, 583, 1646, 590,
41083, 8963, 2223, 587,
95786, 8965, 2221, 590,
95784, 8968, 2217, 584,
158330, 8965, 4465, 585, 529, 588, 526, 590, 1639, 587, 526, 590, 523, 584, 530, 586, 526, 590, 1639, 587, 1643, 583, 530, 587, 527, 590, 1639, 587, 1643, 584, 1647, 590, 1666, 561, 527, 589, 523, 583, 1646, 590, 523, 583, 531, 586, 1643, 583, 530, 586, 527, 590, 524, 582, 1646, 590, 525, 582, 1647, 589, 1640, 586, 528, 589, 1640, 586, 1644, 592, 1638, 589,
41085, 8971, 2214, 586,
95787, 8962, 2223, 588,
95786, 8965, 2222, 589,
206063, 8962, 4467, 591, 521, 585, 529, 588, 1642, 585, 529, 588, 525, 591, 522, 584, 530, 587, 1642, 584, 1646, 591, 523, 584, 529, 588, 1642, 583, 1646, 590, 1640, 587, 1668, 558, 530, 587, 526, 589, 1639, 586, 528, 589, 524, 583, 1647, 589, 524, 593, 521, 585, 528, 589, 1641, 585, 529, 589, 1641, 585, 1645, 592, 522, 585, 1644, 591, 1639, 587, 1642, 584,
41090, 8965, 2221, 590,
95784, 8963, 2223, 588,
95785, 8964, 2222, 589,
183026, 8970, 4460, 590, 524, 583, 531, 586, 1643, 583, 530, 587, 528, 589, 525, 592, 522, 586, 1644, 592, 1637, 588, 525, 591, 522, 585, 1645, 592, 1638, 588, 1641, 585, 1672, 565, 522, 584, 530, 588, 1642, 584, 529, 588, 526, 591, 1639, 587, 527, 590, 523, 584, 530, 587, 1642, 584, 530, 587, 1642, 583, 1647, 590, 524, 583, 1647, 590, 1640, 587, 1643, 582,
41090, 8965, 2221, 590,
95783, 8970, 2216, 584,
95789, 8962, 2223, 587,
184104, 8964, 4467, 583, 530, 587, 527, 590, 1640, 587, 527, 590, 523, 582, 531, 586, 528, 589, 1640, 586, 1644, 593, 521, 586, 528, 589, 1640, 585, 1644, 592, 1638, 589, 1667, 558, 528, 589, 526, 591, 1638, 588, 526, 591, 522, 585, 1645, 591, 522, 585, 530, 587, 527, 591, 1639, 587, 526, 591, 1639, 587, 1642, 584, 530, 587, 1643, 583, 1646, 590, 1639, 587,
41087, 9020, 2166, 584,
95790, 8972, 2213, 587,
95787, 8963, 2222, 589,
169833, 8964, 4465, 583, 529, 587, 527, 590, 1639, 587, 527, 591, 523, 584, 530, 586, 527, 590, 1640, 587, 1643, 583, 531, 587, 527, 590, 1640, 586, 1644, 583, 1647, 590, 1666, 560, 527, 590, 524, 582, 1647, 589, 525, 592, 521, 586, 1644, 592, 521, 586, 528, 589, 526, 592, 1638, 588, 525, 592, 1638, 589, 1641, 585, 528, 589, 1641, 585, 1645, 591, 1638, 588,
41086, 8971, 2215, 585,
95789, 8964, 2222, 588,
95785, 8967, 2218, 583,
185701, 8971, 4460, 590, 523, 584, 530, 587, 1642, 584, 530, 587, 527, 590, 524, 583, 531, 586, 1644, 583, 1647, 590, 524, 592, 521, 585, 1644, 592, 1638, 589, 1641, 585, 1671, 565, 522, 586, 529, 588, 1642, 585, 529, 588, 526, 591, 1638, 588, 525, 590, 523, 584, 530, 587, 1642, 584, 530, 587, 1642, 584, 1646, 590, 524, 583, 1646, 590, 1640, 586, 1643, 583,
41091, 8965, 2222, 589,
95784, 8965, 2221, 589,
95784, 8968, 2217, 583,
146332, 8969, 4461, 669, 445, 591, 522, 584, 1644, 591, 523, 584, 529, 588, 526, 591, 522, 585, 1645, 591, 1638, 587, 527, 590, 524, 584, 1646, 590, 1639, 587, 1642, 583, 1673, 564, 524, 583, 531, 586, 1643, 583, 531, 586, 528, 589, 1641, 585, 528, 589, 525, 592, 522, 585, 1644, 591, 521, 585, 1645, 592, 1638, 588, 525, 592, 1638, 588, 1641, 584, 1646, 591,
41083, 8963, 2222, 589,
95785, 8966, 2220, 592,
261924, 8965, 4465, 585, 529, 588, 525, 592, 1638, 588, 525, 592, 523, 584, 530, 587, 526, 591, 1639, 587, 1642, 583, 529, 587, 527, 590, 1639, 587, 1643, 584, 1646, 590,
};
const IrdaMessage test_decoder_necext_expected1[] = {
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, false},
{IrdaProtocolNECext, 0x7984, 0x12, true},
{IrdaProtocolNECext, 0x7984, 0x12, true},
};
const IrdaMessage test_necext_all[] = {
{IrdaProtocolNECext, 0x0000, 0x00, false},
{IrdaProtocolNECext, 0x0001, 0x00, false},
{IrdaProtocolNECext, 0x0001, 0x80, false},
{IrdaProtocolNECext, 0x0000, 0x80, false},
{IrdaProtocolNECext, 0x0000, 0x00, false},
{IrdaProtocolNECext, 0x0000, 0x00, true},
{IrdaProtocolNECext, 0x0000, 0x00, false},
{IrdaProtocolNECext, 0x0000, 0x00, true},
{IrdaProtocolNECext, 0xFFFF, 0xFF, false},
{IrdaProtocolNECext, 0xFFFE, 0xFF, false},
{IrdaProtocolNECext, 0xFFFE, 0x7F, false},
{IrdaProtocolNECext, 0xFFFF, 0x7F, false},
{IrdaProtocolNECext, 0xFFFF, 0xFF, false},
{IrdaProtocolNECext, 0xFFFF, 0xFF, true},
{IrdaProtocolNECext, 0xAAAA, 0x55, false},
{IrdaProtocolNECext, 0x5555, 0xAA, false},
{IrdaProtocolNECext, 0x5555, 0x55, false},
{IrdaProtocolNECext, 0xAAAA, 0xAA, false},
{IrdaProtocolNECext, 0xAAAA, 0xAA, true},
{IrdaProtocolNECext, 0xAAAA, 0xAA, false},
{IrdaProtocolNECext, 0xAAAA, 0xAA, true},
{IrdaProtocolNECext, 0xAAAA, 0xAA, true},
{IrdaProtocolNECext, 0x5555, 0x55, false},
{IrdaProtocolNECext, 0x5555, 0x55, true},
{IrdaProtocolNECext, 0x5555, 0x55, true},
{IrdaProtocolNECext, 0x5555, 0x55, true},
};

View File

@@ -0,0 +1,112 @@
/*
_____---------______--____--__--__--____------____--__----____--__----__--__--____----____--__--__--__--__--___________
| 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
_____---------______--____--__--__------____--____--__----____--__----__--__--____----____--__--__--__--__--___________
| 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
_____---------______--____--__--__--____------____--__----____--__----__--__--____----____--__--__--__--__--___________
| 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
_____---------______--____--__--__--____------____--__----____--__----__--__--____----____--__--__--__--__--___________
| 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
_____---------______--____--__--__--____------____--__----____--__----__--__--____----____--__--__--__--__--___________
| 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
_____---------______--____--__--__------____--____--__----____--__----__--__--____----____--__--__--__--__--___________
| 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
s m2 m1 m0 T | address | command |
*/
const uint32_t test_decoder_rc6_input1[] = {
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444 + 888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 888, // failed
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444 + 888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 888, // failed
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444 + 888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 888,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 888, // failed
};
const IrdaMessage test_decoder_rc6_expected1[] = {
{IrdaProtocolRC6, 0x93, 0xA0, false}, // toggle 0
{IrdaProtocolRC6, 0x93, 0xA0, false}, // toggle 1
// {IrdaProtocolRC6, 0x93, 0xA0, false},
{IrdaProtocolRC6, 0x93, 0xA0, false}, // toggle 0
{IrdaProtocolRC6, 0x93, 0xA0, true}, // toggle 0
{IrdaProtocolRC6, 0x93, 0xA0, true}, // toggle 0
{IrdaProtocolRC6, 0x93, 0xA0, false}, // toggle 1
// {IrdaProtocolRC6, 0x93, 0xA0, false},
{IrdaProtocolRC6, 0x93, 0xA0, false}, // toggle 0
{IrdaProtocolRC6, 0x93, 0xA1, false}, // toggle 1
// {IrdaProtocolRC6, 0x93, 0xA0, false},
};
const IrdaMessage test_encoder_rc6_input1[] = {
{IrdaProtocolRC6, 0x93, 0xA0, false}, // Toggle 0
{IrdaProtocolRC6, 0x93, 0xA0, true}, // Toggle 0
{IrdaProtocolRC6, 0x93, 0xA1, false}, // Toggle 1
{IrdaProtocolRC6, 0x93, 0xA1, true}, // Toggle 1
{IrdaProtocolRC6, 0x93, 0xA1, true}, // Toggle 1
{IrdaProtocolRC6, 0x93, 0xA0, false}, // Toggle 0
{IrdaProtocolRC6, 0x93, 0xA0, false}, // Toggle 1
{IrdaProtocolRC6, 0x93, 0xA0, true}, // Toggle 1
};
const uint32_t test_encoder_rc6_expected1[] = {
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 888, 888+444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 888, 888+444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444+888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 888,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444+888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 888,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444+888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 888,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 888, 888+444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444+888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444+888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
};
const IrdaMessage test_rc6_all[] = {
{IrdaProtocolRC6, 0x00, 0x00, false}, // t 0
{IrdaProtocolRC6, 0x80, 0x00, false}, // t 1
{IrdaProtocolRC6, 0x80, 0x01, false}, // t 0
{IrdaProtocolRC6, 0x00, 0x01, false}, // t 1
{IrdaProtocolRC6, 0x00, 0x00, false}, // t 0
{IrdaProtocolRC6, 0x00, 0x00, true}, // t 0
{IrdaProtocolRC6, 0x00, 0x00, false}, // t 1
{IrdaProtocolRC6, 0x00, 0x00, true}, // t 1
{IrdaProtocolRC6, 0xFF, 0xFF, false}, // t 0
{IrdaProtocolRC6, 0x7F, 0xFF, false}, // t 1
{IrdaProtocolRC6, 0x7F, 0xFE, false}, // t 0
{IrdaProtocolRC6, 0xFF, 0xFE, false}, // t 1
{IrdaProtocolRC6, 0xFF, 0xFF, false}, // t 0
{IrdaProtocolRC6, 0xFF, 0xFF, true}, // t 0
{IrdaProtocolRC6, 0xAA, 0x55, false}, // t 1
{IrdaProtocolRC6, 0x55, 0xAA, false}, // t 0
{IrdaProtocolRC6, 0x55, 0x55, false}, // t 1
{IrdaProtocolRC6, 0xAA, 0xAA, false}, // t 0
{IrdaProtocolRC6, 0xAA, 0xAA, true}, // t 0
// same with inverted toggle bit
{IrdaProtocolRC6, 0x00, 0x00, false}, // t 1
{IrdaProtocolRC6, 0x80, 0x00, false}, // t 0
{IrdaProtocolRC6, 0x80, 0x01, false}, // t 1
{IrdaProtocolRC6, 0x00, 0x01, false}, // t 0
{IrdaProtocolRC6, 0x00, 0x00, false}, // t 1
{IrdaProtocolRC6, 0x00, 0x00, true}, // t 1
{IrdaProtocolRC6, 0x00, 0x00, false}, // t 0
{IrdaProtocolRC6, 0x00, 0x00, true}, // t 0
{IrdaProtocolRC6, 0xFF, 0xFF, false}, // t 1
{IrdaProtocolRC6, 0x7F, 0xFF, false}, // t 0
{IrdaProtocolRC6, 0x7F, 0xFE, false}, // t 1
{IrdaProtocolRC6, 0xFF, 0xFE, false}, // t 0
{IrdaProtocolRC6, 0xFF, 0xFF, false}, // t 1
{IrdaProtocolRC6, 0xFF, 0xFF, true}, // t 1
{IrdaProtocolRC6, 0xAA, 0x55, false}, // t 0
{IrdaProtocolRC6, 0x55, 0xAA, false}, // t 1
{IrdaProtocolRC6, 0x55, 0x55, false}, // t 0
{IrdaProtocolRC6, 0xAA, 0xAA, false}, // t 1
{IrdaProtocolRC6, 0xAA, 0xAA, true}, // t 1
{IrdaProtocolRC6, 0x93, 0xA0, false}, // t 0
{IrdaProtocolRC6, 0x93, 0xA1, false}, // t 1
};

View File

@@ -0,0 +1,254 @@
const uint32_t test_decoder_samsung32_input1[] = {
3129767, 4513, 4483, 565, 530, 586, 1670, 563, 1664, 588, 1666, 566, 530, 586,
535, 560, 535, 591, 531, 565, 531, 585, 1669, 563, 1666, 587, 1640, 593,
531, 566, 530, 587, 536, 559, 562, 564, 531, 585, 537, 558, 1670, 562,
1665, 587, 534, 561, 534, 592, 530, 566, 529, 587, 1668, 564, 1664, 589,
533, 563, 533, 594, 1661, 560, 1667, 565, 1661, 591, 1664, 558, 46325, 4517,
4480, 558, 1668, 595,
679127, 4511, 4485, 562, 532, 584, 1671, 561, 1666, 587, 1668, 564, 532, 585,
537, 559, 537, 589, 533, 562, 533, 593, 1661, 561, 1667, 586, 1642, 590,
532, 563, 531, 585, 537, 559, 564, 563, 1666, 567, 528, 588, 535, 613,
483, 593, 530, 586, 536, 559, 536, 590, 1637, 584, 537, 558, 1669, 594,
1661, 561, 1667, 586, 1642, 591, 1664, 559, 1670, 583, 534, 567, 46429, 4515,
4480, 558, 1671, 593,
618571, 4508, 4488, 560, 561, 566, 1663, 559, 1667, 583, 1670, 562, 534, 582,
540, 565, 531, 587, 536, 560, 536, 590, 1664, 558, 1670, 583, 1644, 588,
535, 561, 534, 592, 530, 566, 557, 610, 1616, 616, 479, 585, 537, 558,
537, 589, 534, 584, 539, 567, 529, 587, 534, 561, 534, 592, 1663, 559,
1668, 564, 1664, 588, 1666, 566, 1661, 581, 1646, 585, 1669, 563, 46106, 4511,
4485, 563, 1664, 589,
514897, 4514, 4482, 556, 564, 614, 1616, 565, 1664, 589, 1666, 557, 538, 588,
534, 562, 534, 592, 529, 566, 529, 587, 1667, 565, 1663, 590, 1638, 584,
538, 568, 527, 590, 534, 562, 562, 566, 530, 587, 1642, 590, 532, 563,
530, 586, 537, 589, 533, 563, 533, 583, 539, 566, 1661, 561, 561, 566,
1663, 559, 1668, 584, 1671, 563, 1666, 556, 1671, 591, 1663, 559, 46210, 4508,
4488, 560, 1668, 585,
683922, 4509, 4487, 561, 560, 565, 1662, 559, 1669, 585, 1670, 562, 534, 583,
540, 566, 529, 586, 535, 560, 535, 591, 1663, 559, 1669, 584, 1644, 588,
534, 561, 533, 593, 529, 556, 567, 561, 1668, 564, 1664, 590, 534, 563,
532, 584, 538, 557, 537, 589, 534, 562, 534, 593, 530, 566, 555, 561,
1667, 564, 1662, 589, 1665, 557, 1671, 581, 1647, 586, 1669, 564, 46686, 4514,
4481, 556, 1672, 592,
1088255, 4514, 4481, 557, 564, 562, 1667, 565, 1663, 591, 1665, 558, 538, 590,
533, 564, 532, 583, 539, 567, 528, 588, 1666, 566, 1663, 580, 1648, 585,
537, 559, 537, 589, 533, 562, 560, 618, 478, 589, 535, 562, 1667, 565,
1662, 588, 531, 565, 531, 585, 537, 558, 536, 590, 1666, 566, 1661, 592,
530, 566, 530, 586, 1669, 564, 1664, 558, 1669, 594, 1662, 560, 46291, 4510,
4485, 563, 1663, 589, 97349, 4510, 4487, 561, 1666, 586, 97560, 4513, 4482, 566,
1662, 591, 97123, 4510, 4485, 563, 1664, 588, 97605, 4508, 4487, 561, 1666, 586,
97371, 4518, 4478, 560, 1668, 595, 97514, 4518, 4478, 560, 1667, 586, 97014, 4515,
4480, 568, 1660, 593, 96719, 4516, 4481, 567, 1660, 593, 97528, 4515, 4480, 568,
1659, 593, 97453, 4510, 4485, 563, 1665, 587, 97351, 4518, 4477, 561, 1668, 585,
97216, 4511, 4484, 564, 1664, 589, 97708, 4518, 4477, 561, 1667, 586, 96718, 4516,
4479, 559, 1669, 594, 97070, 4515, 4480, 568, 1660, 593, 97500, 4511, 4484, 564,
1662, 590, 97425, 4515, 4481, 567, 1660, 593, 97025, 4515, 4482, 566, 1660, 592,
96796, 4509, 4487, 561, 1666, 587, 97399, 4512, 4484, 565, 1662, 591, 97486, 4516,
4480, 567, 1658, 594, 97425, 4515, 4481, 567, 1659, 593, 97511, 4510, 4485, 563,
1664, 650, 96969, 4511, 4485, 562, 1665, 588, 97243, 4512, 4484, 564, 1663, 590,
97031, 4519, 4478, 560, 1666, 586, 97548, 4514, 4482, 566, 1661, 591, 97302, 4515,
4480, 568, 1659, 593, 97726, 4510, 4486, 562, 1665, 588, 97396, 4514, 4482, 566,
1661, 592, 97301, 4515, 4480, 568, 1661, 593, 97453, 4518, 4477, 560, 1667, 585,
97430, 4518, 4477, 561, 1665, 587, 97521, 4511, 4484, 564, 1664, 589, 97182, 4512,
4484, 564, 1663, 590, 97760, 4516, 4479, 559, 1668, 595, 97268, 4516, 4479, 559,
1668, 595, 97243, 4512, 4485, 563, 1663, 589, 97695, 4510, 4486, 562, 1664, 588,
374205, 4513, 4483, 565, 530, 586, 1669, 564, 1665, 589, 1667, 567, 529, 587,
535, 560, 535, 591, 531, 565, 530, 585, 1669, 563, 1664, 588, 1639, 593,
529, 566, 529, 587, 536, 560, 563, 565, 532, 585, 537, 560, 1669, 563,
1664, 587, 534, 561, 534, 592, 529, 566, 529, 586, 1668, 564, 1663, 589,
532, 563, 534, 593, 1661, 562, 1666, 566, 1662, 591, 1664, 558,
149343, 4512, 4483, 565, 530, 586, 1669, 563, 1664, 588, 1667, 565, 530, 586,
536, 560, 536, 590, 532, 563, 531, 586, 1670, 563, 1666, 567, 1660, 592,
530, 565, 529, 586, 537, 558, 563, 563, 532, 584, 538, 568, 1661, 561,
1665, 587, 535, 560, 535, 592, 532, 565, 531, 587, 1669, 563, 1665, 587,
534, 561, 534, 592, 1663, 559, 1668, 564, 1662, 590, 1666, 566,
116399, 4514, 4482, 566, 531, 587, 1669, 564, 1664, 589, 1666, 566, 529, 587,
535, 561, 535, 592, 531, 565, 529, 587, 1668, 564, 1664, 558, 1670, 595,
529, 566, 528, 589, 535, 560, 562, 565, 531, 585, 536, 559, 1668, 564,
1664, 589, 534, 561, 533, 593, 530, 565, 528, 588, 1668, 564, 1665, 590,
533, 564, 532, 594, 1661, 561, 1666, 566, 1661, 592, 1663, 558,
121946, 4517, 4478, 559, 537, 590, 1664, 568, 1660, 593, 1661, 560, 536, 590,
531, 564, 531, 585, 537, 559, 536, 590, 1665, 568, 1661, 561, 1666, 587,
537, 559, 529, 591, 531, 564, 558, 558, 537, 588, 533, 562, 1665, 567,
1659, 593, 530, 565, 529, 587, 536, 561, 535, 592, 1664, 559, 1671, 593,
530, 566, 528, 587, 1667, 565, 1662, 558, 1668, 595, 1660, 561, 46509, 4516,
4479, 558, 1668, 594,
88785, 4512, 4484, 564, 530, 585, 1669, 563, 1664, 588, 1666, 566, 530, 587,
536, 560, 535, 592, 532, 565, 531, 585, 1669, 563, 1665, 557, 1669, 594,
530, 566, 530, 586, 535, 560, 562, 564, 530, 585, 537, 558, 1669, 563,
1664, 589, 535, 561, 534, 593, 529, 566, 529, 586, 1668, 564, 1664, 589,
533, 562, 532, 594, 1661, 561, 1666, 565, 1662, 591, 1665, 558,
289651, 4512, 4483, 564, 531, 586, 1669, 563, 1665, 588, 1667, 565, 529, 587,
536, 560, 536, 590, 531, 563, 531, 584, 1670, 562, 1666, 556, 1671, 592,
529, 566, 531, 586, 536, 561, 562, 564, 532, 585, 537, 558, 1669, 563,
1665, 588, 535, 561, 536, 590, 530, 565, 531, 585, 1669, 563, 1664, 587,
534, 561, 533, 593, 1662, 561, 1669, 564, 1663, 590, 1665, 567, 46302, 4509,
4487, 561, 1667, 585,
97097, 4513, 4483, 565, 529, 587, 1668, 564, 1663, 589, 1666, 567, 529, 587,
536, 560, 535, 591, 530, 565, 529, 587, 1669, 563, 1664, 558, 1669, 594,
529, 566, 527, 587, 535, 561, 561, 563, 530, 586, 537, 560, 1669, 563,
1663, 589, 534, 561, 532, 594, 529, 566, 528, 587, 1668, 564, 1663, 589,
532, 563, 532, 594, 1660, 561, 1667, 566, 1661, 592, 1663, 558, 46311, 4510,
4485, 562, 1665, 589,
99001, 4514, 4481, 566, 528, 587, 1667, 565, 1662, 589, 1664, 568, 528, 588,
535, 561, 535, 593, 529, 567, 528, 589, 1668, 564, 1663, 559, 1668, 595,
528, 567, 527, 589, 534, 562, 561, 565, 530, 586, 536, 560, 1668, 564,
1663, 590, 533, 563, 532, 595, 524, 567, 527, 588, 1667, 565, 1662, 590,
532, 563, 531, 595, 1659, 562, 1666, 566, 1661, 593, 1664, 559,
300259, 4514, 4482, 556, 565, 561, 1668, 564, 1663, 589, 1664, 556, 539, 588,
535, 561, 535, 643, 478, 568, 530, 587, 1668, 564, 1664, 589, 1636, 594,
529, 567, 528, 588, 534, 561, 561, 565, 1662, 560, 536, 590, 532, 564,
531, 586, 537, 589, 532, 564, 533, 584, 538, 568, 528, 588, 1667, 565,
1662, 560, 1669, 584, 1670, 562, 1666, 587, 1641, 591, 1664, 559, 46271, 4561,
4435, 562, 1666, 586,
81421, 4514, 4482, 556, 565, 561, 1667, 565, 1662, 589, 1664, 558, 538, 588,
534, 562, 534, 593, 530, 567, 530, 587, 1669, 564, 1663, 589, 1637, 594,
529, 567, 528, 588, 534, 561, 560, 566, 1663, 559, 535, 591, 531, 565,
530, 587, 538, 589, 533, 563, 533, 583, 539, 567, 529, 587, 1667, 565,
1662, 560, 1669, 584, 1669, 563, 1666, 587, 1640, 592, 1663, 560, 46296, 4516,
4480, 558, 1669, 594,
80690, 4508, 4489, 560, 561, 565, 1663, 558, 1670, 593, 1660, 561, 534, 592,
530, 565, 530, 586, 537, 560, 536, 591, 1664, 558, 1670, 583, 1644, 587,
535, 560, 534, 592, 530, 566, 556, 559, 1669, 563, 532, 584, 538, 558,
537, 588, 534, 582, 540, 567, 530, 588, 535, 562, 535, 591, 1663, 559,
1669, 564, 1665, 588, 1666, 566, 1662, 560, 1668, 585, 1669, 563,
136483, 4511, 4485, 563, 531, 585, 1671, 561, 1666, 587, 1668, 564, 531, 585,
536, 559, 537, 589, 532, 563, 532, 584, 1670, 562, 1666, 587, 1642, 591,
531, 566, 531, 585, 536, 559, 563, 563, 1665, 567, 528, 588, 535, 561,
534, 593, 529, 567, 556, 560, 535, 591, 530, 565, 531, 585, 1670, 563,
1665, 568, 1660, 593, 1662, 560, 1668, 564, 1663, 590, 1666, 566,
129038, 4511, 4484, 564, 533, 583, 1670, 562, 1666, 587, 1668, 565, 532, 586,
537, 559, 536, 591, 532, 564, 532, 594, 1660, 562, 1666, 566, 1660, 593,
531, 565, 530, 586, 537, 558, 563, 563, 1664, 568, 528, 589, 535, 562,
533, 595, 530, 567, 556, 560, 535, 591, 531, 565, 531, 584, 1669, 563,
1664, 567, 1661, 592, 1662, 559, 1668, 564, 1663, 590, 1666, 566, 46187, 4511,
4486, 562, 1665, 589,
110663, 4517, 4478, 558, 536, 590, 1665, 568, 1660, 593, 1661, 560, 536, 590,
531, 564, 531, 584, 537, 558, 536, 590, 1665, 567, 1661, 561, 1666, 587,
536, 560, 535, 591, 532, 564, 559, 557, 1670, 562, 532, 594, 529, 567,
528, 649, 473, 561, 561, 565, 531, 585, 536, 559, 536, 589, 1665, 567,
1660, 562, 1666, 587, 1668, 564, 1663, 558, 1669, 594, 1661, 561,
143736, 4517, 4479, 559, 536, 591, 1664, 558, 1670, 593, 1661, 559, 536, 590,
531, 564, 531, 585, 536, 559, 537, 589, 1665, 567, 1661, 561, 1666, 587,
536, 560, 536, 590, 530, 564, 557, 558, 1669, 562, 533, 593, 528, 568,
530, 586, 534, 561, 560, 566, 530, 586, 536, 560, 536, 591, 1664, 558,
1671, 562, 1666, 587, 1667, 565, 1663, 559, 1668, 594, 1660, 562, 46234, 4514,
4482, 566, 1661, 591,
120661, 4564, 4432, 565, 530, 586, 1669, 563, 1665, 587, 1666, 566, 531, 585,
536, 559, 536, 591, 532, 564, 532, 586, 1670, 563, 1666, 557, 1666, 592,
530, 565, 530, 586, 536, 560, 562, 563, 1664, 558, 538, 588, 533, 562,
533, 593, 528, 558, 565, 561, 534, 582, 541, 566, 530, 586, 1670, 563,
1664, 567, 1660, 593, 1662, 560, 1668, 564, 1663, 590, 1665, 567, 46472, 4513,
4484, 564, 1664, 588,
125301, 4511, 4484, 564, 532, 584, 1670, 562, 1666, 587, 1668, 565, 531, 586,
537, 560, 537, 591, 532, 565, 533, 584, 1671, 562, 1666, 566, 1661, 591,
530, 565, 532, 584, 536, 559, 562, 564, 1665, 567, 529, 587, 534, 563,
535, 593, 529, 568, 556, 561, 535, 592, 531, 565, 531, 585, 1669, 563,
1665, 567, 1660, 593, 1663, 559, 1668, 564, 1664, 589, 1666, 567,
200253, 4517, 4479, 558, 562, 615, 1613, 558, 1670, 592, 1661, 560, 536, 591,
531, 616, 480, 585, 537, 559, 537, 641, 1613, 568, 1661, 582, 1646, 586,
536, 559, 535, 591, 532, 564, 558, 558, 1670, 562, 533, 592, 530, 566,
529, 588, 536, 581, 542, 617, 479, 587, 537, 560, 536, 590, 1665, 557,
1670, 562, 1666, 587, 1668, 564, 1664, 558, 1669, 593, 1662, 561, 46230, 4570,
4426, 561, 1667, 586,
115418, 4514, 4483, 565, 557, 561, 1669, 563, 1664, 589, 1666, 566, 529, 587,
534, 561, 534, 592, 530, 566, 530, 586, 1668, 564, 1664, 589, 1639, 594,
529, 567, 528, 587, 534, 561, 561, 565, 1663, 559, 535, 590, 532, 563,
532, 584,
};
const IrdaMessage test_decoder_samsung32_expected1[] = {
{IrdaProtocolSamsung32, 0x0E, 0x0C, false}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x81, false}, {IrdaProtocolSamsung32, 0x0E, 0x81, true},
{IrdaProtocolSamsung32, 0x0E, 0x01, false}, {IrdaProtocolSamsung32, 0x0E, 0x01, true},
{IrdaProtocolSamsung32, 0x0E, 0x02, false}, {IrdaProtocolSamsung32, 0x0E, 0x02, true},
{IrdaProtocolSamsung32, 0x0E, 0x03, false}, {IrdaProtocolSamsung32, 0x0E, 0x03, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, false}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, false},
{IrdaProtocolSamsung32, 0x0E, 0x0C, false}, {IrdaProtocolSamsung32, 0x0E, 0x0C, false},
{IrdaProtocolSamsung32, 0x0E, 0x0C, false}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, false}, {IrdaProtocolSamsung32, 0x0E, 0x0C, false},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, false},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, false},
{IrdaProtocolSamsung32, 0x0E, 0x01, false}, {IrdaProtocolSamsung32, 0x0E, 0x01, true},
{IrdaProtocolSamsung32, 0x0E, 0x01, false}, {IrdaProtocolSamsung32, 0x0E, 0x01, true},
{IrdaProtocolSamsung32, 0x0E, 0x01, false}, {IrdaProtocolSamsung32, 0x0E, 0x01, false},
{IrdaProtocolSamsung32, 0x0E, 0x01, false}, {IrdaProtocolSamsung32, 0x0E, 0x01, true},
{IrdaProtocolSamsung32, 0x0E, 0x01, false}, {IrdaProtocolSamsung32, 0x0E, 0x01, false},
{IrdaProtocolSamsung32, 0x0E, 0x01, true}, {IrdaProtocolSamsung32, 0x0E, 0x01, false},
{IrdaProtocolSamsung32, 0x0E, 0x01, true}, {IrdaProtocolSamsung32, 0x0E, 0x01, false},
{IrdaProtocolSamsung32, 0x0E, 0x01, false}, {IrdaProtocolSamsung32, 0x0E, 0x01, true},
};
const IrdaMessage test_samsung32_all[] = {
{IrdaProtocolSamsung32, 0x00, 0x00, false},
{IrdaProtocolSamsung32, 0x01, 0x00, false},
{IrdaProtocolSamsung32, 0x01, 0x80, false},
{IrdaProtocolSamsung32, 0x00, 0x80, false},
{IrdaProtocolSamsung32, 0x00, 0x00, false},
{IrdaProtocolSamsung32, 0x00, 0x00, true},
{IrdaProtocolSamsung32, 0x00, 0x00, false},
{IrdaProtocolSamsung32, 0x00, 0x00, true},
{IrdaProtocolSamsung32, 0xFF, 0xFF, false},
{IrdaProtocolSamsung32, 0xFE, 0xFF, false},
{IrdaProtocolSamsung32, 0xFE, 0x7F, false},
{IrdaProtocolSamsung32, 0xFF, 0x7F, false},
{IrdaProtocolSamsung32, 0xFF, 0xFF, false},
{IrdaProtocolSamsung32, 0xFF, 0xFF, true},
{IrdaProtocolSamsung32, 0xAA, 0x55, false},
{IrdaProtocolSamsung32, 0x55, 0xAA, false},
{IrdaProtocolSamsung32, 0x55, 0x55, false},
{IrdaProtocolSamsung32, 0xAA, 0xAA, false},
{IrdaProtocolSamsung32, 0xAA, 0xAA, true},
{IrdaProtocolSamsung32, 0xAA, 0xAA, false},
{IrdaProtocolSamsung32, 0xAA, 0xAA, true},
{IrdaProtocolSamsung32, 0xAA, 0xAA, true},
{IrdaProtocolSamsung32, 0x55, 0x55, false},
{IrdaProtocolSamsung32, 0x55, 0x55, true},
{IrdaProtocolSamsung32, 0x55, 0x55, true},
{IrdaProtocolSamsung32, 0x55, 0x55, true},
};