Apollo 10.0
自动驾驶开放平台
livox_util.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2024 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16#pragma once
17
18#include "cyber/cyber.h"
19
20namespace apollo {
21namespace drivers {
22namespace lidar {
23
29
31typedef union {
32 struct {
33 uint32_t low;
34 uint32_t high;
35 } stamp_word;
36
37 uint8_t stamp_bytes[8];
38 int64_t stamp;
39} LdsStamp;
40
41uint64_t GetEthPacketTimestamp(const uint8_t& timestamp_type,
42 const uint8_t* time_stamp, const uint8_t& size,
43 const uint32_t& point_size,
44 const bool use_lidar_clock = false);
45
46} // namespace lidar
47} // namespace drivers
48} // namespace apollo
uint64_t GetEthPacketTimestamp(const uint8_t &timestamp_type, const uint8_t *time_stamp, const uint8_t &size, const uint32_t &point_size, const bool use_lidar_clock=false)
@ kTimestampTypeGps
GPS sync mode.
Definition livox_util.h:27
@ kTimestampTypeNoSync
No sync signal mode.
Definition livox_util.h:25
@ kTimestampTypeGptpOrPtp
gPTP or PTP sync mode
Definition livox_util.h:26
class register implement
Definition arena_queue.h:37
8bytes stamp to uint64_t stamp
Definition livox_util.h:31