Wellcome to ARS548 SDK
Loading...
Searching...
No Matches
Ars548Dll.h File Reference

ARS548 radar communication SDK. More...

#include <unistd.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  SomeIPHeader1stPart
 
struct  SomeIPHeader2ndPart
 
struct  E2eP07Header
 
struct  Ars548Msg
 
struct  SomeIPPackage
 
struct  Ars548SensorStatusOlder
 
struct  Ars548SensorStatus
 
struct  Ars548FilterStatusEntry
 
struct  Ars548FilterStatus
 
struct  Ars548Detection
 
struct  Ars548DetectionList
 
struct  Ars548Object
 
struct  Ars548ObjectList
 
struct  Ars548SensorConfiguration
 
struct  Ars548FilterConfigEntry
 
struct  Ars548FilterConfiguration
 
struct  AccelerationLateralCog
 
struct  AccelerationLongitudinalCog
 
struct  VelocityVehicle
 
struct  DrivingDirection
 
struct  YawRate
 
struct  SteeringAngleFrontAxle
 
struct  CharacteristicSpeed
 
struct  Target
 
struct  TargetList
 
struct  VehicleDynamicParams
 
struct  Ars548MsgRecord
 
struct  Ars548TargetRecord
 

Macros

#define ARS548DLL_API
 
#define WINAPI
 
#define CALLBACK
 
#define METHOD_ID_DETECTION_LIST   336
 
#define METHOD_ID_OBJECT_LIST   329
 
#define METHOD_ID_SENSOR_STATUS   380
 
#define METHOD_ID_FILTER_STATUS   396
 
#define METHOD_ID_SENSOR_CONFIG   390
 
#define METHOD_ID_FILTER_CONFIG   395
 
#define METHOD_ID_ACCELERATION_LATERAL_COG   321
 
#define METHOD_ID_ACCELERATION_LONGITUDINAL_COG   322
 
#define METHOD_ID_VELOCITY_VEHICLE   323
 
#define METHOD_ID_DRIVING_DIRECTION   325
 
#define METHOD_ID_YAW_RATE   326
 
#define METHOD_ID_STEERING_ANGLE_FRONT_AXLE   327
 
#define METHOD_ID_CHARACTERISTIC_SPEED   328
 
#define MSG_ID_DETECTION_LIST   METHOD_ID_DETECTION_LIST
 
 
#define MSG_ID_OBJECT_LIST   METHOD_ID_OBJECT_LIST
 
 
#define MSG_ID_SENSOR_STATUS   METHOD_ID_SENSOR_STATUS
 
 
#define MSG_ID_FILTER_STATUS   METHOD_ID_FILTER_STATUS
 
 
#define TARGET_TYPE_DETECTION   0
 
 
#define TARGET_TYPE_OBJECT   1
 
 

Typedefs

typedef uint8_t BYTE
 
typedef int8_t INT8
 
typedef uint8_t UINT8
 
typedef uint16_t UINT16
 
typedef uint32_t UINT32
 
typedef uint32_t DWORD
 
typedef uint64_t UINT64
 
typedef float FLOAT32
 
typedef int BOOL
 
typedef void * HINSTANCE
 
typedef void * LPVOID
 
typedef int SOCKET
 
typedef void(CALLBACK * RadarMessageCallback) (int nMsgId, const Ars548Msg *pMsg)
 Used to define a callback function to be invoked when the radar raw message structure is received.
 
typedef void(CALLBACK * TargetListCallback) (const TargetList *pTargetList)
 Used to define a callback function to be invoked when the parsed target list is ready.
 

Functions

ARS548DLL_API HINSTANCE WINAPI Ars548_Init ()
 
ARS548DLL_API int WINAPI Ars548_StartReceive (HINSTANCE hInst, const char *lpszBindIP, const char *lpszRadarIP)
 
ARS548DLL_API int WINAPI Ars548_StopReceive (HINSTANCE hInst)
 
ARS548DLL_API void WINAPI Ars548_SetRadarMessageCallback (HINSTANCE hInst, const RadarMessageCallback pCallback)
 
ARS548DLL_API void WINAPI Ars548_SetTargetListCallback (HINSTANCE hInst, const TargetListCallback pCallback)
 
ARS548DLL_API int WINAPI Ars548_SetSensorConfig (HINSTANCE hInst, const Ars548SensorConfiguration *pConfig)
 
ARS548DLL_API int WINAPI Ars548_SetFilterConfig (HINSTANCE hInst, const Ars548FilterConfiguration *pConfig)
 
ARS548DLL_API int WINAPI Ars548_ResetFilterConfig (HINSTANCE hInst)
 
ARS548DLL_API int WINAPI Ars548_SendVehicleDynamicParams (HINSTANCE hInst, const VehicleDynamicParams *pParam)
 
ARS548DLL_API void WINAPI Ars548_UnInit (HINSTANCE hInst)
 
ARS548DLL_API int WINAPI Ars548_LoadRecord (HINSTANCE *pRecordInst, const char *lpszFileOrDirectory)
 
