|
CARLA
|
#include "test.h"#include <carla/multigpu/frameDataCodec.h>#include <carla/multigpu/sensorSync.h>#include <cstring>#include <random>#include <sstream>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | SensorState |
| One record of frame data packet 27: the runtime state a sensor of the primary starts this frame's tick from. More... | |
| struct | SensorStates |
| Frame data packet 27, for the sensors of packet 26 that carry state. More... | |
| struct | SensorTick |
| One record of frame data packet 26: a sensor of the primary that ticks in this frame, and the delta of that tick. More... | |
| struct | SensorTicks |
| Frame data packet 26: every sensor of the primary that ticks in this frame. More... | |
Functions | |
| uint32_t | GetEngineState (const std::minstd_rand &engine) |
| The state of a minstd_rand: the value its next draw is computed from. | |
| bool | SetEngineState (std::minstd_rand &engine, uint32_t state) |
| Makes engine continue from state, as GetEngineState returned it. | |
| TEST (MultiGpuSensorSync, empty_ticks_are_still_a_packet) | |
| TEST (MultiGpuSensorSync, impossible_engine_states_are_refused) | |
| TEST (MultiGpuSensorSync, minstd_resumes_the_same_draws) | |
| TEST (MultiGpuSensorSync, states_round_trip_every_field) | |
| TEST (MultiGpuSensorSync, ticks_round_trip_with_bit_exact_deltas) | |
| TEST (MultiGpuSensorSync, truncated_records_fail) | |
| TEST (MultiGpuSensorSync, unknown_and_longer_fields_are_skipped) | |
|
inline |
The state of a minstd_rand: the value its next draw is computed from.
Definition at line 254 of file sensorSync.h.
Referenced by TEST().
|
inline |
Makes engine continue from state, as GetEngineState returned it.
False for a value no minstd_rand can hold.
Definition at line 264 of file sensorSync.h.
| TEST | ( | MultiGpuSensorSync | , |
| empty_ticks_are_still_a_packet | ) |
Definition at line 52 of file test_multigpu_sensor_sync.cpp.
References carla::multigpu::SensorTicks::Read(), TEST(), carla::multigpu::SensorTicks::ticks, and carla::multigpu::SensorTicks::Write().
| TEST | ( | MultiGpuSensorSync | , |
| impossible_engine_states_are_refused | ) |
Definition at line 160 of file test_multigpu_sensor_sync.cpp.
References SetEngineState(), and TEST().
| TEST | ( | MultiGpuSensorSync | , |
| minstd_resumes_the_same_draws | ) |
Definition at line 145 of file test_multigpu_sensor_sync.cpp.
References GetEngineState(), SetEngineState(), and TEST().
| TEST | ( | MultiGpuSensorSync | , |
| states_round_trip_every_field | ) |
Definition at line 64 of file test_multigpu_sensor_sync.cpp.
References carla::multigpu::SensorState::actor_id, carla::multigpu::SensorState::imu_history, carla::multigpu::SensorState::imu_local_rotation, carla::multigpu::ImuHistory::last_delta_seconds, carla::multigpu::ImuHistory::last_location, carla::multigpu::SensorState::lidar_horizontal_angle, carla::multigpu::ImuHistory::older_location, carla::multigpu::SensorState::radar_previous_location, carla::multigpu::SensorState::random_engine, carla::multigpu::SensorStates::Read(), carla::multigpu::SensorStates::states, TEST(), and carla::multigpu::SensorStates::Write().
| TEST | ( | MultiGpuSensorSync | , |
| ticks_round_trip_with_bit_exact_deltas | ) |
Definition at line 33 of file test_multigpu_sensor_sync.cpp.
References SensorTicks::kPacketId, carla::multigpu::SensorTicks::Read(), TEST(), carla::multigpu::SensorTicks::ticks, and carla::multigpu::SensorTicks::Write().
| TEST | ( | MultiGpuSensorSync | , |
| truncated_records_fail | ) |
| TEST | ( | MultiGpuSensorSync | , |
| unknown_and_longer_fields_are_skipped | ) |
Definition at line 105 of file test_multigpu_sensor_sync.cpp.
References SensorStates::kRandomEngine, carla::multigpu::SensorStates::Read(), carla::multigpu::SensorStates::states, TEST(), carla::multigpu::WriteField(), and carla::multigpu::WriteSizedBytes().