#include <TaskContextProxy.hpp>
Public Types | |
typedef std::map < TaskContextProxy *, corba::CTaskContext_ptr > | PMap |
typedef std::map < TaskContextProxy *, corba::CTaskContext_ptr > | PMap |
Public Member Functions | |
virtual bool | activate () |
virtual bool | activate () |
virtual bool | addPeer (TaskContext *peer, std::string alias="") |
virtual bool | addPeer (TaskContext *peer, std::string alias="") |
virtual bool | cleanup () |
virtual bool | cleanup () |
virtual bool | configure () |
virtual bool | configure () |
virtual bool | connectPeers (TaskContext *peer) |
virtual bool | connectPeers (TaskContext *peer) |
virtual bool | connectPorts (TaskContext *peer) |
virtual bool | connectPorts (TaskContext *peer) |
virtual bool | connectServices (TaskContext *peer) |
virtual bool | connectServices (TaskContext *peer) |
virtual void | disconnectPeers (const std::string &name) |
virtual void | disconnectPeers (const std::string &name) |
virtual TaskContext * | getPeer (const std::string &peer_name) const |
virtual TaskContext * | getPeer (const std::string &peer_name) const |
virtual PeerList | getPeerList () const |
virtual PeerList | getPeerList () const |
virtual TaskState | getTaskState () const |
virtual TaskState | getTaskState () const |
virtual bool | hasPeer (const std::string &peer_name) const |
virtual bool | hasPeer (const std::string &peer_name) const |
virtual bool | inFatalError () const |
virtual bool | inFatalError () const |
virtual bool | inRunTimeError () const |
virtual bool | inRunTimeError () const |
virtual bool | isActive () const |
virtual bool | isActive () const |
virtual bool | isConfigured () const |
virtual bool | isConfigured () const |
virtual bool | isRunning () const |
virtual bool | isRunning () const |
virtual bool | ready () |
virtual bool | ready () |
virtual void | removePeer (TaskContext *peer) |
virtual void | removePeer (const std::string &name) |
virtual void | removePeer (TaskContext *peer) |
virtual void | removePeer (const std::string &name) |
corba::CTaskContext_ptr | server () const |
corba::CTaskContext_ptr | server () const |
virtual void | setName (const std::string &n) |
virtual void | setName (const std::string &n) |
virtual bool | start () |
virtual bool | start () |
virtual bool | stop () |
virtual bool | stop () |
~TaskContextProxy () | |
~TaskContextProxy () | |
Static Public Member Functions | |
static TaskContext * | Create (::RTT::corba::CTaskContext_ptr task, bool force_remote=false) |
static TaskContextProxy * | Create (std::string name, bool is_ior=false) |
static TaskContext * | Create (::RTT::corba::CTaskContext_ptr task, bool force_remote=false) |
static TaskContextProxy * | Create (std::string name, bool is_ior=false) |
static TaskContextProxy * | CreateFromFile (std::string filename) |
static TaskContextProxy * | CreateFromFile (std::string filename) |
static void | DestroyOrb () |
static void | DestroyOrb () |
static PortableServer::POA_ptr | ProxyPOA () |
static PortableServer::POA_ptr | ProxyPOA () |
Static Public Attributes | |
static PMap | proxies |
Protected Member Functions | |
void | fetchRequesters (ServiceRequester *parent, CServiceRequester_ptr csrq) |
void | fetchRequesters (ServiceRequester *parent, CServiceRequester_ptr csrq) |
void | fetchServices (Service::shared_ptr parent, CService_ptr mtask) |
void | fetchServices (Service::shared_ptr parent, CService_ptr mtask) |
void | synchronize () |
void | synchronize () |
TaskContextProxy (::RTT::corba::CTaskContext_ptr t) | |
TaskContextProxy (std::string location, bool is_ior) | |
TaskContextProxy (::RTT::corba::CTaskContext_ptr t) | |
TaskContextProxy (std::string location, bool is_ior) | |
Protected Attributes | |
corba::CTaskContext_var | mtask |
std::list< base::PortInterface * > | port_proxies |
Static Protected Attributes | |
static PortableServer::POA_var | proxy_poa |
This class manages the access of remote TaskContext Corba Servers and a Corba Object Request Broker (Orb) which connects to these servers.
Definition at line 82 of file install/include/rtt/transports/corba/TaskContextProxy.hpp.
typedef std::map<TaskContextProxy*, corba::CTaskContext_ptr> RTT::corba::TaskContextProxy::PMap |
Definition at line 87 of file rtt/transports/corba/TaskContextProxy.hpp.
typedef std::map<TaskContextProxy*, corba::CTaskContext_ptr> RTT::corba::TaskContextProxy::PMap |
Definition at line 87 of file install/include/rtt/transports/corba/TaskContextProxy.hpp.
RTT::corba::TaskContextProxy::TaskContextProxy | ( | std::string | location, | |
bool | is_ior | |||
) | [protected] |
Private constructor which creates a new connection to a stringified ior or taskname in NameServer.
Definition at line 94 of file TaskContextProxy.cpp.
RTT::corba::TaskContextProxy::TaskContextProxy | ( | ::RTT::corba::CTaskContext_ptr | t | ) | [protected] |
Private constructor which creates a new connection to a corba object
Definition at line 162 of file TaskContextProxy.cpp.
RTT::corba::TaskContextProxy::~TaskContextProxy | ( | ) |
Definition at line 82 of file TaskContextProxy.cpp.
RTT::corba::TaskContextProxy::TaskContextProxy | ( | std::string | location, | |
bool | is_ior | |||
) | [protected] |
Private constructor which creates a new connection to a stringified ior or taskname in NameServer.
RTT::corba::TaskContextProxy::TaskContextProxy | ( | ::RTT::corba::CTaskContext_ptr | t | ) | [protected] |
Private constructor which creates a new connection to a corba object
RTT::corba::TaskContextProxy::~TaskContextProxy | ( | ) |
virtual bool RTT::corba::TaskContextProxy::activate | ( | void | ) | [virtual] |
This method starts the ExecutionEngine of this component in case it was not running. Normally, it is always running. There is no way to deactivate it from the public interface.
Reimplemented from RTT::base::TaskCore.
bool RTT::corba::TaskContextProxy::activate | ( | void | ) | [virtual] |
This method starts the ExecutionEngine of this component in case it was not running. Normally, it is always running. There is no way to deactivate it from the public interface.
Reimplemented from RTT::base::TaskCore.
Definition at line 481 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::addPeer | ( | TaskContext * | peer, | |
std::string | alias = "" | |||
) | [virtual] |
Add a one-way connection from this task to a peer task.
peer | The peer to add. | |
alias | An optional alias (another name) for the peer. defaults to peer->getName() |
Reimplemented from RTT::TaskContext.
bool RTT::corba::TaskContextProxy::addPeer | ( | TaskContext * | peer, | |
std::string | alias = "" | |||
) | [virtual] |
Add a one-way connection from this task to a peer task.
peer | The peer to add. | |
alias | An optional alias (another name) for the peer. defaults to peer->getName() |
Reimplemented from RTT::TaskContext.
Definition at line 582 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::cleanup | ( | void | ) | [virtual] |
This method instructs a stopped component to enter the pre-operational state again. It calls cleanupHook().
Reimplemented from RTT::base::TaskCore.
bool RTT::corba::TaskContextProxy::cleanup | ( | void | ) | [virtual] |
This method instructs a stopped component to enter the pre-operational state again. It calls cleanupHook().
Reimplemented from RTT::base::TaskCore.
Definition at line 525 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::configure | ( | void | ) | [virtual] |
This method instructs the component to (re-)read configuration data and try to enter the Stopped state. This can only succeed if the component is not running and configureHook() returns true.
Reimplemented from RTT::base::TaskCore.
bool RTT::corba::TaskContextProxy::configure | ( | void | ) | [virtual] |
This method instructs the component to (re-)read configuration data and try to enter the Stopped state. This can only succeed if the component is not running and configureHook() returns true.
Reimplemented from RTT::base::TaskCore.
Definition at line 513 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::connectPeers | ( | TaskContext * | peer | ) | [virtual] |
Add a two-way connection from this task to a peer task.
Reimplemented from RTT::TaskContext.
bool RTT::corba::TaskContextProxy::connectPeers | ( | TaskContext * | peer | ) | [virtual] |
Add a two-way connection from this task to a peer task.
Reimplemented from RTT::TaskContext.
Definition at line 637 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::connectPorts | ( | TaskContext * | peer | ) | [virtual] |
Add a data flow connection from this task's ports to a peer's ports.
Reimplemented from RTT::TaskContext.
bool RTT::corba::TaskContextProxy::connectPorts | ( | TaskContext * | peer | ) | [virtual] |
Add a data flow connection from this task's ports to a peer's ports.
Reimplemented from RTT::TaskContext.
Definition at line 706 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::connectServices | ( | TaskContext * | peer | ) | [virtual] |
Connects all requires/provides services of this component to these of a peer.
Reimplemented from RTT::TaskContext.
bool RTT::corba::TaskContextProxy::connectServices | ( | TaskContext * | peer | ) | [virtual] |
Connects all requires/provides services of this component to these of a peer.
Reimplemented from RTT::TaskContext.
Definition at line 721 of file TaskContextProxy.cpp.
static TaskContext* RTT::corba::TaskContextProxy::Create | ( | ::RTT::corba::CTaskContext_ptr | task, | |
bool | force_remote = false | |||
) | [static] |
Factory method: create a CORBA Proxy for an existing TaskContextServer. This method may in fact return the real TaskContext in case the servant of task is in the same process.
task | The Object to create a proxy for. |
0 | if the ORB is not initialised |
static TaskContextProxy* RTT::corba::TaskContextProxy::Create | ( | std::string | name, | |
bool | is_ior = false | |||
) | [static] |
Factory method: create a CORBA Proxy for an existing TaskContextServer.
name | The name of the TaskContextServer to connect to or the Object Reference of the object to connect to | |
is_ior | set to true if name is an IOR. Defaults to false. |
0 | if the ORB is not initialised |
TaskContext * RTT::corba::TaskContextProxy::Create | ( | ::RTT::corba::CTaskContext_ptr | task, | |
bool | force_remote = false | |||
) | [static] |
Factory method: create a CORBA Proxy for an existing TaskContextServer. This method may in fact return the real TaskContext in case the servant of task is in the same process.
task | The Object to create a proxy for. |
0 | if the ORB is not initialised |
Definition at line 416 of file TaskContextProxy.cpp.
TaskContextProxy * RTT::corba::TaskContextProxy::Create | ( | std::string | name, | |
bool | is_ior = false | |||
) | [static] |
Factory method: create a CORBA Proxy for an existing TaskContextServer.
name | The name of the TaskContextServer to connect to or the Object Reference of the object to connect to | |
is_ior | set to true if name is an IOR. Defaults to false. |
0 | if the ORB is not initialised |
Definition at line 379 of file TaskContextProxy.cpp.
static TaskContextProxy* RTT::corba::TaskContextProxy::CreateFromFile | ( | std::string | filename | ) | [static] |
Factory method: create a CORBA Proxy for an existing TaskContextServer.
filename | A file containing an IOR which refers to the existing TaskContextServer. |
0 | if the ORB is not initialised |
TaskContextProxy * RTT::corba::TaskContextProxy::CreateFromFile | ( | std::string | filename | ) | [static] |
Factory method: create a CORBA Proxy for an existing TaskContextServer.
filename | A file containing an IOR which refers to the existing TaskContextServer. |
0 | if the ORB is not initialised |
Definition at line 399 of file TaskContextProxy.cpp.
static void RTT::corba::TaskContextProxy::DestroyOrb | ( | ) | [static] |
Invoke this method once to cleanup the orb.
void RTT::corba::TaskContextProxy::DestroyOrb | ( | ) | [static] |
Invoke this method once to cleanup the orb.
Definition at line 361 of file TaskContextProxy.cpp.
virtual void RTT::corba::TaskContextProxy::disconnectPeers | ( | const std::string & | name | ) | [virtual] |
Remove a two-way connection from this task to a peer task.
Reimplemented from RTT::TaskContext.
void RTT::corba::TaskContextProxy::disconnectPeers | ( | const std::string & | name | ) | [virtual] |
Remove a two-way connection from this task to a peer task.
Reimplemented from RTT::TaskContext.
Definition at line 652 of file TaskContextProxy.cpp.
void RTT::corba::TaskContextProxy::fetchRequesters | ( | ServiceRequester * | parent, | |
CServiceRequester_ptr | csrq | |||
) | [protected] |
void RTT::corba::TaskContextProxy::fetchRequesters | ( | ServiceRequester * | parent, | |
CServiceRequester_ptr | csrq | |||
) | [protected] |
Definition at line 231 of file TaskContextProxy.cpp.
void RTT::corba::TaskContextProxy::fetchServices | ( | Service::shared_ptr | parent, | |
CService_ptr | mtask | |||
) | [protected] |
void RTT::corba::TaskContextProxy::fetchServices | ( | Service::shared_ptr | parent, | |
CService_ptr | mtask | |||
) | [protected] |
Definition at line 258 of file TaskContextProxy.cpp.
virtual TaskContext* RTT::corba::TaskContextProxy::getPeer | ( | const std::string & | peer_name | ) | const [virtual] |
Get a pointer to a peer of this task.
Reimplemented from RTT::TaskContext.
TaskContext * RTT::corba::TaskContextProxy::getPeer | ( | const std::string & | peer_name | ) | const [virtual] |
Get a pointer to a peer of this task.
Reimplemented from RTT::TaskContext.
Definition at line 691 of file TaskContextProxy.cpp.
virtual PeerList RTT::corba::TaskContextProxy::getPeerList | ( | void | ) | const [virtual] |
Return a standard container which contains all the Peer names of this TaskContext.
Reimplemented from RTT::TaskContext.
TaskContext::PeerList RTT::corba::TaskContextProxy::getPeerList | ( | void | ) | const [virtual] |
Return a standard container which contains all the Peer names of this TaskContext.
Reimplemented from RTT::TaskContext.
Definition at line 664 of file TaskContextProxy.cpp.
virtual TaskState RTT::corba::TaskContextProxy::getTaskState | ( | void | ) | const [virtual] |
Returns the current state of the TaskCore. For example, before start(), this function returns Stopped. During startHook() it returns Stopped, and after start() it returns Running.
Reimplemented from RTT::base::TaskCore.
TaskContext::TaskState RTT::corba::TaskContextProxy::getTaskState | ( | void | ) | const [virtual] |
Returns the current state of the TaskCore. For example, before start(), this function returns Stopped. During startHook() it returns Stopped, and after start() it returns Running.
Reimplemented from RTT::base::TaskCore.
Definition at line 567 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::hasPeer | ( | const std::string & | peer_name | ) | const [virtual] |
Return true if it knows a peer by that name.
Reimplemented from RTT::TaskContext.
bool RTT::corba::TaskContextProxy::hasPeer | ( | const std::string & | peer_name | ) | const [virtual] |
Return true if it knows a peer by that name.
Reimplemented from RTT::TaskContext.
Definition at line 680 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::inFatalError | ( | void | ) | const [virtual] |
Inspect if the component is in the FatalError state. There is no possibility to recover from this state. You need to destroy and recreate your component.
Reimplemented from RTT::base::TaskCore.
bool RTT::corba::TaskContextProxy::inFatalError | ( | void | ) | const [virtual] |
Inspect if the component is in the FatalError state. There is no possibility to recover from this state. You need to destroy and recreate your component.
Reimplemented from RTT::base::TaskCore.
Definition at line 547 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::inRunTimeError | ( | void | ) | const [virtual] |
Inspect if the component is in the RunTimeError state.
Reimplemented from RTT::base::TaskCore.
bool RTT::corba::TaskContextProxy::inRunTimeError | ( | void | ) | const [virtual] |
Inspect if the component is in the RunTimeError state.
Reimplemented from RTT::base::TaskCore.
Definition at line 557 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::isActive | ( | void | ) | const [virtual] |
Inspect if the component's ExecutionEngine is processing requests. Normally this is always the case, but user code could stop the ExecutionEngine manually.
Reimplemented from RTT::base::TaskCore.
bool RTT::corba::TaskContextProxy::isActive | ( | void | ) | const [virtual] |
Inspect if the component's ExecutionEngine is processing requests. Normally this is always the case, but user code could stop the ExecutionEngine manually.
Reimplemented from RTT::base::TaskCore.
Definition at line 493 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::isConfigured | ( | void | ) | const [virtual] |
Inspect if the component is configured, i.e. in the Stopped, Active or Running state.
Reimplemented from RTT::base::TaskCore.
bool RTT::corba::TaskContextProxy::isConfigured | ( | void | ) | const [virtual] |
Inspect if the component is configured, i.e. in the Stopped, Active or Running state.
Reimplemented from RTT::base::TaskCore.
Definition at line 537 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::isRunning | ( | void | ) | const [virtual] |
Inspect if the component is in the Running or RunTimeError state. As RunTimeError is a substate of Running, this method also returns true when the component is in one of these states. See inRunTimeError() or testing the run-time error state.
Reimplemented from RTT::base::TaskCore.
bool RTT::corba::TaskContextProxy::isRunning | ( | void | ) | const [virtual] |
Inspect if the component is in the Running or RunTimeError state. As RunTimeError is a substate of Running, this method also returns true when the component is in one of these states. See inRunTimeError() or testing the run-time error state.
Reimplemented from RTT::base::TaskCore.
Definition at line 503 of file TaskContextProxy.cpp.
static PortableServer::POA_ptr RTT::corba::TaskContextProxy::ProxyPOA | ( | ) | [static] |
Returns the default POA for all proxies.
PortableServer::POA_ptr RTT::corba::TaskContextProxy::ProxyPOA | ( | ) | [static] |
Returns the default POA for all proxies.
Definition at line 759 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::ready | ( | void | ) | [virtual] |
Checks the validity of this TaskContext. When this method returns false, the TaskContext should not be used and various methods may throw exceptions. Use this in case the TaskContext could be a remote object. Will always return true when this TaskContext is local.
Reimplemented from RTT::TaskContext.
bool RTT::corba::TaskContextProxy::ready | ( | void | ) | [virtual] |
Checks the validity of this TaskContext. When this method returns false, the TaskContext should not be used and various methods may throw exceptions. Use this in case the TaskContext could be a remote object. Will always return true when this TaskContext is local.
Reimplemented from RTT::TaskContext.
Definition at line 736 of file TaskContextProxy.cpp.
virtual void RTT::corba::TaskContextProxy::removePeer | ( | TaskContext * | peer | ) | [virtual] |
Remove a one-way connection from this task to a peer task.
Reimplemented from RTT::TaskContext.
virtual void RTT::corba::TaskContextProxy::removePeer | ( | const std::string & | name | ) | [virtual] |
Remove a one-way connection from this task to a peer task.
Reimplemented from RTT::TaskContext.
void RTT::corba::TaskContextProxy::removePeer | ( | TaskContext * | peer | ) | [virtual] |
Remove a one-way connection from this task to a peer task.
Reimplemented from RTT::TaskContext.
Definition at line 624 of file TaskContextProxy.cpp.
void RTT::corba::TaskContextProxy::removePeer | ( | const std::string & | name | ) | [virtual] |
Remove a one-way connection from this task to a peer task.
Reimplemented from RTT::TaskContext.
Definition at line 611 of file TaskContextProxy.cpp.
corba::CTaskContext_ptr RTT::corba::TaskContextProxy::server | ( | ) | const |
Get the Corba Object of the CTaskContext. You need to duplicate this object reference in case you wish to keep a reference to it. This object universally identifies the remote TaskContextServer and can be used to tell other (remote) objects where to find it.
corba::CTaskContext_ptr RTT::corba::TaskContextProxy::server | ( | ) | const |
Get the Corba Object of the CTaskContext. You need to duplicate this object reference in case you wish to keep a reference to it. This object universally identifies the remote TaskContextServer and can be used to tell other (remote) objects where to find it.
Definition at line 753 of file TaskContextProxy.cpp.
virtual void RTT::corba::TaskContextProxy::setName | ( | const std::string & | n | ) | [virtual] |
void RTT::corba::TaskContextProxy::setName | ( | const std::string & | n | ) | [virtual] |
Definition at line 577 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::start | ( | void | ) | [virtual] |
This method starts the execution of the updateHook() with each trigger or period. This function calls the user function startHook(), which must return true in order to allow this component to run.
false |
| |
true | if the Running state was entered. |
Reimplemented from RTT::TaskContext.
bool RTT::corba::TaskContextProxy::start | ( | void | ) | [virtual] |
This method starts the execution of the updateHook() with each trigger or period. This function calls the user function startHook(), which must return true in order to allow this component to run.
false |
| |
true | if the Running state was entered. |
Reimplemented from RTT::TaskContext.
Definition at line 457 of file TaskContextProxy.cpp.
virtual bool RTT::corba::TaskContextProxy::stop | ( | void | ) | [virtual] |
This method stops the execution of updateHook() of this component. You can override this method to do something else or in addition. This function calls stopHook() as well.
Reimplemented from RTT::TaskContext.
bool RTT::corba::TaskContextProxy::stop | ( | void | ) | [virtual] |
This method stops the execution of updateHook() of this component. You can override this method to do something else or in addition. This function calls stopHook() as well.
Reimplemented from RTT::TaskContext.
Definition at line 469 of file TaskContextProxy.cpp.
void RTT::corba::TaskContextProxy::synchronize | ( | ) | [protected] |
void RTT::corba::TaskContextProxy::synchronize | ( | ) | [protected] |
Definition at line 185 of file TaskContextProxy.cpp.
corba::CTaskContext_var RTT::corba::TaskContextProxy::mtask [mutable, protected] |
Definition at line 113 of file install/include/rtt/transports/corba/TaskContextProxy.hpp.
std::list< base::PortInterface * > RTT::corba::TaskContextProxy::port_proxies [protected] |
CDataFlowInterface does not delete ports automatically, because they can then be defined as members of the TaskContext classes.
We must therefore delete in the proxy destructor the ones we are adding through synchronization
Definition at line 109 of file install/include/rtt/transports/corba/TaskContextProxy.hpp.
static PMap RTT::corba::TaskContextProxy::proxies [static] |
Definition at line 88 of file install/include/rtt/transports/corba/TaskContextProxy.hpp.
static PortableServer::POA_var RTT::corba::TaskContextProxy::proxy_poa [static, protected] |
For now one POA handles all proxies.
Definition at line 118 of file install/include/rtt/transports/corba/TaskContextProxy.hpp.