servlib/cmd/TestCommand.h
changeset 0 2b3e5ec03512
equal deleted inserted replaced
-1:000000000000 0:2b3e5ec03512
       
     1 /*
       
     2  *    Copyright 2004-2006 Intel Corporation
       
     3  * 
       
     4  *    Licensed under the Apache License, Version 2.0 (the "License");
       
     5  *    you may not use this file except in compliance with the License.
       
     6  *    You may obtain a copy of the License at
       
     7  * 
       
     8  *        http://www.apache.org/licenses/LICENSE-2.0
       
     9  * 
       
    10  *    Unless required by applicable law or agreed to in writing, software
       
    11  *    distributed under the License is distributed on an "AS IS" BASIS,
       
    12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
    13  *    See the License for the specific language governing permissions and
       
    14  *    limitations under the License.
       
    15  */
       
    16 
       
    17 #ifndef _TEST_COMMAND_H_
       
    18 #define _TEST_COMMAND_H_
       
    19 
       
    20 // XXX/demmer this really belongs in the daemon directory...
       
    21 
       
    22 #include <oasys/tclcmd/TclCommand.h>
       
    23 
       
    24 namespace dtn {
       
    25 
       
    26 /**
       
    27  * CommandModule for the "test" command.
       
    28  */
       
    29 class TestCommand : public oasys::TclCommand {
       
    30 public:
       
    31     TestCommand();
       
    32 
       
    33     /**
       
    34      * Binding function. Since the class is created before logging is
       
    35      * initialized, this can't be in the constructor.
       
    36      */
       
    37     void bind_vars();
       
    38 
       
    39     /**
       
    40      * Virtual from CommandModule.
       
    41      */
       
    42     virtual int exec(int argc, const char** argv, Tcl_Interp* interp);
       
    43     
       
    44     int id_;			///< sets the test node id
       
    45     std::string initscript_;	///< tcl script to run at init
       
    46     std::string argv_;		///< "list" of space-separated args
       
    47 };
       
    48 
       
    49 } // namespace dtn
       
    50 
       
    51 #endif /* _TEST_COMMAND_H_ */