| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "iskhakov_d_linear_topology/seq/include/ops_seq.hpp" | ||
| 2 | |||
| 3 | #include <vector> | ||
| 4 | |||
| 5 | #include "iskhakov_d_linear_topology/common/include/common.hpp" | ||
| 6 | |||
| 7 | namespace iskhakov_d_linear_topology { | ||
| 8 | |||
| 9 |
1/2✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
|
16 | IskhakovDLinearTopologySEQ::IskhakovDLinearTopologySEQ(const InType &in) { |
| 10 | SetTypeOfTask(GetStaticTypeOfTask()); | ||
| 11 | GetInput() = in; | ||
| 12 | 16 | GetOutput() = Message{}; | |
| 13 | 16 | } | |
| 14 | |||
| 15 | 16 | bool IskhakovDLinearTopologySEQ::ValidationImpl() { | |
| 16 | const auto &input = GetInput(); | ||
| 17 | |||
| 18 |
1/2✓ Branch 0 taken 16 times.
✗ Branch 1 not taken.
|
16 | if (input.head_process < 0) { |
| 19 | return false; | ||
| 20 | } | ||
| 21 | |||
| 22 |
1/2✓ Branch 0 taken 16 times.
✗ Branch 1 not taken.
|
16 | if (input.tail_process < 0) { |
| 23 | return false; | ||
| 24 | } | ||
| 25 | |||
| 26 |
1/2✓ Branch 0 taken 16 times.
✗ Branch 1 not taken.
|
16 | if (input.head_process != input.tail_process) { |
| 27 | return false; | ||
| 28 | } | ||
| 29 | |||
| 30 |
1/2✓ Branch 0 taken 16 times.
✗ Branch 1 not taken.
|
16 | if (input.data.empty()) { |
| 31 | return false; | ||
| 32 | } | ||
| 33 | |||
| 34 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 16 times.
|
16 | if (input.delivered) { |
| 35 | ✗ | return false; | |
| 36 | } | ||
| 37 | |||
| 38 | return true; | ||
| 39 | } | ||
| 40 | |||
| 41 | 16 | bool IskhakovDLinearTopologySEQ::PreProcessingImpl() { | |
| 42 | 16 | return true; | |
| 43 | } | ||
| 44 | |||
| 45 | 16 | bool IskhakovDLinearTopologySEQ::RunImpl() { | |
| 46 | const auto &input = GetInput(); | ||
| 47 | |||
| 48 | 16 | Message result; | |
| 49 | 16 | result.head_process = input.head_process; | |
| 50 | 16 | result.tail_process = input.tail_process; | |
| 51 |
1/2✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
|
16 | result.SetData(input.data); |
| 52 |
1/2✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
|
16 | result.delivered = true; |
| 53 | |||
| 54 | GetOutput() = result; | ||
| 55 | 16 | return true; | |
| 56 | } | ||
| 57 | |||
| 58 | 16 | bool IskhakovDLinearTopologySEQ::PostProcessingImpl() { | |
| 59 | 16 | return true; | |
| 60 | } | ||
| 61 | |||
| 62 | } // namespace iskhakov_d_linear_topology | ||
| 63 |