Appendix E. Documents for developers

Table of Contents

Monitor database structure
Control list
Monitor Profiles

Monitor database structure

The monitor database is written in XML, it can be found in the db directory of ddccontrol-db package.

This directory contains the following files:

  • options.xml
  • monitor/%monitor_id%.xml

Control list

XML file: options.xml

control elements (e.g. “brightness”) are contained in group elements (e.g. “color settings”). group and subgroup elements allow the GUI to separate the controls in different branches on the tree.

options attributes:

  • date: indicates the release date of the current database (YYYYMMDD format).
  • dbversion: indicates which version of database format is used (must be set to 1).

control attributes:

  • id: abbreviated control name.
  • name: full English control name.
  • address: DDC address (optional).
  • type: one of these values:
    • “value”: The control accepts values in a continuous range (e.g. brightness).
    • “command”: An action occurs when the value is set to something greater than “0” (e.g. degauss). If you don't define any value element in a command control, the default value “0x01” will be used.
    • “list”: The control accepts a list of values (e.g. OSD language).

value attributes:

  • id: abbreviated value name.
  • name: full English value name (it is not needed if there is only one value for command controls).
  • value: DDC control value (optional).

File format:

<?xml version="1.0"?>
<options date="%date%" dbversion="1">
  <group name="%groupname%">
    <subgroup name="%subgroupname%">
      <control id="%control_id%" type="value" name="%control_name%" address="%hex_address%"/>
        <!-- Command using the default 0x01 address -->
      <control id="%control_id%" type="command" name="%control_name%" address="%hex_address%"/>
      <control id="%control_id%" type="command" name="%control_name%" address="%hex_address%">
        <value id="%value_id%" value="%hex_value%"/>
      <control id="%control_id%" type="list" name="%control_name%" address="%hex_address%">
        <value id="%value_id%" name="%value_name%" value="%hex_value%"/>
      <control ...>
  <group ...>

Monitor Profiles

XML files: monitor/%monitor_id%.xml

List of controls supported by a monitor.

control id attributes are defined in options.xml. If control type is “list” or “command” without non-default value, supported values must be defined.

address attribute for control elements and value attribute for value elements are optional if they are defined in the general options file.

The init attribute in monitor element define the type of the initialization: DDC/CI standard (“standard”), or Samsung (“samsung”).

The caps attribute is optional. Its format is defined in ACCESS.bus specifications and is treated as following:

  • If caps is not defined, caps are read from monitor.

  • If this attribute exists and have a “vcp” string (e.g. “type(lcd) vcp(10 12)”) then the specified caps string is used.

  • If this attribute exists but does not have a “vcp” (e.g. “type(crt)” or “”), then all controls defined in the monitor profile are supposed to be supported.

You can set a delay attribute in control elements to set the time in milliseconds to wait after changing the value of this control. If you don't, a default value is used.

File format:

<?xml version="1.0"?>
<monitor name="%full_monitor_name%" init="[standard|samsung]" caps="%caps%">
    <!--- value -->
    <control id="%control_id%" address="%hex_address%" delay="%wait_time%"/>
    <!--- command using a default 0x01 value-->
    <control id="%control_id%" address="%hex_address%" delay="%wait_time%"/>
    <!--- command -->
    <control id="%control_id%" address="%hex_address%" delay="%wait_time%">
      <value id="activate" value="%hex_value%"/>
    <!--- list -->
    <control id="%control_id%" address="%hex_address%" delay="%wait_time%">
      <value id="%value_id%" value="%hex_value%"/>

If a monitor supports exactly the same controls as another one, you can define it as shown:

<?xml version="1.0"?>
<monitor include="%monitor_id%" name="%full_monitor_name%" caps="%caps%"/> Logo