SST  14.1.0
StructuralSimulationToolkit
simpleDebug.h
1 // Copyright 2009-2024 NTESS. Under the terms
2 // of Contract DE-NA0003525 with NTESS, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2024, NTESS
6 // All rights reserved.
7 //
8 // This file is part of the SST software package. For license
9 // information, see the LICENSE file in the top level directory of the
10 // distribution.
11 
12 #ifndef SST_CORE_IMPL_INTERACTIVE_SIMPLEDEBUG_H
13 #define SST_CORE_IMPL_INTERACTIVE_SIMPLEDEBUG_H
14 
15 #include "sst/core/eli/elementinfo.h"
16 #include "sst/core/interactiveConsole.h"
17 
18 namespace SST {
19 namespace IMPL {
20 namespace Interactive {
21 
22 /**
23  Self partitioner actually does nothing. It is simply a pass
24  through for graphs which have been partitioned during graph
25  creation.
26 */
28 {
29 
30 public:
32  SimpleDebugger, "sst", "interactive.simpledebug", SST_ELI_ELEMENT_VERSION(1, 0, 0),
33  "{EXPERIMENTAL} Basic interactive debugging console for interactive mode.")
34 
35  /**
36  Creates a new self partition scheme.
37  */
38  SimpleDebugger(Params& params);
39 
40  void execute(const std::string& msg) override;
41 
42 private:
43  // This is the stack of where we are in the class hierarchy. This
44  // is needed because when we advance time, we'll need to delete
45  // any ObjectMap because they could change during execution.
46  // After running, this will allow us to recreate the working
47  // directory as far as we can.
48  std::vector<std::string> name_stack;
49 
51  bool done = false;
52 
53  std::vector<std::string> tokenize(std::vector<std::string>& tokens, const std::string& input);
54 
55  void cmd_pwd(std::vector<std::string>& UNUSED(tokens));
56  void cmd_ls(std::vector<std::string>& UNUSED(tokens));
57  void cmd_cd(std::vector<std::string>& tokens);
58  void cmd_print(std::vector<std::string>& tokens);
59  void cmd_set(std::vector<std::string>& tokens);
60  void cmd_time(std::vector<std::string>& tokens);
61  void cmd_run(std::vector<std::string>& tokens);
62 
63  void dispatch_cmd(std::string cmd);
64 };
65 
66 } // namespace Interactive
67 } // namespace IMPL
68 } // namespace SST
69 
70 #endif
SST_ELI_REGISTER_INTERACTIVE_CONSOLE(SimpleDebugger, "sst", "interactive.simpledebug", SST_ELI_ELEMENT_VERSION(1, 0, 0), "{EXPERIMENTAL} Basic interactive debugging console for interactive mode.") SimpleDebugger(Params &params)
Creates a new self partition scheme.
Self partitioner actually does nothing.
Definition: simpleDebug.h:27
Definition: action.cc:18
Class created by the serializer mapping mode used to map the variables for objects.
Definition: objectMap.h:61
void execute(const std::string &msg) override
Called by TimeVortex to trigger checkpoint on simulation clock interval - not used in parallel simula...
Definition: simpleDebug.cc:26
Definition: interactiveConsole.h:42
Parameter store.
Definition: params.h:55