TOC PREV NEXT INDEX

Put your logo here!


12 APPENDIX A: PORTING INSTRUMENTS TO MAR2001

From MAR2001, ICB supports running multiple ICSs in the same workstation and environment. To be able to differentiate between instruments, the ICB interface had to be updated. This appendix explains how to port instrument software created with previous versions of ICB to the MAR2001 version1.

The following updates need to be performed:

· Rename the instrument configuration set from "INS" to "XXXX", and from "START" to "XXXX_START" (in file xxmcfg/config/xxmcfgCONFIG.cfg). This allows to differentiate the instrument configurations.
· All icb<Cmd> utilities have to receive now as first argument the instrument identifier "XXXX" (as used above), i.e. replace in the sources:
icb<Cmd> <arguments>
with:
icb<Cmd> XXXX <arguments>

· In the xxi/dbl/xxiEnv*.db files: environment variable icbID must be defined before including file icbEnv.db, to tell ICB for what instrument to build the OLDB structure. E.g.:
#undef icbID XXXX
#define icbID XXXX
#include "icbEnv.db"

· If the instrument has several LCUs, then in files xxi/dbl/xxiEnv2.db, xxiEnv3.db, etc. the icbEnv.db include is needed only by the LCU environment, because the ICS branch for the WS environment is already included in file xxiEnv1.db. E.g.:
#ifdef MAKE_VXWORKS
#define icbID XXXX
#include "icbEnv.db"
#endif

· In file xxins/config/xxins.cshrc: insert a tcsh shell check before calling icbEnvSet (script arguments are not supported by csh).

Software modules xxins, xxi and xxmcfg have to be updated. The above updates can either be applied manually, or using a simple script supplied for this purpose, as follows:

mkdir temp
cd temp
cmmModify xxins
cmmModify xxi
cmmModify xxmcfg
# Note: There is a dot at the end of next line, as third argument.
icbPatch xx XXXX .

with xx being the instrument module prefix (INS.CON.PREFIX) and XXXX the instrument identifier (INS.CON.ID).

As icbPatch is a simple utility, it is recommended to check the files modified by icbPatch, and if necessary, to manually update them as described above. At the end the produced *.bak files can be deleted.

Notes:

1. icbPatch should only modify old syntax. I.e. if icbPatch will not work if applied e.g. to the new XXXX Template Instrument sources, as these already use the new syntax.
2. If the sources supplied to icbPatch have already been modified, then icbPatch will not apply the updates.
E.g. file xxins/ENVIRONMENTS/wxxxx/dbl/Makefile contains:
DBL_FLAGS = ... `icbConfigGet DBL_FLAGS_WS`

If this is modified and now contains e.g.:
DBL_FLAGS = ... `icbConfigGet XYZ DBL_FLAGS_WS`

then icbPatch will NOT modify this, assuming that the developer has some good reason for using string "XYZ". If this in fact is not the instrument identifier, then the developer has to manually modify the sources.





___oOo___

1
This is not needed, if the instrument was based in the XXXX Template Instrument module xxins, version 2.11 or higher.



Quadralay Corporation
http://www.webworks.com
Voice: (512) 719-3399
Fax: (512) 719-3606
sales@webworks.com
TOC PREV NEXT INDEX