Internal

This page provides a brief description of what goes on inside the SDK.

Packet Received

Occurs when cepton_sdk_mock_network_receive is called.

  1. If the packet is a sensor information packet:
  2. If the packet is a data packet:
    • If no corresponding sensor information packet has been received, ignore the data packet.

    • Compute points from packet.

    • Apply sensor calibration.

    • Add points to frame accumulator. If frame is complete, emit image frame callback.

Threads

Networking Thread 0

Created if CEPTON_SDK_CONTROL_DISABLE_NETWORK is not set.

  • Start listening on the UDP port (default: 8808).

  • Push received packets on a queue for Thread 1.

Networking Thread 1

Created if CEPTON_SDK_CONTROL_DISABLE_NETWORK is not set.

  • Pop packets from queue.

  • Call internal version of cepton_sdk_mock_network_receive. See Packet Received.

Capture Replay Thread 0

Created by cepton_sdk_capture_replay_resume().

  • While running
    • Read next packet from PCAP file.

    • Sleep to simulate realtime delays.

    • Call cepton_sdk_mock_network_receive.

Concurrency

All SDK getter functions are thread safe, and can be called from callbacks. Other SDK functions are not guaranteed to be thread safe, and can cause deadlock if called from callbacks.

Minimal SDK

If desired, the following SDK features can be disabled in the SDK and performed manually by the user: