Version: 9.16.0
YACS::ENGINE::CORBANode Class Reference

Class for CORBA Service Node. More...

#include <CORBANode.hxx>

Inheritance diagram for YACS::ENGINE::CORBANode:
Collaboration diagram for YACS::ENGINE::CORBANode:

Public Member Functions

 CORBANode (const CORBANode &other, ComposedNode *father)
 
 CORBANode (const std::string &name)
 CORBANode constructor. More...
 
virtual void execute ()
 Execute the service on the component associated to the node. More...
 
virtual ServiceNodecreateNode (const std::string &name)
 Create a CORBANode with the same component object and no input or output port. More...
 
virtual std::string getKind () const
 Return the service node kind. More...
 
virtual std::string typeName ()
 
- Public Member Functions inherited from YACS::ENGINE::ServiceNode
virtual void load ()
 Load the component associated to the node. More...
 
virtual bool isDeployable () const
 By definition of ServiceNode class. More...
 
virtual void setComponent (ComponentInstance *compo)
 Associate an existing component instance to this service node AND check the consistency regarding the deployment from root node point of view. More...
 
virtual ComponentInstancegetComponent ()
 Return the associated component instance. More...
 
virtual const ComponentInstancegetComponent () const
 
virtual ContainergetContainer ()
 Return the associated container. More...
 
virtual void setRef (const std::string &ref)
 Associate a new component instance to this service node. More...
 
virtual std::string getRef ()
 
virtual void setMethod (const std::string &method)
 
virtual std::string getMethod ()
 
virtual ServiceNodecreateNode (const std::string &name)=0
 
virtual ~ServiceNode ()
 
virtual void accept (Visitor *visitor)
 
virtual std::string getKind () const
 Return the service node kind. More...
 
virtual std::string typeName ()
 
- Public Member Functions inherited from YACS::ENGINE::ElementaryNode
virtual ~ElementaryNode ()
 
void exUpdateState ()
 Update the node state. More...
 
void init (bool start=true)
 
bool isDeployable () const
 
ComponentInstancegetComponent ()
 
const ComponentInstancegetComponent () const
 
ContainergetContainer ()
 
YACS::StatesForNode getState () const
 
void getReadyTasks (std::vector< Task * > &tasks)
 
void edRemovePort (Port *port)
 
std::list< ElementaryNode * > getRecursiveConstituents () const
 
std::list< ProgressWeightgetProgressWeight () const
 Get the progress weight for all elementary nodes. More...
 
NodegetChildByName (const std::string &name) const
 
virtual void checkBasicConsistency () const
 
ComposedNodegetDynClonerIfExists (const ComposedNode *levelToStop) const
 
int getNumberOfInputPorts () const
 
int getNumberOfOutputPorts () const
 
std::string getInPortName (const InPort *) const
 
std::string getOutPortName (const OutPort *) const
 
InputPortgetInputPort (const std::string &name) const
 
OutputPortgetOutputPort (const std::string &name) const
 
std::list< InputPort * > getSetOfInputPort () const
 
std::list< OutputPort * > getSetOfOutputPort () const
 
std::list< InputPort * > getLocalInputPorts () const
 
std::list< OutputPort * > getLocalOutputPorts () const
 
std::set< OutPort * > getAllOutPortsLeavingCurrentScope () const
 
std::set< InPort * > getAllInPortsComingFromOutsideOfCurrentScope () const
 
virtual std::vector< std::pair< OutPort *, InPort * > > getSetOfLinksLeavingCurrentScope () const
 
virtual std::vector< std::pair< InPort *, OutPort * > > getSetOfLinksComingInCurrentScope () const
 
std::list< InputDataStreamPort * > getSetOfInputDataStreamPort () const
 
std::list< OutputDataStreamPort * > getSetOfOutputDataStreamPort () const
 
InputDataStreamPortgetInputDataStreamPort (const std::string &name) const
 
OutputDataStreamPortgetOutputDataStreamPort (const std::string &name) const
 
virtual InputPortcreateInputPort (const std::string &inputPortName, TypeCode *type)
 
virtual OutputPortcreateOutputPort (const std::string &outputPortName, TypeCode *type)
 
virtual InputDataStreamPortcreateInputDataStreamPort (const std::string &inputPortDSName, TypeCode *type)
 
virtual OutputDataStreamPortcreateOutputDataStreamPort (const std::string &outputPortDSName, TypeCode *type)
 
