OpenRTM-aist-Python 2.0.2
OpenRTM_aist.InPortBase.InPortBase Class Reference

More...

Inheritance diagram for OpenRTM_aist.InPortBase.InPortBase:
OpenRTM_aist.PortBase.PortBase OpenRTM_aist.DataPortStatus.DataPortStatus OpenRTM_aist.CSPEventPort.CSPEventPort OpenRTM_aist.CSPInPort.CSPInPort OpenRTM_aist.EventPort.EventInPort OpenRTM_aist.EventPort_pyfsm.EventInPort OpenRTM_aist.InPort.InPort

Public Member Functions

 __init__ (self, name, data_type)
 
 __del__ (self, PortBase=OpenRTM_aist.PortBase)
 
 init (self, prop)
 
 read (self)
 
 properties (self)
 
 connectors (self)
 
 getConnectorProfiles (self)
 
 getConnectorIds (self)
 
 getConnectorNames (self)
 
 getConnectorById (self, id)
 
 getConnectorByName (self, name)
 
 getConnectorProfileById (self, id)
 
 getConnectorProfileByName (self, name)
 
 connect (self, connector_profile)
 
 notify_connect (self, connector_profile)
 
 activateInterfaces (self)
 
 deactivateInterfaces (self)
 
 addConnectorDataListener (self, listener_type, listener)
 
 removeConnectorDataListener (self, listener_type, listener)
 
 addConnectorListener (self, listener_type, listener)
 
 removeConnectorListener (self, listener_type, listener)
 
 publishInterfaces (self, cprof)
 
 subscribeInterfaces (self, cprof)
 
 unsubscribeInterfaces (self, connector_profile)
 
 initProviders (self)
 
 initConsumers (self)
 
 createProvider (self, cprof, prop)
 
 createConsumer (self, cprof, prop)
 
 createConnector (self, cprof, prop, provider_=None, consumer_=None)
 
 createDuplexConnector (self, cprof, prop, provider_)
 
 getLocalOutPort (self, profile)
 
- Public Member Functions inherited from OpenRTM_aist.PortBase.PortBase
 exit (self)
 
 get_port_profile (self)
 
 getPortProfile (self)
 
 get_connector_profiles (self)
 
 get_connector_profile (self, connector_id)
 
 disconnect (self, connector_id)
 
 notify_disconnect (self, connector_id)
 
 disconnect_all (self)
 
 setName (self, name)
 
 getName (self)
 
 getProfile (self)
 
 setPortRef (self, port_ref)
 
 getPortRef (self)
 
 setOwner (self, owner)
 
 setOnPublishInterfaces (self, on_publish)
 
 setOnSubscribeInterfaces (self, on_subscribe)
 
 setOnConnected (self, on_connected)
 
 setOnUnsubscribeInterfaces (self, on_subscribe)
 
 setOnDisconnected (self, on_disconnected)
 
 setPortConnectListenerHolder (self, portconnListeners)
 
 connectNext (self, connector_profile)
 
 disconnectNext (self, connector_profile)
 
 setConnectionLimit (self, limit_value)
 
 isEmptyId (self, connector_profile)
 
 getUUID (self)
 
 setUUID (self, connector_profile)
 
 isExistingConnId (self, id_)
 
 findConnProfile (self, id_)
 
 findConnProfileIndex (self, id_)
 
 updateConnectorProfile (self, connector_profile)
 
 eraseConnectorProfile (self, id_)
 
 appendInterface (self, instance_name, type_name, pol)
 
 deleteInterface (self, name, pol)
 
 addProperty (self, key, value)
 
 appendProperty (self, key, value)
 
 updateConnectors (self)
 
 checkPorts (self, ports)
 
 isExistingMarshalingType (self, con_prop)
 
- Public Member Functions inherited from OpenRTM_aist.DataPortStatus.DataPortStatus
 toString (status)
 

Additional Inherited Members

- Static Public Attributes inherited from OpenRTM_aist.DataPortStatus.DataPortStatus
int PORT_OK = 0
 
