NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SerialKbdBridge Class Reference

A bridge on the host bus that converts serial chars to keystrokes. More...

Inheritance diagram for SerialKbdBridge:
StaticReceiver< SerialKbdBridge > Device

Public Member Functions

bool receive (MessageSerial &msg)
 SerialKbdBridge (DBus< MessageInput > &bus_input, unsigned serial, unsigned keyboard)
- Public Member Functions inherited from StaticReceiver< SerialKbdBridge >
 StaticReceiver ()
- Public Member Functions inherited from Device
void debug_dump ()
 Device (const char *debug_name)

Private Member Functions

unsigned translate_ascii (unsigned char key)
 Translate ascii code to SCS2 scancodes for an US keyboard layout.
unsigned translate_ansi (unsigned char key)
 Translate ansi escape sequences.
void send_key (unsigned keycode)

Private Attributes

DBus< MessageInput > & _bus_input
unsigned _serial
unsigned _keyboard
unsigned char _escape
unsigned char _escape_chars [5]

Additional Inherited Members

- Static Public Member Functions inherited from StaticReceiver< SerialKbdBridge >
static bool receive_static (Device *o, M &msg)

Detailed Description

A bridge on the host bus that converts serial chars to keystrokes.

State: testing Features: alphanumeric chars, ANSI escape codes Missing: some special chars, see keyboard.h for details.

Constructor & Destructor Documentation

SerialKbdBridge::SerialKbdBridge ( DBus< MessageInput > &  bus_input,
unsigned  serial,
unsigned  keyboard 
)
inline

Member Function Documentation

bool SerialKbdBridge::receive ( MessageSerial msg)
inline
void SerialKbdBridge::send_key ( unsigned  keycode)
inlineprivate
unsigned SerialKbdBridge::translate_ansi ( unsigned char  key)
inlineprivate

Translate ansi escape sequences.

unsigned SerialKbdBridge::translate_ascii ( unsigned char  key)
inlineprivate

Translate ascii code to SCS2 scancodes for an US keyboard layout.

Member Data Documentation

DBus<MessageInput>& SerialKbdBridge::_bus_input
private
unsigned char SerialKbdBridge::_escape
private
unsigned char SerialKbdBridge::_escape_chars[5]
private
unsigned SerialKbdBridge::_keyboard
private
unsigned SerialKbdBridge::_serial
private

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