/opt/ros/diamondback/stacks/ethzasl_aseba/asebaros/aseba/svn/transport/can/can-net.c File Reference

#include "can-net.h"
#include <stdlib.h>
#include <string.h>
Include dependency graph for can-net.c:

Go to the source code of this file.

Classes

struct  AsebaCan

Defines

#define ASEBA_MIN(a, b)   (((a) < (b)) ? (a) : (b))
#define CANID_TO_ID(canid)   ((canid) & 0xff)
#define CANID_TO_TYPE(canid)   ((canid) >> 8)
#define MAX_DROPPING_SOURCE   20
#define TO_CANID(type, id)   (((type) << 8) | (id))
#define TYPE_PACKET_NORMAL   0x0
#define TYPE_PACKET_START   0x1
#define TYPE_PACKET_STOP   0x2
#define TYPE_SMALL_PACKET   0x3

Functions

void AsebaCanFlushQueue (void)
void AsebaCanFrameReceived (const CanFrame *frame)
void AsebaCanFrameSent ()
uint16 AsebaCanGetMinMultipleOfHeight (uint16 v)
void AsebaCanInit (uint16 id, AsebaCanSendFrameFP sendFrameFP, AsebaCanIntVoidFP isFrameRoomFP, AsebaCanVoidVoidFP receivedPacketDroppedFP, AsebaCanVoidVoidFP sentPacketDroppedFP, CanFrame *sendQueue, size_t sendQueueSize, CanFrame *recvQueue, size_t recvQueueSize)
uint16 AsebaCanRecv (uint8 *data, size_t size, uint16 *source)
uint16 AsebaCanRecvBufferEmpty (void)
void AsebaCanRecvFreeQueue (void)
static void AsebaCanRecvQueueFreeFrames (uint16 id)
static void AsebaCanRecvQueueGarbageCollect ()
static uint16 AsebaCanRecvQueueGetMaxUsedFrames ()
static uint16 AsebaCanRecvQueueGetMinFreeFrames ()
uint16 AsebaCanSend (const uint8 *data, size_t size)
static uint16 AsebaCanSendQueueGetFreeFrames ()
static uint16 AsebaCanSendQueueGetUsedFrames ()
static void AsebaCanSendQueueInsert (uint16 canid, const uint8 *data, size_t size)
static void AsebaCanSendQueueToPhysicalLayer ()
uint16 AsebaCanSendSpecificSource (const uint8 *data, size_t size, uint16 source)

Variables

static struct AsebaCan asebaCan
static uint16 dropping [MAX_DROPPING_SOURCE]

Define Documentation

#define ASEBA_MIN ( a,
 )     (((a) < (b)) ? (a) : (b))

Definition at line 14 of file can-net.c.

#define CANID_TO_ID ( canid   )     ((canid) & 0xff)

Definition at line 11 of file can-net.c.

#define CANID_TO_TYPE ( canid   )     ((canid) >> 8)

Definition at line 10 of file can-net.c.

#define TO_CANID ( type,
id   )     (((type) << 8) | (id))

Definition at line 12 of file can-net.c.

#define TYPE_PACKET_NORMAL   0x0

Definition at line 6 of file can-net.c.

#define TYPE_PACKET_START   0x1

Definition at line 7 of file can-net.c.

#define TYPE_PACKET_STOP   0x2

Definition at line 8 of file can-net.c.

#define TYPE_SMALL_PACKET   0x3

Definition at line 5 of file can-net.c.


Variable Documentation

struct AsebaCan asebaCan [static]

This contains the state of the CAN implementation of Aseba network

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


asebaros
Author(s): $author
autogenerated on Mon Sep 5 08:42:01 2011