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

Dependents:   KeyboardTest

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers KeyboardStateChangeMonitor.h Source File

KeyboardStateChangeMonitor.h

00001 #ifndef KEYBOARD_STATE_CHANGE_MONITOR_H_
00002 #define KEYBOARD_STATE_CHANGE_MONITOR_H_
00003 
00004 #include "kbd_mgr/KeyboardStateEventServer.h"
00005 #include "kbd_mgr/KeyboardState.h"
00006 
00007 namespace kbd_mgr {
00008 
00009 /**
00010  * @brief A keyboard state handler that reports only state changes.
00011  */    
00012 class KeyboardStateChangeMonitor : public KeyboardStateEventServer, public KeyboardStateHandler {
00013 public:
00014     virtual void handleState(const KeyboardState &newState);
00015     
00016 private:
00017     KeyboardState lastState;
00018 };
00019 
00020 } // kbd_mgr
00021 
00022 #endif // KEYBOARD_STATE_CHANGE_MONITOR_H_