Class PcapPacketSource¶
Defined in File pcap_packet_source.h
Inheritance Relationships¶
Base Types¶
public ouster::sdk::core::PacketSourceClass PacketSourceprivate ouster::sdk::impl::PacketSourceBuilder< ouster::sdk::core::IoType::PCAP, PcapPacketSource >
Class Documentation¶
-
class PcapPacketSource : public ouster::sdk::core::PacketSource, private ouster::sdk::impl::PacketSourceBuilder<ouster::sdk::core::IoType::PCAP, PcapPacketSource>¶
PacketSource that produces packets from a given PCAP file.
Public Functions
-
PcapPacketSource(const std::string &file, const std::function<void(PcapPacketSourceOptions&)> &options = {})¶
open_source compatible constructor
- Parameters:
file[in] pcap file to open
options[in] frame set source options
-
PcapPacketSource(const std::string &file, PcapPacketSourceOptions options)¶
open source compatible constructor
- Parameters:
file[in] pcap file to open
options[in] frame set source options
-
virtual ouster::sdk::core::PacketIterator begin() const override¶
Get begin iterator for container.
Provides each frame from all sensors in time order
- Returns:
iterator to first item in source
-
virtual const std::vector<std::shared_ptr<ouster::sdk::core::SensorInfo>> &sensor_info() const override¶
Get the SensorInfo for each sensor in the source.
- Returns:
info about each sensor
-
virtual bool is_live() const override¶
Indicates if the source is streaming from a device, such as a sensor.
- Returns:
if live or not
-
uint64_t id_error_count() const¶
Get number of id errors that occurred while retrieving packets.
- Returns:
numer of id errors
-
uint64_t size_error_count() const¶
Get number of size errors that occurred while retrieving packets.
- Returns:
numer of size errors
-
PcapPacketSource(const std::string &file, const std::function<void(PcapPacketSourceOptions&)> &options = {})¶