#include <source/ariba/utility/misc/OvlVis.h>
Public Types | |
enum | _NETWORK_ID { NETWORK_ID_BASE_COMMUNICATION = 1, NETWORK_ID_BASE_OVERLAY = 2, NETWORK_ID_EONSON = 3, NETWORK_ID_MCPO = 4, NETWORK_ID_CLIO = 5, NETWORK_ID_VIDEOSTREAM = 6, NETWORK_ID_GAME = 7, NETWORK_ID_SECURITY = 8 } |
enum | _NODE_COLORS { NODE_COLORS_GREY, NODE_COLORS_GREEN, NODE_COLORS_RED } |
enum | _ICON_ID { ICON_ID_DEFAULT_NODE = 0, ICON_ID_PC = 1, ICON_ID_PC_WORLD = 2, ICON_ID_FAILURE = 3, ICON_ID_RED_CROSS = 4, ICON_ID_CHARACTER_A = 5, ICON_ID_CHARACTER_W = 6, ICON_ID_CAMERA = 7 } |
typedef enum ariba::utility::OvlVis::_NETWORK_ID | NETWORK_ID |
typedef enum ariba::utility::OvlVis::_NODE_COLORS | NODE_COLORS |
typedef enum ariba::utility::OvlVis::_ICON_ID | ICON_ID |
Public Member Functions | |
void | visCreate (NETWORK_ID network, NodeID &node, string nodename, string info) |
void | visChangeStatus (NETWORK_ID network, NodeID &node, bool enable, string info) |
void | visConnect (NETWORK_ID network, NodeID &srcnode, NodeID &destnode, string info) |
void | visDisconnect (NETWORK_ID network, NodeID &srcnode, NodeID &destnode, string info) |
void | visFailedConnect (NETWORK_ID network, NodeID &srcnode, NodeID &destnode, string info) |
void | visShutdown (NETWORK_ID network, NodeID &node, string info) |
void | visChangeNodeColor (NETWORK_ID network, NodeID &node, unsigned char r, unsigned char g, unsigned char b) |
void | visChangeNodeColor (NETWORK_ID network, NodeID &node, NODE_COLORS color) |
void | visChangeNodeIcon (NETWORK_ID network, NodeID &node, ICON_ID icon) |
void | visShowNodeLabel (NETWORK_ID network, NodeID &node, string label) |
void | visDeleteNodeLabel (NETWORK_ID network, NodeID &node) |
void | visShowNodeBubble (NETWORK_ID network, NodeID &node, string label) |
void | visDeleteNodeBubble (NETWORK_ID network, NodeID &node) |
void | visShowShiftedNodeIcon (NETWORK_ID network, NodeID &node, ICON_ID iconID, unsigned int timeout=0) |
void | visDeleteShiftedNodeIcon (NETWORK_ID network, NodeID &node) |
void | visChangeLinkWidth (NETWORK_ID network, NodeID &srcnode, NodeID &destnode, unsigned int width) |
void | visChangeLinkColor (NETWORK_ID network, NodeID &srcnode, NodeID &destnode, unsigned char r, unsigned char g, unsigned char b) |
void | visChangeLinkColor (NETWORK_ID network, NodeID &srcnode, NodeID &destnode, NODE_COLORS color) |
void | visShowLinkLabel (NETWORK_ID network, NodeID &srcnode, NodeID &destnode, string label) |
void | visDeleteLinkLabel (NETWORK_ID network, NodeID &srcnode, NodeID &destnode) |
void | visShowOnLinkIcon (NETWORK_ID network, NodeID &srcnode, NodeID &destnode, ICON_ID iconID) |
void | visDeleteOnLinkIcon (NETWORK_ID network, NodeID &srcnode, NodeID &destnode) |
void | visShowLinkBubble (NETWORK_ID network, NodeID &srcnode, NodeID &destnode, string label) |
void | visDeleteLinkBubble (NETWORK_ID network, NodeID &srcnode, NodeID &destnode) |
void | visSendMessage (NETWORK_ID network, NodeID &startnode, NodeID &endnode) |
void | visCLIOInitMeasurement (NETWORK_ID network, unsigned long edgekey, NodeID &srcnode, NodeID &destnode, string info) |
void | visCLIOEndMeasurement (NETWORK_ID network, unsigned long edgekey, NodeID &srcnode, NodeID &destnode, string info, string value, string unit) |
Static Public Member Functions | |
static OvlVis & | instance () |
Protected Member Functions | |
OvlVis () | |
~OvlVis () | |
Private Types | |
typedef pair< NodeID, NodeID > | NodePair |
typedef KeyMapping< NodePair > | NetworkLinks |
typedef KeyMapping< NodePair > | LinkBubbles |
typedef KeyMapping< NodeID > | NodeBubbles |
typedef KeyMapping< NodeID > | ShiftedNodeIcons |
typedef KeyMapping< NodePair > | OnLinkIcons |
Private Member Functions | |
use_logging_h (OvlVis) | |
void | sendMessage (const string msg, NETWORK_ID nid) |
void | sendSocket (const string msg) |
Private Attributes | |
boost::asio::io_service | io_service |
tcp::socket | socket |
volatile bool | socketOpened |
NetworkLinks | networkLinks |
LinkBubbles | linkBubbles |
NodeBubbles | nodeBubbles |
ShiftedNodeIcons | shiftedNodeIcons |
OnLinkIcons | onLinkIcons |
Classes | |
class | TimedoutIcon |
Definition at line 70 of file OvlVis.h.
The available icons for changing the icon of a node, showing an icon besides a node and showing an icon at a link.
typedef pair<NodeID, NodeID> ariba::utility::OvlVis::NodePair [private] |
typedef KeyMapping<NodePair> ariba::utility::OvlVis::NetworkLinks [private] |
typedef KeyMapping<NodePair> ariba::utility::OvlVis::LinkBubbles [private] |
typedef KeyMapping<NodeID> ariba::utility::OvlVis::NodeBubbles [private] |
typedef KeyMapping<NodeID> ariba::utility::OvlVis::ShiftedNodeIcons [private] |
typedef KeyMapping<NodePair> ariba::utility::OvlVis::OnLinkIcons [private] |
ariba::utility::OvlVis::OvlVis | ( | ) | [protected] |
Definition at line 50 of file OvlVis.cpp.
References ariba::utility::Configuration::instance(), io_service, logging_debug, logging_warn, ariba::utility::Configuration::read(), socket, and socketOpened.
ariba::utility::OvlVis::~OvlVis | ( | ) | [protected] |
ariba::utility::OvlVis::use_logging_h | ( | OvlVis | ) | [private] |
static OvlVis& ariba::utility::OvlVis::instance | ( | ) | [inline, static] |
Definition at line 73 of file OvlVis.h.
Referenced by ariba::utility::OvlVis::TimedoutIcon::eventFunction().
void ariba::utility::OvlVis::visCreate | ( | NETWORK_ID | network, | |
NodeID & | node, | |||
string | nodename, | |||
string | info | |||
) |
Create a node in the network that is initially unconnected.
Definition at line 127 of file OvlVis.cpp.
References sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visChangeStatus | ( | NETWORK_ID | network, | |
NodeID & | node, | |||
bool | enable, | |||
string | info | |||
) |
Change the status of a node -> enable/disable a node.
Definition at line 149 of file OvlVis.cpp.
References sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visConnect | ( | NETWORK_ID | network, | |
NodeID & | srcnode, | |||
NodeID & | destnode, | |||
string | info | |||
) |
Connect two nodes using a link.
Definition at line 167 of file OvlVis.cpp.
References ariba::utility::KeyMapping< T >::exists(), ariba::utility::KeyMapping< T >::insert(), networkLinks, sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visDisconnect | ( | NETWORK_ID | network, | |
NodeID & | srcnode, | |||
NodeID & | destnode, | |||
string | info | |||
) |
Disconnect the link between two nodes.
Definition at line 193 of file OvlVis.cpp.
References ariba::utility::KeyMapping< T >::exists(), ariba::utility::KeyMapping< T >::get(), networkLinks, ariba::utility::KeyMapping< T >::remove(), sendMessage(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visFailedConnect | ( | NETWORK_ID | network, | |
NodeID & | srcnode, | |||
NodeID & | destnode, | |||
string | info | |||
) |
Indicate that the connection procedure between two nodes failed.
Definition at line 214 of file OvlVis.cpp.
References sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visShutdown | ( | NETWORK_ID | network, | |
NodeID & | node, | |||
string | info | |||
) |
Delete a node from the network.
Definition at line 232 of file OvlVis.cpp.
References sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visChangeNodeColor | ( | NETWORK_ID | network, | |
NodeID & | node, | |||
unsigned char | r, | |||
unsigned char | g, | |||
unsigned char | b | |||
) |
Change the color of the node.
Definition at line 252 of file OvlVis.cpp.
References sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
Referenced by visChangeNodeColor().
void ariba::utility::OvlVis::visChangeNodeColor | ( | NETWORK_ID | network, | |
NodeID & | node, | |||
NODE_COLORS | color | |||
) |
Change the color of the node.
Definition at line 272 of file OvlVis.cpp.
References NODE_COLORS_GREEN, NODE_COLORS_GREY, NODE_COLORS_RED, and visChangeNodeColor().
void ariba::utility::OvlVis::visChangeNodeIcon | ( | NETWORK_ID | network, | |
NodeID & | node, | |||
ICON_ID | icon | |||
) |
Change the icon of a node.
Definition at line 291 of file OvlVis.cpp.
References sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visShowNodeLabel | ( | NETWORK_ID | network, | |
NodeID & | node, | |||
string | label | |||
) |
Show the label of the node.
Definition at line 307 of file OvlVis.cpp.
References sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visDeleteNodeLabel | ( | NETWORK_ID | network, | |
NodeID & | node | |||
) |
Delete the label of the node.
Definition at line 323 of file OvlVis.cpp.
References sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visShowNodeBubble | ( | NETWORK_ID | network, | |
NodeID & | node, | |||
string | label | |||
) |
Show a bubble at the node.
Definition at line 337 of file OvlVis.cpp.
References ariba::utility::KeyMapping< T >::insert(), nodeBubbles, sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visDeleteNodeBubble | ( | NETWORK_ID | network, | |
NodeID & | node | |||
) |
Delete a bubble at the node.
Definition at line 356 of file OvlVis.cpp.
References ariba::utility::KeyMapping< T >::exists(), ariba::utility::KeyMapping< T >::get(), nodeBubbles, ariba::utility::KeyMapping< T >::remove(), sendMessage(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visShowShiftedNodeIcon | ( | NETWORK_ID | network, | |
NodeID & | node, | |||
ICON_ID | iconID, | |||
unsigned int | timeout = 0 | |||
) |
Show an icon besides the node.
Definition at line 375 of file OvlVis.cpp.
References ariba::utility::KeyMapping< T >::insert(), sendMessage(), shiftedNodeIcons, ariba::utility::OvlVis::TimedoutIcon::startIcon(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visDeleteShiftedNodeIcon | ( | NETWORK_ID | network, | |
NodeID & | node | |||
) |
Delete an icon besides the node
Definition at line 400 of file OvlVis.cpp.
References ariba::utility::KeyMapping< T >::exists(), ariba::utility::KeyMapping< T >::get(), ariba::utility::KeyMapping< T >::remove(), sendMessage(), shiftedNodeIcons, and ariba::utility::Helper::ultos().
Referenced by ariba::utility::OvlVis::TimedoutIcon::eventFunction().
void ariba::utility::OvlVis::visChangeLinkWidth | ( | NETWORK_ID | network, | |
NodeID & | srcnode, | |||
NodeID & | destnode, | |||
unsigned int | width | |||
) |
Change the link width
Definition at line 423 of file OvlVis.cpp.
References ariba::utility::KeyMapping< T >::get(), networkLinks, sendMessage(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visChangeLinkColor | ( | NETWORK_ID | network, | |
NodeID & | srcnode, | |||
NodeID & | destnode, | |||
unsigned char | r, | |||
unsigned char | g, | |||
unsigned char | b | |||
) |
Change the link color
Definition at line 441 of file OvlVis.cpp.
References ariba::utility::KeyMapping< T >::get(), networkLinks, sendMessage(), and ariba::utility::Helper::ultos().
Referenced by visChangeLinkColor().
void ariba::utility::OvlVis::visChangeLinkColor | ( | NETWORK_ID | network, | |
NodeID & | srcnode, | |||
NodeID & | destnode, | |||
NODE_COLORS | color | |||
) |
Change the link color
Definition at line 463 of file OvlVis.cpp.
References NODE_COLORS_GREEN, NODE_COLORS_GREY, NODE_COLORS_RED, and visChangeLinkColor().
void ariba::utility::OvlVis::visShowLinkLabel | ( | NETWORK_ID | network, | |
NodeID & | srcnode, | |||
NodeID & | destnode, | |||
string | label | |||
) |
Show a link label
Definition at line 483 of file OvlVis.cpp.
References ariba::utility::KeyMapping< T >::get(), networkLinks, sendMessage(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visDeleteLinkLabel | ( | NETWORK_ID | network, | |
NodeID & | srcnode, | |||
NodeID & | destnode | |||
) |
Delete a link label
Definition at line 501 of file OvlVis.cpp.
References ariba::utility::KeyMapping< T >::exists(), ariba::utility::KeyMapping< T >::get(), networkLinks, sendMessage(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visShowOnLinkIcon | ( | NETWORK_ID | network, | |
NodeID & | srcnode, | |||
NodeID & | destnode, | |||
ICON_ID | iconID | |||
) |
Show an icon at the link
Definition at line 519 of file OvlVis.cpp.
References ariba::utility::KeyMapping< T >::insert(), onLinkIcons, sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visDeleteOnLinkIcon | ( | NETWORK_ID | network, | |
NodeID & | srcnode, | |||
NodeID & | destnode | |||
) |
Delete an icon at the link
Definition at line 539 of file OvlVis.cpp.
References ariba::utility::KeyMapping< T >::exists(), ariba::utility::KeyMapping< T >::get(), onLinkIcons, ariba::utility::KeyMapping< T >::remove(), sendMessage(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visShowLinkBubble | ( | NETWORK_ID | network, | |
NodeID & | srcnode, | |||
NodeID & | destnode, | |||
string | label | |||
) |
Show a bubble besides the link
Definition at line 559 of file OvlVis.cpp.
References ariba::utility::KeyMapping< T >::insert(), linkBubbles, sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visDeleteLinkBubble | ( | NETWORK_ID | network, | |
NodeID & | srcnode, | |||
NodeID & | destnode | |||
) |
Delete a bubble besides the link
Definition at line 579 of file OvlVis.cpp.
References ariba::utility::KeyMapping< T >::exists(), ariba::utility::KeyMapping< T >::get(), linkBubbles, ariba::utility::KeyMapping< T >::remove(), sendMessage(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visSendMessage | ( | NETWORK_ID | network, | |
NodeID & | startnode, | |||
NodeID & | endnode | |||
) |
Animate the message sending between two nodes
Definition at line 602 of file OvlVis.cpp.
References sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visCLIOInitMeasurement | ( | NETWORK_ID | network, | |
unsigned long | edgekey, | |||
NodeID & | srcnode, | |||
NodeID & | destnode, | |||
string | info | |||
) |
Definition at line 622 of file OvlVis.cpp.
References sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::visCLIOEndMeasurement | ( | NETWORK_ID | network, | |
unsigned long | edgekey, | |||
NodeID & | srcnode, | |||
NodeID & | destnode, | |||
string | info, | |||
string | value, | |||
string | unit | |||
) |
Definition at line 642 of file OvlVis.cpp.
References sendMessage(), ariba::utility::Identifier::toString(), and ariba::utility::Helper::ultos().
void ariba::utility::OvlVis::sendMessage | ( | const string | msg, | |
NETWORK_ID | nid | |||
) | [private] |
Definition at line 91 of file OvlVis.cpp.
References sendSocket().
Referenced by visChangeLinkColor(), visChangeLinkWidth(), visChangeNodeColor(), visChangeNodeIcon(), visChangeStatus(), visCLIOEndMeasurement(), visCLIOInitMeasurement(), visConnect(), visCreate(), visDeleteLinkBubble(), visDeleteLinkLabel(), visDeleteNodeBubble(), visDeleteNodeLabel(), visDeleteOnLinkIcon(), visDeleteShiftedNodeIcon(), visDisconnect(), visFailedConnect(), visSendMessage(), visShowLinkBubble(), visShowLinkLabel(), visShowNodeBubble(), visShowNodeLabel(), visShowOnLinkIcon(), visShowShiftedNodeIcon(), and visShutdown().
void ariba::utility::OvlVis::sendSocket | ( | const string | msg | ) | [private] |
Definition at line 118 of file OvlVis.cpp.
References socket, and socketOpened.
Referenced by sendMessage().
boost::asio::io_service ariba::utility::OvlVis::io_service [private] |
tcp::socket ariba::utility::OvlVis::socket [private] |
volatile bool ariba::utility::OvlVis::socketOpened [private] |
Definition at line 407 of file OvlVis.h.
Referenced by visChangeLinkColor(), visChangeLinkWidth(), visConnect(), visDeleteLinkLabel(), visDisconnect(), and visShowLinkLabel().
Definition at line 408 of file OvlVis.h.
Referenced by visDeleteLinkBubble(), and visShowLinkBubble().
Definition at line 409 of file OvlVis.h.
Referenced by visDeleteNodeBubble(), and visShowNodeBubble().
Definition at line 410 of file OvlVis.h.
Referenced by visDeleteShiftedNodeIcon(), and visShowShiftedNodeIcon().
Definition at line 411 of file OvlVis.h.
Referenced by visDeleteOnLinkIcon(), and visShowOnLinkIcon().