Changeset 6954 for source/ariba
- Timestamp:
- Nov 18, 2009, 3:36:32 PM (15 years ago)
- Location:
- source/ariba/utility/visual
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/visual/DddVis.cpp
r6941 r6954 159 159 160 160 sendMessage( out.str(), network ); 161 162 // 163 // set node color, if any given 164 // 165 166 if(this->nodecolor != 0){ 167 this->visChangeNodeColor(network, node, 168 (nodecolor & 0xFF0000) >> 16, (nodecolor & 0x00FF00) >> 8, nodecolor & 0x0000FF ); 169 } 161 170 } 162 171 … … 233 242 unsigned char b 234 243 ){ 235 NodeSet::iterator i = colorSet.find(node);236 unsigned int color = makeColor(r,g,b);237 238 if( i == colorSet.end() ){239 colorSet.insert(make_pair( node, color )); // color not set for node, set240 }else{241 if( i->second == color ) return; // color already set, ignore242 else i->second = color; // new color, set243 }244 245 244 ostringstream out; 246 245 out << SET_NODE_COLOR_TYPE << del 247 248 249 250 251 246 << getCommandID() << del 247 << getTimestamp() << del 248 << getNetworkName(network) << del 249 << getNodeNumber(node) << del 250 << makeColor(r, g, b) << del; 252 251 253 252 sendMessage( out.str(), network ); … … 316 315 } 317 316 317 void DddVis::visShowNodeLabel ( 318 NETWORK_ID network, 319 NodeID& node, 320 string label 321 ){ 322 ostringstream out; 323 out << SET_NODE_INFO_TYPE << del 324 << getCommandID() << del 325 << getTimestamp() << del 326 << getNetworkName(network) << del 327 << getNodeNumber(node) << del 328 << label << del; 329 330 sendMessage( out.str(), network ); 331 } 332 318 333 }} // namespace ariba, common -
source/ariba/utility/visual/DddVis.h
r6900 r6954 161 161 NodeID& destnode, 162 162 NODE_COLORS color 163 ); 164 165 /** 166 * Show the label of the node 167 */ 168 void visShowNodeLabel ( 169 NETWORK_ID network, 170 NodeID& node, 171 string label 163 172 ); 164 173 … … 216 225 typedef KeyMapping<NodePair> NetworkLinks; 217 226 NetworkLinks networkLinks; 218 219 NodeSet colorSet;220 221 227 }; 222 228 -
source/ariba/utility/visual/ServerVis.cpp
r6894 r6954 43 43 44 44 use_logging_cpp(ServerVis); 45 unsigned int ServerVis::nodecolor = 0; 45 46 46 47 typedef enum _NETWORK_ID { … … 69 70 } 70 71 71 void ServerVis::configure(string ip, unsigned int port){ 72 void ServerVis::configure(string ip, unsigned int port, unsigned int _color){ 73 nodecolor = _color; 72 74 if( ip.length() == 0 ) return; 73 75 -
source/ariba/utility/visual/ServerVis.h
r6822 r6954 58 58 use_logging_h(ServerVis); 59 59 public: 60 void configure(string ip, unsigned int port); 60 void configure(string ip, unsigned int port, unsigned int _color = 0); 61 static unsigned int nodecolor; 61 62 62 63 typedef enum _NETWORK_ID { … … 105 106 virtual void visChangeLinkColor (NETWORK_ID network, NodeID& srcnode, NodeID& destnode, NODE_COLORS color) = 0; 106 107 108 /// Show the label of the node. 109 virtual void visShowNodeLabel (NETWORK_ID network, NodeID& node, string label) = 0; 110 107 111 protected: 108 112 ServerVis();
Note:
See TracChangeset
for help on using the changeset viewer.