41 PortProfile_var prof(p->get_port_profile());
42 std::string name(prof->name);
45 pp = p->get_port_profile();
46 std::string name( pp->name);
48 #endif // ORB_IS_RTORB 65 return m_port->_is_equivalent(p);
95 :
m_pORB(CORBA::ORB::_duplicate(orb)),
96 m_pPOA(PortableServer::POA::_duplicate(poa)),
110 PortServiceList_var ports;
112 return ports._retn();
131 #else // ORB_IS_RTORB 137 for (CORBA::ULong i (0); i < len; ++i)
142 port_profs[i] = *(pp);
150 #endif // ORB_IS_RTORB 169 return RTC::PortService::_nil();
201 RTC::PortService::_duplicate(port.
getPortRef()));
219 PortProfile_var prof(port->get_port_profile());
220 std::string name(prof->name);
243 RTC_ERROR((
"registerPort(PortBase&) failed."));
251 RTC_ERROR((
"registerPort(PortService_ptr) failed."));
272 PortableServer::ObjectId_var oid =
m_pPOA->servant_to_id(&port);
273 m_pPOA->deactivate_object(oid);
276 return m_portServants.unregisterObject(tmp) == NULL ?
false :
true;
301 RTC_ERROR((
"deletePort(PortBase&) failed."));
308 RTC_ERROR((
"deletePort(PortService_ptr) failed."));
322 if (!port_name)
return;
336 std::vector<PortBase*> ports;
338 for (
int i(0), len(ports.size()); i < len; ++i)
340 ports[i]->activateInterfaces();
353 std::vector<PortBase*> ports;
355 for (
int i(0), len(ports.size()); i < len; ++i)
357 ports[i]->deactivateInterfaces();
371 std::vector<PortBase*> ports;
#define RTC_ERROR(fmt)
Error log output macro.
void finalizePorts()
Deactivate all Ports and unregister them.
Logger rtclog
Logger stream.
CORBA::ORB_var m_pORB
Reference to ORB.
PortableServer::POA_var m_pPOA
Reference to POA.
PortService_ptr getPortRef()
Get the object reference of this Port.
PortServiceList * getPortServiceList() const
Get PortServiceList.
const char * getName() const
Get the name of this Port.
void operator()(PortBase *p)
PortService_ptr getPortRef(const char *port_name) const
Get the reference to Port object.
PortBase * getPort(const char *port_name) const
Get pointer to the Port's servant.
void activatePorts()
Activate all Port interfaces.
void setPortRef(PortService_ptr port_ref)
Set the object reference of this Port.
PortProfileList corerection functor.
Functor to delete the Port.
void registerPort(PortBase &port)
Regsiter the Port.
CORBA::Long find(const CorbaSequence &seq, Functor f)
Return the index of CORBA sequence element that functor matches.
PortProfileList getPortProfileList() const
Get PorProfileList.
CORBA sequence utility template functions.
void erase_if(CorbaSequence &seq, Functor f)
Remove an element of a sequence according to a predicate.
const PortProfile & getProfile() const
Get the PortProfile of the Port.
ObjectManager< const char *, PortBase, comp_op< PortBase > > m_portServants
void deactivatePorts()
Deactivate all Port interfaces.
find_port(const PortService_ptr &p)
bool removePort(PortBase &port)
Unregister the Port registration.
std::vector< IPortService * > PortServiceList
void deletePortByName(const char *port_name)
Unregister the Port's registration by its name.
bool addPort(PortBase &port)
Regsiter the Port.
const PortService_ptr m_port
void push_back(CorbaSequence &seq, SequenceElement elem)
Push the new element back to the CORBA sequence.
bool operator()(const PortService_ptr &p)
PortServiceList m_portRefs
List of Port's object references.
void deletePort(PortBase &port)
Unregister the Port registration.
virtual ReturnCode_t disconnect_all()
[CORBA interface] Disconnect the All Ports
bool operator()(const PortService_ptr &p)
std::vector< PortProfile * > PortProfileList
Functor for_each(CorbaSequence &seq, Functor f)
Apply the functor to all CORBA sequence elements.
RTC's Port administration class.
PortAdmin(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa)
Constructor.
find_port_name(const char *name)