DeviceName InstrumentComponent::remoteName() const { // find out whether the name is local or uses the nice module bool useNice = true; // if this is already a local name, used unchanged if (!useNice) { debug(LOG_DEBUG, DEBUG_LOG, 0, "using localized name %s", _deviceurl.c_str()); return DeviceName(_deviceurl); } // this is a remote name, so construct a remote name device::nice::DeviceNicer nicer(_servicename); DeviceName result = nicer(_deviceurl); debug(LOG_DEBUG, DEBUG_LOG, 0, "localized name: %s", result.toString().c_str()); return result; }
CcdPtr NiceCamera::getCcd0(size_t id) { snowstar::CcdPrx ccd = _camera->getCcd(id); std::string servicename = name()[1]; astro::device::nice::DeviceNicer nicer(servicename); return CcdPtr(new NiceCcd(ccd, nicer(ccd->getName()))); }