ouster.sdk.pcap.packet_iter module¶
- ichunked_before(it, pred)[source]¶
Return the given stream chunked by the predicate.
Each sub-iterator will be fully consumed when the next chunk is requested. No caching of unused items is performed, so client code should evaluate sub-iterators (e.g. into lists) to avoid dropping items.
This should behave same as more_itertools.split_before, except that chunks aren’t eagerly evaluated into lists. This makes it safe to use on streams where it’s possible that
prednever evaluates to true. :rtype:Iterator[Iterator[TypeVar(T)]]- Parameters:
it (Iterable[T])
pred (Callable[[T], bool])
- Return type:
Iterator[Iterator[T]]
- class RecordingPacketSource(source, prefix_path, *, sensor_idx=-1, n_seconds=0.0, n_frames, chunk_size=0, src_ip='127.0.0.1', dst_ip='127.0.0.1', lidar_port=-1, imu_port=-1, use_sll_encapsulation=False, overwrite=True)[source]¶
Bases:
object- Parameters:
source (PacketSource)
prefix_path (str)
sensor_idx (int)
n_seconds (float)
n_frames (int | None)
chunk_size (int)
src_ip (str)
dst_ip (str)
lidar_port (int)
imu_port (int)
use_sll_encapsulation (bool)
overwrite (bool)