File syn_xcp.c¶
Go to the source code of this file
ASAM Universal Measurement and Calibration Protocol v1.x (XCP) Slave Implementation.
#include "syn_xcp.h"#include "../util/syn_pack.h"#include <string.h>
Public Functions¶
| Type | Name |
|---|---|
| bool | syn_xcp_init (SYN_XCP_Slave * slave, uint16_t station_id) Initialize XCP slave instance context. |
| bool | syn_xcp_process_cto (SYN_XCP_Slave * slave, const uint8_t cto, uint8_t dto_out) Process incoming XCP CTO command packet and prepare response. |
| bool | syn_xcp_service_daq (SYN_XCP_Slave * slave, uint8_t event_channel, uint8_t dto_out, uint8_t * list_idx, uint8_t * odt_idx) Service periodic XCP DAQ sampling event channel tick. |
| bool | syn_xcp_set_mta (SYN_XCP_Slave * slave, uint8_t ext, uintptr_t addr) Set XCP Memory Transfer Address (MTA). |
Public Functions Documentation¶
function syn_xcp_init¶
Initialize XCP slave instance context.
Parameters:
slavePointer to XCP slave structure.station_idXCP slave node/station ID.
Returns:
true on success, false if slave is NULL.
function syn_xcp_process_cto¶
Process incoming XCP CTO command packet and prepare response.
Parameters:
slavePointer to XCP slave structure.cto8-byte input CTO CAN frame buffer.dto_out8-byte output response DTO/CRM frame buffer.
Returns:
true if response frame populated, false on invalid parameters.
function syn_xcp_service_daq¶
Service periodic XCP DAQ sampling event channel tick.
bool syn_xcp_service_daq (
SYN_XCP_Slave * slave,
uint8_t event_channel,
uint8_t dto_out,
uint8_t * list_idx,
uint8_t * odt_idx
)
Parameters:
slavePointer to XCP slave structure.event_channelEvent channel index triggered.dto_out8-byte output CAN telemetry buffer.list_idxIn/Out pointer to DAQ list state iterator.odt_idxIn/Out pointer to ODT state iterator.
Returns:
true if a DAQ DTO packet was generated, false if no packet pending.
function syn_xcp_set_mta¶
Set XCP Memory Transfer Address (MTA).
Parameters:
slavePointer to XCP slave structure.extAddress extension byte.addr32-bit/64-bit target memory pointer.
Returns:
true on success, false if slave is NULL.
The documentation for this class was generated from the following file src/syntropic/proto/syn_xcp.c