#include <AVStreams_i.h>
Collaboration diagram for TAO_MCastConfigIf:
Public Types | |
VDEV = 0 | |
FLOWENDPOINT = 1 | |
enum | Peer_Interface { VDEV = 0, FLOWENDPOINT = 1 } |
Public Member Functions | |
TAO_MCastConfigIf (void) | |
Default constructor. | |
~TAO_MCastConfigIf (void) | |
Dtor. | |
virtual CORBA::Boolean | set_peer (CORBA::Object_ptr peer, AVStreams::streamQoS &the_qos, const AVStreams::flowSpec &the_spec) |
virtual void | configure (const CosPropertyService::Property &a_configuration) |
virtual void | set_initial_configuration (const CosPropertyService::Properties &initial) |
virtual void | set_format (const char *flowName, const char *format_name) |
virtual void | set_dev_params (const char *flowName, const CosPropertyService::Properties &new_params) |
Protected Member Functions | |
int | in_flowSpec (const AVStreams::flowSpec &flow_spec, const char *flow_name) |
checks whether the flowname is in the flow_spec. | |
Protected Attributes | |
ACE_SOCK_Dgram_Mcast | sock_mcast_ |
Multicast socket. | |
CosPropertyService::Properties | initial_configuration_ |
Initial configuration to be distributed to all B parties when they join. | |
ACE_DLList< Peer_Info > | peer_list_ |
ACE_DLList_Iterator< Peer_Info > | peer_list_iterator_ |
Classes | |
struct | Peer_Info |
Definition at line 283 of file AVStreams_i.h.
TAO_MCastConfigIf::TAO_MCastConfigIf | ( | void | ) |
Default constructor.
Definition at line 1297 of file AVStreams_i.cpp.
01298 :peer_list_iterator_ (peer_list_) 01299 { 01300 }
TAO_MCastConfigIf::~TAO_MCastConfigIf | ( | void | ) |
void TAO_MCastConfigIf::configure | ( | const CosPropertyService::Property & | a_configuration | ) | [virtual] |
Definition at line 1334 of file AVStreams_i.cpp.
References CORBA::Exception::_tao_print_exception(), TAO_MCastConfigIf::Peer_Info::peer_, and peer_list_iterator_.
01335 { 01336 Peer_Info *info; 01337 try 01338 { 01339 for (this->peer_list_iterator_.first (); 01340 (info = this->peer_list_iterator_.next ()) != 0; 01341 this->peer_list_iterator_.advance ()) 01342 { 01343 info->peer_->configure (a_configuration); 01344 } 01345 } 01346 catch (const CORBA::Exception& ex) 01347 { 01348 ex._tao_print_exception ( 01349 "TAO_MCastConfigIf::set_configure"); 01350 return; 01351 } 01352 }
int TAO_MCastConfigIf::in_flowSpec | ( | const AVStreams::flowSpec & | flow_spec, | |
const char * | flow_name | |||
) | [protected] |
checks whether the flowname is in the flow_spec.
Definition at line 1414 of file AVStreams_i.cpp.
References ACE_OS::strlen(), and ACE_OS::strncmp().
01415 { 01416 size_t len = ACE_OS::strlen (flow_name); 01417 for (CORBA::ULong i = 0; i < flow_spec.length (); i++) 01418 if (ACE_OS::strncmp (flow_spec[i], flow_name, len) == 0) 01419 { 01420 return 1; 01421 } 01422 return 0; 01423 }
void TAO_MCastConfigIf::set_dev_params | ( | const char * | flowName, | |
const CosPropertyService::Properties & | new_params | |||
) | [virtual] |
Definition at line 1388 of file AVStreams_i.cpp.
References CORBA::Exception::_tao_print_exception(), TAO_MCastConfigIf::Peer_Info::flow_spec_, TAO_MCastConfigIf::Peer_Info::peer_, and peer_list_iterator_.
01390 { 01391 Peer_Info *info; 01392 try 01393 { 01394 01395 for (this->peer_list_iterator_.first (); 01396 (info = this->peer_list_iterator_.next ()) != 0; 01397 this->peer_list_iterator_.advance ()) 01398 { 01399 if (this->in_flowSpec (info->flow_spec_, flowName)) 01400 { 01401 info->peer_->set_dev_params (flowName, new_params); 01402 } 01403 } 01404 } 01405 catch (const CORBA::Exception& ex) 01406 { 01407 ex._tao_print_exception ( 01408 "TAO_MCastConfigIf::set_dev_params"); 01409 return; 01410 } 01411 }
void TAO_MCastConfigIf::set_format | ( | const char * | flowName, | |
const char * | format_name | |||
) | [virtual] |
Definition at line 1363 of file AVStreams_i.cpp.
References CORBA::Exception::_tao_print_exception(), TAO_MCastConfigIf::Peer_Info::flow_spec_, TAO_MCastConfigIf::Peer_Info::peer_, and peer_list_iterator_.
01365 { 01366 Peer_Info *info; 01367 try 01368 { 01369 for (this->peer_list_iterator_.first (); 01370 (info = this->peer_list_iterator_.next ()) != 0; 01371 this->peer_list_iterator_.advance ()) 01372 { 01373 if (this->in_flowSpec (info->flow_spec_, flowName)) 01374 { 01375 info->peer_->set_format (flowName, format_name); 01376 } 01377 } 01378 } 01379 catch (const CORBA::Exception& ex) 01380 { 01381 ex._tao_print_exception ("TAO_MCastConfigIf::set_format"); 01382 return; 01383 } 01384 }
void TAO_MCastConfigIf::set_initial_configuration | ( | const CosPropertyService::Properties & | initial | ) | [virtual] |
Definition at line 1356 of file AVStreams_i.cpp.
References initial_configuration_.
01357 { 01358 this->initial_configuration_ = initial; 01359 }
CORBA::Boolean TAO_MCastConfigIf::set_peer | ( | CORBA::Object_ptr | peer, | |
AVStreams::streamQoS & | the_qos, | |||
const AVStreams::flowSpec & | the_spec | |||
) | [virtual] |
Definition at line 1309 of file AVStreams_i.cpp.
References CORBA::Exception::_tao_print_exception(), ACE_NEW_RETURN, TAO_MCastConfigIf::Peer_Info::flow_spec_, TAO_MCastConfigIf::Peer_Info::peer_, peer_list_, and TAO_MCastConfigIf::Peer_Info::qos_.
Referenced by TAO_StreamCtrl::bind_devs().
01312 { 01313 try 01314 { 01315 Peer_Info *info; 01316 ACE_NEW_RETURN (info, 01317 Peer_Info, 01318 0); 01319 info->peer_ = AVStreams::VDev::_narrow (peer); 01320 info->qos_ = qos; 01321 info->flow_spec_ = flow_spec; 01322 this->peer_list_.insert_tail (info); 01323 } 01324 catch (const CORBA::Exception& ex) 01325 { 01326 ex._tao_print_exception ("TAO_MCastConfigIf::set_peer"); 01327 return 0; 01328 } 01329 return 1; 01330 }
CosPropertyService::Properties TAO_MCastConfigIf::initial_configuration_ [protected] |
Initial configuration to be distributed to all B parties when they join.
Definition at line 328 of file AVStreams_i.h.
Referenced by set_initial_configuration().
ACE_DLList<Peer_Info> TAO_MCastConfigIf::peer_list_ [protected] |
Definition at line 331 of file AVStreams_i.h.
Referenced by configure(), set_dev_params(), and set_format().
ACE_SOCK_Dgram_Mcast TAO_MCastConfigIf::sock_mcast_ [protected] |