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

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

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Provides access host computer through UDP connetion.

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


Public Member Functions

 HostUDP (String controllername, int statport, int cmdport) throws UnknownHostException, SocketException
 Initializes HostUDP.

 HostUDP (String controllername, int statport) throws UnknownHostException, SocketException
 Initializes HostUDP using default command port numbers.

 HostUDP (String controllername) throws UnknownHostException, SocketException
 Initializes HostUDP using default status and command port numbers.

void finalize ()
 Finalizes HostUDP.

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

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

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


Constructor & Destructor Documentation

br::ufrgs::ece::AIC::HostUDP::HostUDP String  controllername,
int  statport,
int  cmdport
throws UnknownHostException, SocketException [inline]
 

Initializes HostUDP.

Parameters:
controllername name of host computer
statport UDP port on host to send status to
cmdport UDP port on AIC to receive commands from host
Exceptions:
UnknownHostException if host is unknown
SocketException on socket errors

br::ufrgs::ece::AIC::HostUDP::HostUDP String  controllername,
int  statport
throws UnknownHostException, SocketException [inline]
 

Initializes HostUDP using default command port numbers.

Parameters:
controllername name of host computer
statport UDP port on host to send status to
Exceptions:
UnknownHostException if host is unknown
SocketException on socket errors

br::ufrgs::ece::AIC::HostUDP::HostUDP String  controllername  )  throws UnknownHostException, SocketException [inline]
 

Initializes HostUDP using default status and command port numbers.

Parameters:
controllername name of host computer
Exceptions:
UnknownHostException if host is unknown
SocketException on socket errors


Member Function Documentation

int br::ufrgs::ece::AIC::HostUDP::command byte[]  args,
int  size
throws IOException [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:
IOException on communication errors

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

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

Sends encoder displacement and sync-switch status to host.

Parameters:
disp encoder displacement in pulses
index sync-switch status
Exceptions:
IOException on communication errors

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

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

Sends encoder displacement and sync-switch status to host.

Parameters:
disp encoder displacement in rad
index sync-switch status
Exceptions:
IOException on communication 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