AGHAF  4.5.5
Annecy electronique Generic Hardware Access Framework
DoKLine

API to use DoKLine on exxotest devices. More...

typedef void * AGHAF_DoKLine_Channel
 handle on a DoKLine channel
 
typedef void(* AGHAF_DoKLine_onMsgTx) (uint64_t timestamp, uint8_t flags, uint32_t headerSize, uint8_t const *header, uint32_t footerSize, uint8_t const *footer, uint32_t dataLen, uint8_t const *data, void *userContext)
 callback called when a frame is transmitted on a DoKLine channel More...
 
typedef void(* AGHAF_DoKLine_onMsgRx) (uint64_t timestamp, uint8_t flags, uint32_t headerSize, uint8_t const *header, uint32_t footerSize, uint8_t const *footer, uint32_t dataLen, uint8_t const *data, void *userContext)
 callback called when a frame is received on a DoKLine channel More...
 
typedef void(* AGHAF_DoKLine_onMsgTxErr) (uint64_t timestamp, AGHAF_DoKLine_Error error, void *userContext)
 callback called when a transmission errors happens on a DoKLine channel More...
 
void AGHAF_DoKLine_setOnMsgTxCallback (AGHAF_DoKLine_Channel channel, AGHAF_DoKLine_onMsgTx callback, void *userContext)
 set the callback on a transmission event More...
 
void AGHAF_DoKLine_setOnMsgRxCallback (AGHAF_DoKLine_Channel channel, AGHAF_DoKLine_onMsgRx callback, void *userContext)
 set the callback on a reception event More...
 
void AGHAF_DoKLine_setOnMsgTxErrCallback (AGHAF_DoKLine_Channel channel, AGHAF_DoKLine_onMsgTxErr callback, void *userContext)
 set the callback a transmission error event More...
 
AGHAF_Status AGHAF_DoKLine_getChannelCount (AGHAF_KLine kline, uint8_t *count)
 Provide the number of channels available on the bus. More...
 
AGHAF_Status AGHAF_DoKLine_getFreeChannelCount (AGHAF_KLine kline, uint8_t *count)
 Return the number of free channels still available. More...
 
AGHAF_DoKLine_Channel AGHAF_DoKLine_createChannel (AGHAF_KLine kline)
 Create a channel. More...
 
void AGHAF_DoKLine_releaseChannel (AGHAF_DoKLine_Channel channel)
 Release the channel. More...
 
AGHAF_DoKLine_Channel AGHAF_DoKLine_getChannelByIndex (AGHAF_KLine kline, uint8_t index)
 return the index corrsponding to the index in parameter (nullptr if the index is not found) More...
 
uint8_t AGHAF_DoKLine_Channel_getIndex (AGHAF_DoKLine_Channel channel)
 Return the intern index from the channel. More...
 
AGHAF_Status AGHAF_DoKLine_Channel_setParam (AGHAF_DoKLine_Channel channel, AGHAF_DoKLine_ChannelParam param, uint32_t value)
 Set the parameter from a channel. More...
 
AGHAF_Status AGHAF_DoKLine_Channel_getParam (AGHAF_DoKLine_Channel channel, AGHAF_DoKLine_ChannelParam param, uint32_t *value)
 Provide the value from a channel parameter. More...
 
AGHAF_Status AGHAF_DoKLine_Channel_start (AGHAF_DoKLine_Channel channel)
 Start a channel. More...
 
AGHAF_Status AGHAF_DoKLine_Channel_stop (AGHAF_DoKLine_Channel channel)
 Stop a channel. More...
 
AGHAF_Status AGHAF_DoKLine_Channel_send (AGHAF_DoKLine_Channel channel, uint8_t flags, uint32_t dataLen, uint8_t const *data)
 Send on the DoKLine channel in parameter. More...
 

Detailed Description

API to use DoKLine on exxotest devices.

Usage Example

Call order and priority

below, the description of channel state management:


Symbol Description
Forbidden
Authorized
Next state


Function Stop Start
AGHAF_DoKLine_Channel_setParam
AGHAF_DoKLine_Channel_getParam
AGHAF_DoKLine_Channel_start
AGHAF_DoKLine_Channel_stop
AGHAF_DoKLine_Channel_send

Typedef Documentation

◆ AGHAF_DoKLine_onMsgRx

typedef void(* AGHAF_DoKLine_onMsgRx) (uint64_t timestamp, uint8_t flags, uint32_t headerSize, uint8_t const *header, uint32_t footerSize, uint8_t const *footer, uint32_t dataLen, uint8_t const *data, void *userContext)

callback called when a frame is received on a DoKLine channel

Parameters
timestamptimestamp of the event
flagscorresponding to AGHAF_DoKLine_MSG_FLAGS
headerSizeheader size
headerheader data
footerSizefooter size
footerfooter data
dataLensize of the datas received
datadatas received
userContextcontext given when setting the callback in the system

◆ AGHAF_DoKLine_onMsgTx

typedef void(* AGHAF_DoKLine_onMsgTx) (uint64_t timestamp, uint8_t flags, uint32_t headerSize, uint8_t const *header, uint32_t footerSize, uint8_t const *footer, uint32_t dataLen, uint8_t const *data, void *userContext)

callback called when a frame is transmitted on a DoKLine channel

Parameters
timestamptimestamp of the event
flagscorresponding to AGHAF_DoKLine_MSG_FLAGS
headerSizeheader size
headerheader data
footerSizefooter size
footerfooter data
dataLensize of the datas transmitted
datadatas transmitted
userContextcontext given when setting the callback in the system