virtual InputPortedAddInputPort (const std::string &inputPortName, TypeCode *type)
 
virtual OutputPortedAddOutputPort (const std::string &outputPortName, TypeCode *type)
 
virtual InputDataStreamPortedAddInputDataStreamPort (const std::string &inputPortDSName, TypeCode *type)
 
virtual OutputDataStreamPortedAddOutputDataStreamPort (const std::string &outputPortDSName, TypeCode *type)
 
virtual void edOrderInputPorts (const std::list< InputPort * > &ports)
 
virtual void edOrderOutputPorts (const std::list< OutputPort * > &ports)
 
virtual std::string typeName ()
 
virtual void edUpdateState ()
 update the status of the node More...
 
virtual void ensureLoading ()
 Put this node into TOLOAD state when possible. More...
 
int getMaxLevelOfParallelism () const
 
ComplexWeightgetWeight ()
 
void setWeight (double elementaryWeight)
 
void getWeightRegardingDPL (ComplexWeight *weight)
 
void partitionRegardingDPL (const PartDefinition *pd, std::map< ComposedNode *, YACS::BASES::AutoRefCnt< PartDefinition > > &zeMap)
 
void begin ()
 
bool isReady ()
 
void finished ()
 
void aborted ()
 
void loaded ()
 Notify this node that it is loaded. More...
 
void connected ()
 Notify this node that it is connected. More...
 
virtual std::string getErrorDetails ()
 Give a description of error when node status is ERROR. More...
 
virtual void initService ()
 
virtual void connectService ()
 
virtual void disconnectService ()
 
virtual void load ()
 
virtual void getCoupledTasks (std::set< Task * > &coupledSet)
 Calls getCoupledNodes for Task interface. More...
 
virtual void getCoupledNodes (std::set< Task * > &coupledSet)
 Put all nodes that are coupled to this node in coupledSet. More...
 
void accept (Visitor *visitor)
 
virtual void addDatastreamPortToInitMultiService (const std::string &port_name, int number)
 
- Public Member Functions inherited from YACS::ENGINE::Node
virtual ~Node ()
 
virtual void init (bool start=true)
 
virtual void shutdown (int level)
 Stop all pending activities of the node. More...
 
virtual void resetState (int level)
 Reset the node state depending on the parameter level. More...
 
Nodeclone (ComposedNode *father, bool editionOnly=true) const
 This method MUST NEVER BE VIRTUAL More...
 
NodecloneWithoutCompAndContDeepCpy (ComposedNode *father, bool editionOnly=true) const
 This method MUST NEVER BE VIRTUAL More...
 
void setState (YACS::StatesForNode theState)
 Sets the given state for node. More...
 
virtual YACS::StatesForNode getState () const
 
virtual YACS::StatesForNode getEffectiveState () const
 Return the node state in the context of its father. More...
 
virtual YACS::StatesForNode getEffectiveState (const Node *) const
 Return the effective state of a node in the context of this one (its father) More...
 
std::string getColorState (YACS::StatesForNode state) const
 Return the color associated to a state. More...
 
InGategetInGate ()
 
OutGategetOutGate ()
 
const std::string & getName () const
 
void setName (const std::string &name)
 Change the name of the node. More...
 
ComposedNodegetFather () const
 
const std::string getId () const
 
bool exIsControlReady () const
 
std::list< Node * > getOutNodes () const
 
virtual void writeDot (std::ostream &os) const
 Dump to the input stream a dot representation of the node. More...
 
void writeDotInFile (const std::string &fileName) const
 
virtual void exUpdateState ()
 Update the node state. More...
 
virtual void exFailedState ()
 Notify this node that its execution has failed. More...
 
virtual void exDisabledState ()
 Notify this node that it has been disabled. More...
 
virtual void getReadyTasks (std::vector< Task * > &tasks)=0
 
virtual std::list< ElementaryNode * > getRecursiveConstituents () const =0
 
virtual std::list< ProgressWeightgetProgressWeight () const =0
 
virtual int getNumberOfInputPorts () const =0
 
virtual int getNumberOfOutputPorts () const =0
 
std::list< InPort * > getSetOfInPort () const
 
std::list< OutPort * > getSetOfOutPort () const
 
virtual std::list< InputPort * > getSetOfInputPort () const =0
 
virtual std::list< OutputPort * > getSetOfOutputPort () const =0
 
virtual std::list< InputPort * > getLocalInputPorts () const =0
 
