Main Page   Class Hierarchy   Compound List   Compound Members  

ArACTS_1_2 Class Reference

Driver for ACTS. More...

#include <ArACTS.h>

List of all members.

Public Types

enum  ActsConstants {
  NUM_CHANNELS = 32, MAX_BLOBS = 10, BLOB_DATA_SIZE = 16, DATA_HEADER = NUM_CHANNELS * 4,
  MAX_DATA = 5300
}

Public Methods

 ArACTS_1_2 (void)
 Constructor.

virtual ~ArACTS_1_2 (void)
 Destructor.

bool openPort (ArRobot *robot, const char *host="localhost", int port=5001)
 Opens the connection to ACTS. More...

bool closePort (void)
 Closes the connection. More...

bool isConnected (void)
 Finds out whether there is connection.

ArRobotgetRobot (void)
 Gets the robot this class is connected to.

void setRobot (ArRobot *robot)
 Sets the robot this class is connected to.

bool requestPacket (void)
 Requests another packet. More...

bool requestQuit (void)
 Requests that ACTS quits. More...

bool receiveBlobInfo (void)
 Gets the blob information from the connection to acts. More...

int getNumBlobs (int channel)
 Gets the number of blobs for the given chanel. More...

bool getBlob (int channel, int blobNumber, ArACTSBlob *blob)
 Gets the given blob from the given channel. More...

void actsHandler (void)
 A function that reads information from acts and requests packets.

void invert (int width=160, int height=120)
 This will make the image stats inverted (for use with an inverted camera). More...


Protected Methods

int getData (char *rawData)
 an iternal function to strip out the information from some bytes.


Detailed Description

Driver for ACTS.


Member Enumeration Documentation

enum ArACTS_1_2::ActsConstants
 

Enumeration values:
NUM_CHANNELS  Number of channels there are.
MAX_BLOBS  Number of blobs per channel.
BLOB_DATA_SIZE  Size of the blob data.
DATA_HEADER  Size of the data header.
MAX_DATA  Maximum amount of data.


Member Function Documentation

bool ArACTS_1_2::closePort void   
 

Closes the connection.

Closes the port to the ACTS server

Returns:
true if the connection was closed properly, false otherwise

bool ArACTS_1_2::getBlob int    channel,
int    blobNumber,
ArACTSBlob   blob
 

Gets the given blob from the given channel.

Gets the blobNumber from the channel given, fills the information for that blob into the given blob structure.

Parameters:
channel  the channel to get the blob from
blobNumber  the number of the blob to get from the given channel
blob  the blob instance to fill in with the data about the requested blob
Returns:
true if the blob instance could be filled in from the

int ArACTS_1_2::getNumBlobs int    channel
 

Gets the number of blobs for the given chanel.

Returns:
the number of blobs on the channel, or -1 if the channel is invalid

void ArACTS_1_2::invert int    width = 160,
int    height = 120
 

This will make the image stats inverted (for use with an inverted camera).

This inverts the image, but since ACTS doesn't tell this driver the height or width, you need to provide both of those for the image, default is 160x120.

Parameters:
width  the width of the images acts is grabbing (pixels)
height  the height of the images acts is grabbing (pixels)

bool ArACTS_1_2::openPort ArRobot   robot,
const char *    host = "localhost",
int    port = 5001
 

Opens the connection to ACTS.

Opens the port to the ACTS server

Parameters:
robot  the robot to attach this to, which puts a sensorInterp on the robot so that ArACTS will always have fresh data from ACTS... giving a NULL value is perfectly acceptable, in this case ArACTS will not do any processing or requesting and you'll have to use receiveBlobInfo and requestPacket (or just call actsHandler)
port  the port the ACTS server is running on, default of 5001
host  the host the ACTS server is running on, default is localhost (ie this machine)
Returns:
true if the connection was established, false otherwise

bool ArACTS_1_2::receiveBlobInfo void   
 

Gets the blob information from the connection to acts.

Checks the connection to the ACTS server for data, if data is there it fills in the blob information, otherwise just returns false

Returns:
true if there was new data and the data could be read succesfully

bool ArACTS_1_2::requestPacket void   
 

Requests another packet.

Requests a packet from the ACTS server, specifically it sends the request to the acts server over its connection

Returns:
true if the command was sent succesfully, false otherwise

bool ArACTS_1_2::requestQuit void   
 

Requests that ACTS quits.

Sends a command to the ACTS server requesting that ACTS quit

Returns:
true if the request was sent succesfully, false otherwise


The documentation for this class was generated from the following files:
Generated on Tue Nov 12 17:43:50 2002 for Aria by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001