OpenRTM-aist-Python 1.2.1
Public Member Functions | List of all members
OpenRTM_aist.InPortBase.InPortBase Class Reference

Port for InPort. More...

Inheritance diagram for OpenRTM_aist.InPortBase.InPortBase:
OpenRTM_aist.PortBase.PortBase OpenRTM_aist.DataPortStatus.DataPortStatus OpenRTM_aist.InPort.InPort

Public Member Functions

def __init__ (self, name, data_type)
 Constructor. More...
 
def __del__ (self, PortBase=OpenRTM_aist.PortBase)
 Destructor. More...
 
def init (self, prop)
 Initializing properties. More...
 
def read (self)
 It is a virtual method that is called from RTObject_impl::readAll(). More...
 
def properties (self)
 Get properties. More...
 
def connectors (self)
 Connector list. More...
 
def getConnectorProfiles (self)
 ConnectorProfile list. More...
 
def getConnectorIds (self)
 ConnectorId list. More...
 
def getConnectorNames (self)
 Connector name list. More...
 
def getConnectorById (self, id)
 Getting ConnectorProfile by ID. More...
 
def getConnectorByName (self, name)
 Getting Connector by name. More...
 
def getConnectorProfileById (self, id, prof)
 Getting ConnectorProfile by name. More...
 
def getConnectorProfileByName (self, name, prof)
 Getting ConnectorProfile by name. More...
 
def connect (self, connector_profile)
 [CORBA interface] Connect the Port More...
 
def notify_connect (self, connector_profile)
 
def activateInterfaces (self)
 Activate all Port interfaces. More...
 
def deactivateInterfaces (self)
 Deactivate all Port interfaces. More...
 
def addConnectorDataListener (self, listener_type, listener, autoclean=True)
 Adding BufferDataListener type listener. More...
 
def removeConnectorDataListener (self, listener_type, listener)
 Removing BufferDataListener type listener. More...
 
def addConnectorListener (self, listener_type, listener, autoclean=True)
 Adding ConnectorListener type listener. More...
 
def removeConnectorListener (self, listener_type, listener)
 Removing BufferDataListener type listener. More...
 
def publishInterfaces (self, cprof)
 Publish interface information. More...
 
def subscribeInterfaces (self, cprof)
 Subscribe to the interface. More...
 
def unsubscribeInterfaces (self, connector_profile)
 Disconnect the interface connection. More...
 
def initProviders (self)
 InPort provider initializationvoid initProviders();.
 
def initConsumers (self)
 OutPort consumer initializationvoid initConsumers();.
 
def createProvider (self, cprof, prop)
 InPort provider creationInPortProvider* createProvider(ConnectorProfile& cprof, coil::Properties& prop);.
 
def createConsumer (self, cprof, prop)
 InPort provider creationOutPortConsumer* createConsumer(const ConnectorProfile& cprof, coil::Properties& prop);.
 
def createConnector (self, cprof, prop, provider_=None, consumer_=None)
 InPortPushConnector creationInPortConnector* createConnector(ConnectorProfile& cprof, coil::Properties& prop, InPortProvider* provider);.
 
def getLocalOutPort (self, profile)
 Getting local peer OutPort if available. More...
 
- Public Member Functions inherited from OpenRTM_aist.PortBase.PortBase
def __init__ (self, name=None)
 Constructor. More...
 
def __del__ (self)
 Destructor. More...
 
def exit (self)
 
def get_port_profile (self)
 [CORBA interface] Get the PortProfile of the Port More...
 
def getPortProfile (self)
 Get the PortProfile of the Port. More...
 
def get_connector_profiles (self)
 [CORBA interface] Get the ConnectorProfileList of the Port More...
 
def get_connector_profile (self, connector_id)
 [CORBA interface] Get the ConnectorProfile More...
 
def connect (self, connector_profile)
 [CORBA interface] Connect the Port More...
 
def notify_connect (self, connector_profile)
 [CORBA interface] Notify the Ports connection More...
 
def disconnect (self, connector_id)
 [CORBA interface] Disconnect the Port More...
 
def notify_disconnect (self, connector_id)
 [CORBA interface] Notify the Ports disconnection More...
 
def disconnect_all (self)
 [CORBA interface] Connect the Port More...
 
def setName (self, name)
 Set the name of this Port. More...
 
def getName (self)
 Get the name of this Port. More...
 
def getProfile (self)
 Get the PortProfile of the Port. More...
 
def setPortRef (self, port_ref)
 Set the object reference of this Port. More...
 
def getPortRef (self)
 Get the object reference of this Port. More...
 
def setOwner (self, owner)
 Set the owner RTObject of the Port. More...
 
def setOnPublishInterfaces (self, on_publish)
 Setting callback called on publish interfaces. More...
 
def setOnSubscribeInterfaces (self, on_subscribe)
 Setting callback called on publish interfaces. More...
 
def setOnConnected (self, on_connected)
 Setting callback called on connection established. More...
 
def setOnUnsubscribeInterfaces (self, on_subscribe)
 Setting callback called on unsubscribe interfaces. More...
 
