#include <rtt/corba/ControlTaskServer.hpp>

The Orb may be run from the main thread or in its own thread.
Definition at line 64 of file ControlTaskServer.hpp.
Public Member Functions | |
| ControlTask_ptr | server () const |
| Get the Corba Object of this ControlTask. | |
Static Public Member Functions | |
| static bool | InitOrb (int argc, char *argv[]) |
| Invoke this method once to initialise the Orb which will run the task servers. | |
| static void | ShutdownOrb (bool wait_for_completion=true) |
| Invoke this method once to shutdown the Orb which is running the task servers in RunOrb(). | |
| static void | CleanupServers () |
| Destroys all ControlTaskServer objects. | |
| static void | RunOrb () |
| Invoke this method to run the orb and accept client requests. | |
| static void | ThreadOrb () |
| Invoke this method to run the orb in a separate thread and accept client requests from that thread. | |
| static void | DestroyOrb () |
| Invoke this method once to cleanup the orb. | |
| static ControlTaskServer * | Create (TaskContext *tc, bool use_naming=true) |
| Factory method: create a CORBA server for an existing TaskContext. | |
| static ControlTask_ptr | CreateServer (TaskContext *tc, bool use_naming=true) |
| Factory method: create a CORBA server for an existing TaskContext. | |
Static Public Attributes | |
| static CORBA::ORB_var | orb |
| The orb of this process. | |
| static PortableServer::POA_var | rootPOA |
| The root POA of this process. | |
Protected Types | |
|
typedef std::map< TaskContext *, ControlTaskServer * > | ServerMap |
Protected Member Functions | |
| ControlTaskServer (TaskContext *taskcontext, bool use_naming) | |
| Private constructor which creates a new servant. | |
| ~ControlTaskServer () | |
| When a ControlTaskServer is destroyed, the object reference is removed from the Naming Service and the servant is deleted. | |
Static Protected Member Functions | |
| static void | DoShutdownOrb (bool wait_for_completion=true) |
| Internal shutdown function, used by both thread and ShutdownOrb. | |
Protected Attributes | |
| Corba::ControlTask_var | mtask |
| TaskContext * | mtaskcontext |
| bool | muse_naming |
Static Protected Attributes | |
| static ServerMap | servers |
| static ActivityInterface * | orbrunner = 0 |
Friends | |
| class | OrbRunner |
| class | ControlTaskProxy |
| void ShutdownOrb | ( | bool | wait_for_completion = true |
) | [static] |
Invoke this method once to shutdown the Orb which is running the task servers in RunOrb().
When this function returns, no CORBA invocations are in progress, unless wait_for_completion is false.
Definition at line 252 of file ControlTaskServer.cpp.
References ControlTaskServer::DoShutdownOrb().
| void RunOrb | ( | ) | [static] |
Invoke this method to run the orb and accept client requests.
Use ShutdownOrb() to break out of this method.
Definition at line 280 of file ControlTaskServer.cpp.
References ApplicationServer::orb.
| void ThreadOrb | ( | ) | [static] |
Invoke this method to run the orb in a separate thread and accept client requests from that thread.
Use ShutdownOrb() to break out of this method.
Definition at line 324 of file ControlTaskServer.cpp.
References ApplicationServer::orb, and ActivityInterface::start().
| ControlTaskServer * Create | ( | TaskContext * | tc, | |
| bool | use_naming = true | |||
| ) | [static] |
Factory method: create a CORBA server for an existing TaskContext.
| tc | The TaskContext to serve. | |
| use_naming | Set to false in order not to use the Corba Naming Service. |
| 0 | if the ORB is not initialised |
Definition at line 369 of file ControlTaskServer.cpp.
References ControlTaskServer::ControlTaskServer(), TaskContext::getName(), and ApplicationServer::orb.
Referenced by ControlTaskProxy::addPeer(), ControlTaskProxy::connectPeers(), and ControlTaskProxy::connectPorts().
| ControlTask_ptr CreateServer | ( | TaskContext * | tc, | |
| bool | use_naming = true | |||
| ) | [static] |
Factory method: create a CORBA server for an existing TaskContext.
Same as above, but immediately return the Corba object. Also checks if tc is ControlTaskProxy and returns the server of the proxy if so.
| tc | The TaskContext to serve. | |
| use_naming | Set to false in order not to use the Corba Naming Service. |
| 0 | if the ORB is not initialised |
Definition at line 384 of file ControlTaskServer.cpp.
References ControlTaskServer::ControlTaskServer(), TaskContext::getName(), ApplicationServer::orb, and ControlTaskServer::server().
| Corba::ControlTask_ptr server | ( | ) | const |
Get the Corba Object of this ControlTask.
This object universally identifies the remote ControlTaskServer and can be used to tell other (remote) objects where to find it.
Definition at line 406 of file ControlTaskServer.cpp.
Referenced by ControlTaskProxy::addPeer(), ControlTaskProxy::connectPeers(), ControlTaskProxy::connectPorts(), and ControlTaskServer::CreateServer().
1.5.6