AGHAF  4.5.5
Annecy electronique Generic Hardware Access Framework
aghaf_can_enums.h File Reference

Go to the source code of this file.

Macros

AGHAF_CAN_PERIODIC_FLAGS

#define AGHAF_CAN_PERIODIC_NO_RESTART   (1 << 0)
 Don't restart period.
 
AGHAF_CAN_MSG_FLAGS

#define AGHAF_CAN_MSG_BRS    (1 << 3)
 Bit Rate Switch (Only evaluated if FD format is enabled)
 
#define AGHAF_CAN_MSG_ESI    (1 << 4)
 Error State Indicator (Only evaluated if FD format is enabled)
 
#define AGHAF_CAN_MSG_EVENT_DATA    (1 << 5)
 valid data according to dataLen More...
 
#define AGHAF_CAN_MSG_FDF   (1 << 2)
 FD format.
 
#define AGHAF_CAN_MSG_RTR    (1 << 1)
 to ISO11898-1 even if FD format is set) More...
 
#define AGHAF_CAN_MSG_XTD   (1 << 0)
 Extended identifier (29-bit CAN ID)
 

Enumerations

enum  AGHAF_CAN_ChipState { AGHAF_CAN_CHIP_ACTIVE = 0 , AGHAF_CAN_CHIP_PASSIVE = 1 , AGHAF_CAN_CHIP_BUSOFF = 2 }
 Enumeration of the chip states. More...
 
enum  AGHAF_CAN_Error {
  AGHAF_CAN_ERROR_NONE = 0 , AGHAF_CAN_ERROR_STUFF , AGHAF_CAN_ERROR_FORM , AGHAF_CAN_ERROR_ACK ,
  AGHAF_CAN_ERROR_BIT1 , AGHAF_CAN_ERROR_BIT0 , AGHAF_CAN_ERROR_CRC
}
 Enumerator to describe the error on the bus. More...
 
enum  AGHAF_CAN_FILTER_Type { AGHAF_CAN_FILTER_TYPE_CLASSIC , AGHAF_CAN_FILTER_TYPE_SINGLE , AGHAF_CAN_FILTER_TYPE_DUAL , AGHAF_CAN_FILTER_TYPE_RANGE = 3 }
 type of the filter More...
 
enum  AGHAF_CAN_FilterCaps {
  AGHAF_CAN_FLTRCAPS_ID_STD = (1 << 0) , AGHAF_CAN_FLTRCAPS_ID_EXT = (1 << 1) , AGHAF_CAN_FLTRCAPS_MODE_ACCEPT = (1 << 2) , AGHAF_CAN_FLTRCAPS_MODE_REJECT = (1 << 3) ,
  AGHAF_CAN_FLTRCAPS_TYPE_CLASSIC = (1 << 4) , AGHAF_CAN_FLTRCAPS_TYPE_SINGLE = (1 << 5) , AGHAF_CAN_FLTRCAPS_TYPE_DUAL = (1 << 6) , AGHAF_CAN_FLTRCAPS_TYPE_RANGE = (1 << 7)
}
 CAN filtering capabilities flags. More...
 
enum  AGHAF_CAN_FilterId { AGHAF_CAN_FILTER_ID_STD = 0 , AGHAF_CAN_FILTER_ID_XTD = 1 }
 enumerator to choose the identifier type for can filter More...
 
enum  AGHAF_CAN_FilterMode { AGHAF_CAN_FILTER_MODE_ACCEPT = 0 , AGHAF_CAN_FILTER_MODE_REJECT = 1 }
 enumerator to choose the type of the filter: accept or reject More...
 
enum  AGHAF_CAN_GlobalFilterCaps { AGHAF_CAN_GFLTRCAPS_ID = (1 << 0) , AGHAF_CAN_GFLTRCAPS_NMF , AGHAF_CAN_GFLTRCAPS_RTR = (1 << 2) }
 Global CAN filtering capabilities flags. More...
 
enum  AGHAF_CAN_Mode { AGHAF_CAN_MODE_FD = 0x00 , AGHAF_CAN_MODE_HS = 0x01 , AGHAF_CAN_MODE_LS = 0x02 }
 Possible modes for CAN. More...
 
