
Beobot BeoChipListener. More...
#include <Beobot/BeobotBeoChipListener.H>


Public Member Functions | |
| BeobotBeoChipListener (nub::soft_ref< BeoChip > bc) | |
| virtual void | event (const BeoChipEventType t, const int valint, const float valfloat) | 
| An event was received.   | |
Public Attributes | |
| nub::soft_ref< BeoChip > | itsBeoChip | 
| int | minp0 | 
| int | maxp0 | 
| int | minp1 | 
| int | maxp1 | 
| int | counter0 | 
| int | counter1 | 
| int | kbd | 
| bool | moveServo | 
Definition at line 43 of file BeobotBeoChipListener.H.
| virtual void BeobotBeoChipListener::event | ( | const BeoChipEventType | t, | |
| const int | valint, | |||
| const float | valfloat | |||
| ) |  [inline, virtual] | 
        
An event was received.
This function will be called by the BeoChip once you have registered your BeoChipListener derivative with the BeoChip using BeoChip::setListener(). Beware that the call to event() will ve from a thread running in the BeoChip and thus will operate in parallel with your main thread and main loop. See test-BeoChip.C for an example of how to synchronize a main loop with these asynchronous event calls. The following data will be passed along with the event type:
    Type            valint                        valfloat
    ----------------------------------------------------------------------
    NONE         0                             0.0F
    PWM0         pulse 0 width, 1.6us units    calibrated width in [-1..1]
    PWM1         pulse 1 width, 1.6us units    calibrated width in [-1..1]
    KBD          5 LSB show the 5 keys         0.0F
    ADC0         A/D 0 value                   calibrated value in [-1..1]
    ADC1         A/D 0 value                   calibrated value in [-1..1]
    all others   0                             0.0FImplements BeoChipListener.
Definition at line 52 of file BeobotBeoChipListener.H.
 1.6.3