25 #ifndef TIMESYNC_TIMESYNC_H_ 26 #define TIMESYNC_TIMESYNC_H_ 61 if ((cb !=
nullptr) || (data !=
nullptr)) {
int32_t InitTimeSync(const TimeSyncConfig &config)
void FsmTransferState(uint8_t new_state)
volatile bool exit_poll_data_
void(* FnReceiveSyncTimeCb)(const char *rmc, uint32_t rmc_length, void *client_data)
std::shared_ptr< std::thread > t_poll_state_
static TimeSync * GetInstance()
volatile uint8_t fsm_state_
std::chrono::steady_clock::time_point transfer_time_
ProtocolConfig protocol_config
volatile uint32_t rx_bytes_
std::shared_ptr< std::thread > t_poll_data_
volatile bool start_poll_state_
TimeSync & operator=(const TimeSync &)=delete
volatile bool exit_poll_state_
int32_t SetReceiveSyncTimeCb(FnReceiveSyncTimeCb cb, void *data)
volatile bool start_poll_data_
FnReceiveSyncTimeCb fn_cb_