|
1 /* |
|
2 * Copyright 2005-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 _NODE_COMMAND_H_ |
|
18 #define _NODE_COMMAND_H_ |
|
19 |
|
20 #include <oasys/tclcmd/TclCommand.h> |
|
21 |
|
22 #include "cmd/BundleCommand.h" |
|
23 #include "cmd/LinkCommand.h" |
|
24 #include "cmd/ParamCommand.h" |
|
25 #include "cmd/RouteCommand.h" |
|
26 #include "cmd/StorageCommand.h" |
|
27 |
|
28 namespace dtnsim { |
|
29 |
|
30 class Node; |
|
31 |
|
32 /** |
|
33 * Class to control the node |
|
34 */ |
|
35 class NodeCommand : public oasys::TclCommand { |
|
36 public: |
|
37 NodeCommand(Node* node); |
|
38 |
|
39 /// virtual from TclCommand |
|
40 virtual int exec(int objc, Tcl_Obj** objv, Tcl_Interp* interp); |
|
41 |
|
42 protected: |
|
43 Node* node_; |
|
44 dtn::BundleCommand bundle_cmd_; |
|
45 dtn::LinkCommand link_cmd_; |
|
46 dtn::ParamCommand param_cmd_; |
|
47 dtn::RouteCommand route_cmd_; |
|
48 dtn::StorageCommand storage_cmd_; |
|
49 }; |
|
50 |
|
51 } // namespace dtnsim |
|
52 |
|
53 #endif /* _NODE_COMMAND_H_ */ |