75 #include "../../OperationCaller.hpp" 76 #include "../../rtt-detail-fwd.hpp" 85 : mpoa( PortableServer::POA::_duplicate(the_poa) )
86 , mtask( orig ), mRequest_i(0), mService_i(0)
99 TaskContextServer::ShutdownOrb(
false);
111 return CORBA::string_dup(
mtask->
provides()->doc().c_str() );
207 const char * service_name)
210 return CService::_nil();
217 CDataFlowInterface_i::registerServant(CDataFlowInterface::_narrow(mService), mserv);
220 std::string svc(service_name);
222 return ::RTT::corba::CService::_duplicate(
mService.in() );
223 return mService->getService( service_name );
227 const char * service_name)
229 std::string svc(service_name);
230 if (
mtask->
requires()->requiresService(service_name) ==
false && svc !=
"this")
231 return CServiceRequester::_nil();
242 return ::RTT::corba::CServiceRequester::_duplicate(
mRequest.in() );
243 return mRequest->getRequest( service_name );
250 ::RTT::corba::CTaskContext::CPeerNames_var result = new ::RTT::corba::CTaskContext::CPeerNames();
251 result->length( peers.size() );
252 for (
unsigned int i=0; i != peers.size(); ++i )
253 result[i] = CORBA::string_dup( peers[i].c_str() );
255 return result._retn();
261 std::string pname(name);
266 return TaskContextServer::CreateServer( task,
false );
268 return RTT::corba::CTaskContext::_nil();
274 std::string mname(name);
279 ::RTT::corba::CTaskContext_ptr p,
282 std::string malias(alias);
284 return mtask->
addPeer( TaskContextProxy::Create(p), alias );
291 std::string mname(name);
297 ::RTT::corba::CTaskContext_ptr p)
306 std::string pname(name);
312 ::RTT::corba::CTaskContext_ptr p)
319 ::RTT::corba::CTaskContext_ptr p)
virtual ::CORBA::Boolean cleanup(void)
virtual ::CORBA::Boolean removePeer(const char *name)
The state indicating the component encountered a C++ exception.
virtual ::CORBA::Boolean start(void)
Service::shared_ptr provides()
Returns this Service.
virtual ~RTT_corba_CTaskContext_i(void)
virtual ::CORBA::Boolean inFatalError(void)
virtual ::CORBA::Boolean inRunTimeError(void)
virtual bool stop()
This method stops the execution of updateHook() of this component.
PortableServer::ServantBase_var mRequest_i
virtual bool recover()
Call this method in a RunTimeError or Exception state to indicate that the run-time error conditions ...
virtual char * getDescription(void)
virtual ::RTT::corba::CServiceRequester_ptr getRequester(const char *service_name)
virtual ::CORBA::Boolean isConfigured(void)
virtual bool connectPeers(TaskContext *peer)
Add a two-way connection from this task to a peer task.
virtual char * getName(void)
virtual void removePeer(const std::string &name)
Remove a one-way connection from this task to a peer task.
virtual ::CORBA::Boolean inException(void)
PortableServer::POA_var mpoa
RTT::corba::CServiceRequester_var mRequest
virtual bool isConfigured() const
Inspect if the component is configured, i.e.
virtual bool activate()
This method starts the ExecutionEngine of this component in case it was not running.
virtual ::CORBA::Boolean stop(void)
virtual bool isRunning() const
Inspect if the component is in the Running or RunTimeError state.
virtual bool configure()
This method instructs the component to (re-)read configuration data and try to enter the Stopped stat...
virtual TaskContext * getPeer(const std::string &peer_name) const
Get a pointer to a peer of this task.
virtual ::CORBA::Boolean recover(void)
virtual bool inException() const
Inspect if the component is in the Exception state.
virtual bool hasPeer(const std::string &peer_name) const
Return true if it knows a peer by that name.
sequence< string > CPeerNames
virtual ::RTT::corba::CTaskState getTaskState(void)
ServiceRequester::shared_ptr requires()
Returns the object that manages which methods this Task requires to be implemented by another task...
virtual ::CORBA::Boolean disconnectPeers(const char *name)
virtual ::CORBA::Boolean addPeer(::RTT::corba::CTaskContext_ptr p, const char *alias)
Convenient short notation for every sub-namespace of RTT.
PortableServer::ServantBase_var mService_i
virtual ::CORBA::Boolean connectServices(::RTT::corba::CTaskContext_ptr p)
virtual bool inFatalError() const
Inspect if the component is in the FatalError state.
virtual ::RTT::corba::CDataFlowInterface_ptr ports(void)
virtual PeerList getPeerList() const
Return a standard container which contains all the Peer names of this TaskContext.
std::vector< std::string > PeerList
A list of Peer TaskContext names.
virtual ::CORBA::Boolean activate(void)
virtual void disconnectPeers(const std::string &name)
Remove a two-way connection from this task to a peer task.
RTT_corba_CTaskContext_i(RTT::TaskContext *orig, PortableServer::POA_ptr the_poa)
virtual TaskState getTaskState() const
Returns the current state of the TaskCore.
virtual bool isActive() const
Inspect if the component's ExecutionEngine is processing requests.
virtual bool inRunTimeError() const
Inspect if the component is in the RunTimeError state.
virtual RTT::corba::CServiceRequester_ptr activate_this()
virtual ::RTT::corba::CTaskContext::CPeerNames * getPeerList(void)
CORBA (OmniORB/TAO) code for network data transport.
virtual ::RTT::corba::CTaskContext_ptr getPeer(const char *name)
virtual RTT::corba::CService_ptr activate_this()
virtual ::CORBA::Boolean connectPeers(::RTT::corba::CTaskContext_ptr p)
The TaskContext is the C++ representation of an Orocos component.
virtual ::CORBA::Boolean connectPorts(::RTT::corba::CTaskContext_ptr p)
virtual bool connectPorts(TaskContext *peer)
Add a data flow connection from this task's ports to a peer's ports.
virtual bool connectServices(TaskContext *peer)
Connects all requires/provides services of this component to these of a peer.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
virtual ::RTT::corba::CService_ptr getProvider(const char *service_name)
virtual ::CORBA::Boolean resetException(void)
virtual ::CORBA::Boolean isRunning(void)
Operation< Signature > & addOperation(Operation< Signature > &op)
Add an operation object to the interface.
virtual ::CORBA::Boolean configure(void)
CTaskState
Maps 1-to-1 to RTT::base::TaskCore::TaskState.
virtual ::CORBA::Boolean isActive(void)
RTT::corba::CService_var mService
virtual bool start()
This method starts the execution of the updateHook() with each trigger or period. ...
virtual bool addPeer(TaskContext *peer, std::string alias="")
Add a one-way connection from this task to a peer task.
virtual ::CORBA::Boolean hasPeer(const char *name)
virtual bool cleanup()
This method instructs a stopped component to enter the pre-operational state again.
virtual const std::string & getName() const
Returns the name of this TaskContext.