◆ AGHAF_DoKLine_onMsgTxErr

typedef void(* AGHAF_DoKLine_onMsgTxErr) (uint64_t timestamp, AGHAF_DoKLine_Error error, void *userContext)

callback called when a transmission errors happens on a DoKLine channel

Parameters
timestamptimestamp of the event
errorvalue of the error
userContextcontext given when setting the callback in the system

Function Documentation

◆ AGHAF_DoKLine_Channel_getIndex()

uint8_t AGHAF_DoKLine_Channel_getIndex ( AGHAF_DoKLine_Channel  channel)

Return the intern index from the channel.

Parameters
channel
Returns
index from the channel

◆ AGHAF_DoKLine_Channel_getParam()

AGHAF_Status AGHAF_DoKLine_Channel_getParam ( AGHAF_DoKLine_Channel  channel,
AGHAF_DoKLine_ChannelParam  param,
uint32_t *  value 
)

Provide the value from a channel parameter.

Parameters
channelhandle on the channel
paramparameter to get
valuevalue to get
Returns
status request information

◆ AGHAF_DoKLine_Channel_send()

AGHAF_Status AGHAF_DoKLine_Channel_send ( AGHAF_DoKLine_Channel  channel,
uint8_t  flags,
uint32_t  dataLen,
uint8_t const *  data 
)

Send on the DoKLine channel in parameter.

Parameters
channelhandle on the channel
flagsAGHAF_DoKLine_MSG_FLAGS
dataLenlength from the datas
datapointer on data
Returns
status request information
Examples
DoKLine/main.cpp.

◆ AGHAF_DoKLine_Channel_setParam()

AGHAF_Status AGHAF_DoKLine_Channel_setParam ( AGHAF_DoKLine_Channel  channel,
AGHAF_DoKLine_ChannelParam  param,
uint32_t  value 
)

Set the parameter from a channel.

Parameters
channelhandle on the channel
paramparameter to set
valuevalue to set
Returns
status request information
Examples
DoKLine/main.cpp.

◆ AGHAF_DoKLine_Channel_start()

AGHAF_Status AGHAF_DoKLine_Channel_start ( AGHAF_DoKLine_Channel  channel)

Start a channel.

Parameters
channelhandle on the channel
Returns
status request information
Examples
DoKLine/main.cpp.

◆ AGHAF_DoKLine_Channel_stop()

AGHAF_Status AGHAF_DoKLine_Channel_stop ( AGHAF_DoKLine_Channel  channel)

Stop a channel.

Parameters
channelhandle on the channel
Returns
status request information
Examples
DoKLine/main.cpp.

◆ AGHAF_DoKLine_createChannel()

AGHAF_DoKLine_Channel AGHAF_DoKLine_createChannel ( AGHAF_KLine  kline)

Create a channel.

Parameters
klinehandle on the bus
Returns
handle on the channel created
Examples
DoKLine/main.cpp.

◆ AGHAF_DoKLine_getChannelByIndex()

AGHAF_DoKLine_Channel AGHAF_DoKLine_getChannelByIndex ( AGHAF_KLine  kline,
uint8_t  index 
)

return the index corrsponding to the index in parameter (nullptr if the index is not found)

Parameters
klinebus on which is the channel
indexindex from the channel
Returns
handle on a channel

◆ AGHAF_DoKLine_getChannelCount()

AGHAF_Status AGHAF_DoKLine_getChannelCount ( AGHAF_KLine  kline,
uint8_t *  count 
)

Provide the number of channels available on the bus.

Parameters
klinehandle on the bus
countpointer to fill with the data
Returns
status request information

◆ AGHAF_DoKLine_getFreeChannelCount()

AGHAF_Status AGHAF_DoKLine_getFreeChannelCount ( AGHAF_KLine  kline,
uint8_t *  count 
)

Return the number of free channels still available.

Parameters
klinehandle on the bus
countnumber of free channels still available
Returns
status request information

◆ AGHAF_DoKLine_releaseChannel()

void AGHAF_DoKLine_releaseChannel ( AGHAF_DoKLine_Channel  channel)

Release the channel.

Parameters
channelhandle on the channel to release
Returns
status request information
Examples
DoKLine/main.cpp.

◆ AGHAF_DoKLine_setOnMsgRxCallback()

void AGHAF_DoKLine_setOnMsgRxCallback ( AGHAF_DoKLine_Channel  channel,
AGHAF_DoKLine_onMsgRx  callback,
void *  userContext 
)

set the callback on a reception event

Parameters
channelhandle on a DoKLine channel
callbackcallback to be used for the event
userContextcontext provided by the user for custom datas

◆ AGHAF_DoKLine_setOnMsgTxCallback()

void AGHAF_DoKLine_setOnMsgTxCallback ( AGHAF_DoKLine_Channel  channel,
AGHAF_DoKLine_onMsgTx  callback,
void *  userContext 
)

set the callback on a transmission event

Parameters
channelhandle on a DoKLine channel
callbackcallback to be used for the event
userContextcontext provided by the user for custom datas

◆ AGHAF_DoKLine_setOnMsgTxErrCallback()

void AGHAF_DoKLine_setOnMsgTxErrCallback ( AGHAF_DoKLine_Channel  channel,
AGHAF_DoKLine_onMsgTxErr  callback,
void *  userContext 
)

set the callback a transmission error event

Parameters
channelhandle on a DoKLine channel
callbackcallback to be used for the event
userContextcontext provided by the user for custom datas