- Protected Member Functions inherited from OpenRTM_aist.PortBase.PortBase
 _publishInterfaces (self)
 

Detailed Description

Port for InPort

This is an implementation class for the data input port.

Since
0.4.0

Constructor & Destructor Documentation

◆ __init__()

OpenRTM_aist.InPortBase.InPortBase.__init__ ( self,
name,
data_type )

Constructor

Constructor

Parameters
namePort name
inportInPort object that is associated with this data input port. Specify also the data type and the buffer type used in the InPort object.
propProperty for setting ports

InPortBase(const char* name, const char* data_type);

Reimplemented from OpenRTM_aist.PortBase.PortBase.

Reimplemented in OpenRTM_aist.CSPEventPort.CSPEventPort, OpenRTM_aist.CSPInPort.CSPInPort, OpenRTM_aist.EventPort.EventInPort, OpenRTM_aist.EventPort_pyfsm.EventInPort, and OpenRTM_aist.InPort.InPort.

◆ __del__()

Member Function Documentation

◆ activateInterfaces()

OpenRTM_aist.InPortBase.InPortBase.activateInterfaces ( self)

Activate all Port interfaces

This operation activate all interfaces that is registered in the ports.

void activateInterfaces();

◆ addConnectorDataListener()

OpenRTM_aist.InPortBase.InPortBase.addConnectorDataListener ( self,
listener_type,
listener )

Adding BufferDataListener type listener

This operation adds certain listeners related to buffer writing and reading events. The following listener types are available.

  • ON_BUFFER_WRITE: At the time of buffer write
  • ON_BUFFER_FULL: At the time of buffer full
  • ON_BUFFER_WRITE_TIMEOUT: At the time of buffer write timeout
  • ON_BUFFER_OVERWRITE: At the time of buffer overwrite
  • ON_BUFFER_READ: At the time of buffer read
  • ON_SEND: At the time of sending to InPort
  • ON_RECEIVED: At the time of finishing sending to InPort
  • ON_SENDER_TIMEOUT: At the time of timeout of OutPort
  • ON_SENDER_ERROR: At the time of error of OutPort
  • ON_RECEIVER_FULL: At the time of bufferfull of InPort
  • ON_RECEIVER_TIMEOUT: At the time of timeout of InPort
  • ON_RECEIVER_ERROR: At the time of error of InPort

Listeners should have the following function operator().

ConnectorDataListener:: operator()(const ConnectorProfile&, const cdrStream&)

The ownership of the given listener object is transferred to this OutPort object in default. The given listener object will be destroied automatically in the OutPort's dtor or if the listener is deleted by removeConnectorDataListener() function. If you want to keep ownership of the listener object, give "false" value to 3rd argument to inhibit automatic destruction.

Parameters
listener_typeA listener type
listenerA pointer to a listener object

void addConnectorDataListener(ConnectorDataListenerType type, ConnectorDataListener* listener)

◆ addConnectorListener()

OpenRTM_aist.InPortBase.InPortBase.addConnectorListener ( self,
listener_type,
listener )

Adding ConnectorListener type listener

This operation adds certain listeners related to buffer writing and reading events. The following listener types are available.

  • ON_BUFFER_EMPTY: At the time of buffer empty
  • ON_BUFFER_READTIMEOUT: At the time of buffer read timeout

Listeners should have the following function operator().

ConnectorListener.operator()(const ConnectorProfile&)

The ownership of the given listener object is transferred to this OutPort object in default. The given listener object will be destroied automatically in the OutPort's dtor or if the listener is deleted by removeConnectorListener() function. If you want to keep ownership of the listener object, give "false" value to 3rd argument to inhibit automatic destruction.

Parameters
listener_typeA listener type
listenerA pointer to a listener object

void addConnectorListener(ConnectorListenerType type, ConnectorListener* listener)

◆ connect()

OpenRTM_aist.InPortBase.InPortBase.connect ( self,
connector_profile )

[CORBA interface] Connect the Port

This operation establishes connection according to the given ConnectionProfile inforamtion. This function is premised on calling from mainly application program or tools.