enum  AGHAF_CAN_Param {
  CAN_PARAM_MODE , CAN_PARAM_BAUDRATE , CAN_PARAM_BAUDRATE_FD , CAN_PARAM_SAMPLEPOINT ,
  CAN_PARAM_SAMPLEPOINT_FD , CAN_PARAM_SYNCJUMP_WIDTH , CAN_PARAM_SYNCJUMP_WIDTH_FD , CAN_PARAM_LISTEN_ONLY ,
  CAN_PARAM_TERMINATION , CAN_PARAM_TERMINATION_LS , CAN_PARAM_NO_EVENT
}
 List of parameters used to configure a CAN bus. More...
 
enum  AGHAF_CAN_RejectType { AGHAF_CAN_REJECT_ALL = 0 , AGHAF_CAN_REJECT_STD , AGHAF_CAN_REJECT_EXT , AGHAF_CAN_REJECT_NONE = 3 }
 enumerator to choose the type of exclusion filter More...
 

Macro Definition Documentation

◆ AGHAF_CAN_MSG_EVENT_DATA

#define AGHAF_CAN_MSG_EVENT_DATA    (1 << 5)

valid data according to dataLen

Report Tx data in CanEventMessage / Event CanEventMessage has

◆ AGHAF_CAN_MSG_RTR

#define AGHAF_CAN_MSG_RTR    (1 << 1)

to ISO11898-1 even if FD format is set)