virtual std::list< OutputPort * > getLocalOutputPorts () const =0
 
virtual std::set< InputPort * > edGetSetOfUnitializedInputPort () const
 Becomes deprecated soon. Replaced by ComposedNode::CheckConsistency. More...
 
virtual bool edAreAllInputPortInitialized () const
 Becomes deprecated soon. Replaced by ComposedNode::CheckConsistency. More...
 
virtual std::string getInPortName (const InPort *) const =0
 
virtual std::string getOutPortName (const OutPort *) const =0
 
virtual std::list< InputDataStreamPort * > getSetOfInputDataStreamPort () const =0
 
virtual std::list< OutputDataStreamPort * > getSetOfOutputDataStreamPort () const =0
 
InPortgetInPort (const std::string &name) const
 
InPropertyPortgetInPropertyPort () const
 
virtual OutPortgetOutPort (const std::string &name) const
 
virtual std::set< OutPort * > getAllOutPortsLeavingCurrentScope () const =0
 
virtual std::set< InPort * > getAllInPortsComingFromOutsideOfCurrentScope () const =0
 
virtual std::vector< std::pair< OutPort *, InPort * > > getSetOfLinksLeavingCurrentScope () const =0
 
virtual std::vector< std::pair< InPort *, OutPort * > > getSetOfLinksComingInCurrentScope () const =0
 
virtual InputPortgetInputPort (const std::string &name) const
 
virtual OutputPortgetOutputPort (const std::string &name) const =0
 
virtual InputDataStreamPortgetInputDataStreamPort (const std::string &name) const =0
 
virtual OutputDataStreamPortgetOutputDataStreamPort (const std::string &name) const =0
 
std::list< ComposedNode * > getAllAscendanceOf (ComposedNode *levelToStop=0) const
 
bool operator> (const Node &other) const
 
bool operator< (const Node &other) const
 
std::string getImplementation () const
 
DynParaLoopgetClosestDPLAmongAncestors () const
 
virtual ComposedNodegetRootNode () const
 
virtual void setProperty (const std::string &name, const std::string &value)
 
virtual std::string getProperty (const std::string &name)
 
std::map< std::string, std::string > getProperties ()
 
std::map< std::string, std::string > getPropertyMap ()
 
virtual void setProperties (std::map< std::string, std::string > properties)
 
virtual NodegetChildByName (const std::string &name) const =0
 
virtual ProcgetProc ()
 
virtual const ProcgetProc () const
 
virtual void accept (Visitor *visitor)=0
 
virtual int getMaxLevelOfParallelism () const =0
 
virtual void getWeightRegardingDPL (ComplexWeight *weight)=0
 
virtual void partitionRegardingDPL (const PartDefinition *pd, std::map< ComposedNode *, YACS::BASES::AutoRefCnt< PartDefinition > > &zeMap)=0
 
std::string getQualifiedName () const
 same as Node::getName() in most cases, but differs for children of switch More...
 
int getNumId ()
 return node instance identifiant, unique for each node instance More...
 
std::vector< std::pair< std::string, int > > getDPLScopeInfo (ComposedNode *gfn)
 
virtual void applyDPLScope (ComposedNode *gfn)
 
virtual void sendEvent (const std::string &event)
 emit notification to all observers registered with the dispatcher More...
 
virtual void sendEvent2 (const std::string &event, void *something)
 emit notification to all observers registered with the dispatcher More...
 
virtual std::string typeName ()
 
virtual std::string getErrorDetails () const
 
virtual void setErrorDetails (const std::string &error)
 
virtual void modified ()
 Sets Node in modified state and its father if it exists. More...
 
virtual int isModified ()
 
virtual int isValid ()
 indicates if the node is valid (returns 1) or not (returns 0) More...
 
virtual void edUpdateState ()
 update the status of the node More...
 
virtual std::string getErrorReport ()
 returns a string that contains an error report if the node is in error More...
 
virtual std::string getContainerLog ()
 returns a string that contains the name of the container log file if it exists More...
 
virtual void ensureLoading ()
 Put this node into TOLOAD state when possible. More...
 
virtual void getCoupledNodes (std::set< Task * > &coupledNodes)
 
virtual void cleanNodes ()
 Clean the node in case of not clean exit. More...
 
- Public Member Functions inherited from YACS::ENGINE::Task
virtual void begin ()=0
 
virtual bool isReady ()=0
 
virtual void execute ()=0
 
virtual void load ()=0
 
virtual void loaded ()=0
 
virtual void connected ()=0
 
virtual void initService ()=0
 
virtual void connectService ()=0
 
virtual void disconnectService ()=0
 
virtual void getCoupledTasks (std::set< Task * > &coupledSet)=0
 
virtual bool isDeployable () const =0
 
virtual ComponentInstancegetComponent ()=0
 
virtual const ComponentInstancegetComponent () const =0
 
virtual ContainergetContainer ()=0
 
virtual YACS::StatesForNode getState () const =0
 
virtual void finished ()=0
 
virtual void aborted ()=0
 
virtual void imposeResource (const std::string &resource_name, const std::string &container_name)
 
virtual bool canAcceptImposedResource ()
 
virtual bool hasImposedResource () const
 
virtual ~Task ()
 

Static Public Attributes

static const char KIND [] ="CORBA"
 
static const char IMPL_NAME [] ="CORBA"
 
- Static Public Attributes inherited from YACS::ENGINE::ServiceNode
static const char KIND [] =""
 
- Static Public Attributes inherited from YACS::ENGINE::Node
static std::map< int, Node * > idMap
 

Protected Member Functions

NodesimpleClone (ComposedNode *father, bool editionOnly) const
 Clone the node : must also clone the component instance ? More...
 
- Protected Member Functions inherited from YACS::ENGINE::ServiceNode
 ServiceNode (const std::string &name)
 
 ServiceNode (const ServiceNode &other, ComposedNode *father)
 
void performDuplicationOfPlacement (const Node &other)
 performs a duplication of placement using clone method of containers and components. clone behaviour is driven by attachOnCloning attribute. More...
 
void performShallowDuplicationOfPlacement (const Node &other)
 performs a also duplication of placement but here containers and components are not copied at all whatever the value of attachedOnCloning. More...
 
- Protected Member Functions inherited from YACS::ENGINE::ElementaryNode
 ElementaryNode (const std::string &name)
 
 ElementaryNode (const ElementaryNode &other, ComposedNode *father)
 
void performDuplicationOfPlacement (const Node &other)
 performs a duplication of placement using clone method of containers and components. clone behaviour is driven by attachOnCloning attribute. More...
 
void performShallowDuplicationOfPlacement (const Node &other)
 performs a also duplication of placement but here containers and components are not copied at all whatever the value of attachedOnCloning. More...
 
void initCommonPartWithoutStateManagement (bool start)
 
virtual void createMultiDatastreamPorts ()
 
void edDisconnectAllLinksWithMe ()
 
bool areAllInputPortsValid () const
 
template<class PORT >
PORT * getPort (const std::string &name, const std::list< PORT * > &setOfPorts) const
 
template<class PORT , class ENUMTYPE >
PORT * edAddPort (const std::string &portName, std::list< PORT * > &setOfPorts, ENUMTYPE type)
 
template<class PORT , class ENUMTYPE >
bool edCheckAddPort (const std::string &portName, std::list< PORT * > &setOfPorts, ENUMTYPE type)
 
- Protected Member Functions inherited from YACS::ENGINE::Node
 Node (const std::string &name)
 
 Node (const Node &other, ComposedNode *father)
 
virtual void performDuplicationOfPlacement (const Node &other)=0
 performs a duplication of placement using clone method of containers and components. clone behaviour is driven by attachOnCloning attribute. More...
 
virtual void performShallowDuplicationOfPlacement (const Node &other)=0
 performs a also duplication of placement but here containers and components are not copied at all whatever the value of attachedOnCloning. More...
 
virtual NodesimpleClone (ComposedNode *father, bool editionOnly=true) const =0
 
virtual void exForwardFailed ()
 
virtual void exForwardFinished ()
 
virtual void edDisconnectAllLinksWithMe ()
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::ENGINE::Node
static std::string getStateName (YACS::StatesForNode state)
 Return the name of a state. More...
 
static void checkValidityOfNodeName (const std::string &name)
 
- Public Attributes inherited from YACS::ENGINE::Node
YACS::Colour _colour
 
- Static Protected Member Functions inherited from YACS::ENGINE::ElementaryNode
template<class PORT >
static void edRemovePortTypedFromSet (PORT *port, std::list< PORT * > &setOfPorts)
 
template<class PORT >
static bool isPortNameAlreadyExist (const std::string &portName, const std::list< PORT * > &setOfPorts)
 
