br::ufrgs::ece::AIC::HostCAN Class Reference
[AIC Hardware Interface]

Inheritance diagram for br::ufrgs::ece::AIC::HostCAN:

Inheritance graph
[legend]
Collaboration diagram for br::ufrgs::ece::AIC::HostCAN:

Collaboration graph
[legend]
List of all members.

Detailed Description

Provides access host computer through CAN bus.

See also:
HostUDP
Author:
Walter Fetter Lages (w.fetter@ieee.org)


Public Member Functions

 HostCAN (int aicid, int bus) throws CanBusException
 Initializes HostCAN.

 HostCAN (int aicid) throws CanBusException
 Initializes HostCAN using CAN bus 0 as default.

void finalize () throws CanBusException
 Finalizes HostCAN
Exceptions:
CanBusException on CAN bus errors.


int command (byte[] args, int size) throws CanBusException
 Gets command received from host computer.

void sendStatus (double disp, int index) throws CanBusException
 Sends encoder displacement and sync-switch status to host.

void sendStatus (int disp, int index) throws CanBusException
 Sends encoder displacement and sync-switch status to host.


Constructor & Destructor Documentation

br::ufrgs::ece::AIC::HostCAN::HostCAN int  aicid,
int  bus
throws CanBusException [inline]
 

Initializes HostCAN.

Parameters:
aicid AIC identification on bus from 1 to 31
bus CAN bus to use 0 or 1
Exceptions:
CanBusException on CAN bus errors

br::ufrgs::ece::AIC::HostCAN::HostCAN int  aicid  )  throws CanBusException [inline]
 

Initializes HostCAN using CAN bus 0 as default.

Parameters:
aicid AIC identification on bus from 1 to 31
Exceptions:
CanBusException on CAN bus errors


Member Function Documentation

int br::ufrgs::ece::AIC::HostCAN::command byte[]  args,
int  size
throws CanBusException [inline, virtual]
 

Gets command received from host computer.

Parameters:
args command arguments array. args[0] is the length of actual arguments.
size size of the arguments array
Returns:
command code
Exceptions:
CanBusException on CAN bus errors

Implements br::ufrgs::ece::AIC::Host.

void br::ufrgs::ece::AIC::HostCAN::sendStatus int  disp,
int  index
throws CanBusException [inline, virtual]
 

Sends encoder displacement and sync-switch status to host.

Parameters:
disp encoder displacement in pulses
index sync-switch status
Exceptions:
CanBusException on CAN bus errors

Implements br::ufrgs::ece::AIC::Host.

void br::ufrgs::ece::AIC::HostCAN::sendStatus double  disp,
int  index
throws CanBusException [inline, virtual]
 

Sends encoder displacement and sync-switch status to host.

Parameters:
disp encoder displacement in rad
index sync-switch status
Exceptions:
CanBusException on CAN bus errors

Implements br::ufrgs::ece::AIC::Host.


The documentation for this class was generated from the following file:
Generated on Thu Mar 27 15:33:38 2008 for Actuator Interface Card by doxygen 1.3.6