def setOnDisconnected (self, on_disconnected)
 Setting callback called on disconnected. More...
 
def setPortConnectListenerHolder (self, portconnListeners)
 Setting PortConnectListener holder. More...
 
def publishInterfaces (self, connector_profile)
 Publish interface information. More...
 
def connectNext (self, connector_profile)
 Call notify_connect() of the next Port. More...
 
def disconnectNext (self, connector_profile)
 Call notify_disconnect() of the next Port. More...
 
def subscribeInterfaces (self, connector_profile)
 Publish interface information. More...
 
def unsubscribeInterfaces (self, connector_profile)
 Disconnect interface connection. More...
 
def setConnectionLimit (self, limit_value)
 Set the maximum number of connections. More...
 
def isEmptyId (self, connector_profile)
 Whether connector_id of ConnectorProfile is empty. More...
 
def getUUID (self)
 Get the UUID. More...
 
def setUUID (self, connector_profile)
 Create and set the UUID to the ConnectorProfile. More...
 
def isExistingConnId (self, id_)
 Whether the given id exists in stored ConnectorProfiles. More...
 
def findConnProfile (self, id_)
 Find ConnectorProfile with id. More...
 
def findConnProfileIndex (self, id_)
 Find ConnectorProfile with id. More...
 
def updateConnectorProfile (self, connector_profile)
 Append or update the ConnectorProfile list. More...
 
def eraseConnectorProfile (self, id_)
 Delete the ConnectorProfile. More...
 
def appendInterface (self, instance_name, type_name, pol)
 Append an interface to the PortInterfaceProfile. More...
 
def deleteInterface (self, name, pol)
 Delete an interface from the PortInterfaceProfile. More...
 
def addProperty (self, key, value)
 Add NameValue data to PortProfile's properties. More...
 
def appendProperty (self, key, value)
 Append NameValue data to PortProfile's properties. More...
 
def updateConnectors (self)
 Disconnect ports that doesn't exist. More...
 
def checkPorts (self, ports)
 Existence of ports. More...
 
- Public Member Functions inherited from OpenRTM_aist.DataPortStatus.DataPortStatus
def toString (status)
 Convert DataPortStatus into the string. More...
 

Additional Inherited Members

- Static Public Attributes inherited from OpenRTM_aist.DataPortStatus.DataPortStatus
int PORT_OK = 0
 DataPortStatus return codes. More...
 

Detailed Description

Port for InPort.

This is an implementation class for the data input port.

Since
0.4.0

Constructor & Destructor Documentation

def 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);

def OpenRTM_aist.InPortBase.InPortBase.__del__ (   self,
  PortBase = OpenRTM_aist.PortBase 
)

Destructor.

Destructor

Member Function Documentation

def OpenRTM_aist.InPortBase.InPortBase.activateInterfaces (   self)

Activate all Port interfaces.

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

void activateInterfaces();

def OpenRTM_aist.InPortBase.InPortBase.addConnectorDataListener (   self,
  listener_type,
  listener,
  autoclean = True 
)

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
autocleanA flag for automatic listener destruction

void addConnectorDataListener(ConnectorDataListenerType type, ConnectorDataListener* listener, bool autoclean)

def OpenRTM_aist.InPortBase.InPortBase.addConnectorListener (   self,
  listener_type,
  listener,
  autoclean = True 
)

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
autocleanA flag for automatic listener destruction

void addConnectorListener(ConnectorListenerType type, ConnectorListener* listener, bool autoclean)

def 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.
def OpenRTM_aist.InPortBase.InPortBase.connectors (   self)

Connector list.

This operation returns connector list

Returns
connector list

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

def OpenRTM_aist.InPortBase.InPortBase.deactivateInterfaces (   self)

Deactivate all Port interfaces.

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

void deactivateInterfaces();

def 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);

def 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);

def OpenRTM_aist.InPortBase.InPortBase.getConnectorIds (   self)

ConnectorId list.

This operation returns ConnectorId list

Returns
connector list

coil::vstring getConnectorIds();

def OpenRTM_aist.InPortBase.InPortBase.getConnectorNames (   self)

Connector name list.

This operation returns Connector name list

Returns
connector name list

coil::vstring getConnectorNames();

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

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);

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

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);

def OpenRTM_aist.InPortBase.InPortBase.getConnectorProfiles (   self)

ConnectorProfile list.

This operation returns ConnectorProfile list

Returns
connector list

ConnectorInfoList getConnectorProfiles();

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

Getting local peer OutPort if available.

Parameters
self
profile
Returns

OutPortBase* getLocalOutPort(const ConnectorInfo& profile)

def 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);

def OpenRTM_aist.InPortBase.InPortBase.notify_connect (   self,
  connector_profile 
)
Parameters
self
connector_profile
Returns
def OpenRTM_aist.InPortBase.InPortBase.properties (   self)

Get properties.

Getting properties of this InPort

Returns
InPort's properties
def 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);

def 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;

def 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)

def 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)

def 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);

def 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);


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