A method for generating program code used to describe relationships
between a plurality of function names and a plurality of control codes of
a device. The method comprises receiving the relationships between the
plurality of function names and the plurality of control codes, detecting
if one of the function names corresponds to more than one control code
and if one of the control codes corresponds to a plurality of function
names. Program code is generated to describe the relationships if there
are no multiple mappings between the control codes and the function
names. A warning message is generated if there is function name
corresponding to more than one control code or a control code corresponds
to more than one function name.