AGHAF  4.5.1
Annecy electronique Generic Hardware Access Framework
aghaf_can.h File Reference
#include "aghaf_global.h"
#include <ghap/aghaf_can_enums.h>
Include dependency graph for aghaf_can.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  AGHAF_CAN_FilterDesc
 structure to tell the filter capabilities from an exxotest device More...
 
struct  AGHAF_CAN_Identifier
 structure to represent an indentifier CAN in the AGHAF library More...
 
void AGHAF_CAN_asyncSendFrame (AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame, uint32_t *id)
 AGHAF_CAN_asyncSendFrame. More...
 
typedef void(* AGHAF_CAN_asyncSendFrame_Callback) (AGHAF_Status status, uint32_t id, void *userContext)
 Callback function type to recieve CAN events. More...
 
void AGHAF_CAN_asyncSendFrame_deregisterCallback (AGHAF_CAN_Bus bus, AGHAF_CAN_asyncSendFrame_Callback callback)
 AGHAF_CAN_asyncSendFrame_deregisterCallback. More...
 
void AGHAF_CAN_asyncSendFrame_registerCallback (AGHAF_CAN_Bus bus, AGHAF_CAN_asyncSendFrame_Callback callback, void *userContext)
 AGHAF_CAN_asyncSendFrame_registerCallback. More...
 
typedef void * AGHAF_CAN_Bus
 handle to a CAN bus More...
 
AGHAF_Status AGHAF_CAN_Bus_activate (AGHAF_CAN_Bus bus)
 activate a CAN bus More...
 
AGHAF_Status AGHAF_CAN_Bus_addFilter (AGHAF_CAN_Bus bus, AGHAF_CAN_FilterId idType, AGHAF_CAN_FILTER_Type type, AGHAF_CAN_FilterMode mode, uint32_t id1, uint32_t id2)
 add a filter to the CAN bus More...
 
AGHAF_Status AGHAF_CAN_Bus_BusOn (AGHAF_CAN_Bus bus)
 reactivate the bus after an error More...
 
AGHAF_Status AGHAF_CAN_Bus_clearFilters (AGHAF_CAN_Bus bus)
 clear the filters from a bus More...
 
AGHAF_Status AGHAF_CAN_Bus_deactivate (AGHAF_CAN_Bus bus)
 deactivate a CAN bus More...
 
AGHAF_Status AGHAF_CAN_Bus_filtersCount (AGHAF_CAN_Bus bus, AGHAF_CAN_FilterId idType, uint16_t *count)
 Provide the current number of filters. More...
 
void AGHAF_CAN_Bus_freeSupportedFilters (AGHAF_CAN_FilterDesc *values)
 Free the memory allocated with AGHAF_CAN_Bus_supportedFilters. More...
 
void AGHAF_CAN_Bus_freeSupportedModes (AGHAF_CAN_Mode *modes)
 Free the memory allocated with AGHAF_CAN_Bus_supportedModes. More...
 
void AGHAF_CAN_Bus_freeSupportedTerminations (uint32_t *terminations)
 Free the memory allocated with AGHAF_CAN_Bus_supportedTerminations or AGHAF_CAN_Bus_supportedTerminationsLs. More...
 
AGHAF_Status AGHAF_CAN_Bus_getParam (AGHAF_CAN_Bus bus, AGHAF_CAN_Param param, uint32_t *value)
 Provide the value from a CAN parameter. More...
 
uint8_t AGHAF_CAN_Bus_getPeriodicCount (AGHAF_CAN_Bus bus)
 Return the number of periodic message available on a CAN bus. More...
 
AGHAF_Status AGHAF_CAN_Bus_isActivated (AGHAF_CAN_Bus bus, AGHAF_BOOL *isActivated)
 Request if a CAN bus is yet activated or not. More...
 
AGHAF_Status AGHAF_CAN_Bus_reject (AGHAF_CAN_Bus bus, AGHAF_CAN_RejectType rejectType, AGHAF_BOOL rtr)
 Set a global filter. More...
 
AGHAF_Status AGHAF_CAN_Bus_sendPeriodic (AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame, uint8_t index, uint8_t flags, uint32_t period)
 Add a periodic message to send. More...
 
