Setup

Types

typedef uint32_t CeptonSDKControl

SDK setup flags.

enum _CeptonSDKControl

Values:

enumerator CEPTON_SDK_CONTROL_DISABLE_NETWORK

Disable networking operations.

Useful for running multiple instances of sdk in different processes. Must pass packets manually to cepton_sdk::mock_network_receive.

enumerator CEPTON_SDK_CONTROL_ENABLE_MULTIPLE_RETURNS

Enable multiple returns.

When set, cepton_sdk::SensorInformation::return_count will indicate the number of returns per laser. Can only be set at SDK initialization.

enumerator CEPTON_SDK_CONTROL_HOST_TIMESTAMPS

Always use packet timestamps (disable GPS/PTP timestamps).

enumerator CEPTON_SDK_CONTROL_RESERVED
typedef uint32_t CeptonSDKFrameMode

Controls frequency of points being reported.

enum _CeptonSDKFrameMode

Values:

enumerator CEPTON_SDK_FRAME_STREAMING

Report points by packet.

enumerator CEPTON_SDK_FRAME_TIMED

Report points at fixed time intervals.

Interval controlled by CeptonSDKFrameOptions::length.

enumerator CEPTON_SDK_FRAME_COVER

Report points when the field of view is covered once. NOTE: USE THE COVER MODE AS THE DEFAULT MODE IN SDK Use this for a fast frame rate.

  • For Sora series, detects scanline (left-to-right or right-to-left).

  • For HR80 series, detects half scan cycle (left-to-right or right-to-left).

  • For Vista series, detects half scan cycle.

enumerator CEPTON_SDK_FRAME_CYCLE

Report points when the scan pattern goes through a full cycle.

Use this for a consistent, repeating frame. Typically 2x longer frame than CEPTON_SDK_FRAME_COVER mode.

enumerator CEPTON_SDK_FRAME_MODE_MAX
struct CeptonSDKFrameOptions

SDK frame options.

Must use cepton_sdk_create_frame_options to create.

Public Members

size_t signature

Internal use only.

CeptonSDKFrameMode mode

Default: CEPTON_SDK_FRAME_STREAMING.

float length

Frame length [seconds].

Default: 0.05. Only used if mode=CEPTON_SDK_FRAME_TIMED.

struct CeptonSDKFrameOptions cepton_sdk_create_frame_options(void)

Create frame options.

struct CeptonSDKOptions

SDK initialization options.

Must call cepton_sdk_create_options to create.

Public Members

size_t signature

Internal use only.

CeptonSDKControl control_flags

Default: 0.

struct CeptonSDKFrameOptions frame
uint16_t port

Network listen port. Default: 8808.

struct CeptonSDKOptions cepton_sdk_create_options(void)

Create SDK options.

typedef void (*cepton_sdk::FpSensorErrorCallback)(SensorHandle handle, SensorErrorCode error_code, const char *error_msg, const void *error_data, size_t error_data_size, void *user_data)

Methods

const char *cepton_sdk_get_version_string()

Returns library version string.

This is different from CEPTON_SDK_VERSION.

Return

Version string. Owned by SDK. Valid until next SDK call in current thread.

int cepton_sdk_get_version_major()

Returns library version major.

int cepton_sdk_get_version_minor()

Returns library version minor.

int cepton_sdk_get_version_patch()

Returns library version patch.

CeptonSensorErrorCode cepton_sdk_initialize(int ver, const struct CeptonSDKOptions *const options, FpCeptonSensorErrorCallback cb, void *const user_data)

Initializes settings and networking.

Must be called before any other sdk function listed below.

Parameters
  • ver: CEPTON_SDK_VERSION

  • options: SDK options.

  • cb: Error callback.

  • user_data: Error callback user instance pointer.

CeptonSensorErrorCode cepton_sdk_deinitialize(void)

Resets everything and deallocates memory.

CeptonSensorErrorCode cepton_sdk_clear(void)

Clears sensors.

Use when loading/unloading capture file.

CeptonSensorErrorCode cepton_sdk_set_control_flags(CeptonSDKControl mask, CeptonSDKControl flags)

Sets SDK control flags.

Parameters
  • mask: Bit mask for selecting flags to change.

  • flags: Bit flag values.

CeptonSDKControl cepton_sdk_get_control_flags(void)

Returns SDK control flag.

int cepton_sdk_has_control_flag(CeptonSDKControl flag)

Returns whether SDK control flag is set.

uint16_t cepton_sdk_get_port(void)

Returns network listen port.

CeptonSensorErrorCode cepton_sdk_set_port(uint16_t port)

Sets network listen port.

Default: 8808.

CeptonSensorErrorCode cepton_sdk_set_frame_options(const struct CeptonSDKFrameOptions *const options)

Sets frame options.

CeptonSDKFrameMode cepton_sdk_get_frame_mode(void)

Returns frame mode.

float cepton_sdk_get_frame_length(void)

Returns frame length.