mirror of https://github.com/rusefi/rusefi-1.git
TS via TCP connector and ISO-TP via PCAN #3667
This commit is contained in:
parent
4b9157d804
commit
1dbcaaa6a4
|
@ -152,27 +152,20 @@ TEST(testCanSerial, test2Frames) {
|
||||||
TestCanStreamerState state;
|
TestCanStreamerState state;
|
||||||
state.test({ "0123456789A" }, { "\x10"s "\x0B"s "012345"s, "\x21"s "6789A\0\0"s }, 11, { 2, 5, 4 }); // 11 bytes -> 2 8-byte frames
|
state.test({ "0123456789A" }, { "\x10"s "\x0B"s "012345"s, "\x21"s "6789A\0\0"s }, 11, { 2, 5, 4 }); // 11 bytes -> 2 8-byte frames
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
{
|
{
|
||||||
TestCanStreamerState state;
|
TestCanStreamerState state;
|
||||||
state.test({ "0123456ABCDEFG" }, { "\x07"s "0123456"s, "\x07"s "ABCDEFG"s }, 0, { 14 }); // 14 bytes -> 2 8-byte frames, empty FIFO
|
state.test({ "0123456ABCDEFG" }, { "\x10"s "\x0E"s "012345"s, "\x21"s "6ABCDEF"s, "\x22"s "G\0\0\0\0\0\0"s }, 14, { 14 }); // 14 bytes -> 3 8-byte frames, empty FIFO
|
||||||
}
|
}
|
||||||
{
|
|
||||||
TestCanStreamerState state;
|
|
||||||
state.test({ "0123456ABCDEFG" }, { "\x07"s "0123456"s, "\x07"s "ABCDEFG"s }, 0, { 6, 1, 1, 6 }); // 14 bytes -> 2 8-byte frames, empty FIFO, split receive test
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
TEST(testCanSerial, testIrregularSplits) {
|
TEST(testCanSerial, testIrregularSplits) {
|
||||||
{
|
{
|
||||||
TestCanStreamerState state;
|
TestCanStreamerState state;
|
||||||
state.test({ "012", "3456ABCDEFG" }, { "\x07"s "0123456"s, "\x07"s "ABCDEFG"s }, 0, { 7, 7 }); // 14 bytes -> 2 8-byte frames, empty FIFO
|
state.test({ "012", "3456ABCDEFG" }, { "\x10"s "\x0E"s "012345"s, "\x21"s "6ABCDEF"s, "\x22"s "G\0\0\0\0\0\0"s }, 14, { 7, 7 }); // 14 bytes -> 2 8-byte frames, empty FIFO
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
TestCanStreamerState state;
|
TestCanStreamerState state;
|
||||||
state.test({ "0123456ABC", "DEFG" }, { "\x07"s "0123456"s, "\x07"s "ABCDEFG"s }, 0, { 14 }); // 14 bytes -> 2 8-byte frames, empty FIFO
|
state.test({ "0123456ABC", "DEFG" }, { "\x10"s "\x0E"s "012345"s, "\x21"s "6ABCDEF"s, "\x22"s "G\0\0\0\0\0\0"s }, 14, { 14 }); // 14 bytes -> 2 8-byte frames, empty FIFO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,13 +173,9 @@ TEST(testCanSerial, testLongMessage) {
|
||||||
{
|
{
|
||||||
TestCanStreamerState state;
|
TestCanStreamerState state;
|
||||||
state.test({ "abcdefghijklmnopqrstuvwxyz" }, {
|
state.test({ "abcdefghijklmnopqrstuvwxyz" }, {
|
||||||
"\x07"s "abcdefg"s,
|
"\x10"s "\x1A"s "abcdef"s,
|
||||||
"\x07"s "hijklmn"s,
|
"\x21"s "ghijklm"s,
|
||||||
"\x07"s "opqrstu"s,
|
"\x22"s "nopqrst"s,
|
||||||
"\x05"s "vwxyz\0\0"s }, 5, { 26 }); // 26 bytes -> 4 8-byte frames, 5 bytes left in FIFO
|
"\x23"s "uvwxyz\0"s }, 26, { 26 }); // 26 bytes -> 4 8-byte frames, 5 bytes left in FIFO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue