New feature to allow to register components with different names for same class:...
[anna.git] / example / diameter / batchConverter / main.cpp
index 14300cc..7232973 100644 (file)
@@ -89,7 +89,7 @@ int main(int argc, char **argv) {
   if(argc < 3) {
     std::string msg = "Usage: "; msg += exec;
     msg += " <stacks> <working directory> [--hex-only] [--xml-only] [--no-validation] [--ignore-flags] [--debug]\n\n";
-    msg += "       stacks:                  <id1,dictionary1#id2,dictionary2#...#idN,dictionaryN>\n";
+    msg += "       stacks:                  <appid1,dictionary1#appid2,dictionary2#...#appidN,dictionaryN>\n";
     msg += "                                This is a list of #-separated stacks defined by a comma-separated pair <application-id,xml dictionary pathfile>\n";
     msg += "                                If only one stack is provided, application-id could be omitted and then, all the messages will be decoded with the\n";
     msg += "                                dictionary regardless the value of the application-id (the stack will be registered with id=0).\n";
@@ -122,7 +122,7 @@ int main(int argc, char **argv) {
   bool processHex = xmlOnly ? false:true;
   Logger::setLevel(debug ? Logger::Debug:Logger::Warning);
   Logger::initialize(execBN.c_str(), new TraceWriter(filetrace.c_str(), 2048000));
-  G_codecEngine = new anna::diameter::codec::Engine();
+  G_codecEngine = new anna::diameter::codec::Engine("MyCodecEngine");
   G_codecMsg = G_codecEngine->createMessage();
   anna::diameter::stack::Engine &stackEngine = anna::diameter::stack::Engine::instantiate();
 
@@ -148,7 +148,7 @@ int main(int argc, char **argv) {
       }
 
       if(stackTok.size() != 2)
-        throw anna::RuntimeException("Each stack must be in the form '<application-id>#<xml dictionary pathfile>'", ANNA_FILE_LOCATION);
+        throw anna::RuntimeException("Each stack must be in the form '<application-id>,<xml dictionary pathfile>'", ANNA_FILE_LOCATION);
 
       multistack = true;
       stack_it = stackTok.begin();