}
else if ( !strcmp( Type , "string" ) ) {
cdebug << "string" << endl ;
- InitialValue <<= (char *) "";
+// InitialValue <<= (char *) NULL ;
+ InitialValue <<= "" ;
}
else if ( !strcmp( Type , "boolean" ) ) {
cdebug << "boolean" << endl ;
_Value = &_InitialValue ;
}
-void GraphBase::DataPort::Value( const CORBA::Any & aDataValue ) {
+void GraphBase::DataPort::SetValue( const CORBA::Any & aDataValue ) {
CORBA::Any * aValue = new CORBA::Any( aDataValue ) ;
- Value( aValue ) ;
+ SetValue( aValue ) ;
}
#define ValueTrace 0
-void GraphBase::DataPort::Value( const CORBA::Any * aDataValue ) {
-// cdebug << pthread_self() << " Value(aDataValue) --> pthread_mutex_lock " << &_MutexWait
+void GraphBase::DataPort::SetValue( const CORBA::Any * aDataValue ) {
+// cdebug << pthread_self() << " SetValue(aDataValue) --> pthread_mutex_lock " << &_MutexWait
// << endl ;
if ( pthread_mutex_lock( &_MutexWait ) ) {
perror( "lock DataValue" ) ;
exit( 0 ) ;
}
-// cdebug << pthread_self() << " Value(aDataValue) pthread_mutex_locked " << &_MutexWait
+// cdebug << pthread_self() << " SetValue(aDataValue) pthread_mutex_locked " << &_MutexWait
// << endl ;
delete _theValue ;
perror( "unlock DataValue" ) ;
exit( 0 ) ;
}
-// cdebug << pthread_self() << " Value(aDataValue) --> pthread_mutex_unlocked " << &_MutexWait
+// cdebug << pthread_self() << " SetValue(aDataValue) --> pthread_mutex_unlocked " << &_MutexWait
// << endl ;
}
bool _Done ;
pthread_mutex_t _MutexWait ;
- void Value( const CORBA::Any * aValue ) ;
+ void SetValue( const CORBA::Any * aValue ) ;
public :
virtual ~DataPort() ;
void InitialValues(CORBA::Any aValue ) ;
- void Value (const CORBA::Any & aValue ) ;
-// void Value( const CORBA::Any * aValue ) ;
-// void Value( const CORBA::Any ** aValue ) ;
-// CORBA::Any const * Value() const ;
+//SetValue is under the control of _MutexWait because of concurrent access with Value()
+ void SetValue (const CORBA::Any & aValue ) ;
const CORBA::Any Value() const ;
bool BoolValue() const ;
-// const CORBA::Any ** ValuePtr() const ;
+//PortState is NOT under the control of _MutexWait because there is no problem of concurrent access
void PortState( SUPERV::GraphState aPortState ) {
_PortState = aPortState ; } ;
SUPERV::GraphState PortState() { return _PortState ; } ;
+//PortDone is NOT under the control of _MutexWait because there is no problem of concurrent access
void PortDone( bool aDone ) {
// cdebug << "ChgDone(.) " << NodeName() << " " << PortName() << " "
// << _Done << " -> " << aDone << endl ;