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

#include <lvx_file.h>

Public Member Functions

void AddDeviceInfo (LvxFileDeviceInfo &info)
 
void BasePointsHandle (LivoxEthPacket *data, LvxFilePacket &packet)
 
void CloseLvxFile ()
 
bool Eof ()
 
int GetDeviceCount ()
 
int GetDeviceInfo (uint8_t idx, LvxFileDeviceInfo *info)
 
int GetDeviceInfoListSize ()
 
int GetFileState (void)
 
int GetFileVersion ()
 
int GetLvxFileReadProgress ()
 
int GetPacketsOfFrame (OutPacketBuffer *PacketsOfFrame)
 
int InitLvxFile ()
 
void InitLvxFileHeader ()
 
 LvxFileHandle ()
 
int Open (const char *filename, std::ios_base::openmode mode)
 
void SaveFrameToLvxFile (std::list< LvxFilePacket > &point_packet_list_temp)
 
 ~LvxFileHandle ()=default
 

Private Member Functions

bool AddAndCheckDeviceInfo ()
 
uint64_t DataSizeOfFrame (FrameHeader &frame_header)
 
uint64_t DataSizeOfFrame (FrameHeaderV0 &frame_header_v0)
 
uint64_t DataStartOffset ()
 
uint64_t MiniFileSize ()
 
uint32_t PacketNumOfFrame ()
 
bool PrepareDataRead ()
 
uint64_t PrivateHeaderOffset ()
 
bool ReadAndCheckHeader ()
 

Private Attributes

uint32_t cur_frame_index_
 
uint64_t cur_offset_
 
uint64_t data_start_offset_
 
uint8_t device_count_
 
std::vector< LvxFileDeviceInfodevice_info_list_
 
uint8_t file_ver_
 
uint32_t frame_duration_
 
std::fstream lvx_file_
 
int mode_
 
LvxFilePrivateHeader private_header_
 
LvxFilePrivateHeaderV0 private_header_v0_
 
LvxFilePublicHeader public_header_
 
uint64_t size_
 
int state_
 

Detailed Description

Definition at line 172 of file lvx_file.h.

Constructor & Destructor Documentation

livox_ros::LvxFileHandle::LvxFileHandle ( )

Definition at line 42 of file lvx_file.cpp.

livox_ros::LvxFileHandle::~LvxFileHandle ( )
default

Member Function Documentation

bool livox_ros::LvxFileHandle::AddAndCheckDeviceInfo ( )
private

Definition at line 108 of file lvx_file.cpp.

void livox_ros::LvxFileHandle::AddDeviceInfo ( LvxFileDeviceInfo info)
inline

Definition at line 186 of file lvx_file.h.

void livox_ros::LvxFileHandle::BasePointsHandle ( LivoxEthPacket *  data,
LvxFilePacket packet 
)

Definition at line 309 of file lvx_file.cpp.

void livox_ros::LvxFileHandle::CloseLvxFile ( )

Definition at line 305 of file lvx_file.cpp.

uint64_t livox_ros::LvxFileHandle::DataSizeOfFrame ( FrameHeader frame_header)
inlineprivate

Definition at line 222 of file lvx_file.h.

uint64_t livox_ros::LvxFileHandle::DataSizeOfFrame ( FrameHeaderV0 frame_header_v0)
inlineprivate

Definition at line 227 of file lvx_file.h.

uint64_t livox_ros::LvxFileHandle::DataStartOffset ( )
private

Definition at line 98 of file lvx_file.cpp.

bool livox_ros::LvxFileHandle::Eof ( )

Definition at line 205 of file lvx_file.cpp.

int livox_ros::LvxFileHandle::GetDeviceCount ( )
inline

Definition at line 190 of file lvx_file.h.

int livox_ros::LvxFileHandle::GetDeviceInfo ( uint8_t  idx,
LvxFileDeviceInfo info 
)

Definition at line 314 of file lvx_file.cpp.

int livox_ros::LvxFileHandle::GetDeviceInfoListSize ( )
inline

Definition at line 189 of file lvx_file.h.

int livox_ros::LvxFileHandle::GetFileState ( void  )
inline

Definition at line 192 of file lvx_file.h.

int livox_ros::LvxFileHandle::GetFileVersion ( )
inline

Definition at line 195 of file lvx_file.h.

int livox_ros::LvxFileHandle::GetLvxFileReadProgress ( )

Definition at line 370 of file lvx_file.cpp.

int livox_ros::LvxFileHandle::GetPacketsOfFrame ( OutPacketBuffer PacketsOfFrame)

Definition at line 323 of file lvx_file.cpp.

int livox_ros::LvxFileHandle::InitLvxFile ( )

Definition at line 207 of file lvx_file.cpp.

void livox_ros::LvxFileHandle::InitLvxFileHeader ( )

Definition at line 217 of file lvx_file.cpp.

uint64_t livox_ros::LvxFileHandle::MiniFileSize ( )
private

Definition at line 82 of file lvx_file.cpp.

int livox_ros::LvxFileHandle::Open ( const char *  filename,
std::ios_base::openmode  mode 
)

Definition at line 159 of file lvx_file.cpp.

uint32_t livox_ros::LvxFileHandle::PacketNumOfFrame ( )
private
bool livox_ros::LvxFileHandle::PrepareDataRead ( )
private

reset the read position to the start offset of data erea

Definition at line 142 of file lvx_file.cpp.

uint64_t livox_ros::LvxFileHandle::PrivateHeaderOffset ( )
private

Definition at line 94 of file lvx_file.cpp.

bool livox_ros::LvxFileHandle::ReadAndCheckHeader ( )
private

if (public_header_.magic_code != kLvxHeaderMagicCode) { return false; }

Definition at line 56 of file lvx_file.cpp.

void livox_ros::LvxFileHandle::SaveFrameToLvxFile ( std::list< LvxFilePacket > &  point_packet_list_temp)

Definition at line 270 of file lvx_file.cpp.

Member Data Documentation

uint32_t livox_ros::LvxFileHandle::cur_frame_index_
private

Definition at line 205 of file lvx_file.h.

uint64_t livox_ros::LvxFileHandle::cur_offset_
private

Definition at line 206 of file lvx_file.h.

uint64_t livox_ros::LvxFileHandle::data_start_offset_
private

Definition at line 208 of file lvx_file.h.

uint8_t livox_ros::LvxFileHandle::device_count_
private

Definition at line 201 of file lvx_file.h.

std::vector<LvxFileDeviceInfo> livox_ros::LvxFileHandle::device_info_list_
private

Definition at line 199 of file lvx_file.h.

uint8_t livox_ros::LvxFileHandle::file_ver_
private

Definition at line 200 of file lvx_file.h.

uint32_t livox_ros::LvxFileHandle::frame_duration_
private

Definition at line 207 of file lvx_file.h.

std::fstream livox_ros::LvxFileHandle::lvx_file_
private

Definition at line 198 of file lvx_file.h.

int livox_ros::LvxFileHandle::mode_
private

Definition at line 210 of file lvx_file.h.

LvxFilePrivateHeader livox_ros::LvxFileHandle::private_header_
private

Definition at line 203 of file lvx_file.h.

LvxFilePrivateHeaderV0 livox_ros::LvxFileHandle::private_header_v0_
private

Definition at line 204 of file lvx_file.h.

LvxFilePublicHeader livox_ros::LvxFileHandle::public_header_
private

Definition at line 202 of file lvx_file.h.

uint64_t livox_ros::LvxFileHandle::size_
private

Definition at line 209 of file lvx_file.h.

int livox_ros::LvxFileHandle::state_
private

Definition at line 211 of file lvx_file.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