20 #include <coil/stringutil.h> 39 m_consumer(consumer), m_publisher(0),
40 m_listeners(listeners), m_buffer(buffer)
49 {
throw std::bad_alloc(); }
53 throw std::bad_alloc();
189 std::string pub_type;
205 std::string buf_type;
virtual ReturnCode write(const cdrMemoryStream &data)
Writing data.
void onDisconnect()
Invoke callback when connection is destroied.
ConnectorListeners class.
InPortConsumer abstract class.
std::string normalize(std::string &str)
Erase the head/tail blank and replace upper case to lower case.
virtual void activate()
Connector activation.
virtual void init(coil::Properties &prop)=0
Initializing configuration.
coil::Properties properties
Connection properties.
void onConnect()
Invoke callback when connection is established.
virtual CdrBufferBase * getBuffer()
Getting Buffer.
virtual void deactivate()
Connector deactivation.
virtual ReturnCode setBuffer(BufferBase< cdrMemoryStream > *buffer)=0
Setting buffer pointer.
ConnectorListenerHolder connector_[CONNECTOR_LISTENER_NUM]
ConnectorListenerType listener array The ConnectorListenerType listener is stored.
virtual CdrBufferBase * createBuffer(ConnectorInfo &info)
create buffer
virtual ReturnCode disconnect()
disconnect
ConnectorListeners & m_listeners
A reference to a ConnectorListener.
ConnectorInfo m_profile
PortProfile of the Port.
static GlobalFactory< AbstractClass, Identifier, Compare, Creator, Destructor > & instance()
Create instance.
GlobalFactory template class.
virtual ReturnCode deactivate()=0
deactivation
CdrBufferBase * m_buffer
A pointer to a buffer.
#define RTC_PARANOID(fmt)
Paranoid level log output macro.
virtual ReturnCode init(coil::Properties &prop)=0
Initializing configuration.
InPortConsumer * m_consumer
A pointer to an InPortConsumer.
#define RTC_DEBUG(fmt)
Debug level log output macro.
Push type connector class.
PublisherBase * m_publisher
A pointer to a publisher.
void deleteObject(const Identifier &id, AbstractClass *&obj)
Delete factory object.
virtual PublisherBase * createPublisher(ConnectorInfo &info)
create buffer
virtual ReturnCode write(const cdrMemoryStream &data, unsigned long sec, unsigned long usec)=0
Write data.
DATAPORTSTATUS_ENUM OutPortPushConnector(ConnectorInfo info, InPortConsumer *consumer, ConnectorListeners &listeners, CdrBufferBase *buffer=0)
Constructor.
::RTC::BufferStatus::Enum ReturnCode
virtual ReturnCode setListener(ConnectorInfo &info, ConnectorListeners *listeners)=0
Set the listener.
virtual ~OutPortPushConnector()
Destructor.
Properties & getNode(const std::string &key)
Get node of properties.
virtual ReturnCode setConsumer(InPortConsumer *consumer)=0
Store InPort consumer.
void notify(const ConnectorInfo &info)
Notify listeners.
virtual void init(const coil::Properties &prop)=0
Set the buffer.
BufferBase abstract class.
const std::string & getProperty(const std::string &key) const
Search for the property with the specified key in this property.
virtual ReturnCode activate()=0
activation