Android-cuttlefish cvd tool
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
cuttlefish::sensors::SensorsSimulator Class Reference

#include <sensors_simulator.h>

Collaboration diagram for cuttlefish::sensors::SensorsSimulator:
Collaboration graph
[legend]

Public Types

using SensorsChangedCallback = std::function< void(SensorsMask)>
 

Public Member Functions

 SensorsSimulator (bool is_auto)
 
void SetSensorsChangedCallback (SensorsMask mask, SensorsChangedCallback callback)
 
void SetMotion (double x, double y, double z)
 
void SetHingeAngle (float angle)
 
std::string GetSensorsData (SensorsMask mask)
 

Private Member Functions

void NotifySensorsChanged (SensorsMask changed)
 

Private Attributes

std::mutex sensors_data_mtx_
 
SensorsMask sensors_changed_mask_ = 0
 
SensorsChangedCallback sensors_changed_callback_
 
SensorsData sensors_data_ [kMaxSensorId+1]
 
Eigen::Matrix3d current_rotation_matrix_
 
std::chrono::time_point< std::chrono::high_resolution_clock > last_event_timestamp_
 
bool is_auto_
 

Member Typedef Documentation

◆ SensorsChangedCallback

Constructor & Destructor Documentation

◆ SensorsSimulator()

cuttlefish::sensors::SensorsSimulator::SensorsSimulator ( bool  is_auto)

Member Function Documentation

◆ GetSensorsData()

std::string cuttlefish::sensors::SensorsSimulator::GetSensorsData ( SensorsMask  mask)

◆ NotifySensorsChanged()

void cuttlefish::sensors::SensorsSimulator::NotifySensorsChanged ( SensorsMask  changed)
private

◆ SetHingeAngle()

void cuttlefish::sensors::SensorsSimulator::SetHingeAngle ( float  angle)

◆ SetMotion()

void cuttlefish::sensors::SensorsSimulator::SetMotion ( double  x,
double  y,
double  z 
)

◆ SetSensorsChangedCallback()

void cuttlefish::sensors::SensorsSimulator::SetSensorsChangedCallback ( SensorsMask  mask,
SensorsChangedCallback  callback 
)

Member Data Documentation

◆ current_rotation_matrix_

Eigen::Matrix3d cuttlefish::sensors::SensorsSimulator::current_rotation_matrix_
private

◆ is_auto_

bool cuttlefish::sensors::SensorsSimulator::is_auto_
private

◆ last_event_timestamp_

std::chrono::time_point<std::chrono::high_resolution_clock> cuttlefish::sensors::SensorsSimulator::last_event_timestamp_
private

◆ sensors_changed_callback_

SensorsChangedCallback cuttlefish::sensors::SensorsSimulator::sensors_changed_callback_
private

◆ sensors_changed_mask_

SensorsMask cuttlefish::sensors::SensorsSimulator::sensors_changed_mask_ = 0
private

◆ sensors_data_

SensorsData cuttlefish::sensors::SensorsSimulator::sensors_data_[kMaxSensorId+1]
private

◆ sensors_data_mtx_

std::mutex cuttlefish::sensors::SensorsSimulator::sensors_data_mtx_
private

The documentation for this class was generated from the following files: