Menu

#192 DevProxy different DB:Methods that use adm_device don't work

closed
5
2009-04-21
2008-10-07
No

Hello all,

It seems that in C++, the adm_name in the DeviceProxy object is not correct in the case the DeviceProxy refers to a device that is not on the current database (defined by the TANGO_HOST env variable).

Example:
I have my TANGO_HOST=BL01:10000
I want to access a device that is managed by a database in another machine: MACHINE:10000

executing the following code:

DeviceProxy d("tango://MACHINE:10000/my/own/device");
try
{
// polling_status needs to access the adm_device
cout << d.polling_status() << endl;
}
catch(DevFailed &e)
{
Except::print_exception(e);
}

will throw the exception:
--------------------------------------------------
The device proxy methods that access the database
Tango exception
Severity = ERROR
Error reason = DB_DeviceNotDefined
Desc : device my/own/device not defined in the database !
Origin : DataBase::ImportDevice()

Tango exception
Severity = ERROR
Error reason = API_CommandFailed
Desc : Failed to execute command_inout on device Db device, command DbImportDevice
Origin : Connection::command_inout()

Tango exception
Severity = ERROR
Error reason = API_DeviceNotDefined
Desc : Can't connect to device dserver/Test/t01
Origin : DeviceProxy::DeviceProxy
--------------------------------------------------

because it looks for the adm_device in BL01 instead of MACHINE.

I propose that in devapi_base.cpp, the DeviceProxy::adm_name() method takes into account the host:port of the device name.

Cheers
Tiago

Discussion

  • Emmanuel Taurel

    Emmanuel Taurel - 2008-10-20

    Hola a todos,

    Bug fixed in devapi_base.cpp file release 3.32.2.2 available in the Release_6_1_1-bugfixes branch
    Bug fix will obviously also be included in future Tango 7

    Regards

    Emmanuel Taurel

     
  • Emmanuel Taurel

    Emmanuel Taurel - 2009-04-21
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB