CAN management
[User API]

Collaboration diagram for CAN management:

Data Structures

struct  Message
 The CAN message structure. More...
struct  struct_s_BOARD
 The CAN board configuration. More...

Functions

UNS8 UnLoadCanDriver (LIB_HANDLE handle)
 Unload CAN driver interface.
LIB_HANDLE LoadCanDriver (const char *driver_name)
 Load CAN driver interface.
CAN_PORT canOpen (s_BOARD *board, CO_Data *d)
 Open a CANOpen device.
int canClose (CO_Data *d)
 Close a CANOpen device.
UNS8 canChangeBaudRate (CAN_PORT port, char *baud)
 Change the CANOpen device baudrate.

Function Documentation

UNS8 canChangeBaudRate ( CAN_PORT  port,
char *  baud 
)

Change the CANOpen device baudrate.

Parameters:
port CanFestival file descriptor
*baud The new baudrate to assign
Returns:
  • 0 is returned upon success or if not supported by the CAN driver.
  • errorcode from the CAN driver is returned if an error occurs. (if implemented in the CAN driver)
CAN change baudrate routine
Parameters:
port CAN port
baud baudrate
Returns:
success or error

Definition at line 231 of file unix.c.

References canChangeBaudRate().

Referenced by canChangeBaudRate(), and LoadCanDriver().

Here is the call graph for this function:

int canClose ( CO_Data d  ) 

Close a CANOpen device.

Parameters:
*d Pointer to the CAN object data structure
Returns:
  • 0 is returned upon success.
  • errorcode if error. (if implemented)
CAN close routine
Parameters:
d CAN object data
Returns:
success or error

Definition at line 207 of file unix.c.

References canClose(), struct_CO_Data::canHandle, EnterMutex(), and LeaveMutex().

Referenced by canClose(), and LoadCanDriver().

Here is the call graph for this function:

CAN_PORT canOpen ( s_BOARD board,
CO_Data d 
)

Open a CANOpen device.

Parameters:
*board Pointer to the board structure that contains busname and baudrate
*d Pointer to the CAN object data structure
Returns:
  • CanFestival file descriptor is returned upon success.
  • NULL is returned if the CANOpen board can't be opened.
CAN open routine
Parameters:
board device name and baudrate
d CAN object data
Returns:
valid CAN_PORT pointer or NULL

Definition at line 173 of file unix.c.

References struct_s_BOARD::baudrate, struct_s_BOARD::busname, struct_CO_Data::canHandle, canOpen(), EnterMutex(), and LeaveMutex().

Referenced by canOpen(), and LoadCanDriver().

Here is the call graph for this function:

LIB_HANDLE LoadCanDriver ( const char *  driver_name  ) 

Load CAN driver interface.

Parameters:
*driver_name The location of the library to load
Returns:
  • handle of the CAN driver interface is returned upon success.
  • NULL is returned if the CAN driver interface can't be loaded.
Loads the dll and get funcs ptr

Parameters:
driver_name String containing driver's dynamic library name
Returns:
Library handle

Definition at line 94 of file unix.c.

References canChangeBaudRate(), canClose(), and canOpen().

Here is the call graph for this function:

UNS8 UnLoadCanDriver ( LIB_HANDLE  handle  ) 

Unload CAN driver interface.

Parameters:
handle The library handle
Returns:
  • 0 is returned upon success.
  • -1 is returned if the CAN driver interface can't be unloaded.

Definition at line 76 of file unix.c.


Generated on Wed Feb 4 12:17:20 2009 for CanFestival by  doxygen 1.5.6