CCAux  2.20.0.0
CCAux API reference
Functions
CanSetting functions

Functions

EXTERN_C CCAUXDLL_API CANSETTINGHANDLE CCAUXDLL_CALLING_CONV GetCanSetting (void)
 
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV CanSetting_release (CANSETTINGHANDLE)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CanSetting_getBaudrate (CANSETTINGHANDLE, uint8_t net, uint16_t *baudrate)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CanSetting_getFrameType (CANSETTINGHANDLE, uint8_t net, CanFrameType *frameType)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CanSetting_setBaudrate (CANSETTINGHANDLE, uint8_t net, uint16_t baudrate)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CanSetting_setFrameType (CANSETTINGHANDLE, uint8_t net, CanFrameType frameType)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CanSetting_getFlexibleDataBaudrates (CANSETTINGHANDLE, uint8_t net, uint16_t *baudrateNominal, uint16_t *baudrateData)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CanSetting_setFlexibleDataBaudrates (CANSETTINGHANDLE, uint8_t net, uint16_t baudrateNominal, uint16_t baudrateData)
 

Detailed Description

Functions in the CanSetting class

Function Documentation

◆ CanSetting_getBaudrate()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::CanSetting_getBaudrate ( CANSETTINGHANDLE  ,
uint8_t  net,
uint16_t baudrate 
)

Get Baud rate

Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, VI2, V700, Yukon, V510, V710, V1000, V1200, X1200

Parameters
netCAN net (1-4) to get settings for.
baudrateCAN baud rate (kbit/s).
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

Example Usage:

err = CanSetting_getBaudrate(pCanSetting, net, &baudrates[net - 1]);
if (err != ERR_SUCCESS)
{
cout << "Error(" << err << ") in function getBaudrate: " << GetErrorStringA(err) << endl;
break;
}
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CanSetting_getBaudrate(CANSETTINGHANDLE, uint8_t net, uint16_t *baudrate)
EXTERN_C CCAUXDLL_API char_t const *CCAUXDLL_CALLING_CONV GetErrorStringA(eErr errCode)
@ ERR_SUCCESS
Definition: CCAuxTypes.h:163

◆ CanSetting_getFlexibleDataBaudrates()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::CanSetting_getFlexibleDataBaudrates ( CANSETTINGHANDLE  ,
uint8_t  net,
uint16_t baudrateNominal,
uint16_t baudrateData 
)

Get FD Baudrates

Supported Platform(s): XL5, XM9, X1200

Parameters
netCAN net (1-4) to get settings for.
baudrateNominalCAN baudrateNominal selection (kbit/s).
baudrateDataCAN baudrateData selection (kbit/s). If the returned baudrates are ZERO then settings are such that FD-FLEXIBLE_DATA is not active a CLASSIC baudrate is active and the API CanSetting_getBaudrate() should be used.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

Example Usage:

◆ CanSetting_getFrameType()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::CanSetting_getFrameType ( CANSETTINGHANDLE  ,
uint8_t  net,
CanFrameType frameType 
)

Get frame type

Supported Platform(s): XL, XL5, XM, XM9

Parameters
netCAN net (1-4) to get settings for.
frameTypeCAN frame type
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

Example Usage:

◆ CanSetting_release()

EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV CrossControl::CanSetting_release ( CANSETTINGHANDLE  )

Delete the CanSetting object.

Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, VI2, V700, Yukon, V510, V710, V1000, V1200, X1200

Returns
-

Example Usage:

assert(pCanSetting);
read_cansettings(pCanSetting);
CanSetting_release(pCanSetting);
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV CanSetting_release(CANSETTINGHANDLE)
EXTERN_C CCAUXDLL_API CANSETTINGHANDLE CCAUXDLL_CALLING_CONV GetCanSetting(void)
void * CANSETTINGHANDLE
Definition: CanSetting.h:32

◆ CanSetting_setBaudrate()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::CanSetting_setBaudrate ( CANSETTINGHANDLE  ,
uint8_t  net,
uint16_t  baudrate 
)

Set Baud rate. The changes will take effect after a restart (Windows). The changes will be reset after a restart (Linux)

Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, VI2, V700, Yukon, V510, V710, V1000, V1200, X1200

Parameters
netCAN net (1-4).
baudrateCAN baud rate (kbit/s). The driver will calculate the best supported baud rate if it does not support the given baud rate. The maximum baud rate is 1000 kbit/s.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

◆ CanSetting_setFlexibleDataBaudrates()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::CanSetting_setFlexibleDataBaudrates ( CANSETTINGHANDLE  ,
uint8_t  net,
uint16_t  baudrateNominal,
uint16_t  baudrateData 
)

Set FD Baudrates.

Supported Platform(s): XL5, XM9, X1200

Parameters
netCAN net (1-4).
baudrateNominalCAN baudrateNominal selection (kbit/s).
baudrateDataCAN baudrateData selection (kbit/s).
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

Example Usage:

◆ CanSetting_setFrameType()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::CanSetting_setFrameType ( CANSETTINGHANDLE  ,
uint8_t  net,
CanFrameType  frameType 
)

Set frame type. The changes will take effect after a restart.

Supported Platform(s): XL, XL5, XM, XM9

Parameters
netCAN net (1-4).
frameTypeCAN frameType
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

◆ GetCanSetting()

EXTERN_C CCAUXDLL_API CANSETTINGHANDLE CCAUXDLL_CALLING_CONV CrossControl::GetCanSetting ( void  )

Factory function that creates instances of the CanSetting object.

Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, VI2, V700, Yukon, V510, V710, V1000, V1200, X1200

Returns
CANSETTINGHANDLE to an allocated CanSetting object. The returned handle needs to be deallocated using the CanSetting_release(CANSETTINGHANDLE) method when it's no longer needed. Returns NULL if it fails to allocate memory.

Example Usage:

assert(pCanSetting);
read_cansettings(pCanSetting);
CanSetting_release(pCanSetting);