/* * File for setting the properties of a new TIP850DAC device to * default values. * */ #include <tango.h> using namespace Tango; main(unsigned int argc, char **argv) { // // create a connection to the new TIP850DAC DAC TANGO device // DeviceProxy *device = new DeviceProxy( "tango://has107k:10000/exp/line1/dac1"); // Write value to attributes DeviceAttribute *da_write1 = new DeviceAttribute( "VoltageMin", (float)-10.); device->write_attribute(*da_write1); DeviceAttribute *da_write2 = new DeviceAttribute( "VoltageMax", (float) 10.); device->write_attribute(*da_write2); // Write default values to properties unsigned long base = 2048; // 0x800 unsigned long channel = 0; DbDatum base_toput("Base"), channel_toput("Channel"); DbData db_data; base_toput << base; channel_toput << channel; db_data.push_back(base_toput); db_data.push_back(channel_toput); device->put_property(db_data); }