#include <TcaControlBundle.h>
Public Types | |
enum | TypeCode { CB_NULL, CB_ADV, CB_ADV_SENT, CB_ASK, CB_ASK_RECEIVED, CB_ASK_SENT, CB_COA, CB_COA_SENT, CB_REG_RECEIVED, CB_ROUTES, CB_UNB, CB_LINK_ANNOUNCE, CB_LINK_AVAILABLE, CB_LINK_UNAVAILABLE, CB_CONTACT_UP, CB_CONTACT_DOWN, CB_UNKNOWN } |
Public Member Functions | |
TcaControlBundle () | |
TcaControlBundle (const std::string &payload) | |
virtual | ~TcaControlBundle () |
virtual std::string | str () const |
void | dump (const std::string &intro) const |
Static Public Member Functions | |
static std::string | eat_to_tab (std::string &s) |
Public Attributes | |
TypeCode | type_ |
std::string | code_ |
std::vector< std::string > | args_ |
Static Protected Member Functions | |
static bool | parse_payload (const std::string &payload, TypeCode &type, std::string &code, std::string &body) |
Definition at line 36 of file TcaControlBundle.h.
Definition at line 40 of file TcaControlBundle.h.
dtn::TcaControlBundle::TcaControlBundle | ( | ) | [inline] |
Definition at line 64 of file TcaControlBundle.h.
dtn::TcaControlBundle::TcaControlBundle | ( | const std::string & | payload | ) |
Definition at line 32 of file TcaControlBundle.cc.
References args_, code_, eat_to_tab(), parse_payload(), and type_.
virtual dtn::TcaControlBundle::~TcaControlBundle | ( | ) | [inline, virtual] |
Definition at line 70 of file TcaControlBundle.h.
void dtn::TcaControlBundle::dump | ( | const std::string & | intro | ) | const |
Definition at line 105 of file TcaControlBundle.cc.
std::string dtn::TcaControlBundle::eat_to_tab | ( | std::string & | s | ) | [static] |
Definition at line 117 of file TcaControlBundle.cc.
Referenced by TcaControlBundle().
bool dtn::TcaControlBundle::parse_payload | ( | const std::string & | payload, | |
TypeCode & | type, | |||
std::string & | code, | |||
std::string & | body | |||
) | [static, protected] |
Definition at line 64 of file TcaControlBundle.cc.
References CB_ADV, CB_ADV_SENT, CB_ASK, CB_ASK_RECEIVED, CB_ASK_SENT, CB_COA, CB_COA_SENT, CB_CONTACT_DOWN, CB_CONTACT_UP, CB_LINK_ANNOUNCE, CB_LINK_AVAILABLE, CB_LINK_UNAVAILABLE, CB_REG_RECEIVED, CB_ROUTES, CB_UNB, and CB_UNKNOWN.
Referenced by TcaControlBundle().
std::string dtn::TcaControlBundle::str | ( | ) | const [virtual] |
Definition at line 45 of file TcaControlBundle.cc.
Referenced by dtn::check_nargs(), and check_nargs().
std::vector<std::string> dtn::TcaControlBundle::args_ |
Definition at line 62 of file TcaControlBundle.h.
Referenced by dtn::TcaWrappedBundle::append_arg(), dtn::check_nargs(), check_nargs(), dtn::TcaWrappedBundle::dest(), dump(), TcaController::gate_reg(), dtn::TcaRouter::handle_add_route(), dtn::TcaRouter::handle_ask(), TcaController::handle_ask_received(), TcaController::handle_coa_sent(), dtn::TcaRouter::handle_del_route(), dtn::TcaRouter::handle_get_routes(), TcaController::handle_link_announce(), dtn::TcaRouter::handle_register(), TcaController::handle_routes(), TcaController::handle_unb(), dtn::log_controlbundle(), dtn::TcaRouter::on_adv_transmitted(), dtn::TcaRouter::on_ask_transmitted(), dtn::TcaRouter::on_coa_transmitted(), TcaController::route_reg(), dtn::TcaWrappedBundle::source(), str(), TcaControlBundle(), and dtn::TcaWrappedBundle::TcaWrappedBundle().
std::string dtn::TcaControlBundle::code_ |
Definition at line 61 of file TcaControlBundle.h.
Referenced by dump(), dtn::TcaRouter::handle_bl_control_bundle(), TcaController::handle_bundle_received(), dtn::TcaRouter::handle_bundle_transmitted(), dtn::log_controlbundle(), str(), and TcaControlBundle().
Definition at line 60 of file TcaControlBundle.h.
Referenced by TcaController::handle_bundle_received(), and TcaControlBundle().