Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
|
Go to the documentation of this file.
5 #ifndef MOTION_MODULE_H
6 #define MOTION_MODULE_H
15 namespace motion_module
96 #define FW_IMAGE_PACKET_PAYLOAD_LEN (128)
107 void config(uvc::device & device, uint8_t gyro_bw, uint8_t gyro_range, uint8_t accel_bw, uint8_t accel_range, uint32_t time_seed);
121 default:
return std::string(
to_string() <<
"unresolved request id: " << request).c_str();
139 default:
return std::string(
to_string() <<
"unresolved mm state id: " << state).c_str();
158 std::vector<motion_event>
operator() (
const unsigned char* data,
const int& data_size);
193 uvc::device* device_handle;
195 std::timed_mutex& usbMutex;
198 void i2c_iap_write(uint16_t slave_address, uint8_t *buffer, uint16_t len);
200 void write_firmware(uint8_t *data,
int size);
203 void enter_state(
mm_state new_state);
204 void set_control(
mm_request request,
bool on);
271 #endif // MOTION_MODULE_H
motion_event_status status
Definition: motion-module.h:78
wraparound_mechanism< unsigned long long > timestamp_wraparound
Definition: motion-module.h:148
unsigned pwr_mode_change_done
Definition: motion-module.h:70
int requested_state(mm_request, bool on) const
Definition: motion-module.h:29
Definition: motion-module.h:176
motion_module_state()
Definition: motion-module.h:168
Definition: motion-module.h:143
unsigned cx3_packet_number
Definition: motion-module.h:71
mm_state state
Definition: motion-module.h:168
void toggle_motion_module_power(bool on)
Definition: motion-module.h:25
mm_gyro_bandwidth gyro_bandwidth
Definition: motion-module.h:91
motion_module_wraparound()
Definition: motion-module.h:145
Definition: motion-module.h:24
mm_gyro_range gyro_range
Definition: motion-module.h:90
Definition: motion-module.h:23
Definition: motion-module.h:128
std::bitset< 16 > error_state
Definition: motion-module.h:77
Definition: motion-module.h:27
mm_accel_range accel_range
Definition: motion-module.h:92
Motion data from gyroscope and accelerometer from the microcontroller.
Definition: rs.h:347
void switch_to_operational()
mm_accel_bandwidth accel_bandwidth
Definition: motion-module.h:93
uint16_t length
Definition: motion-module.h:101
uint8_t data[FW_IMAGE_PACKET_PAYLOAD_LEN]
Definition: motion-module.h:103
mm_accel_bandwidth
Definition: motion-module.h:60
rs_timestamp_data non_imu_packets[8]
Definition: motion-module.h:83
Definition: motion-module.h:31
const char * get_mm_state_name(mm_state state)
Definition: motion-module.h:133
motion_module_errors
Definition: motion-module.h:17
Definition: motion-module.h:35
Definition: motion-module.h:98
mm_accel_range
Definition: motion-module.h:52
Definition: motion-module.h:129
Definition: motion-module.h:111
unsigned short non_imu_entries_num
Definition: motion-module.h:80
rs_motion_data parse_motion(const unsigned char *data)
i2c_register
Definition: motion-module.h:208
Definition: motion-module.h:75
const char * get_mm_request_name(mm_request request)
Definition: motion-module.h:116
Definition: motion-module.h:33
Definition: motion-module.h:19
motion_module_parser()
Definition: motion-module.h:154
Definition: motion-module.h:28
mm_request
Definition: motion-module.h:109
rs_motion_data imu_packets[4]
Definition: motion-module.h:82
mm_state
Definition: motion-module.h:125
uint32_t mm_time_seed
Definition: motion-module.h:89
Definition: motion-module.h:20
Definition: motion-module.h:130
Definition: motion-module.h:87
void parse_timestamp(const unsigned char *data, rs_timestamp_data &)
unsigned reserved_0
Definition: motion-module.h:69
#define FW_IMAGE_PACKET_PAYLOAD_LEN
Definition: motion-module.h:96
Definition: motion-module.h:113
mm_gyro_range
Definition: motion-module.h:39
Definition: motion-module.h:30
uint32_t address
Definition: motion-module.h:100
Timestamp data from the motion microcontroller.
Definition: rs.h:339
unsigned short imu_entries_num
Definition: motion-module.h:79
power_states
Definition: motion-module.h:241
wraparound_mechanism< unsigned long long > frame_counter_wraparound
Definition: motion-module.h:149
Definition: motion-module.h:21
Definition: motion-module.h:112
unsigned long timestamp
Definition: motion-module.h:81
motion_module_control(uvc::device *device, std::timed_mutex &usbMutex)
static bool valid(int check_state)
Definition: motion-module.h:171
std::vector< motion_event > operator()(const unsigned char *data, const int &data_size)
void config(uvc::device &device, uint8_t gyro_bw, uint8_t gyro_range, uint8_t accel_bw, uint8_t accel_range, uint32_t time_seed)
Definition: motion-module.h:32
adaptor_board_command
Definition: motion-module.h:249
unsigned reserved_6_15
Definition: motion-module.h:72
Definition: motion-module.h:67
Definition: motion-module.h:22
mm_gyro_bandwidth
Definition: motion-module.h:46
uint8_t dummy
Definition: motion-module.h:102
Definition: motion-module.h:26
Definition: motion-module.h:127
uint8_t op_code
Definition: motion-module.h:99
Definition: motion-module.h:34
Definition: motion-module.h:165
std::vector< motion_module_wraparound > mm_data_wraparound
Definition: motion-module.h:162
void firmware_upgrade(void *data, int size)
Definition: motion-module.h:152
void toggle_motion_module_events(bool on)