This is an old revision of the document!
Application Components
Written by Dominic Clifton
This is a short guide to my ideas about how to implement new drivers and software for the Ergodex DX1 and any other similar devices.
There are three major components required for operation and configuration of one or more pads.
These are as follows:
Each pad requires a driver, the driver should be a driver that is common to all DX1 pads.
A Pad driver needs to be made for each supported device. (Initially Erogdex's DX1, later maybe CH-Product's Multifunction Panel, Belkin Nostromo N52s, Frogpads, Saitek Eclipse I + Command Pad, Cherry Master-Xpress keyboards, Logitech G-15's, etc)
The pad monitor handles usage of the pads.
The pad configuration editor will be the main user interface from which users will manage pad configurations and record and edit macros.
Pad Driver
Overview
Goals
Primary goals
Allow the pad monitor to send data which it then forwards to the actual device.
Work with one than one pad of the same type.
Pass received data to the Pad Monitor
TODO: complete this list
Pad Monitor
Overview
The pad monitor is the main part of the software that actually makes the device work. All the code for processing device requests and responses is handled by the pad monitor.
The pad monitor is to be written in C++ for maximum portability to Mac OS X and Linux.
Goals
Primary goals
Run all the time a user is logged in
Low memory footprint
Be Fast (execution, start-up, reprogramming pads, etc.)
Detect pad insertion/removal
Uniquely identify pads
Program pads with default configurations
Handle execution of macros
Detect application changes and reconfigure pads as appropriate
Load pad configurations
When pad inserted/detected
When a notification is received from another application
When the configuration files are changed on the file system
Handle starting of a separate macro recording application
needs to pass on which pad recording was started from
needs to pass on active application information (task name, exe's full path, parameters)
needs to pass on which pad configuration is active for the pad that recording was started from
needs to pass on when recording is stopped
needs to pass on which pad button to record the macro to
Support a plugin interface for handling key event actions
events are (key or button pressed/released)
event actions could be: macro playback, midi command, launch app, switch app, etc
Handle requests to change the status indicators from other apps
Show the status of known and connected pads
e.g. one system tray icon or one per pad
change or animate the system tray icons according to pad status
show a status dialog when double clicked, status dialog should have a list of connected pads that can also be enabled/disabled from the UI.
Store all application data in user profile, in XML.
Secondary goals
not to interfere with the NVidia SLI enabling/disabling process.
detect fast user switching user changes (and reprogram the pad accordingly)
Allow multiple users per Windows Login (the software will already support multiple users with different configurations as datafiles are to be stored in the user's profile)
Notes
The pad monitor should be split into several key areas in order for porting to other operating systems to be viable. These are as follows:
Pad Monitor core
Request and Response processing
Configuration file handling (loading and processing of XML files)
Status UI
Active application detection
Plugins for handling events
Pad Configuration Editor
Overview
The Pad Configuration Editor is to be written in C# to allow for rapid application development over portability. The fact that we require a rich UI that fits in with the host operating system's UI means that if the UI was to be cross-platform it would not be as rich as we want it to be. Also, some areas of the application are vastly different between operating systems (e.g. macro recording). The areas that are the same between different platforms should be written in separate class libraries that can be used on all platforms - e.g. loading, saving and parsing of internal data into XML, etc.
Goals
Primary goals
Run on demand, not all the time, to avoid high memory footprint!
Create, Modify and Delete pad configurations
Show a multicolumn tree-view of pad configurations on the left
Tree nodes: all configurations, configurations by pad, configurations by applications
Columns: configuration name, pad usage (pad1, pad2), application name, layout name
Create backups of pad configurations when record button is used (in case you screw up the recording!)
Allow recording of macros without focussing (or even showing) the pad configuration editor
Re-sizable window
Define physical keyboard layouts
Allow user to and reposition the keys on the pad to match the layout of the keys on their device.
Assign keyboard layouts to pads
Assign background image to layout, show background image in UI.
Define named key groups
Define key actions
Single Key Action (e.g. Key 1 behaves the same as 'w')
Modifier Key(s) Action (e.g. Key 2 can be shift AND control)
Momentary Press Action (e.g. Key 4 can enable 'Key group 1' when held)
Cycle Action (e.g. Key 5 can enable 'Key Group 2' → 'Key Group 3' → 'Key Group …' → 'Key Group 1' each time it's pressed and released.
Use available plugins to perform additional actions
Key Actions should be able to have events (e.g. 'Key 6' could cycle between key groups and also use an event plugin. The plugin, for example, might update a status indicator either on a device or in the host os).
Automatically save changes
Communicate with the Pad Monitor when changes have been made.
Secondary goals
Allow multiple users per Windows Login (the software will already support multiple users with different configurations as datafiles are to be stored in the user's profile)
Import pad configurations from the original Ergodex supplied software.
Allow exporting of keyboard layout templates to vector file formats, so it can be loaded in Photoshop, etc.
Notes
It should be noted that because we eventually want cross-platform drivers that operating system specific information should be noted as such in any data files that are created so it can be handled appropriately by both the pad monitor and by the configuration editor.
I initially thought about being able to share pad configurations with users of other operating systems, but when it comes down to it the amount of work involved makes it un-worthwhile, especially when considering all the differences between the keyboards, joysticks and mice of the different OS's. At a basic level it'd be nice for application developers to include a single Ergodex configuration with their cross-platform software but it's doubtful they'd all be the same anyway, so initially don't expect a Quake 4 profile created on the Windows version of the software to load and work on Linux or Mac OSX and vice-versa.
software_components.1171040941.txt.gz · Last modified: 2007/02/09 18:09 (external edit)