ARS548DLL_API int WINAPI Ars548_GetMsgRecords (HINSTANCE hRecordInst, const Ars548MsgRecord **pMsgRecords, UINT32 *pMsgRecordCount)
 
ARS548DLL_API int WINAPI Ars548_GetTargetRecords (HINSTANCE hRecordInst, const Ars548TargetRecord **pTargetRecords, UINT32 *pTargetRecordCount)
 
ARS548DLL_API void WINAPI Ars548_FreeRecord (HINSTANCE hRecordInst)
 
ARS548DLL_API int WINAPI Ars548_StartRecord (HINSTANCE hInst)
 
ARS548DLL_API int WINAPI Ars548_GetRecordingFileName (HINSTANCE hInst, char **pszFileName)
 
ARS548DLL_API int WINAPI Ars548_StopRecord (HINSTANCE hInst)
 

Variables

const int ARS548_OK = 0
 Success.
 
const int ARS548_ERROR_STATE = 40001
 Status errors, e.g. duplicate start of receiving.
 
const int ARS548_ERROR_RESOURCE_CREATION = 40002
 Failed to create resources, e.g. failed to create threads.
 
const int ARS548_ERROR_NETWORK_INIT_FAILED = 40003
 Network initialization failed.
 
const int ARS548_ERROR_NETWORK_BIND_FAILED = 40004
 Failed to bind address or port.
 
const int ARS548_ERROR_NETWORK_MULTICAST_INIT_FAILED = 40005
 Multicast initialization failed.
 
const int ARS548_ERROR_NETWORK_INVALID_MULTICAST_IP = 40006
 Invalid multicast IP.
 
const int ARS548_ERROR_NOT_IMPLEMENTED = 40007
 This feature is not yet implemented.
 
const int ARS548_ERROR_SEND_FAILED = 40008
 Send failed.
 
const int ARS548_ERROR_FILE_NOT_EXIST = 40009
 The file or directory does not exist.
 
const int ARS548_ERROR_FILE_READ_FAILED = 40010
 Failed to read file.
 
const int ARS548_ERROR_DIRECTORY_CREATION_FAILED = 40011
 Failed to create directory.
 
const int ARS548_ERROR_FILE_CREATION_FAILED = 40012
 Failed to create file.
 
const int ARS548_ERROR_FILE_WRITE_FAILED = 40013
 Failed to write file.
 
const int ARS548_ERROR_RECORD_ALREADY_LOAD = 40014
 The record has already been loaded.
 

Detailed Description

ARS548 radar communication SDK.

Author
Jun jun.c.nosp@m.hen@.nosp@m.adas-.nosp@m.engi.nosp@m.neeri.nosp@m.ng.d.nosp@m.e
Version
1.0

Function Documentation

◆ Ars548_FreeRecord()

ARS548DLL_API void WINAPI Ars548_FreeRecord ( HINSTANCE  hRecordInst)

Free the memory of the record. After calling this, the pointers and arrays obtained through this record will become invalid and cannot be used anymore.

Parameters
hRecordInstRecord instance ID returned by Ars548_LoadRecord.
See also
Ars548_LoadRecord

◆ Ars548_GetMsgRecords()

ARS548DLL_API int WINAPI Ars548_GetMsgRecords ( HINSTANCE  hRecordInst,
const Ars548MsgRecord **  pMsgRecords,
UINT32 *  pMsgRecordCount 
)

Get all raw radar messages from the record.

Parameters
hRecordInstRecord instance ID returned by Ars548_LoadRecord.
pMsgRecordsA pointer to store the array of Ars548MsgRecord.
pMsgRecordCountA pointer to store the number of Ars548MsgRecord.
See also
Ars548_LoadRecord
Returns
Returns ARS548_OK for success, other values for failure, refer to the error code table.

◆ Ars548_GetRecordingFileName()

ARS548DLL_API int WINAPI Ars548_GetRecordingFileName ( HINSTANCE  hInst,
char **  pszFileName 
)

Get the filename of the recording in progress.

Parameters
hInstInstance ID returned by Ars548_Init.
pszFileNameA pointer to store the recording filename. If currently in recording state, pszFileName points to the returned recording filename. If not currently in recording state, the pointer pointed to by pszFileName will be NULL.
Returns
Returns ARS548_OK for success, other values for failure, refer to the error code table.

◆ Ars548_GetTargetRecords()

ARS548DLL_API int WINAPI Ars548_GetTargetRecords ( HINSTANCE  hRecordInst,
const Ars548TargetRecord **  pTargetRecords,
UINT32 *  pTargetRecordCount 
)

Get all Ars548TargetRecord arrays from the record.

Parameters
hRecordInstRecord instance ID returned by Ars548_LoadRecord.
pTargetRecordsA pointer to store the array of Ars548TargetRecord.
pTargetRecordCountA pointer to store the number of Ars548TargetRecord.
See also
Ars548_LoadRecord
Returns
Returns ARS548_OK for success, other values for failure, refer to the error code table.

