I would like to access the second element of ROS-Message message_a
.
# ROS-Message message_a
Header header
message_b[] test
ROS-Message 1 contains ROS-Message 2!
# ROS-Message message_b
Header header
uint32[] result
In my main code I loop with a for-each loop through the message test with the datatyp message_a
.
for ( message_a::Test1 test : message_a.message_b ) {
uint32_t c = test.result;
}
How can I access for example the second element of message_b? I need that because I want to get the result of the second test.
With the for-each loop that you see above, it will loop through all elements of message_b
. How can I change this for-each loop to a general for-loop? Then I could just loop from 2 to 3...