Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
livox_ros::TimeSync Class Reference

#include <timesync.h>

Public Member Functions

int32_t DeInitTimeSync ()
 
int32_t InitTimeSync (const TimeSyncConfig &config)
 
int32_t SetReceiveSyncTimeCb (FnReceiveSyncTimeCb cb, void *data)
 
void StartTimesync ()
 

Static Public Member Functions

static TimeSyncGetInstance ()
 

Private Member Functions

void FsmCheckDevState ()
 
void FsmOpenDev ()
 
void FsmPrepareDev ()
 
void FsmTransferState (uint8_t new_state)
 
TimeSyncoperator= (const TimeSync &)=delete
 
void PollDataLoop ()
 
void PollStateLoop ()
 
void StopTimesync ()
 
 TimeSync ()
 
 TimeSync (const TimeSync &)=delete
 
 ~TimeSync ()
 

Private Attributes

void * client_data_
 
CommProtocolcomm_
 
TimeSyncConfig config_
 
volatile bool exit_poll_data_
 
volatile bool exit_poll_state_
 
FnReceiveSyncTimeCb fn_cb_
 
volatile uint8_t fsm_state_
 
volatile uint32_t rx_bytes_
 
volatile bool start_poll_data_
 
volatile bool start_poll_state_
 
std::shared_ptr< std::thread > t_poll_data_
 
std::shared_ptr< std::thread > t_poll_state_
 
std::chrono::steady_clock::time_point transfer_time_
 
UserUartuart_
 

Detailed Description

Definition at line 45 of file timesync.h.

Constructor & Destructor Documentation

livox_ros::TimeSync::TimeSync ( )
private

Definition at line 37 of file timesync.cpp.

livox_ros::TimeSync::~TimeSync ( )
private

Definition at line 50 of file timesync.cpp.

livox_ros::TimeSync::TimeSync ( const TimeSync )
privatedelete

Member Function Documentation

int32_t livox_ros::TimeSync::DeInitTimeSync ( )

Definition at line 81 of file timesync.cpp.

void livox_ros::TimeSync::FsmCheckDevState ( )
private

Definition at line 182 of file timesync.cpp.

void livox_ros::TimeSync::FsmOpenDev ( )
private

Definition at line 162 of file timesync.cpp.

void livox_ros::TimeSync::FsmPrepareDev ( )
private

delay some time when device is opened, 4s

Definition at line 172 of file timesync.cpp.

void livox_ros::TimeSync::FsmTransferState ( uint8_t  new_state)
private

Definition at line 155 of file timesync.cpp.

static TimeSync* livox_ros::TimeSync::GetInstance ( )
inlinestatic

Definition at line 47 of file timesync.h.

int32_t livox_ros::TimeSync::InitTimeSync ( const TimeSyncConfig config)

Definition at line 52 of file timesync.cpp.

TimeSync& livox_ros::TimeSync::operator= ( const TimeSync )
privatedelete
void livox_ros::TimeSync::PollDataLoop ( )
private

Definition at line 125 of file timesync.cpp.

void livox_ros::TimeSync::PollStateLoop ( )
private

Definition at line 108 of file timesync.cpp.

int32_t livox_ros::TimeSync::SetReceiveSyncTimeCb ( FnReceiveSyncTimeCb  cb,
void *  data 
)
inline

Definition at line 60 of file timesync.h.

void livox_ros::TimeSync::StartTimesync ( )
inline

Definition at line 55 of file timesync.h.

void livox_ros::TimeSync::StopTimesync ( )
private

Definition at line 92 of file timesync.cpp.

Member Data Documentation

void* livox_ros::TimeSync::client_data_
private

Definition at line 94 of file timesync.h.

CommProtocol* livox_ros::TimeSync::comm_
private

Definition at line 90 of file timesync.h.

TimeSyncConfig livox_ros::TimeSync::config_
private

Definition at line 88 of file timesync.h.

volatile bool livox_ros::TimeSync::exit_poll_data_
private

Definition at line 85 of file timesync.h.

volatile bool livox_ros::TimeSync::exit_poll_state_
private

Definition at line 81 of file timesync.h.

FnReceiveSyncTimeCb livox_ros::TimeSync::fn_cb_
private

Definition at line 93 of file timesync.h.

volatile uint8_t livox_ros::TimeSync::fsm_state_
private

Definition at line 96 of file timesync.h.

volatile uint32_t livox_ros::TimeSync::rx_bytes_
private

Definition at line 91 of file timesync.h.

volatile bool livox_ros::TimeSync::start_poll_data_
private

Definition at line 86 of file timesync.h.

volatile bool livox_ros::TimeSync::start_poll_state_
private

Definition at line 82 of file timesync.h.

std::shared_ptr<std::thread> livox_ros::TimeSync::t_poll_data_
private

Definition at line 84 of file timesync.h.

std::shared_ptr<std::thread> livox_ros::TimeSync::t_poll_state_
private

Definition at line 80 of file timesync.h.

std::chrono::steady_clock::time_point livox_ros::TimeSync::transfer_time_
private

Definition at line 97 of file timesync.h.

UserUart* livox_ros::TimeSync::uart_
private

Definition at line 89 of file timesync.h.


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


livox_ros_driver
Author(s): Livox Dev Team
autogenerated on Mon Mar 15 2021 02:40:46