Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages | Examples

AiboLed Class Reference

#include <aiboled.h>

Collaboration diagram for AiboLed:

Collaboration graph
[legend]

Public Member Functions

 AiboLed ()
virtual ~AiboLed ()
Methods for led primitives
void OpenPrimitives ()
Methods for command vectors
RCRegion * FindFreeRegion () const
int FindFreeRegionIndex () const
RCRegion * GetRegion (int index=0)
int GetValidRegions () const
void NewCommandVectorData (int numVecs=1)
void SetCommandVector (int index, OCommandVectorData *vec)
Methods for LED manipulation
void SetLed (LED led, bool on, int time, int cmdVecIndex=0)
void SetLed (LED led, int time, int cmdVecIndex)
void SetLed (LED led, int time, bool on=true, int cmdVecIndex=0)
void SetLedTime (LED led, int time, bool on=true, int cmdVecIndex=0)
void SetHeadLight (int time, bool on=true, int cmdVecIndex=0)

Data Fields

RCRegion * Region [MaxLedRegions]

Static Public Attributes

static const int MaxLedRegions = 3

Protected Attributes

int LedIndex [NUM_LEDS]
int ValidRegions
OPrimitiveID LedID [NUM_LEDS]

Detailed Description

Class for manipulation of led states
Examples:

LedsExample.h.


Constructor & Destructor Documentation

AiboLed::AiboLed  ) 
 

Default constructor

virtual AiboLed::~AiboLed  )  [inline, virtual]
 

Default destructor


Member Function Documentation

void AiboLed::OpenPrimitives  ) 
 

Method opens all LED primitives and stores them in the LedID array

RCRegion * AiboLed::FindFreeRegion  )  const
 

Finds a free memory region (RCRegion) in which the next command data can be set

Returns:
Free RCRegion

int AiboLed::FindFreeRegionIndex  )  const
 

Finds a free memory region (RCRegion) in which the next command data can be set

Returns:
Index of free RCRegion

RCRegion * AiboLed::GetRegion int  index = 0  )  [inline]
 

Returns the CommandVectorData obtained by the region corresponding to the index

Parameters:
index Index of the RCRegion which is returned
Returns:
The RCRegion (which includes the command vector

int AiboLed::GetValidRegions  )  const [inline]
 

Returns the number of valid regions

Returns:
Number of valid regions

void AiboLed::NewCommandVectorData int  numVecs = 1  ) 
 

Methods creates an new LedCcommandVector for setting led status

Parameters:
numVecs number of Led CommandVectors

void AiboLed::SetCommandVector int  index,
OCommandVectorData *  vec
 

Method allows user to insert an own command vector in memory region

Bug:
SetCommandVector(int,OCommandVectorData) Valid Regions is not checked and set
Parameters:
index Index of Region in which the command vector is set
vec Command vector to be set

void AiboLed::SetLed LED  led,
bool  on,
int  time,
int  cmdVecIndex = 0
 

Switches a Led on or off corresponding to the "on" value for a given time.

Deprecated:
Use SetLed(LED , int , bool ,int) instead
Parameters:
led Led to be switched
on On or off
time Time for switching (in frames)
cmdVecIndex Index oft he command vector in which the light should be enabled

void AiboLed::SetLed LED  led,
int  time,
int  cmdVecIndex
 

Switches a Led on or off corresponding to the "on" value.

Deprecated:
Use SetLed(LED , int , bool ,int) instead
Parameters:
led The Led to be switched
time Time (*8ms) for which the led is enabled
cmdVecIndex Index oft he command vector in which the light should be enabled

void AiboLed::SetLed LED  led,
int  time,
bool  on = true,
int  cmdVecIndex = 0
 

Switches a Led on or off corresponding to the "on" value.

Parameters:
led The Led to be switched
time Time(*8ms )/Frames for which the led is enabled
on On or off?
cmdVecIndex Index oft he command vector in which the light should be enabled

void AiboLed::SetLedTime LED  led,
int  time,
bool  on = true,
int  cmdVecIndex = 0
 

Switches a Led on or off corresponding to the "on" value.

Parameters:
led The Led to be switched
time Time (ms) for which the led is enabled
on On or off?
cmdVecIndex Index oft he command vector in which the light should be enabled

void AiboLed::SetHeadLight int  time,
bool  on = true,
int  cmdVecIndex = 0
[inline]
 

Switches the retractable HeadLight on or off corresponding to the "on" value.

Parameters:
time Time (*8ms) for which the led is enabled
on On or off
cmdVecIndex The index oft he command vector in which the light should be enabled

Here is the call graph for this function:


Field Documentation

const int AiboLed::MaxLedRegions = 3 [static]
 

Number of maximum allowd RCRegions for storing led-patterns.

RCRegion* AiboLed::Region[MaxLedRegions]
 

Array of RcRegions for storing led-patterns

int AiboLed::LedIndex[NUM_LEDS] [protected]
 

Mapping array for LED's in OCommandVectorData, to local LED_ARRAY

int AiboLed::ValidRegions [protected]
 

Number of valid RCRegions with led-patterns

OPrimitiveID AiboLed::LedID[NUM_LEDS] [protected]
 

Array containig the PrimitiveID's of the led's


The documentation for this class was generated from the following files:

tams Tim Baier AiboLib v0.2.4
Generated Thu Jan 19 11:55:36 2006 by doxygen 1.4.3