- Static Protected Member Functions inherited from YACS::ENGINE::Node
static void checkValidityOfPortName (const std::string &name)
 
static ComposedNodecheckHavingCommonFather (Node *node1, Node *node2)
 
- Protected Attributes inherited from YACS::ENGINE::ServiceNode
ComponentInstance_component
 
std::string _method
 
std::string _ref
 
- Protected Attributes inherited from YACS::ENGINE::ElementaryNode
std::list< InputPort * > _setOfInputPort
 
std::list< OutputPort * > _setOfOutputPort
 
std::list< InputDataStreamPort * > _setOfInputDataStreamPort
 
std::list< OutputDataStreamPort * > _setOfOutputDataStreamPort
 
ComplexWeight _weight
 
bool _createDatastreamPorts
 
bool _multi_port_node
 
- Protected Attributes inherited from YACS::ENGINE::Node
InGate _inGate
 
OutGate _outGate
 
InPropertyPort_inPropertyPort
 
std::string _name
 
ComposedNode_father
 
YACS::StatesForNode _state
 
int _modified
 
std::string _errorDetails
 
int _numId
 
std::string _implementation
 
std::map< std::string, std::string > _propertyMap
 
Node_eventReceiver =nullptr
 
- Static Protected Attributes inherited from YACS::ENGINE::Node
static const char SEP_CHAR_IN_PORT [] ="."
 
static int _total = 0
 

Detailed Description

Class for CORBA Service Node.

See also
InputCorbaPort
OutputCorbaPort

Definition at line 44 of file CORBANode.hxx.

Constructor & Destructor Documentation

◆ CORBANode() [1/2]

CORBANode::CORBANode ( const CORBANode other,
ComposedNode father 
)

Definition at line 72 of file CORBANode.cxx.

72 :ServiceNode(other,father)
73{
75}
static const char IMPL_NAME[]
Definition: CORBANode.hxx:57
std::string _implementation
Definition: Node.hxx:97
ServiceNode(const std::string &name)
Definition: ServiceNode.cxx:55

References YACS::ENGINE::Node::_implementation, and IMPL_NAME.

Referenced by createNode(), and simpleClone().

◆ CORBANode() [2/2]

CORBANode::CORBANode ( const std::string &  name)

CORBANode constructor.

Definition at line 67 of file CORBANode.cxx.

67 : ServiceNode(name)
68{
70}

References YACS::ENGINE::Node::_implementation, and IMPL_NAME.

Member Function Documentation

◆ createNode()

ServiceNode * CORBANode::createNode ( const std::string &  name)
virtual

Create a CORBANode with the same component object and no input or output port.

Parameters
name: node name
Returns
a new CORBANode node

Implements YACS::ENGINE::ServiceNode.

Definition at line 263 of file CORBANode.cxx.

264{
265
266 CORBANode* node= new CORBANode(name);
268 return node;
269}
Class for CORBA Service Node.
Definition: CORBANode.hxx:45
CORBANode(const CORBANode &other, ComposedNode *father)
Definition: CORBANode.cxx:72
ComponentInstance * _component
Definition: ServiceNode.hxx:60
virtual void setComponent(ComponentInstance *compo)
Associate an existing component instance to this service node AND check the consistency regarding the...

References YACS::ENGINE::ServiceNode::_component, CORBANode(), and YACS::ENGINE::ServiceNode::setComponent().

◆ execute()

void CORBANode::execute ( )
virtual

Execute the service on the component associated to the node.

Implements YACS::ENGINE::Task.

Definition at line 78 of file CORBANode.cxx.

79{
80 YACSTRACE(1, "+++++++++++++ CorbaNode::execute: " << getName() << " +++++++++++++++" );
81 {
82 //DII request building :
83 // a service gets all its in parameters first
84 // then all its out parameters
85 // no inout parameters
86 // the return value (if any) is the first out parameter
87 // not yet user exception (only CORBA exception)
88
89 CORBA::Object_var objComponent=((CORBAComponent*)_component)->getCompoPtr();
90 CORBA::Request_var req = objComponent->_request(_method.c_str());
91 CORBA::NVList_ptr arguments = req->arguments() ;
92
93 DEBTRACE( "+++++++++++++++++CorbaNode::inputs+++++++++++++++++" )
94 int in_param=0;
95 //in parameters
96 list<InputPort *>::iterator iter2;
97 for(iter2 = _setOfInputPort.begin(); iter2 != _setOfInputPort.end(); iter2++)
98 {
100 DEBTRACE( "port name: " << p->getName() )
101 DEBTRACE( "port kind: " << p->edGetType()->kind() )
102 CORBA::Any* ob=p->getAny();
103#ifdef _DEVDEBUG_
104 CORBA::TypeCode_var typcod= ob->type();
105 switch(p->edGetType()->kind())
106 {
107 case Double:
109 *ob >>= d;
110 DEBTRACE( d )
111 break;
112 case Int:
113 CORBA::Long l;
114 *ob >>= l;
115 DEBTRACE( l )
116 break;
117 case String:
118 const char *s;
119 *ob >>= s;
120 DEBTRACE( s )
121 break;
122 case Bool:
123 CORBA::Boolean b;
124 if(*ob >>= CORBA::Any::to_boolean(b))
125 DEBTRACE( b )
126 else
127 DEBTRACE( "not a boolean" )
128 break;
129 case Objref:
130 DEBTRACE( typcod->id() )
131 break;
132 default:
133 break;
134 }
135#endif
136 //add_value makes a copy of any (*ob). This copy will be deleted with the request
137 arguments->add_value( p->getName().c_str() , *ob , CORBA::ARG_IN ) ;
138 in_param=in_param+1;
139 }
140
141 //output parameters
142 DEBTRACE( "+++++++++++++++++CorbaNode::outputs+++++++++++++++++" )
143 list<OutputPort *>::iterator iter;
144 for(iter = _setOfOutputPort.begin(); iter != _setOfOutputPort.end(); iter++)
145 {
147 DEBTRACE( "port name: " << p->getName() )
148 DEBTRACE( "port kind: " << p->edGetType()->kind() )
149 CORBA::Any* ob=p->getAnyOut();
150#ifdef REFCNT
151 DEBTRACE("refcount CORBA : " << ((omni::TypeCode_base*)ob->pd_tc.in())->pd_ref_count);
152#endif
153 //add_value makes a copy of any. Copy will be deleted with request
154 arguments->add_value( p->getName().c_str() , *ob , CORBA::ARG_OUT );
155#ifdef REFCNT
156 DEBTRACE("refcount CORBA : " << ((omni::TypeCode_base*)ob->pd_tc.in())->pd_ref_count);
157#endif
158 delete ob;
159 }
160
161 //return value
162 req->set_return_type(CORBA::_tc_void);
163
164 DEBTRACE( "+++++++++++++++++CorbaNode::calculation+++++++++++++++++" << _method )
165 req->invoke();
166 CORBA::Exception *exc =req->env()->exception();
167 if( exc )
168 {
169 DEBTRACE( "An exception was thrown!" )
170 DEBTRACE( "The raised exception is of Type:" << exc->_name() )
171
172 std::cerr << "The raised exception is of Type:" << exc->_name() << std::endl;
173 /*
174 if(strcmp(exc->_name(),"MARSHAL") == 0)
175 {
176 const char* ms = ((CORBA::MARSHAL*)exc)->NP_minorString();
177 if (ms)
178 std::cerr << "(CORBA::MARSHAL: minor = " << ms << ")" << std::endl;
179 else
180 std::cerr << "(CORBA::MARSHAL: minor = " << ((CORBA::MARSHAL*)exc)->minor() << ")" << std::endl;
181 }
182 */
183 _errorDetails="Execution problem: the raised exception is of Type:";
184 _errorDetails += exc->_name();
185 throw Exception("Execution problem");
186 }
187
188 DEBTRACE( "++++++++++++CorbaNode::outputs++++++++++++" )
189 int out_param=in_param;
190 for(iter = _setOfOutputPort.begin(); iter != _setOfOutputPort.end(); iter++)
191 {
193 DEBTRACE( "port name: " << p->getName() )
194 DEBTRACE( "port kind: " << p->edGetType()->kind() )
195 DEBTRACE( "port number: " << out_param )
196 CORBA::Any *ob=arguments->item(out_param)->value();
197#ifdef REFCNT
198 DEBTRACE("refcount CORBA : " << ((omni::TypeCode_base*)ob->pd_tc.in())->pd_ref_count);
199#endif
200#ifdef _DEVDEBUG_
201 CORBA::TypeCode_var tc=ob->type();
202 switch(p->edGetType()->kind())
203 {
204 case Double:
206 *ob >>= d;
207 DEBTRACE( d )
208 break;
209 case Int:
210 CORBA::Long l;
211 *ob >>= l;
212 DEBTRACE( l )
213 break;
214 case String:
215 const char *s;
216 *ob >>= s;
217 DEBTRACE( s )
218 break;
219 case Objref:
220 DEBTRACE( tc->id() )
221 break;
222 default:
223 break;
224 }
225#endif
226 //OutputPort must copy the input Any(ob).
227 //This Any will be deleted with the request.
228 //Copy is made by the method put.
229 p->put(ob);
230 out_param=out_param+1;
231#ifdef REFCNT
232 DEBTRACE("refcount CORBA : " << ((omni::TypeCode_base*)ob->pd_tc.in())->pd_ref_count);
233#endif
234 }
235 DEBTRACE( "++++++++++++++++++++++++++++++++++++++++++" )
236 }
237 //Request has been deleted (_var )
238 //All anys given to the request are deleted : don't forget to copy them
239 //if you want to keep them
240#ifdef REFCNT
241 list<OutputPort *>::const_iterator iter;
242 for(iter = _setOfOutputPort.begin(); iter != _setOfOutputPort.end(); iter++)
243 {
245 CORBA::Any *ob=p->getAny();
246 DEBTRACE("refcount CORBA : " << ((omni::TypeCode_base*)ob->pd_tc.in())->pd_ref_count);
247 }
248#endif
249 DEBTRACE( "+++++++++++++++++ End CorbaNode::execute: " << getName() << " +++++++++++++++++" )
250}
#define DEBTRACE(msg)
Definition: YacsTrace.hxx:31
#define YACSTRACE(level, msg)
YACSTRACE macro for dynamic trace: print only if YACS_TRACELEVEL environment variable is set and leve...
Definition: YacsTrace.hxx:41
: Interface for management of storage of data formated dynamically in its TypeCode....
Definition: Any.hxx:79
Class for CORBA component instance.
std::string getName() const
std::list< InputPort * > _setOfInputPort
std::list< OutputPort * > _setOfOutputPort
Class for CORBA Input Ports.
Definition: CORBAPorts.hxx:45
Base class for Input Ports.
Definition: InputPort.hxx:44
std::string _name
Definition: Node.hxx:89
const std::string & getName() const
Definition: Node.hxx:125
std::string _errorDetails
Definition: Node.hxx:93
Proc * p
Definition: driver.cxx:216