AGHAF_Status AGHAF_CAN_Bus_setParam (AGHAF_CAN_Bus bus, AGHAF_CAN_Param param, uint32_t value)
 Set the value from a CAN parameter. More...
 
AGHAF_Status AGHAF_CAN_Bus_state (AGHAF_CAN_Bus bus, AGHAF_CAN_BusState *canBusState)
 AGHAF_CAN_Bus_state. More...
 
AGHAF_Status AGHAF_CAN_Bus_supportedFilters (AGHAF_CAN_Bus bus, uint16_t *globalFilterCaps, AGHAF_CAN_FilterDesc **values, uint16_t *size)
 Provide the supported filters from a CAN bus. More...
 
AGHAF_Status AGHAF_CAN_Bus_supportedModes (AGHAF_CAN_Bus bus, AGHAF_CAN_Mode **modes, uint8_t *nbModes)
 Request the supported modes from the CAN bus in parameter. More...
 
AGHAF_Status AGHAF_CAN_Bus_supportedTerminations (AGHAF_CAN_Bus bus, uint32_t **terminations, uint32_t *nbTerminations)
 Request the supported terminations from a CAN bus. More...
 
AGHAF_Status AGHAF_CAN_Bus_supportedTerminationsLs (AGHAF_CAN_Bus bus, uint32_t **terminations, uint32_t *nbTerminations)
 Request the supported low speed terminations from a CAN bus. More...
 
enum  AGHAF_CAN_BusState { AGHAF_CAN_BUS_UNKNOW = 0 , AGHAF_CAN_BUS_ACTIVE , AGHAF_CAN_BUS_PASSIVE , AGHAF_CAN_BUS_BUSOFF }
 enumerator for the state of the bus More...
 
typedef void(* AGHAF_CAN_Callback) (AGHAF_CAN_Event event, void *userContext)
 Callback function type to recieve CAN events. More...
 
void AGHAF_CAN_deregisterCallback (AGHAF_CAN_Bus bus, AGHAF_CAN_Callback callback)
 deregister a callback More...
 
typedef void * AGHAF_CAN_Event
 Handle to a CAN event.
 
uint32_t AGHAF_CAN_Event_busError (AGHAF_CAN_Event_busInfo busState)
 return the value from the error More...
 
typedef void const * AGHAF_CAN_Event_busInfo
 Handle to a CAN event bus info.
 
uint32_t AGHAF_CAN_Event_busLoad (AGHAF_CAN_Event_busInfo busState)
 return the bus load More...
 
uint32_t AGHAF_CAN_Event_chipState (AGHAF_CAN_Event_busInfo busState)
 return the chipstate More...
 
AGHAF_CAN_Frame AGHAF_CAN_Event_frame (AGHAF_CAN_Event event)
 return the frame contained in an event More...
 
enum  AGHAF_CAN_EventType {
  AGHAF_CAN_EVENT_UNKNOW = 0 , AGHAF_CAN_EVENT_MSGTX = 1 , AGHAF_CAN_EVENT_MSGRX = 2 , AGHAF_CAN_EVENT_ERROR = 3 ,
  AGHAF_CAN_EVENT_BUSCHANGE = 4 , AGHAF_CAN_EVENT_BUSLOAD = 5
}
 enumerator to tell the type of the event More...
 
enum  AGHAF_CAN_FILTER_Type { AGHAF_CAN_FILTER_TYPE_CLASSIC = 0 , AGHAF_CAN_FILTER_TYPE_SINGLE = 1 , AGHAF_CAN_FILTER_TYPE_DUAL = 2 , AGHAF_CAN_FILTER_TYPE_RANGE = 3 }
 type of the filter More...
 
typedef struct AGHAF_CAN_FilterDesc AGHAF_CAN_FilterDesc
 structure to tell the filter capabilities from an exxotest device
 
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...
 
typedef void * AGHAF_CAN_Frame
 Handle to a CAN frame. More...
 
AGHAF_BOOL AGHAF_CAN_Frame_brs (AGHAF_CAN_Frame frame)
 AGHAF_CAN_Frame_brs. More...
 
AGHAF_Status AGHAF_CAN_Frame_data (AGHAF_CAN_Frame frame, void *data, int64_t size)
 Provide the data contained in a frame. More...
 
