Ejemplo n.º 1
0
char * RTT_corba_CConfigurationInterface_i::getPropertyType (
    const char * name)
{
    DataSourceBase::shared_ptr ds = getPropertyDataSource( name );
    if (ds)
        return CORBA::string_dup( ds->getType().c_str() );
    return CORBA::string_dup( "na" );
}
Ejemplo n.º 2
0
 corba::CMethod_ptr ExpressionServer::CreateMethod( DataSourceBase::shared_ptr expr, MethodC* orig, PortableServer::POA_ptr p ) {
     // try to retrieve:
     corba::CMethod_ptr result = MServers[ expr ];
     if ( !CORBA::is_nil(result) )
         return corba::CMethod::_duplicate(result);
     // create new:
     if ( CORBA::is_nil(p) )
         p = ApplicationServer::rootPOA.in();
     Logger::log() <<Logger::Debug<< "Created 'Any' CMethod server for type "<< expr->getType()<<Logger::endl;
     Orocos_AnyMethod_i* newexpr = new Orocos_AnyMethod_i( *orig, expr, p );
     MServers[expr] = newexpr->activate_this();
     EServants[expr] = newexpr;
     EServers[expr] = corba::CExpression::_narrow(MServers[expr]);
     return corba::CMethod::_duplicate( MServers[expr] );
 }
Ejemplo n.º 3
0
CORBA::Boolean RTT_corba_CConfigurationInterface_i::propertyFromString (
    const char* name, const char* value
  )
{
    DataSourceBase::shared_ptr ds = getPropertyDataSource( name );
    if (!ds)
        return false;
    if ( ds->getTypeInfo()->fromString( value, ds ) ) {
        RTT::log(RTT::Error) << "corba::CConfigurationInterface: Could not assign string to "<< ds->getType() <<"." <<RTT::endlog();
        return false;
    }
    return true;
}
Ejemplo n.º 4
0
 corba::CExpression_ptr ExpressionServer::CreateAssignableExpression( DataSourceBase::shared_ptr expr, PortableServer::POA_ptr p ){
     // try to retrieve:
     corba::CAssignableExpression_ptr result = AServers[ expr ];
     if ( !CORBA::is_nil(result) )
         return corba::CExpression::_duplicate(result);
     // create new:
     if ( CORBA::is_nil(p) )
         p = ApplicationServer::rootPOA.in();
     Logger::log() <<Logger::Debug<< "Created 'Any' Assignable CExpression server for type "<< expr->getType()<<Logger::endl;
     Orocos_AnyAssignableExpression_i* newexpr = new Orocos_AnyAssignableExpression_i( expr, p );
     AServers[expr] = newexpr->activate_this();
     EServants[expr] = newexpr;
     EServers[expr] = corba::CExpression::_narrow(AServers[expr]);
     corba::CExpression_var ret = corba::CExpression::_duplicate( EServers[expr] );
     return ret._retn();
 }