26#include <rtm/idl/RTCSkel.h>
37 class ConnectionCallback;
130 :
public virtual POA_RTC::PortService,
131 public virtual PortableServer::RefCountServantBase
512 ReturnCode_t
connect(ConnectorProfile& connector_profile)
override;
1346 virtual ReturnCode_t
1375 virtual ReturnCode_t
connectNext(ConnectorProfile& connector_profile);
1468 virtual ReturnCode_t
1578 static bool isEmptyId(
const ConnectorProfile& connector_profile) ;
1620 static void setUUID(ConnectorProfile& connector_profile) ;
1820 PortInterfacePolarity pol);
1876 template <
class ValueType>
1965 RTC::ConnectorProfile& profile)
1975 RTC::ConnectorProfile& profile)
1984 RTC::ConnectorProfile& profile)
1994 RTC::ConnectorProfile& profile,
2006 RTC::ConnectorProfile& profile,
2018 RTC::ConnectorProfile& profile,
2030 RTC::ConnectorProfile& profile,
2041 RTC::ConnectorProfile& profile,
2052 RTC::ConnectorProfile& profile,
2256 return m_id == std::string(cprof.connector_id);
2271#ifdef ORB_IS_ORBEXPRESS
2274 return m_port->_is_equivalent(port_ref.in());
2279 return m_port->_is_equivalent(port_ref);
2300 CORBA::String_var name(CORBA::string_dup(prof.instance_name));
2301 return ((
m_name ==
static_cast<const char *
>(name))
2302 && (
m_pol == prof.polarity));
CORBA sequence utility template functions.
NameValue and NVList utility functions.
port's internal action listener classes
RT component logger class.
Callback functor abstract for connect/notify_connect() funcs.
Definition PortCallback.h:56
Definition DirectPortBase.h:47
Logger class.
Definition SystemLogger.h:101
Port base class.
Definition PortBase.h:132
ReturnCode_t disconnect(const char *connector_id) override
[CORBA interface] Disconnect the Port
PortProfile m_profile
PortProfile of the Port .
Definition PortBase.h:2097
std::mutex m_connectorsMutex
Definition PortBase.h:2115
static bool isEmptyId(const ConnectorProfile &connector_profile)
Check whether connector_id of ConnectorProfile is empty.
int m_connectionLimit
The maximum number of connections .
Definition PortBase.h:2133
virtual DirectPortBase * getDirectPort()
PortConnectListeners * m_portconnListeners
PortConnectListener holder.
Definition PortBase.h:2237
ReturnCode_t notify_disconnect(const char *connector_id) override
[CORBA interface] Notify the Ports disconnection
void setOnUnsubscribeInterfaces(ConnectionCallback *on_unsubscribe)
Setting callback called on unsubscribe interfaces.
void setOwner(RTObject_ptr owner)
Set the owner RTObject of the Port.
bool isExistingConnId(const char *id)
Check whether the given id exists in stored ConnectorProfiles.
DirectPortBase * m_directport
Definition PortBase.h:2239
void onConnectNextport(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition PortBase.h:2005
void onNotifyDisconnect(const char *portname, RTC::ConnectorProfile &profile)
Definition PortBase.h:1974
ReturnCode_t notify_connect(ConnectorProfile &connector_profile) override
[CORBA interface] Notify the Ports connection
void onDisconnectNextport(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition PortBase.h:2040
ConnectorProfile findConnProfile(const char *id)
Find ConnectorProfile with id.
ReturnCode_t disconnect_all() override
[CORBA interface] Disconnect the All Ports
ConnectionCallback * m_onConnectionLost
Callback functor objects.
Definition PortBase.h:2222
ConnectionCallback * m_onUnsubscribeInterfaces
Callback functor objects.
Definition PortBase.h:2192
bool eraseConnectorProfile(const char *id)
Delete the ConnectorProfile.
std::mutex m_profile_mutex
Mutex of PortProfile .
Definition PortBase.h:2114
void setName(const char *name)
Set the name of this Port.
void onConnected(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition PortBase.h:2029
void addProperty(const char *key, ValueType value)
Add NameValue data to PortProfile's properties.
Definition PortBase.h:1877
ConnectionCallback * m_onConnected
Callback functor objects.
Definition PortBase.h:2178
ConnectionCallback * m_onSubscribeInterfaces
Callback functor objects.
Definition PortBase.h:2163
const PortProfile & getPortProfile() const
Get the PortProfile of the Port.
RTC::PortService_var m_objref
Object Reference of the Port .
Definition PortBase.h:2106
void onNotifyConnect(const char *portname, RTC::ConnectorProfile &profile)
Definition PortBase.h:1964
void onDisconnected(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition PortBase.h:2051
std::string m_ownerInstanceName
Instance name .
Definition PortBase.h:2124
void onPublishInterfaces(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition PortBase.h:1993
void setPortRef(PortService_ptr port_ref)
Set the object reference of this Port.
bool appendInterface(const char *instance_name, const char *type_name, PortInterfacePolarity pol)
Append an interface to the PortInterfaceProfile.
CORBA::Long findConnProfileIndex(const char *id)
Find ConnectorProfile with id.
PortBase(const char *name="")
Constructor.
void setOnConnected(ConnectionCallback *on_connected)
Setting callback called on connection established.
coil::Properties m_properties
Properties .
Definition PortBase.h:1919
ConnectorProfileList * get_connector_profiles() override
[CORBA interface] Get the ConnectorProfileList of the Port
ConnectionCallback * m_onPublishInterfaces
Callback functor objects.
Definition PortBase.h:2149
ConnectorProfile * get_connector_profile(const char *connector_id) override
[CORBA interface] Get the ConnectorProfile
virtual void unsubscribeInterfaces(const ConnectorProfile &connector_profile)=0
Disconnect interface connection.
virtual void deactivateInterfaces()=0
Deactivate all Port interfaces.
void setOnDisconnected(ConnectionCallback *on_disconnected)
Setting callback called on disconnected.
static void setUUID(ConnectorProfile &connector_profile)
Generate and set the UUID to the ConnectorProfile.
virtual void setConnectionLimit(int limit_value)
Set the maximum number of connections.
void setPortConnectListenerHolder(PortConnectListeners *portconnListeners)
Setting PortConnectListener holder.
void setOnConnectionLost(ConnectionCallback *on_connection_lost)
Setting callback called on connection lost.
void updateConnectors()
Disconnect ports that doesn't exist.
void updateConnectorProfile(const ConnectorProfile &connector_profile)
Append or update the ConnectorProfile list.
virtual ReturnCode_t disconnectNext(ConnectorProfile &cprof)
Call notify_disconnect() of the next Port.
Logger rtclog
Logger stream .
Definition PortBase.h:2089
bool checkPorts(::RTC::PortServiceList &ports)
Existence of ports.
ConnectionCallback * m_onDisconnected
Callback functor objects.
Definition PortBase.h:2206
ReturnCode_t connect(ConnectorProfile &connector_profile) override
[CORBA interface] Connect the Port
void appendProperty(const char *key, const char *value)
Append NameValue data to PortProfile's properties.
Definition PortBase.h:1908
void setOnSubscribeInterfaces(ConnectionCallback *on_subscribe)
Setting callback called on publish interfaces.
virtual ReturnCode_t connectNext(ConnectorProfile &connector_profile)
Call notify_connect() of the next Port.
virtual ReturnCode_t publishInterfaces(ConnectorProfile &connector_profile)=0
Publish interface information.
virtual void activateInterfaces()=0
Activate all Port interfaces.
virtual ReturnCode_t _publishInterfaces()
Publish interface information.
PortProfile * get_port_profile() override
[CORBA interface] Get the PortProfile of the Port
const char * getName() const
Get the name of this Port.
bool isExistingMarshalingType(coil::Properties &con_prop)
Whether the specified serializer can be used.
const PortProfile & getProfile() const
Get the PortProfile of the Port.
~PortBase() override
Destructor.
bool deleteInterface(const char *name, PortInterfacePolarity pol)
Delete the interface registration from the PortInterfaceProfile.
void onUnsubscribeInterfaces(const char *portname, RTC::ConnectorProfile &profile)
Definition PortBase.h:1983
void onSubscribeInterfaces(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition PortBase.h:2017
PortService_ptr getPortRef() const
Get the object reference of this Port.
virtual ReturnCode_t subscribeInterfaces(const ConnectorProfile &connector_profile)=0
Publish interface information.
static std::string getUUID()
Generate the UUID.
void setOnPublishInterfaces(ConnectionCallback *on_publish)
Setting callback called on publish interfaces.
PortConnectListeners class.
Definition PortConnectListener.h:487
bool notify(PortConnectListenerType type, const char *portname, RTC::ConnectorProfile &profile)
Definition PortConnectListener.h:625
void push_back(CorbaSequence &seq, SequenceElement elem)
Push the new element back to the CORBA sequence.
Definition CORBA_SeqUtil.h:175
bool appendStringValue(SDOPackage::NVList &nv, const char *name, const char *value)
Append the specified string to element of NVList.
SDOPackage::NameValue newNV(const char *name, Value value)
Create NameValue.
Definition NVUtil.h:80
@ ON_UNSUBSCRIBE_INTERFACES
@ ON_SUBSCRIBE_INTERFACES
Functor to find a ConnectorProfile named id .
Definition PortBase.h:2252
find_conn_id(const char *id)
Definition PortBase.h:2253
bool operator()(const ConnectorProfile &cprof)
Definition PortBase.h:2254
std::string m_id
Definition PortBase.h:2258
Functor to find interface from name and polarity .
Definition PortBase.h:2293
bool operator()(const PortInterfaceProfile &prof)
Definition PortBase.h:2298
std::string m_name
Definition PortBase.h:2304
PortInterfacePolarity m_pol
Definition PortBase.h:2305
find_interface(const char *name, PortInterfacePolarity pol)
Definition PortBase.h:2294
Functor to find the object reference that is identical port_ref .
Definition PortBase.h:2269
find_port_ref(PortService_ptr port_ref)
Definition PortBase.h:2270
PortService_ptr m_port
Definition PortBase.h:2282
bool operator()(PortService_ptr port_ref)
Definition PortBase.h:2277