int64_t AGHAF_CAN_Frame_dataSize (AGHAF_CAN_Frame frame)
 return the size from the data More...
 
void AGHAF_CAN_Frame_delete (AGHAF_CAN_Frame frame)
 Free the memory from a CAN frame. More...
 
AGHAF_BOOL AGHAF_CAN_Frame_esi (AGHAF_CAN_Frame frame)
 AGHAF_CAN_Frame_esi. More...
 
AGHAF_BOOL AGHAF_CAN_Frame_fdf (AGHAF_CAN_Frame frame)
 AGHAF_CAN_Frame_fdf. More...
 
AGHAF_CAN_FrameType AGHAF_CAN_Frame_frameType (AGHAF_CAN_Frame frame)
 Get the type from the frame. More...
 
AGHAF_Status AGHAF_CAN_Frame_id (AGHAF_CAN_Frame frame, AGHAF_CAN_Identifier *identifier)
 Get the identifier from a CAN frame. More...
 
AGHAF_CAN_Frame AGHAF_CAN_Frame_new (void)
 Return a handle on a CAN frame. More...
 
AGHAF_Status AGHAF_CAN_Frame_setData (AGHAF_CAN_Frame frame, const void *data, int64_t size)
 Set the data from a frame. More...
 
AGHAF_Status AGHAF_CAN_Frame_setFDF (AGHAF_CAN_Frame frame, AGHAF_BOOL fdf, AGHAF_BOOL esi, AGHAF_BOOL brs)
 AGHAF_CAN_Frame_setFDF. More...
 
AGHAF_Status AGHAF_CAN_Frame_setFrameType (AGHAF_CAN_Frame frame, AGHAF_CAN_FrameType type)
 Set the type from the frame. More...
 
AGHAF_Status AGHAF_CAN_Frame_setId (AGHAF_CAN_Frame frame, AGHAF_CAN_Identifier *identifier)
 Set the identifier from a CAN frame. More...
 
enum  AGHAF_CAN_FrameType { AGHAF_CAN_DataFrame = 0 , AGHAF_CAN_RemoteFrame = 1 }
 type of frame More...
 
AGHAF_CAN_Bus AGHAF_CAN_getBus (AGHAF_Device device, uint8_t index)
 return the CAN bus at index in parameter More...
 
uint8_t AGHAF_CAN_getBusCount (AGHAF_Device device)
 return the number of CAN bus from a device More...
 
uint8_t AGHAF_CAN_getBusIndex (AGHAF_CAN_Bus bus)
 return the index from a CAN bus More...
 
uint8_t AGHAF_CAN_getEventBusIndex (AGHAF_CAN_Event event)
 return the index from the bus on which occured the event More...
 
AGHAF_CAN_Event_busInfo AGHAF_CAN_getEventBusInfo (AGHAF_CAN_Event event)
 return the bus informations from an event More...
 
typedef struct AGHAF_CAN_Identifier AGHAF_CAN_Identifier
 structure to represent an indentifier CAN in the AGHAF library
 
enum  AGHAF_CAN_IdentifierType { AGHAF_CAN_IdStd , AGHAF_CAN_IdXtd }
 enumerator to choose the type of CAN identifier More...
 
void AGHAF_CAN_registerCallback (AGHAF_CAN_Bus bus, AGHAF_CAN_Callback callback, void *userContext)
 Register a callback for the CAN events from a bus. More...
 
enum  AGHAF_CAN_RejectType { AGHAF_CAN_REJECT_ALL = 0 , AGHAF_CAN_REJECT_STD = 1 , AGHAF_CAN_REJECT_EXT = 2 , AGHAF_CAN_REJECT_NONE = 3 }
 enumerator to choose the type of exclusion filter More...
 
AGHAF_Status AGHAF_CAN_sendFrame (AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame)
 send a frame on a CAN bus More...
 
AGHAF_Status AGHAF_CAN_sendMessage (AGHAF_CAN_Bus bus, uint32_t ident, uint8_t flags, uint16_t dataLen, uint8_t const *data)
 send data on a CAN bus More...
 
AGHAF_CAN_EventType AGHAF_CAN_typeEvent (AGHAF_EventInfo event)
 return the type from the event More...