Parameters
connector_profileThe ConnectorProfile.
Returns
ReturnCode_t The return code of ReturnCode_t type.

Reimplemented from OpenRTM_aist.PortBase.PortBase.

◆ connectors()

OpenRTM_aist.InPortBase.InPortBase.connectors ( self)

Connector list

This operation returns connector list

Returns
connector list

const std.vector<InPortConnector*>& connectors();

◆ createConnector()

OpenRTM_aist.InPortBase.InPortBase.createConnector ( self,
cprof,
prop,
provider_ = None,
consumer_ = None )

InPortPushConnector creation

InPortConnector* createConnector(ConnectorProfile& cprof, coil.Properties& prop, InPortProvider* provider);

◆ createConsumer()

OpenRTM_aist.InPortBase.InPortBase.createConsumer ( self,
cprof,
prop )

InPort provider creation

OutPortConsumer* createConsumer(const ConnectorProfile& cprof, coil.Properties& prop);

◆ createDuplexConnector()

OpenRTM_aist.InPortBase.InPortBase.createDuplexConnector ( self,
cprof,
prop,
provider_ )

InPortDuplexConnector creation

Parameters
cprof
prop
provider_
Returns

◆ createProvider()

OpenRTM_aist.InPortBase.InPortBase.createProvider ( self,
cprof,
prop )

InPort provider creation

InPortProvider* createProvider(ConnectorProfile& cprof, coil.Properties& prop);

◆ deactivateInterfaces()

OpenRTM_aist.InPortBase.InPortBase.deactivateInterfaces ( self)

Deactivate all Port interfaces

This operation deactivate all interfaces that is registered in the ports.

void deactivateInterfaces();

◆ getConnectorById()

OpenRTM_aist.InPortBase.InPortBase.getConnectorById ( self,
id )

Getting ConnectorProfile by ID

This operation returns Connector specified by ID.

Parameters
idConnector ID
Returns
A pointer to connector

InPortConnector* getConnectorById(const char* id);

◆ getConnectorByName()

OpenRTM_aist.InPortBase.InPortBase.getConnectorByName ( self,
name )

Getting Connector by name

This operation returns Connector specified by name.

Parameters
idConnector ID
Returns
A pointer to connector

InPortConnector* getConnectorByName(const char* name);

◆ getConnectorIds()

OpenRTM_aist.InPortBase.InPortBase.getConnectorIds ( self)

ConnectorId list

This operation returns ConnectorId list

Returns
connector list

coil.vstring getConnectorIds();

◆ getConnectorNames()

OpenRTM_aist.InPortBase.InPortBase.getConnectorNames ( self)

Connector name list

This operation returns Connector name list

Returns
connector name list

coil.vstring getConnectorNames();

◆ getConnectorProfileById()

OpenRTM_aist.InPortBase.InPortBase.getConnectorProfileById ( self,
id )

Getting ConnectorProfile by name

This operation returns ConnectorProfile specified by name

Parameters
idConnector ID
profConnectorProfile
Returns
false specified ID does not exist

bool getConnectorProfileById(const char* id, ConnectorInfo& prof);

◆ getConnectorProfileByName()

OpenRTM_aist.InPortBase.InPortBase.getConnectorProfileByName ( self,
name )

Getting ConnectorProfile by name

This operation returns ConnectorProfile specified by name

Parameters
idConnector ID
profConnectorProfile
Returns
false specified name does not exist

bool getConnectorProfileByName(const char* name, ConnectorInfo& prof);

◆ getConnectorProfiles()

OpenRTM_aist.InPortBase.InPortBase.getConnectorProfiles ( self)

ConnectorProfile list

This operation returns ConnectorProfile list

Returns
connector list

ConnectorInfoList getConnectorProfiles();

◆ getLocalOutPort()

OpenRTM_aist.InPortBase.InPortBase.getLocalOutPort ( self,
profile )

Getting local peer OutPort if available

Parameters
self
profile
Returns

OutPortBase* getLocalOutPort(const ConnectorInfo& profile)

◆ init()