Remote Transmission request (Message is transmitted according

Enumeration Type Documentation

◆ AGHAF_CAN_ChipState

Enumeration of the chip states.

Enumerator
AGHAF_CAN_CHIP_ACTIVE 

Active error state.

AGHAF_CAN_CHIP_PASSIVE 

Passive error state.

AGHAF_CAN_CHIP_BUSOFF 

Bus off state.

◆ AGHAF_CAN_Error

Enumerator to describe the error on the bus.

Enumerator
AGHAF_CAN_ERROR_NONE 

No error.

AGHAF_CAN_ERROR_STUFF 

More than 5 equal bits in a sequence have occurred in a part of a received message where this is not allowed

AGHAF_CAN_ERROR_FORM 

A fixed format part of a received frame has the wrong format

AGHAF_CAN_ERROR_ACK 

The message transmitted by the device was not acknowledged by another node

AGHAF_CAN_ERROR_BIT1 

Device tried to send a recessive level but the monitored bus value was dominant

AGHAF_CAN_ERROR_BIT0 

Device tried to send a dominant level but the monitored bus value was recessive

AGHAF_CAN_ERROR_CRC 

The CRC check sum of a received message was incorrect

◆ AGHAF_CAN_FILTER_Type

type of the filter

Enumerator
AGHAF_CAN_FILTER_TYPE_CLASSIC 

id1 is the identifier and id2 is the mask

AGHAF_CAN_FILTER_TYPE_SINGLE 

id1 is the identifier you want to filter. id2 is not used.

AGHAF_CAN_FILTER_TYPE_DUAL 

id1 is an identifier and id2 is an identifier too

AGHAF_CAN_FILTER_TYPE_RANGE 

allow to filter on a range (id1 is the beginning and id2 is the end)

◆ AGHAF_CAN_FilterCaps

CAN filtering capabilities flags.

Enumerator
AGHAF_CAN_FLTRCAPS_ID_STD 

Standard ident filter.

AGHAF_CAN_FLTRCAPS_ID_EXT 

Extended ident filter.

AGHAF_CAN_FLTRCAPS_MODE_ACCEPT 

Acceptance filter.

AGHAF_CAN_FLTRCAPS_MODE_REJECT 

Rejection filter.

AGHAF_CAN_FLTRCAPS_TYPE_CLASSIC 

Classic filter/mask.

AGHAF_CAN_FLTRCAPS_TYPE_SINGLE 

Single ident filter.

AGHAF_CAN_FLTRCAPS_TYPE_DUAL 

Dual ident filter.

AGHAF_CAN_FLTRCAPS_TYPE_RANGE 

Range filter.

◆ AGHAF_CAN_FilterId

enumerator to choose the identifier type for can filter

Enumerator
AGHAF_CAN_FILTER_ID_STD 

Filter for frames with standard can Id.

AGHAF_CAN_FILTER_ID_XTD 

filter for frames with an extended can Id

◆ AGHAF_CAN_FilterMode

enumerator to choose the type of the filter: accept or reject

Enumerator
AGHAF_CAN_FILTER_MODE_ACCEPT 

Accept mode for a can filter.

AGHAF_CAN_FILTER_MODE_REJECT 

Reject mode for a can filter.

◆ AGHAF_CAN_GlobalFilterCaps

Global CAN filtering capabilities flags.

Enumerator
AGHAF_CAN_GFLTRCAPS_ID 

Identifier format filter.

AGHAF_CAN_GFLTRCAPS_NMF 

Non-matching frames with filters list filter.

AGHAF_CAN_GFLTRCAPS_RTR 

Remote frames filter.

◆ AGHAF_CAN_Mode

Possible modes for CAN.

Enumerator
AGHAF_CAN_MODE_FD 

CAN FD

Enable CAN High Speed and FD transmition and reception.
Use CAN High Speed and FD termination settings (CAN_PARAM_TERMINATION).

AGHAF_CAN_MODE_HS 

CAN High Speed

Enable CAN High Speed transmition and reception.
Use CAN High Speed and FD termination settings (CAN_PARAM_TERMINATION).

AGHAF_CAN_MODE_LS 

CAN Low Speed

Enable CAN Low Speed transmition and reception.
Use CAN Low Speed termination settings (CAN_PARAM_TERMINATION_LS).

◆ AGHAF_CAN_Param

List of parameters used to configure a CAN bus.

Enumerator
CAN_PARAM_MODE 

CAN mode settings.

Use: AGHAF_CAN_Mode
Default: AGHAF_CAN_MODE_FD

CAN_PARAM_BAUDRATE 

Nominal CAN baudrate in bps

Max: 1000000 bps (1 Mbps)
Default: 500000 bps (500 kbps)

CAN_PARAM_BAUDRATE_FD 

Baudrate to be used during the high bitrate phase of CAN FD frame

Max: 5000000 bps (5 Mbps)
Default: 1000000 bps (1 Mbps)

CAN_PARAM_SAMPLEPOINT 

Desired bit sample point as a percentage of the bit time

Range: [0, 100] %
Default: 80 %

CAN_PARAM_SAMPLEPOINT_FD 

Desired bit sample point as a percentage of the bit time
to be used during the high bitrate phase of CAN FD frame

Range: [0, 100] %
Default: 80 %

CAN_PARAM_SYNCJUMP_WIDTH 

Desired synchronization jump bit has a percentage of bit time

Range: [0, 100] %
Default: 15 %

CAN_PARAM_SYNCJUMP_WIDTH_FD 

Desired synchronization jump bit has a percentage of bit time
to be used during the high bitrate phase of CAN FD frame

Range: [0, 100] %
Default: 15 %

CAN_PARAM_LISTEN_ONLY 

Enable listen only mode.
CAN controler will no longer acknowledge received frames.

Range: [0, 1]
Default: 0 (disabled)

CAN_PARAM_TERMINATION 

CAN High Speed and FD termination settings.
Use one of the value returned by supported CAN termination function.

0 no termination
Default: 0 (no termination)

CAN_PARAM_TERMINATION_LS 

CAN Low Speed termination settings.
Use one of the value returned by supported CAN Low Speed termination function.

0 no termination
Default: 0 (no termination)

CAN_PARAM_NO_EVENT 

Disable CAN events reporting.
This will significantly reduce the load on the USB bus if you don't need these events.
Protocols requiring CAN will continue to function normally (e.g. DoCAN).

Range: [0, 1]
Default: 0 (report CAN events)

◆ AGHAF_CAN_RejectType

enumerator to choose the type of exclusion filter

Enumerator
AGHAF_CAN_REJECT_ALL 

Reject all non matching frames.

AGHAF_CAN_REJECT_STD 

Reject all non matching frames with a standard can Id.

AGHAF_CAN_REJECT_EXT 

Reject all non matching frames with an extended can Id.

AGHAF_CAN_REJECT_NONE 

Accept all the frames.