KeyboardManager: a class to manage the polling of a switch-matrix keyboard

Dependents:   KeyboardTest

kbd_mgr/KeyboardStateChangeMonitor.h

Committer:
osmeest
Date:
2011-02-03
Revision:
3:1310c57aca77
Parent:
2:eb4cc53ff33d

File content as of revision 3:1310c57aca77:

#ifndef KEYBOARD_STATE_CHANGE_MONITOR_H_
#define KEYBOARD_STATE_CHANGE_MONITOR_H_

#include "kbd_mgr/KeyboardStateEventServer.h"
#include "kbd_mgr/KeyboardState.h"

namespace kbd_mgr {

/**
 * @brief A keyboard state handler that reports only state changes.
 */    
class KeyboardStateChangeMonitor : public KeyboardStateEventServer, public KeyboardStateHandler {
public:
    virtual void handleState(const KeyboardState &newState);
    
private:
    KeyboardState lastState;
};

} // kbd_mgr

#endif // KEYBOARD_STATE_CHANGE_MONITOR_H_