OutPortBase.h
Go to the documentation of this file.
1 // -*- C++ -*-
20 #ifndef RTC_OUTPORTBASE_H
21 #define RTC_OUTPORTBASE_H
22 
23 #include <vector>
24 #include <string>
25 
26 #include <coil/Properties.h>
27 #include <coil/stringutil.h>
28 
29 #include <rtm/PortBase.h>
30 #include <rtm/InPortConsumer.h>
31 #include <rtm/OutPortProvider.h>
32 #include <rtm/ConnectorBase.h>
33 #include <rtm/CdrBufferBase.h>
34 #include <rtm/SystemLogger.h>
35 #include <rtm/ConnectorListener.h>
36 
37 namespace RTC
38 {
39  class PublisherBase;
40  class ConnectorBase;
41  class OutPortConnector;
42 
231  : public PortBase, public DataPortStatus
232  {
233  public:
235 
236  typedef std::vector<OutPortConnector*> ConnectorList;
237 
257  OutPortBase(const char* name, const char* data_type);
258 
275  virtual ~OutPortBase(void);
276 
293  void init(coil::Properties& prop);
294 
316  virtual bool write() = 0;
317 
337 
356  const std::vector<OutPortConnector*>& connectors();
357 
377 
397 
417 
438  OutPortConnector* getConnectorById(const char* id);
439 
460  OutPortConnector* getConnectorByName(const char* name);
461 
484  bool getConnectorProfileById(const char* id,
485  ConnectorInfo& prof);
486 
509  bool getConnectorProfileByName(const char* name,
510  ConnectorInfo& prof);
511 
512 
529  virtual void activateInterfaces();
530 
547  virtual void deactivateInterfaces();
548 
549 
626  ConnectorDataListener* listener,
627  bool autoclean = true);
628 
629 
650  ConnectorDataListener* listener);
651 
652 
705  void addConnectorListener(ConnectorListenerType callback_type,
706  ConnectorListener* listener,
707  bool autoclean = true);
708 
729  ConnectorListener* listener);
730 
748  bool isLittleEndian();
749 
775  virtual ReturnCode_t
776  connect(ConnectorProfile& connector_profile)
777  throw (CORBA::SystemException);
778 
779 
780  protected:
795  void configure();
796 
843  virtual ReturnCode_t
844  publishInterfaces(ConnectorProfile& connector_profile);
845 
884  virtual ReturnCode_t
885  subscribeInterfaces(const ConnectorProfile& connector_profile);
886 
918  virtual void
919  unsubscribeInterfaces(const ConnectorProfile& connector_profile);
920 
928  void initProviders();
929 
937  void initConsumers();
938 
974  bool checkEndian(const coil::Properties& prop, bool& littleEndian);
975 
983  OutPortProvider* createProvider(ConnectorProfile& cprof,
992  InPortConsumer* createConsumer(const ConnectorProfile& cprof,
994 
1002  OutPortConnector* createConnector(const ConnectorProfile& cprof,
1004  InPortConsumer* consumer);
1012  OutPortConnector* createConnector(const ConnectorProfile& cprof,
1015 
1016  protected:
1032  std::vector<OutPortConnector*> m_connectors;
1065 
1073  struct provider_cleanup;
1074 
1082  struct connector_cleanup;
1083  };
1084 }; // End of namespace RTC
1085 #endif // RTC_RTCOUTPORTBASE_H
OutPortConnector * getConnectorById(const char *id)
Getting ConnectorProfile by ID.
RTC&#39;s Port base class.
ConnectorListeners class.
void configure()
Configureing outport.
InPortConsumer abstract class.
DATAPORTSTATUS_ENUM typedef std::vector< OutPortConnector * > ConnectorList
Definition: OutPortBase.h:236
virtual ~OutPortBase(void)
Destructor.
void initProviders()
OutPort provider initialization.
ConnectorInfoList getConnectorProfiles()
ConnectorProfile list.
void addConnectorDataListener(ConnectorDataListenerType listener_type, ConnectorDataListener *listener, bool autoclean=true)
Adding BufferDataListener type listener.
#define DATAPORTSTATUS_ENUM
Importing RTC::DataPortStatus macro.
coil::vstring getConnectorNames()
Connector name list.
RT-Component.
virtual bool write()=0
Write data.
coil::vstring getConnectorIds()
ConnectorId list.
OutPortConnector * getConnectorByName(const char *name)
Getting Connector by name.
std::vector< OutPortConnector * > m_connectors
Connection list.
Definition: OutPortBase.h:1032
void initConsumers()
InPort consumer initialization.
ConnectorDataListener class.
void addConnectorListener(ConnectorListenerType callback_type, ConnectorListener *listener, bool autoclean=true)
Adding ConnectorListener type listener.
RT component logger class.
ReturnCode_t
Definition: doil.h:53
coil::Properties m_properties
Properties.
Definition: OutPortBase.h:1024
void removeConnectorListener(ConnectorListenerType callback_type, ConnectorListener *listener)
Removing BufferDataListener type listener.
ConnectorListeners m_listeners
ConnectorDataListener listener.
Definition: OutPortBase.h:1064
virtual void unsubscribeInterfaces(const ConnectorProfile &connector_profile)
Disconnect the interface connection.
std::vector< ConnectorInfo > ConnectorInfoList
bool isLittleEndian()
return it whether endian setting.
OutPortConnector * createConnector(const ConnectorProfile &cprof, coil::Properties &prop, InPortConsumer *consumer)
OutPortPushConnector creation.
virtual ReturnCode_t publishInterfaces(ConnectorProfile &connector_profile)
Publish interface information.
std::vector< std::string > vstring
Definition: stringutil.h:37
ConnectorDataListenerType
The types of ConnectorDataListener.
Connector base class.
void removeConnectorDataListener(ConnectorDataListenerType listener_type, ConnectorDataListener *listener)
Removing BufferDataListener type listener.
bool getConnectorProfileById(const char *id, ConnectorInfo &prof)
Getting ConnectorProfile by name.
bool m_littleEndian
Connected Endian.
Definition: OutPortBase.h:1056
OutPortProvider class.
OutPortBase(const char *name, const char *data_type)
Constructor.
Definition: OutPortBase.cpp:81
void init(coil::Properties &prop)
Initializing properties.
virtual ReturnCode_t connect(ConnectorProfile &connector_profile)
[CORBA interface] Connect the Port
OutPortProvider * createProvider(ConnectorProfile &cprof, coil::Properties &prop)
OutPort provider creation.
coil::vstring m_consumerTypes
Available consumers.
Definition: OutPortBase.h:1048
prop
Organization::get_organization_property ();.
ConnectorListenerType
The types of ConnectorListener.
Functor to delete Providers.
Definition: OutPortBase.cpp:42
Class represents a set of properties.
Definition: Properties.h:101
bool checkEndian(const coil::Properties &prop, bool &littleEndian)
Checking endian flag of serializer.
virtual void activateInterfaces()
Activate all Port interfaces.
bool getConnectorProfileByName(const char *name, ConnectorInfo &prof)
Getting ConnectorProfile by name.
coil::vstring m_providerTypes
Available providers.
Definition: OutPortBase.h:1040
Functor to delete Connectors.
Definition: OutPortBase.cpp:62
virtual ReturnCode_t subscribeInterfaces(const ConnectorProfile &connector_profile)
Subscribe to the interface.
const std::vector< OutPortConnector * > & connectors()
Connector list.
InPortConsumer * createConsumer(const ConnectorProfile &cprof, coil::Properties &prop)
InPort consumer creation.
DataPortStatus mixin class.
virtual void deactivateInterfaces()
Deactivate all Port interfaces.
InPortConsumer class.
connector listener class
coil::Properties & properties()
Get properties.


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Jun 6 2019 19:25:59