Adaptation/GUID-F8B8C030-B5E1-5EB3-A672-83BF35555801.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-F8B8C030-B5E1-5EB3-A672-83BF35555801" xml:lang="en"><title>halcfg.pl
Syntax</title><shortdesc><filepath>halcfg.pl</filepath> is a Perl script that is used by
the build system to generate the C++ source files from the Config and Values
files. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p> </p>
<p>There are four modes in which the Perl script <codeph>halcfg.pl</codeph> can
be used. </p>
<ul>
<li id="GUID-9EABDCC1-4C8A-5850-9631-0FC96CCC50F8"><codeblock id="GUID-4E07A1C2-DAD6-5603-BD1B-6FECE39B419D" xml:space="preserve">perl halcfg.pl hal_data.h values.hda values.cpp</codeblock> <p>takes the <filepath>values.hda</filepath> text file and generates a table
of initial values for items stored by the HAL. </p> </li>
<li id="GUID-04ABED61-2606-50DF-AD74-C80A12F0692F"><codeblock id="GUID-38B36C83-FCDF-597B-B73D-F6A2CE8CC3D9" xml:space="preserve">perl halcfg.pl -x hal_data.h config.hcf config.cpp</codeblock> <p>generates three tables: </p> <ul>
<li id="GUID-054BE9E6-8582-527E-BEA3-FED29CD9DFD3"><p>the properties, i.e.
whether valid and/or writable, for each item </p> </li>
<li id="GUID-0D4A169F-4E5D-5569-9D77-CA45E94402D4"><p>the offset of each item
within the <codeph>DllGlobal</codeph> block </p> </li>
<li id="GUID-28AF093B-5D68-57CF-900B-206F29F67003"><p>the function implementing
each item, for derived attributes (i.e. those attributes that are not simply
stored by the HAL. </p> </li>
</ul> </li>
<li id="GUID-82EDD6DB-9256-560B-8400-39789B02504D"><codeblock id="GUID-495F247E-1ED9-533A-9780-8D328E3499D7" xml:space="preserve">perl halcfg.pl -s hal_data.h config.hcf source.cpp</codeblock> <p>generates a source file containing skeleton code for the implementation
of the accessor function for each derived attribute </p> </li>
<li id="GUID-33E34298-1367-5FBC-B582-37EB413345AF"><codeblock id="GUID-B291494F-3D32-5A32-A775-3425E4F1750A" xml:space="preserve">perl halcfg.pl -h hal_data.h config.hcf header.h</codeblock> <p>generates a header file containing prototypes for the accessor functions
for each derived attribute </p> </li>
</ul>
<p>Note that the header file <filepath>hal_data.h</filepath> containing the
attributes and values used by the HAL is passed on all calls to the Perl script. </p>
</conbody></concept>