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 pred never evaluates to true.

Return type:

Iterator[Iterator[TypeVar(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