OpenRTM_aist.InPortBase.InPortBase.init ( self,
prop )

Initializing properties

This method initializes the port in the specified property.

Parameters
propProperty for setting ports

void init(coil.Properties& prop);

Reimplemented in OpenRTM_aist.CSPEventPort.CSPEventPort, OpenRTM_aist.CSPInPort.CSPInPort, OpenRTM_aist.EventPort.EventInPort, and OpenRTM_aist.EventPort_pyfsm.EventInPort.

◆ initConsumers()

OpenRTM_aist.InPortBase.InPortBase.initConsumers ( self)

OutPort consumer initialization

void initConsumers();

◆ initProviders()

OpenRTM_aist.InPortBase.InPortBase.initProviders ( self)

InPort provider initialization

void initProviders();

◆ notify_connect()

OpenRTM_aist.InPortBase.InPortBase.notify_connect ( self,
connector_profile )

Parameters
self
connector_profile
Returns

Reimplemented from OpenRTM_aist.PortBase.PortBase.

Reimplemented in OpenRTM_aist.CSPEventPort.CSPEventPort, and OpenRTM_aist.CSPInPort.CSPInPort.

◆ properties()

OpenRTM_aist.InPortBase.InPortBase.properties ( self)

Get properties

Getting properties of this InPort

Returns
InPort's properties

◆ publishInterfaces()

OpenRTM_aist.InPortBase.InPortBase.publishInterfaces ( self,
cprof )

Publish interface information

Publish interface information. Assign the Provider information that owned by this port to ConnectorProfile.properties

Parameters
connector_profileThe connector profile
Returns
The return code of ReturnCode_t type

ReturnCode_t publishInterfaces(ConnectorProfile& connector_profile);

Reimplemented from OpenRTM_aist.PortBase.PortBase.

◆ read()

OpenRTM_aist.InPortBase.InPortBase.read ( self)

It is a virtual method that is called from RTObject_impl.readAll(). This method reads out data from DataPort.

Returns
true:Success,false:Failure

virtual bool read() = 0;

Reimplemented in OpenRTM_aist.CSPEventPort.CSPEventPort, OpenRTM_aist.CSPInPort.CSPInPort, and OpenRTM_aist.InPort.InPort.

◆ removeConnectorDataListener()

OpenRTM_aist.InPortBase.InPortBase.removeConnectorDataListener ( self,
listener_type,
listener )

Removing BufferDataListener type listener

This operation removes a specified listener.

Parameters
listener_typeA listener type
listenerA pointer to a listener object

void removeConnectorDataListener(ConnectorDataListenerType type, ConnectorDataListener* listener)

◆ removeConnectorListener()

OpenRTM_aist.InPortBase.InPortBase.removeConnectorListener ( self,
listener_type,
listener )

Removing BufferDataListener type listener

This operation removes a specified listener.

Parameters
listener_typeA listener type
listenerA pointer to a listener object

void removeConnectorListener(ConnectorListenerType type, ConnectorListener* listener)

◆ subscribeInterfaces()

OpenRTM_aist.InPortBase.InPortBase.subscribeInterfaces ( self,
cprof )

Subscribe to the interface

Subscribe to interface. Derive Provider information that matches Consumer owned by the Port from ConnectorProfile.properties and set the Consumer to the reference of the CORBA object.

Parameters
connector_profileThe connector profile
Returns
ReturnCode_t The return code of ReturnCode_t type

ReturnCode_t subscribeInterfaces(const ConnectorProfile& connector_profile);

Reimplemented from OpenRTM_aist.PortBase.PortBase.

◆ unsubscribeInterfaces()

OpenRTM_aist.InPortBase.InPortBase.unsubscribeInterfaces ( self,
connector_profile )

Disconnect the interface connection

Disconnect the interface connection. Release all objects set in Consumer associated with given ConnectorProfile and unscribe the interface.

Parameters
connector_profileThe connector profile

void unsubscribeInterfaces(const ConnectorProfile& connector_profile);

Reimplemented from OpenRTM_aist.PortBase.PortBase.


The documentation for this class was generated from the following file: