EDGEAI API

Data Structures | Macros | Enumerations | Functions
DAP_core.h File Reference
`#include <stdint.h>`
`#include <stdbool.h>`
`#include <string.h>`
`#include <ti/ai/edge_ai/dap/DAP.h>`
Include dependency graph for DAP_core.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | DAP_Frame
struct | DAP_Property
| Data Types for the inferences and properties. More...
struct | DAP_Inference

## Macros
#define | DAP_MAX_FRAME_SIZE_BYTES (200)

## Enumerations
enum | DAP_ErrorType { DAP_ERROR_TYPE_NONE = 0x00, DAP_ERROR_TYPE_MISMATCH_START_BYTE = 0xE1, DAP_ERROR_TYPE_MISMATCH_END_BYTE = 0xE2, DAP_ERROR_TYPE_ADDR_RANGE = 0xE3, DAP_ERROR_TYPE_MISMATCH_CRC = 0xE4, DAP_ERROR_TYPE_MISMATCH_TARGET_ADDR = 0xE5 }
| DAP error types. More...
enum | DAP_CommandType { DAP_ERROR_COMMAND = 0x00, DAP_GET_CAPABILITIES_COMMAND = 0x01, DAP_LIST_SENSORS_COMMAND = 0x02, DAP_CONFIGURE_PIPELINE_COMMAND = 0x03, DAP_LIST_MODELS_COMMAND = 0x04, DAP_REMOVE_MODEL_COMMAND = 0x05, DAP_START_MODEL_UPLOAD_COMMAND = 0x06, DAP_END_MODEL_UPLOAD_COMMAND = 0x07, DAP_START_STREAMING_COMMAND = 0x08, DAP_STOP_STREAMING_COMMAND = 0x09, DAP_LIST_INFERENCING_VALUES_COMMAND = 0x0a, DAP_READ_PROPERTY_COMMAND = 0x0c, DAP_WRITE_PROPERTY_COMMAND = 0x0d, DAP_LIST_PROPERTIES_COMMAND = 0x0e, DAP_SEND_DATA_COMMAND = 0x10, DAP_RECEIVE_DATA_COMMAND = 0x10 }
| DAP command types. More...
enum | DAP_CommandPayloadFixedLength { DAP_GET_CAPABILITIES_CMD_FIXED_LENGHT = 0, DAP_LIST_SENSORS_FIXED_CMD_LENGHT = 0, DAP_CONFIGURE_PIPELINE_CMD_FIXED_LENGHT = 2, DAP_LIST_MODELS_CMD_FIXED_LENGHT = 0, DAP_REMOVE_MODEL_CMD_FIXED_LENGTH = 1, DAP_START_MODEL_UPLOAD_CMD_FIXED_LENGTH = 0, DAP_END_MODEL_UPLOAD_CMD_FIXED_LENGTH = 4, DAP_START_STREAMING_CMD_FIXED_LENGHT = 0, DAP_STOP_STREAMING_CMD_FIXED_LENGHT = 0, DAP_LIST_INFERENCING_VALUES_CMD_FIXED_LENGTH = 0, DAP_READ_PROPERTY_CMD_FIXED_LENGHT = 1, DAP_WRITE_PROPERTY_CMD_FIXED_LENGHT = 1, DAP_LIST_PROPERTIES_CMD_FIXED_LENGHT = 0, DAP_DATA_CMD_FIXED_LENGTH = 0 }
| Minimum payload length of commands sent from the host to the target. More...
enum | DAP_ResponsePayloadFixedLength { DAP_ERROR_FIXED_LENGHT = 2, DAP_GET_CAPABILITIES_FIXED_LENGHT = 4, DAP_LIST_SENSORS_FIXED_LENGHT = 2, DAP_CONFIGURE_PIPELINE_FIXED_LENGHT = 0, DAP_LIST_MODELS_FIXED_LENGHT = 2, DAP_REMOVE_MODEL_FIXED_LENGTH = 0, DAP_START_MODEL_UPLOAD_FIXED_LENGTH = 0, DAP_END_MODEL_UPLOAD_FIXED_LENGTH = 0, DAP_START_STREAMING_FIXED_LENGHT = 0, DAP_STOP_STREAMING_FIXED_LENGHT = 0, DAP_LIST_INFERENCING_VALUES_FIXED_LENGTH = 3, DAP_READ_PROPERTY_FIXED_LENGHT = 1, DAP_WRITE_PROPERTY_FIXED_LENGHT = 1, DAP_LIST_PROPERTIES_FIXED_LENGHT = 3, DAP_DATA_FIXED_LENGTH = 0 }
| Minimum payload length of commands sent from the target to the host. More...
enum | DAP_DataTypes { DAP_DATA_TYPE_INT8 = 0x01, DAP_DATA_TYPE_INT16 = 0x02, DAP_DATA_TYPE_INT32 = 0x03, DAP_DATA_TYPE_UINT8 = 0x04, DAP_DATA_TYPE_UINT16 = 0x05, DAP_DATA_TYPE_UINT32 = 0x06, DAP_DATA_TYPE_FLOAT16 = 0x07, DAP_DATA_TYPE_FLOAT32 = 0x08, DAP_DATA_TYPE_FLOAT64 = 0x09 }
| Data Types for the inferences and properties. More...

## Functions
DAP_ErrorType | DAP_verifyFrame (DAP_Frame *frame)
| Verify a frame. More...
void | DAP_serviceCommand (DAP_Handle *dapHandle, DAP_Frame *commandFrame)
| Service a command sent by the host. More...
void | DAP_sendError (DAP_Handle *dapHandle, DAP_CommandType command, const char errorMessage[])
| Send error to host. More...
void | DAP_receiveDataCommand (DAP_Handle *dapHandle, DAP_SendDataType sendDataType, void *data, size_t dataSize)
| Send data to host. More...

## Macro Definition Documentation

## § DAP_MAX_FRAME_SIZE_BYTES

#define DAP_MAX_FRAME_SIZE_BYTES (200)

## Enumeration Type Documentation

## § DAP_ErrorType

enum DAP_ErrorType

DAP error types.

Enumerator
DAP_ERROR_TYPE_NONE | No error
DAP_ERROR_TYPE_MISMATCH_START_BYTE | Mismatch Start byte error
DAP_ERROR_TYPE_MISMATCH_END_BYTE | Mismatch end byte error
DAP_ERROR_TYPE_ADDR_RANGE | Error in Address range
DAP_ERROR_TYPE_MISMATCH_CRC | Mismatch CRC error
DAP_ERROR_TYPE_MISMATCH_TARGET_ADDR | Mismatch target address error

## § DAP_CommandType

enum DAP_CommandType

DAP command types.

This enum defines the commands that can be sent between the host and the target.

Enumerator
DAP_ERROR_COMMAND | Sent from target to host to indicate there has been an error.
DAP_GET_CAPABILITIES_COMMAND | Get software capabilities and metadata.
DAP_LIST_SENSORS_COMMAND | List all available sensors.
DAP_CONFIGURE_PIPELINE_COMMAND | Configure the application.
DAP_LIST_MODELS_COMMAND | List all available models.
DAP_REMOVE_MODEL_COMMAND | Remove one of the models.
DAP_START_MODEL_UPLOAD_COMMAND | Signal the target that the host will start sending data.
DAP_END_MODEL_UPLOAD_COMMAND | Signal the target that the host is done sending data.
DAP_START_STREAMING_COMMAND | Signal the target to start sending data to the host.
DAP_STOP_STREAMING_COMMAND | Signal the target to stop sending data to the host.
DAP_LIST_INFERENCING_VALUES_COMMAND | List all inference values.
DAP_READ_PROPERTY_COMMAND | Read a sampling property.
DAP_WRITE_PROPERTY_COMMAND | Write to a sampling property,
DAP_LIST_PROPERTIES_COMMAND | List all sampling properties.
DAP_SEND_DATA_COMMAND | Data comming from the host to the target (model upload).
DAP_RECEIVE_DATA_COMMAND | Data comming from the target to the host (streaming).

## § DAP_CommandPayloadFixedLength

enum DAP_CommandPayloadFixedLength

Minimum payload length of commands sent from the host to the target.

Enumerator
DAP_GET_CAPABILITIES_CMD_FIXED_LENGHT | No fixed payload
DAP_LIST_SENSORS_FIXED_CMD_LENGHT | No fixed payload
DAP_CONFIGURE_PIPELINE_CMD_FIXED_LENGHT | Mode, Model Index
DAP_LIST_MODELS_CMD_FIXED_LENGHT | No fixed payload
DAP_REMOVE_MODEL_CMD_FIXED_LENGTH | Model Index
DAP_START_MODEL_UPLOAD_CMD_FIXED_LENGTH | No fixed payload
DAP_END_MODEL_UPLOAD_CMD_FIXED_LENGTH | Checksum
DAP_START_STREAMING_CMD_FIXED_LENGHT | No fixed payload
DAP_STOP_STREAMING_CMD_FIXED_LENGHT | No fixed payload
DAP_LIST_INFERENCING_VALUES_CMD_FIXED_LENGTH | No fixed payload
DAP_READ_PROPERTY_CMD_FIXED_LENGHT | Property Index
DAP_WRITE_PROPERTY_CMD_FIXED_LENGHT | Property Index
DAP_LIST_PROPERTIES_CMD_FIXED_LENGHT | No fixed payload
DAP_DATA_CMD_FIXED_LENGTH | No fixed payload

## § DAP_ResponsePayloadFixedLength

enum DAP_ResponsePayloadFixedLength

Minimum payload length of commands sent from the target to the host.

Enumerator
DAP_ERROR_FIXED_LENGHT | Command, Error Number
DAP_GET_CAPABILITIES_FIXED_LENGHT | API Versio, Capability Flag, SDK Major Version, SDK Minor Version
DAP_LIST_SENSORS_FIXED_LENGHT | Sensor Count, Sensor Index
DAP_CONFIGURE_PIPELINE_FIXED_LENGHT | No fixed payload
DAP_LIST_MODELS_FIXED_LENGHT | Model Count, Model Index
DAP_REMOVE_MODEL_FIXED_LENGTH | No fixed payload
DAP_START_MODEL_UPLOAD_FIXED_LENGTH | No fixed payload
DAP_END_MODEL_UPLOAD_FIXED_LENGTH | No fixed payload
DAP_START_STREAMING_FIXED_LENGHT | No fixed payload
DAP_STOP_STREAMING_FIXED_LENGHT | No fixed payload
DAP_LIST_INFERENCING_VALUES_FIXED_LENGTH | Inference Count, Inference Index, Inference Data Format
DAP_READ_PROPERTY_FIXED_LENGHT | Property Index
DAP_WRITE_PROPERTY_FIXED_LENGHT | Property Index
DAP_LIST_PROPERTIES_FIXED_LENGHT | Property Count, Property Index, Property Data Format
DAP_DATA_FIXED_LENGTH | No fixed payload

## § DAP_DataTypes

enum DAP_DataTypes

Data Types for the inferences and properties.

Enumerator
DAP_DATA_TYPE_INT8 | 8-bit signed integer
DAP_DATA_TYPE_INT16 | 16-bit signed integer
DAP_DATA_TYPE_INT32 | 32-bit signed integer
DAP_DATA_TYPE_UINT8 | 8-bit unsigned integer
DAP_DATA_TYPE_UINT16 | 16-bit unsigned integer
DAP_DATA_TYPE_UINT32 | 32-bit unsigned integer
DAP_DATA_TYPE_FLOAT16 | 16-bit half precision floating point value
DAP_DATA_TYPE_FLOAT32 | 32-bit normal precision floating point value
DAP_DATA_TYPE_FLOAT64 | 64-bit double precision floating point value

## Function Documentation

## § DAP_verifyFrame()

DAP_ErrorType DAP_verifyFrame | ( | DAP_Frame * | frame | ) |

Verify a frame.

This function verify if a frame is well constructed

Parameters

  [in] | frame | pointer to a frame

Returns
  Returns if there is an error in the frame.

## § DAP_serviceCommand()

void DAP_serviceCommand | ( | DAP_Handle * | dapHandle,
|  | DAP_Frame * | commandFrame
| ) |  |

Service a command sent by the host.

This function decodes the command sent by the host and generates a response packet based on the command received.

Parameters

  [in] | dapHandle | pointer
  [in] | commandFrame | pointer to the received packet.

## § DAP_sendError()

void DAP_sendError | ( | DAP_Handle * | dapHandle,
|  | DAP_CommandType | command,
|  | const char | errorMessage[]
| ) |  |

Send error to host.

This function sends an error packet to the host. Errors can be synchronous, in response to a command, or asynchronous, errors that are not sent in response to any specific command, such as, errors during streaming operations.

Parameters

  [in] | dapHandle | pointer
  [in] | command | error type
  [in] | errorMessage | string with the error message

## § DAP_receiveDataCommand()

void DAP_receiveDataCommand | ( | DAP_Handle * | dapHandle,
|  | DAP_SendDataType | sendDataType,
|  | void * | data,
|  | size_t | dataSize
| ) |  |

Send data to host.

This function sends a buffer of data to the DAP

Parameters

  [in] | dapHandle | pointer
  [in] | sendDataType | Type of the data sent
  [in] | data | pointer to a buffer with the data
  [in] | dataSize | size of the data buffer in bytes

© Copyright 1995-2026, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale