ouster.sdk.pcap.pcap module

Copyright (c) 2021, Ouster, Inc. All rights reserved.

record(packets, pcap_path, *, src_ip='127.0.0.1', dst_ip='127.0.0.1', lidar_port=7502, imu_port=7503, use_sll_encapsulation=False)[source]

Record a sequence of sensor packets to a pcap file.

Parameters:
  • packets (Iterable[Packet]) – A (finite!) sequence of packets

  • pcap_path (str) – Path of the output pcap file

  • src_ip (str) – Source IP to use for all packets

  • dst_ip (str) – Destination IP to use for all packets

  • lidar_port (int) – Src/dst port to use for lidar packets

  • imu_port (int) – Src/dst port to use for imu packets

  • use_sll_encapsulation (bool) – Use sll encapsulation

Return type:

int

Returns:

Number of packets captured