AGHAF 4.5.7
Annecy electronique Generic Hardware Access Framework
Loading...
Searching...
No Matches
aghaf_can.h File Reference
#include "aghaf_can_common.h"
#include "aghaf_global.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_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.
 
typedef void(* AGHAF_CAN_asyncSendFrame_Callback) (AGHAF_Status status, uint32_t id, void *userContext)
 Callback function type to recieve CAN events.
 
void AGHAF_CAN_asyncSendFrame_deregisterCallback (AGHAF_CAN_Bus bus, AGHAF_CAN_asyncSendFrame_Callback callback)
 AGHAF_CAN_asyncSendFrame_deregisterCallback.
 
void AGHAF_CAN_asyncSendFrame_registerCallback (AGHAF_CAN_Bus bus, AGHAF_CAN_asyncSendFrame_Callback callback, void *userContext)
 AGHAF_CAN_asyncSendFrame_registerCallback.
 
typedef void * AGHAF_CAN_Bus
 handle to a CAN bus
 
AGHAF_Status AGHAF_CAN_Bus_activate (AGHAF_CAN_Bus bus)
 activate a CAN bus
 
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
 
AGHAF_Status AGHAF_CAN_Bus_BusOn (AGHAF_CAN_Bus bus)
 reactivate the bus after an error
 
AGHAF_Status AGHAF_CAN_Bus_clearFilters (AGHAF_CAN_Bus bus)
 clear the filters from a bus
 
AGHAF_Status AGHAF_CAN_Bus_deactivate (AGHAF_CAN_Bus bus)
 deactivate a CAN bus
 
AGHAF_Status AGHAF_CAN_Bus_filtersCount (AGHAF_CAN_Bus bus, AGHAF_CAN_FilterId idType, uint16_t *count)
 Provide the current number of filters.
 
void AGHAF_CAN_Bus_freeSupportedFilters (AGHAF_CAN_FilterDesc *values)
 Free the memory allocated with AGHAF_CAN_Bus_supportedFilters.
 
void AGHAF_CAN_Bus_freeSupportedModes (AGHAF_CAN_Mode *modes)
 Free the memory allocated with AGHAF_CAN_Bus_supportedModes.
 
void AGHAF_CAN_Bus_freeSupportedTerminations (uint32_t *terminations)
 Free the memory allocated with AGHAF_CAN_Bus_supportedTerminations or AGHAF_CAN_Bus_supportedTerminationsLs.
 
AGHAF_Status AGHAF_CAN_Bus_getParam (AGHAF_CAN_Bus bus, AGHAF_CAN_Param param, uint32_t *value)
 Provide the value from a CAN parameter.
 
uint8_t AGHAF_CAN_Bus_getPeriodicCount (AGHAF_CAN_Bus bus)
 Return the number of periodic message available on a CAN bus.
 
AGHAF_Status AGHAF_CAN_Bus_isActivated (AGHAF_CAN_Bus bus, AGHAF_BOOL *isActivated)
 Request if a CAN bus is yet activated or not.
 
AGHAF_Status AGHAF_CAN_Bus_reject (AGHAF_CAN_Bus bus, AGHAF_CAN_RejectType rejectType, AGHAF_BOOL rtr)
 Set a global filter.
 
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.
 
AGHAF_Status AGHAF_CAN_Bus_setParam (AGHAF_CAN_Bus bus, AGHAF_CAN_Param param, uint32_t value)
 Set the value from a CAN parameter.
 
AGHAF_Status AGHAF_CAN_Bus_state (AGHAF_CAN_Bus bus, AGHAF_CAN_BusState *canBusState)
 AGHAF_CAN_Bus_state.
 
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.
 
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.
 
AGHAF_Status AGHAF_CAN_Bus_supportedTerminations (AGHAF_CAN_Bus bus, uint32_t **terminations, uint32_t *nbTerminations)
 Request the supported terminations from a CAN bus.
 
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.
 
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.
 
