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
20
namespace
apollo
{
21
namespace
drivers {
22
namespace
lidar {
23
24
typedef
enum
{
25
kTimestampTypeNoSync
= 0,
26
kTimestampTypeGptpOrPtp
= 1,
27
kTimestampTypeGps
= 2
28
}
TimestampType
;
29
31
typedef
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
41
uint64_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
cyber.h
apollo::drivers::lidar::GetEthPacketTimestamp
uint64_t GetEthPacketTimestamp(const uint8_t ×tamp_type, const uint8_t *time_stamp, const uint8_t &size, const uint32_t &point_size, const bool use_lidar_clock=false)
apollo::drivers::lidar::TimestampType
TimestampType
Definition
livox_util.h:24
apollo::drivers::lidar::kTimestampTypeGps
@ kTimestampTypeGps
GPS sync mode.
Definition
livox_util.h:27
apollo::drivers::lidar::kTimestampTypeNoSync
@ kTimestampTypeNoSync
No sync signal mode.
Definition
livox_util.h:25
apollo::drivers::lidar::kTimestampTypeGptpOrPtp
@ kTimestampTypeGptpOrPtp
gPTP or PTP sync mode
Definition
livox_util.h:26
apollo
class register implement
Definition
arena_queue.h:37
apollo::drivers::lidar::LdsStamp
8bytes stamp to uint64_t stamp
Definition
livox_util.h:31
apollo::drivers::lidar::LdsStamp::stamp
int64_t stamp
Definition
livox_util.h:38
apollo::drivers::lidar::LdsStamp::high
uint32_t high
Definition
livox_util.h:34
apollo::drivers::lidar::LdsStamp::low
uint32_t low
Definition
livox_util.h:33
modules
drivers
lidar
livox
driver
livox_util.h