◆ Ars548_Init()

ARS548DLL_API HINSTANCE WINAPI Ars548_Init ( )

Initialization

Returns
Returns an instance ID which should be passed as the first parameter in subsequent calls to other SDK functions.
See also
Ars548_UnInit

◆ Ars548_LoadRecord()

ARS548DLL_API int WINAPI Ars548_LoadRecord ( HINSTANCE *  pRecordInst,
const char *  lpszFileOrDirectory 
)

Load a record file or directory created by RT-Viewer.

Parameters
pRecordInstRecord instance ID returned after loading the record, which is used as a parameter in subsequent record-related function calls and eventually released through Ars548_FreeRecord.
lpszFileOrDirectorya record file (.rec) or directory.
Returns
Returns ARS548_OK for success, other values for failure, refer to the error code table.

◆ Ars548_ResetFilterConfig()

ARS548DLL_API int WINAPI Ars548_ResetFilterConfig ( HINSTANCE  hInst)

Reset radar filter configuration I.e. clear and disable all filters

Parameters
hInstInstance ID
Returns
Returns ARS548_OK for success, other values for failure, refer to the error code table.

◆ Ars548_SendVehicleDynamicParams()

ARS548DLL_API int WINAPI Ars548_SendVehicleDynamicParams ( HINSTANCE  hInst,
const VehicleDynamicParams pParam 
)

Send vehicle dynamic parameters to radar

Parameters
hInstInstance ID
pParamPointer to vehicle dynamic parameters.
Returns
Returns ARS548_OK for success, other values for failure, refer to the error code table.

◆ Ars548_SetFilterConfig()

ARS548DLL_API int WINAPI Ars548_SetFilterConfig ( HINSTANCE  hInst,
const Ars548FilterConfiguration pConfig 
)

Set radar filter configuration

Parameters
hInstInstance ID
pConfigPointer to filter configuration
Returns
Returns ARS548_OK for success, other values for failure, refer to the error code table.

◆ Ars548_SetRadarMessageCallback()

ARS548DLL_API void WINAPI Ars548_SetRadarMessageCallback ( HINSTANCE  hInst,
const RadarMessageCallback  pCallback 
)

Set callback function for raw radar message data

Parameters
hInstInstance ID
pCallbackPointer to callback function

◆ Ars548_SetSensorConfig()

ARS548DLL_API int WINAPI Ars548_SetSensorConfig ( HINSTANCE  hInst,
const Ars548SensorConfiguration pConfig 
)

Set radar sensor configuration

Parameters
hInstInstance ID
pConfigPointer to sensor configuration
Returns
Returns ARS548_OK for success, other values for failure, refer to the error code table.

◆ Ars548_SetTargetListCallback()

ARS548DLL_API void WINAPI Ars548_SetTargetListCallback ( HINSTANCE  hInst,
const TargetListCallback  pCallback 
)

Set callback function for radar target info

Parameters
hInstInstance ID
pCallbackPointer to callback function

◆ Ars548_StartReceive()

ARS548DLL_API int WINAPI Ars548_StartReceive ( HINSTANCE  hInst,
const char *  lpszBindIP,
const char *  lpszRadarIP 
)

Start receiving radar data

Parameters
hInstInstance ID
lpszBindIPNetwork interface IP connected to radar
lpszRadarIPRadar IP
Returns
Returns ARS548_OK for success, other values for failure, refer to the error code table.
See also
Ars548_StopReceive

◆ Ars548_StartRecord()

ARS548DLL_API int WINAPI Ars548_StartRecord ( HINSTANCE  hInst)

Start recording. The recorded file will be saved in the "records" subdirectory of the current working directory, following the naming convention of RT-Viewer for recording files (e.g., records/2024-03-12_07.38.54/2024-03-12_07.38.54.ars540.rec). After this function is successfully called, the recording filename being written to can be obtained by calling Ars548_GetRecordingFileName. Note: If no actual data is written, the created file and directory will be deleted when Ars548_StopRecord is called.

Parameters
hInstInstance ID returned by Ars548_Init.
Returns
Returns ARS548_OK for success, other values for failure, refer to the error code table.

◆ Ars548_StopReceive()

ARS548DLL_API int WINAPI Ars548_StopReceive ( HINSTANCE  hInst)

Stop receiving radar data

Parameters
hInstInstance ID
Returns
Returns ARS548_OK for success, other values for failure, refer to the error code table.
See also
Ars548_StartReceive

◆ Ars548_StopRecord()

ARS548DLL_API int WINAPI Ars548_StopRecord ( HINSTANCE  hInst)

Stop recording.

Parameters
hInstInstance ID returned by Ars548_Init.
Returns
Returns ARS548_OK for success, other values for failure, refer to the error code table.

◆ Ars548_UnInit()

ARS548DLL_API void WINAPI Ars548_UnInit ( HINSTANCE  hInst)

Deinitialization

Parameters
hInstInstance ID returned by Ars548_Init.
See also
Ars548_Init