void AGHAF_CAN_deregisterCallback (AGHAF_CAN_Bus bus, AGHAF_CAN_Callback callback)
 deregister a callback
 
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
 
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
 
uint32_t AGHAF_CAN_Event_chipState (AGHAF_CAN_Event_busInfo busState)
 return the chipstate
 
AGHAF_CAN_Frame AGHAF_CAN_Event_frame (AGHAF_CAN_Event event)
 return the frame contained in an event
 
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 , AGHAF_CAN_EVENT_BUSLOAD = 5
}
 enumerator to tell the type of the event More...
 
typedef void * AGHAF_CAN_Frame
 Handle to a CAN frame.
 
AGHAF_BOOL AGHAF_CAN_Frame_brs (AGHAF_CAN_Frame frame)
 AGHAF_CAN_Frame_brs.
 
AGHAF_Status AGHAF_CAN_Frame_data (AGHAF_CAN_Frame frame, void *data, int64_t size)
 Provide the data contained in a frame.
 
int64_t AGHAF_CAN_Frame_dataSize (AGHAF_CAN_Frame frame)
 return the size from the data
 
void AGHAF_CAN_Frame_delete (AGHAF_CAN_Frame frame)
 Free the memory from a CAN frame.
 
AGHAF_BOOL AGHAF_CAN_Frame_esi (AGHAF_CAN_Frame frame)
 AGHAF_CAN_Frame_esi.
 
AGHAF_BOOL AGHAF_CAN_Frame_fdf (AGHAF_CAN_Frame frame)
 AGHAF_CAN_Frame_fdf.
 
AGHAF_CAN_FrameType AGHAF_CAN_Frame_frameType (AGHAF_CAN_Frame frame)
 Get the type from the frame.
 
AGHAF_Status AGHAF_CAN_Frame_id (AGHAF_CAN_Frame frame, AGHAF_CAN_Identifier *identifier)
 Get the identifier from a CAN frame.
 
AGHAF_CAN_Frame AGHAF_CAN_Frame_new (void)
 Return a handle on a CAN frame.
 
AGHAF_Status AGHAF_CAN_Frame_setData (AGHAF_CAN_Frame frame, const void *data, int64_t size)
 Set the data from a frame.
 
AGHAF_Status AGHAF_CAN_Frame_setFDF (AGHAF_CAN_Frame frame, AGHAF_BOOL fdf, AGHAF_BOOL esi, AGHAF_BOOL brs)
 AGHAF_CAN_Frame_setFDF.
 
AGHAF_Status AGHAF_CAN_Frame_setFrameType (AGHAF_CAN_Frame frame, AGHAF_CAN_FrameType type)
 Set the type from the frame.
 
AGHAF_Status AGHAF_CAN_Frame_setId (AGHAF_CAN_Frame frame, AGHAF_CAN_Identifier *identifier)
 Set the identifier from a CAN frame.
 
enum  AGHAF_CAN_FrameType { AGHAF_CAN_DataFrame = 0 , AGHAF_CAN_RemoteFrame }
 type of frame More...
 
AGHAF_CAN_Bus AGHAF_CAN_getBus (AGHAF_Device device, uint8_t index)
 return the CAN bus at index in parameter
 
uint8_t AGHAF_CAN_getBusCount (AGHAF_Device device)
 return the number of CAN bus from a device
 
uint8_t AGHAF_CAN_getBusIndex (AGHAF_CAN_Bus bus)
 return the index from a CAN bus
 
uint8_t AGHAF_CAN_getEventBusIndex (AGHAF_CAN_Event event)
 return the index from the bus on which occured the event
 
AGHAF_CAN_Event_busInfo AGHAF_CAN_getEventBusInfo (AGHAF_CAN_Event event)
 return the bus informations from an event
 
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.
 
AGHAF_Status AGHAF_CAN_sendFrame (AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame)
 send a frame on a CAN bus
 
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
 
AGHAF_CAN_EventType AGHAF_CAN_typeEvent (AGHAF_EventInfo event)
 return the type from the event