Interface for Control Plane module that is necessary for it to work with pfpdb. More...
#include <CPDebuggerInterface.h>
Classes | |
class | TableEntry |
Data Structure used to represent table entries so that they can be stored. More... | |
Public Types | |
enum | TableEntryStatus { OK, INSERTING, DELETING, MODIFYING, NONE } |
Public Member Functions | |
virtual void | do_command (std::string command)=0 |
void | updateHandle (std::string table_name, std::string match_key, std::string action_name, uint64_t handle) |
Update the handle of an entry in internal list of entries. More... | |
void | addTableEntry (std::string table_name, std::string match_key, std::string action_name, std::vector< std::string > action_data, uint64_t handle=-1) |
Add a table entry to internal list of entries. More... | |
void | printTableEntries () |
Print the internal list of entries to stdout. More... | |
void | updateTableEntry (std::string table_name, uint64_t handle, std::string action_name, std::vector< std::string > action_data) |
Update or modify an entry that has already been added to the internal list of entries. More... | |
void | deleteTableEntry (std::string table_name, uint64_t handle) |
Delete an entry from the internal list of entries. More... | |
void | confirmUpdateEntry (std::string table_name, uint64_t handle) |
void | confirmDeleteEntry (std::string table_name, uint64_t handle) |
std::vector < CPDebuggerInterface::TableEntry > | getAllTableEntries () |
Get internal list of table entries. | |
Protected Attributes | |
std::map< std::string, std::map< std::string, std::vector< TableEntry > > > | table_entries |
List of table entries (in a more convenient data structure) | |
Detailed Description
Interface for Control Plane module that is necessary for it to work with pfpdb.
It defines what operations must be supported for the debugger to work. Provides functions to maintain a list of entries so that it may be accessed by the debugger. It is the user's responsibility to call these functions at the appropriate time so that the debugger remains up-to-date.
Member Function Documentation
void pfp::core::db::CPDebuggerInterface::addTableEntry | ( | std::string | table_name, |
std::string | match_key, | ||
std::string | action_name, | ||
std::vector< std::string > | action_data, | ||
uint64_t | handle = -1 |
||
) |
Add a table entry to internal list of entries.
- Parameters
-
table_name Name of table to which the entry belongs. match_key Match key for the entry. action_name Name of action associated with entry. action_data Data used with the action for this entry.
void pfp::core::db::CPDebuggerInterface::deleteTableEntry | ( | std::string | table_name, |
uint64_t | handle | ||
) |
Delete an entry from the internal list of entries.
- Parameters
-
table_name [description] handle [description]
void pfp::core::db::CPDebuggerInterface::printTableEntries | ( | ) |
Print the internal list of entries to stdout.
Useful for debugging.
void pfp::core::db::CPDebuggerInterface::updateHandle | ( | std::string | table_name, |
std::string | match_key, | ||
std::string | action_name, | ||
uint64_t | handle | ||
) |
Update the handle of an entry in internal list of entries.
Useful if the handle is not known when addTableEntry is called This handle is necessary for modifying or deleting an entry.
- Parameters
-
table_name Name of table in which the entry is found. match_key Key of the entry. action_name Name of the action of the entry. handle New unique identifier for entry.
void pfp::core::db::CPDebuggerInterface::updateTableEntry | ( | std::string | table_name, |
uint64_t | handle, | ||
std::string | action_name, | ||
std::vector< std::string > | action_data | ||
) |
Update or modify an entry that has already been added to the internal list of entries.
- Parameters
-
table_name Name of table to which the entry belongs. handle Unique identifier of the entry. action_name Name of the new action for the entry. action_data The new data to be used with the action.
The documentation for this class was generated from the following files:
- /home/lemniscate/workspace/PFPSim/pfpsim/core/debugger/CPDebuggerInterface.h
- /home/lemniscate/workspace/PFPSim/pfpsim/core/debugger/CPDebuggerInterface.cpp