Index: trunk/ippTools/src/camtoolConfig.c
===================================================================
--- trunk/ippTools/src/camtoolConfig.c	(revision 12058)
+++ trunk/ippTools/src/camtoolConfig.c	(revision 12131)
@@ -46,12 +46,10 @@
     // -pendingexp
     psMetadata *pendingexpArgs = psMetadataAlloc();
-    psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-exp_tag", 0,
-            "search by exposure ID", NULL);
-    psMetadataAddS32(pendingexpArgs, PS_LIST_TAIL, "-chip_version", 0,
-            "search for exposures with this chip version", -1);
-    psMetadataAddS32(pendingexpArgs, PS_LIST_TAIL, "-cam_version", 0,
-            "search for exposures with this cam version", -1);
+    psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-cam_id", 0,
+            "search by camtool ID", NULL);
+    psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-chip_id", 0,
+            "search by chiptool ID", NULL);
     psMetadataAddU64(pendingexpArgs, PS_LIST_TAIL, "-limit",  0,
-        "limit result set to N items", 0);
+            "limit result set to N items", 0);
     psMetadataAddBool(pendingexpArgs, PS_LIST_TAIL, "-simple", 0,
             "use the simple output format", false);
@@ -60,6 +58,8 @@
     // -pendingimfile
     psMetadata *pendingimfileArgs = psMetadataAlloc();
-    psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-exp_tag", 0,
-            "search by exposure ID", NULL);
+    psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-cam_id", 0,
+            "search by camtool ID", NULL);
+    psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-chip_id", 0,
+            "search by chiptool ID", NULL);
     psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-class", 0,
             "search by class", NULL);
@@ -72,6 +72,8 @@
     // -addprocessedexp
     psMetadata *addprocessedexpArgs = psMetadataAlloc();
-    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-exp_tag", 0,
-            "define exp ID (required)", NULL);
+    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-cam_id", 0,
+            "define camtool ID (required)", NULL);
+    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-chip_id", 0,
+            "define chiptool ID (required)", NULL);
     psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-uri", 0,
             "define URI (required)", NULL);
@@ -96,34 +98,34 @@
     psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-path_base", 0,
             "define banana 1", NULL);
-    psMetadataAddS8(addprocessedexpArgs, PS_LIST_TAIL, "-code",  0,
-        "set fault code (required)", 0);
-    psMetadataAddBool(pendingexpArgs, PS_LIST_TAIL, "-faulted",  0,
-        "only return imfiles with a fault status set", false);
+    psMetadataAddS16(addprocessedexpArgs, PS_LIST_TAIL, "-code",  0,
+            "set fault code (required)", 0);
+    psMetadataAddBool(addprocessedexpArgs, PS_LIST_TAIL, "-faulted",  0,
+            "only return imfiles with a fault status set", false);
 
     // -processedexp
     psMetadata *processedexpArgs = psMetadataAlloc();
-    psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-exp_tag", 0,
-            "search by exposure ID", NULL);
-    psMetadataAddS32(processedexpArgs, PS_LIST_TAIL, "-chip_version", 0,
-            "search for exposures with this chip version", -1);
-    psMetadataAddS32(processedexpArgs, PS_LIST_TAIL, "-cam_version", 0,
-            "search for exposures with this cam version", -1);
+    psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-cam_id", 0,
+            "search by camtool ID", NULL);
+    psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-chip_id", 0,
+            "search by chiptool ID", NULL);
     psMetadataAddU64(processedexpArgs, PS_LIST_TAIL, "-limit",  0,
-        "limit result set to N items", 0);
+            "limit result set to N items", 0);
     psMetadataAddBool(processedexpArgs, PS_LIST_TAIL, "-simple", 0,
             "use the simple output format", false);
     psMetadataAddBool(processedexpArgs, PS_LIST_TAIL, "-faulted",  0,
-        "only return imfiles with a fault status set", false);
+            "only return imfiles with a fault status set", false);
 
     // -updateprocessedexp
     psMetadata *updateprocessedexpArgs = psMetadataAlloc();
-    psMetadataAddStr(updateprocessedexpArgs, PS_LIST_TAIL, "-exp_tag",  0,
-        "search by exposure ID", NULL);
+    psMetadataAddStr(updateprocessedexpArgs, PS_LIST_TAIL, "-cam_id", 0,
+            "search by camtool ID", NULL);
+    psMetadataAddStr(updateprocessedexpArgs, PS_LIST_TAIL, "-chip_id",  0,
+            "search by chiptool ID", NULL);
     psMetadataAddStr(updateprocessedexpArgs, PS_LIST_TAIL, "-class",  0,
-        "search by class", NULL);
+            "search by class", NULL);
     psMetadataAddStr(updateprocessedexpArgs, PS_LIST_TAIL, "-class_id",  0,
-        "search by class ID", NULL);
-    psMetadataAddS8(updateprocessedexpArgs, PS_LIST_TAIL, "-code",  0,
-        "set fault code (required)", 0);
+            "search by class ID", NULL);
+    psMetadataAddS16(updateprocessedexpArgs, PS_LIST_TAIL, "-code",  0,
+            "set fault code (required)", 0);
 
     // -block
@@ -221,5 +223,28 @@
     config->where = psMetadataAlloc();
 
-    addWhereStr(exp_tag);
+{
+    psString str = NULL;
+    bool status = false;
+    if ((str = psMetadataLookupStr(&status, config->args, "-cam_id"))) {
+        if (!psMetadataAddS64(config->where, PS_LIST_TAIL, "cam_id", 0, "==", (psS64)atoll(str))) {
+            psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id");
+            psFree(config);
+            return NULL;
+        }
+    }
+}
+
+{
+    psString str = NULL;
+    bool status = false;
+    if ((str = psMetadataLookupStr(&status, config->args, "-chip_id"))) {
+        if (!psMetadataAddS64(config->where, PS_LIST_TAIL, "chip_id", 0, "==", (psS64)atoll(str))) {
+            psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id");
+            psFree(config);
+            return NULL;
+        }
+    }
+}
+
     // convert '-inst' to 'camera'
     {
