25#define GROUP_PREFIX "GROUP_"
26#define GROUP_PREFIX_LEN 6
31#define CCD_EXPOSURE_VALUE 3
36 std::stringstream groupNameStream;
37 groupNameStream <<
"Image group " << id;
38 groupName = groupNameStream.str();
40 std::stringstream groupSettingsNameStream;
41 groupSettingsNameStream <<
GROUP_PREFIX << std::setw(2) << std::setfill(
'0') << id;
42 groupSettingsName = groupSettingsNameStream.str();
46 GroupSettingsNP[IMAGE_COUNT].
fill(
"IMAGE_COUNT",
"Image count",
"%3.0f", 1, 100, 1, 1);
47 GroupSettingsNP[CCD_BINNING].
fill(
"CCD_BINNING",
"Binning",
"%1.0f", 1, 4, 1, 1);
48 GroupSettingsNP[FILTER_SLOT].
fill(
"FILTER_SLOT",
"Filter",
"%2.f", 0, 12, 1, 0);
49 GroupSettingsNP[CCD_EXPOSURE_VALUE].
fill(
"CCD_EXPOSURE_VALUE",
"Duration (s)",
"%5.2f", 0, 36000, 0, 1.0);
51 groupSettingsName.c_str(),
"Image group settings",
57 return GroupSettingsNP[CCD_BINNING].getValue();
62 return GroupSettingsNP[FILTER_SLOT].getValue();
67 return GroupSettingsNP[CCD_EXPOSURE_VALUE].getValue();
72 return GroupSettingsNP[IMAGE_COUNT].getValue();
79 if (groupSettingsName == name)
81 GroupSettingsNP.
update(values, names, n);
83 GroupSettingsNP.
apply();
std::shared_ptr< Imager > imager(new Imager())
Group(int id, Imager *imager)
bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n)
virtual bool deleteProperty(const char *propertyName)
Delete a property and unregister it. It will also be deleted from all clients.
void defineProperty(INumberVectorProperty *property)
void setState(IPState state)
void apply(const char *format,...) const ATTRIBUTE_FORMAT_PRINTF(2
bool update(const double values[], const char *const names[], int n)
void fill(const char *device, const char *name, const char *label, const char *group, IPerm permission, double timeout, IPState state)
static const std::string DEVICE_NAME