References YACS::ENGINE::ServiceNode::_component, YACS::ENGINE::Node::_errorDetails, YACS::ENGINE::ServiceNode::_method, YACS::ENGINE::ElementaryNode::_setOfInputPort, YACS::ENGINE::ElementaryNode::_setOfOutputPort, gui.CONNECTOR::b, YACS::ENGINE::Bool, DEBTRACE, YACS::ENGINE::Double, YACS::ENGINE::ComposedNode::getName(), YACS::ENGINE::Node::getName(), YACS::ENGINE::Int, testCppPluginInvokation::l, YACS::ENGINE::Objref, p, YACS::ENGINE::String, and YACSTRACE.

◆ getKind()

std::string CORBANode::getKind ( ) const
virtual

Return the service node kind.

A runtime can provide several implementations of a service node. Each implementation has a different kind. A ComponentInstance can be associated to a ServiceNode with the same kind.

Reimplemented from YACS::ENGINE::ServiceNode.

Definition at line 61 of file CORBANode.cxx.

62{
63 return KIND;
64}
static const char KIND[]
Definition: CORBANode.hxx:54

References KIND.

◆ simpleClone()

Node * CORBANode::simpleClone ( ComposedNode father,
bool  editionOnly 
) const
protectedvirtual

Clone the node : must also clone the component instance ?

Implements YACS::ENGINE::Node.

Definition at line 253 of file CORBANode.cxx.

254{
255 return new CORBANode(*this,father);
256}

References CORBANode().

◆ typeName()

virtual std::string YACS::ENGINE::CORBANode::typeName ( )
inlinevirtual

Reimplemented from YACS::ENGINE::ServiceNode.

Definition at line 55 of file CORBANode.hxx.

55{return "YACS__ENGINE__CORBANode";}

Member Data Documentation

◆ IMPL_NAME

◆ KIND

const char CORBANode::KIND ="CORBA"
static

Definition at line 54 of file CORBANode.hxx.

Referenced by YACS::ENGINE::RuntimeSALOME::createRefNode(), and getKind().


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