Access Keys:
Skip to content (Access Key - 0)
 

Beehive Roadmap - M1 Database Schema

This milestone is part of the Beehive Roadmap. See the roadmap for full details of milestones and scheduling of milestones.

Database Schema

Create a database schema from data found at http://lirc.sourceforge.net/remotes/. We need a schema to manage (in first phase, LIRC) configuration files in a database.

The typical data needed for the first iteration from a LIRC configuration file are following fields:

Vendor Name (String)

This is the top level hierarchy shown in http://lirc.sourceforge.net/remotes/

Model (String)

This is the second level hierarchy, for example what is shown in http://lirc.sourceforge.net/remotes/sony

Infrared Codes (arbitrary name-value pairs)

Typically consists of string names mapped to infrared code hex values.

For example:

play 0x20
plus 0xD0
ffwd 0xE0
rev 0x10
minus 0xB0
menu 0x40

The name tends to be something the user can locate on his remote, while the value is the actual infrared code sent (how it translates to infrared pulses and spaces is driven by the infrared options, see below)

Infrared Options (prefixed name-value pairs)

There are various option fields in the configuration files. These are interpreted by the specific IR transmitter LIRC device drivers to generate the proper bit sequences for the low level device API.

These tend to be poorly documented, and some fields may be out-of-date or unnecessary.

However, all the data should be preserved so the original LIRC configuration file can be regenerated from the database schema when necessary (see M2 - Java API).

None of the options have semantic meaning to us in the first phases, so they can be stored as name-value pairs that can be later queried by name if necessary.

Some options are obvious and used pretty much by all LIRC config files:

  • name
  • flags
  • header
  • one
  • zero
  • bits
  • eps
  • aeps
  • gap

There's some amount of discovery to be done here. When scraping the config files into database is also the point to discover what all options exist in the current LIRC config files. As mentioned before, this part is rather poorly maintained in LIRC documentation.

When extracting the data from the LIRC configuration files to database, it makes sense to implement the tooling for data scraping in a way that can be later reused for sync functionality in version 2.0 of Beehive.

Useful Resources
 
A sample of three arbitrarily chosen IR remote control configs
Somewhat extensive documentation of LIRC flags values from the WinLIRC homepage
High level view of how infrared codes work

Timestamp

Save a timestamp on each recorded LIRC remote configuration based on the creation date of the file. Timestamps may later be updated based on modifications or sync updates (see Version 2.0 of Beehive)

Other

There are other content in the LIRC config files that should be preserved in order to recreate the original file from a database (see M2 - Java API). For example, the comment sections. Possibly others.

Deliverables

Database schema (with associated schema creation SQL instructions) that can be used to construct and deconstruct LIRC configuration file to a database schema and reverse from schema to a LIRC configuration file.

 
Labels: , , , ,

Added by Administrator

Last edit by Administrator on Feb 06, 2009 23:11

Adaptavist Theme Builder Powered by Atlassian Confluence
Free theme builder license