Data Transformation Engine Services Guide
Chapter 21 –  Adding the Adapter to Mercator Command Server 
116
Chapter 21 –  Adding the 
Adapter to Mercator Command 
Server 
In order to add your new adapter to Mercator Command Server, you must change 3 
files and then rebuild Mercator Command Server. The files you must change are 
described below. Similar changes have already been made to these files to add the 
sample adapter “useradapter”. These can be used as an example of how you must make 
the changes for your new adapter. 
Note: You should try to begin any externalized entry points in your adapter with some 2 
or 3 character ID value that is unique. All modules in the Mercator Command Server 
are linked together and therefore all entry points must be unique or the linker will give an 
error of “duplicate entry point name” (or something similar). 
Since the Mercator Command Server was originally designed with shared libraries, it 
was not necessary to take these steps; but now that there are no shared libraries and all 
modules are linked together, there is always a possibility of having duplicates. We did 
not change all of the Mercator supplied adapter entry points to have a unique 2 or 3 
character ID value. 
vtableu.c 
This is a C program that must be compiled and then linked with Mercator Command 
Server. It defines the entry points into your new adapter. Only those entry points that 
will be visible to the Resource Manager component of Mercator Command Server need 
be added here. Miscellaneous supporting functions (global data) need not be defined. 
Note that this file also contains entry points for all the Mercator supplied adapters. That 
section of the file is not shown here. You should NOT alter that section of the file. 
/* vtableu.c */ 
#include <stdio.h> 
#include <stdlib.h> 
#include <vtable.h> 
/* 
HAVE_USER_ADAPTERS determines if we have user written adapters or not. 
User Adapters must be defined in the adapters.xml configuration file. 
*/ 
/* define the externs for sample adapter entry points */ 
#ifdef HAVE_USER_ADAPTERS 
ENTRY_X( useradapter_config ) 
ENTRY_X( UA_CompareWatches ) 
ENTRY_X( UA_CompareResources ) 
ENTRY_X( UA_Get ) 
ENTRY_X( UA_Put ) 
ENTRY_X( UA_BeginTransaction ) 
ENTRY_X( UA_EndTransaction ) 










