Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

vector_canboard.c File Reference

#include <windows.h>
#include <stdio.h>
#include "..\interfaces.h"
#include "..\..\vendor_api\vector_canboard\vxlapi.h"
#include "..\..\includes\canapi.h"
#include "..\..\includes\debug.h"

Go to the source code of this file.

Defines

#define TIMESCALE   1000000000
#define ACCESSMASK(n)   (1<<(channel[n].hwChannelIndex))
#define CANRETVAL   channel[which].error.toreturn

Enumerations

enum  { I_ERRS = 0x00000001, I_STATE = 0x00000002 }

Functions

int vector_baudrate_calc (int desiredbaud, XLchipParams *touse)
int vector_checkstatus (int tocheck, int handle)
int vector_canboardprobe ()
int vector_canboardstartup ()
int vector_canboardopenchannel (int which)
int vector_canboardclosechannel (int which)
int vector_canboardshutdown ()
void dumpevent (XLevent *todump)
int vector_canboardread (int which, can_frame *out)
int vector_canboardwrite (int which, can_frame *in)
int vector_canboardupdatestatus (int which)
int vector_canboardchangestatus (int which, int type, int status)

Variables

FILE * tracefile
_if_channel channel [CAN_MAXCHANNELS]
_if_board cancard [MAX_CARDS]
int if_channel_count
int if_board_count
int statuslookup [][2]
int g_msgsrx = 1


Define Documentation

#define ACCESSMASK  )     (1<<(channel[n].hwChannelIndex))
 

Definition at line 79 of file vector_canboard.c.

Referenced by vector_canboardchangestatus(), vector_canboardopenchannel(), vector_canboardupdatestatus(), and vector_canboardwrite().

#define CANRETVAL   channel[which].error.toreturn
 

Definition at line 80 of file vector_canboard.c.

#define TIMESCALE   1000000000
 

Definition at line 36 of file vector_canboard.c.

Referenced by vector_canboardread().


Enumeration Type Documentation

anonymous enum
 

Enumerator:
I_ERRS 
I_STATE 

Definition at line 81 of file vector_canboard.c.


Function Documentation

void dumpevent XLevent *  todump  ) 
 

Definition at line 289 of file vector_canboard.c.

References tracefile.

int vector_baudrate_calc int  desiredbaud,
XLchipParams *  touse
 

Definition at line 101 of file vector_canboard.c.

References IF_SUCCESS.

int vector_canboardchangestatus int  which,
int  type,
int  status
 

Definition at line 474 of file vector_canboard.c.

References ACCESSMASK, _if_channel::blocktimeout, C_BAUDRATE, C_BLOCKTIMEOUT, C_CODE, C_HIDECHIP, C_HIDEERRORS, C_MASK, C_RXERROR, C_RXQUEUE, C_TXERROR, C_TXQUEUE, _if_channel::code, _if_channel::filter, _if_channel::flags, I_ERRS, I_STATE, IF_FAILURE, IF_SUCCESS, _if_channel::mask, S_ERR_NOT_IMPLEMENTED, and vector_checkstatus().

int vector_canboardclosechannel int  which  ) 
 

Definition at line 280 of file vector_canboard.c.

References vector_checkstatus().

int vector_canboardopenchannel int  which  ) 
 

Definition at line 212 of file vector_canboard.c.

References ACCESSMASK, _if_channel::buscapabilities, _if_channel::hwHandle, IF_FAILURE, IF_SUCCESS, _if_channel::last, and vector_checkstatus().

int vector_canboardprobe  ) 
 

Definition at line 123 of file vector_canboard.c.

References _if_channel::articleNumber, _if_channel::baudrate, _if_channel::blocktimeout, _if_channel::board, _if_board::boardtype, _if_channel::buscapabilities, _if_channel::bustype, CANBOARDXL, _if_channel::capabilities, _if_board::channel, _if_board::channelcount, _if_channel::hwChannel, _if_channel::hwChannelIndex, _if_channel::hwIndex, _if_channel::hwTransState, _if_channel::hwTransType, _if_channel::hwType, if_board_count, if_channel_count, IF_DEFAULT_BAUD, IF_DEFAULT_RXQUEUE, IF_FAILURE, IF_SUCCESS, _if_board::index, _if_channel::name, _if_channel::rxqueuesize, _if_channel::serialNumber, _if_board::status, and _if_channel::transceiverName.

int vector_canboardread int  which,
can_frame out
 

Definition at line 293 of file vector_canboard.c.

References can20bframe::ack, can20bframe::arbitration, _if_channel::blocktimeout, _if_channel::board, _as_ts::can_ts_nsec, _as_ts::can_ts_sec, can20bframe::control, can20bframe::crc, can20bframe::data, can20bframe::eof, fakecrc(), FAKED_ACK, FAKED_CRC, FAKED_EOF, FAKED_RTR, FAKED_SOF, GRABBIT, _if_channel::lastsync, can20bframe::oob, _if_channel::rxerror, can20bframe::sof, _if_board::status, statuslookup, TIMESCALE, _if_channel::txerror, and vector_checkstatus().

int vector_canboardshutdown  ) 
 

Definition at line 285 of file vector_canboard.c.

References vector_checkstatus().

int vector_canboardstartup  ) 
 

Definition at line 201 of file vector_canboard.c.

References IF_FAILURE, and IF_SUCCESS.

int vector_canboardupdatestatus int  which  ) 
 

Definition at line 446 of file vector_canboard.c.

References ACCESSMASK, _if_channel::baudrate, _if_channel::hwHandle, IF_FAILURE, IF_SUCCESS, and vector_checkstatus().

int vector_canboardwrite int  which,
can_frame in
 

Definition at line 416 of file vector_canboard.c.

References ACCESSMASK, can20bframe::arbitration, can20bframe::control, can20bframe::data, IF_SUCCESS, and vector_checkstatus().

int vector_checkstatus int  tocheck,
int  handle
 

Definition at line 106 of file vector_canboard.c.

References _if_channel::error, IF_FAILURE, IF_SUCCESS, S_ERR_UNKNOWN, and statuslookup.

Referenced by vector_canboardchangestatus(), vector_canboardclosechannel(), vector_canboardopenchannel(), vector_canboardread(), vector_canboardshutdown(), vector_canboardupdatestatus(), and vector_canboardwrite().


Variable Documentation

struct _if_board cancard[MAX_CARDS]
 

Definition at line 94 of file defines.c.

struct _if_channel channel[CAN_MAXCHANNELS]
 

Definition at line 93 of file defines.c.

int g_msgsrx = 1
 

Definition at line 86 of file vector_canboard.c.

int if_board_count
 

Definition at line 96 of file defines.c.

int if_channel_count
 

Definition at line 95 of file defines.c.

int statuslookup[][2]
 

Definition at line 44 of file vector_canboard.c.

Referenced by vector_canboardread(), and vector_checkstatus().

FILE* tracefile
 

Definition at line 44 of file canapi.c.

Referenced by DllMain(), and dumpevent().


Generated on Wed Feb 22 13:31:27 2006 for CANapi by  doxygen 1.4.4