Instrument Neutral Distributed Interface INDI  2.0.2
test_property_class.cpp
Go to the documentation of this file.
1 /*******************************************************************************
2  Copyright(c) 2020 Eric Dejouhanet. All rights reserved.
3  This library is free software; you can redistribute it and/or
4  modify it under the terms of the GNU Library General Public
5  License version 2 as published by the Free Software Foundation.
6  .
7  This library is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10  Library General Public License for more details.
11  .
12  You should have received a copy of the GNU Library General Public License
13  along with this library; see the file COPYING.LIB. If not, write to
14  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
15  Boston, MA 02110-1301, USA.
16 *******************************************************************************/
17 
18 #include <gtest/gtest.h>
19 
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23 
24 #include <cstdlib>
25 #include <cstring>
26 
27 #include "basedevice.h"
28 
29 #include "indiproperty.h"
30 #include "indipropertynumber.h"
31 #include "indipropertytext.h"
32 #include "indipropertyswitch.h"
33 #include "indipropertylight.h"
34 #include "indipropertyblob.h"
35 
36 #include <indipropertyview.h>
37 
38 TEST(CORE_PROPERTY_CLASS, Test_EmptyProperty)
39 {
41 
42  ASSERT_EQ(p.getProperty(), nullptr);
43  ASSERT_EQ(p.getBaseDevice(), nullptr);
44  ASSERT_EQ(p.getType(), INDI_UNKNOWN);
45  ASSERT_EQ(p.getRegistered(), false);
46  ASSERT_EQ(p.isDynamic(), false);
47 
48  ASSERT_EQ(p.getName(), nullptr);
49  ASSERT_EQ(p.getLabel(), nullptr);
50  ASSERT_EQ(p.getGroupName(), nullptr);
51  ASSERT_EQ(p.getDeviceName(), nullptr);
52  ASSERT_EQ(p.getTimestamp(), nullptr);
53 
54  ASSERT_EQ(p.getState(), IPS_ALERT);
55  ASSERT_EQ(p.getPermission(), IP_RO);
56 
57  ASSERT_EQ(p.getNumber(), nullptr);
58  ASSERT_EQ(p.getText(), nullptr);
59  ASSERT_EQ(p.getSwitch(), nullptr);
60  ASSERT_EQ(p.getLight(), nullptr);
61  ASSERT_EQ(p.getBLOB(), nullptr);
62 }
63 
64 TEST(CORE_PROPERTY_CLASS, Test_PropertySetters)
65 {
67 
69  nvp.setDeviceName("device field");
70  nvp.setName("name field");
71  nvp.setLabel("label field");
72  nvp.setGroupName("group field");
73  nvp.setPermission(IP_RW);
74  nvp.setState(IPS_BUSY);
75  nvp.setTimestamp("timestamp field");
76  nvp.setAux(nullptr);
77  nvp.setWidgets(nullptr, 0);
78  nvp.setTimeout(42);
79 
80 
81  // Setting a property makes it registered but NOT meaningful
82  p.setProperty(&nvp);
83  ASSERT_EQ(p.getProperty(), &nvp);
84  ASSERT_EQ(p.getType(), INDI_UNKNOWN);
85  ASSERT_EQ(p.getNumber(), nullptr);
86 
87  // Property fields remain unpropagated
88  ASSERT_EQ(p.getName(), nullptr);
89  ASSERT_EQ(p.getLabel(), nullptr);
90  ASSERT_EQ(p.getGroupName(), nullptr);
91  ASSERT_EQ(p.getDeviceName(), nullptr);
92  ASSERT_EQ(p.getTimestamp(), nullptr);
93 
94  // Other fields remain unchanged
95  ASSERT_EQ(p.getRegistered(), true);
96  ASSERT_EQ(p.isDynamic(), false);
97  ASSERT_EQ(p.getBaseDevice(), nullptr);
98  ASSERT_EQ(p.getState(), IPS_ALERT);
99  ASSERT_EQ(p.getPermission(), IP_RO);
100 
101  // Other specific conversions return nothing
102  ASSERT_EQ(p.getText(), nullptr);
103  ASSERT_EQ(p.getSwitch(), nullptr);
104  ASSERT_EQ(p.getLight(), nullptr);
105  ASSERT_EQ(p.getBLOB(), nullptr);
106 
107  // Setting a property type gives a meaning to the property
108  // Note the possible desync between property value and type
109  p.setType(INDI_NUMBER);
110  ASSERT_EQ(p.getProperty(), &nvp);
111  ASSERT_EQ(p.getNumber(), &nvp);
112  ASSERT_EQ(p.getType(), INDI_NUMBER);
113 
114  // Property fields are propagated
115  ASSERT_STREQ(p.getName(), "name field");
116  ASSERT_STREQ(p.getLabel(), "label field");
117  ASSERT_STREQ(p.getGroupName(), "group field");
118  ASSERT_STREQ(p.getDeviceName(), "device field");
119  ASSERT_STREQ(p.getTimestamp(), "timestamp field");
120 
121  // And previously set fields remain unchanged
122  ASSERT_EQ(p.getRegistered(), true);
123  ASSERT_EQ(p.isDynamic(), false);
124  ASSERT_EQ(p.getBaseDevice(), nullptr);
125 
126  // Other specific conversions still return nothing
127  ASSERT_EQ(p.getText(), nullptr);
128  ASSERT_EQ(p.getSwitch(), nullptr);
129  ASSERT_EQ(p.getLight(), nullptr);
130  ASSERT_EQ(p.getBLOB(), nullptr);
131 
132  // Clearing a property brings it back to the unregistered state
133  p.setProperty(nullptr);
134  ASSERT_EQ(p.getProperty(), nullptr);
135  ASSERT_EQ(p.getType(), INDI_UNKNOWN);
136  ASSERT_EQ(p.getRegistered(), false);
137 
138  // Property fields are not propagated anymore
139  ASSERT_EQ(p.getName(), nullptr);
140  ASSERT_EQ(p.getLabel(), nullptr);
141  ASSERT_EQ(p.getGroupName(), nullptr);
142  ASSERT_EQ(p.getDeviceName(), nullptr);
143  ASSERT_EQ(p.getTimestamp(), nullptr);
144 
145  // And other fields are reset
146  ASSERT_EQ(p.isDynamic(), false);
147  ASSERT_EQ(p.getBaseDevice(), nullptr);
148  ASSERT_EQ(p.getState(), IPS_ALERT);
149  ASSERT_EQ(p.getPermission(), IP_RO);
150 
151  // Again, conversions return nothing
152  ASSERT_EQ(p.getNumber(), nullptr);
153  ASSERT_EQ(p.getText(), nullptr);
154  ASSERT_EQ(p.getSwitch(), nullptr);
155  ASSERT_EQ(p.getLight(), nullptr);
156  ASSERT_EQ(p.getBLOB(), nullptr);
157 }
158 
159 TEST(CORE_PROPERTY_CLASS, DISABLED_Test_Integrity)
160 {
161  INDI::Property p;
162 
163  INumberVectorProperty * corrupted_property = (INumberVectorProperty*) (void*) 0x12345678;
164  //INDI::BaseDevice * corrupted_device = (INDI::BaseDevice*) (void*) 0x87654321;
165  INDI::BaseDevice corrupted_device;
166 
167  p.setProperty(corrupted_property);
168 
169  // A magic header should protect the property from returning garbage
170  EXPECT_EQ(p.getProperty(), nullptr);
171  EXPECT_EQ(p.getRegistered(), false);
172 
173  // A verification mechanism should protect the property from getting an incorrect type
174  EXPECT_EQ(p.getType(), INDI_UNKNOWN);
175  p.setType(INDI_NUMBER);
176  EXPECT_EQ(p.getType(), INDI_UNKNOWN);
177  p.setType(INDI_TEXT);
178  EXPECT_EQ(p.getType(), INDI_UNKNOWN);
179  p.setType(INDI_SWITCH);
180  EXPECT_EQ(p.getType(), INDI_UNKNOWN);
181  p.setType(INDI_LIGHT);
182  EXPECT_EQ(p.getType(), INDI_UNKNOWN);
183  p.setType(INDI_BLOB);
184  EXPECT_EQ(p.getType(), INDI_UNKNOWN);
185 
186  // A verification mechanism should protect the property from being converted to an incorrect type
187  EXPECT_EQ(p.getNumber(), nullptr);
188  EXPECT_EQ(p.getText(), nullptr);
189  EXPECT_EQ(p.getSwitch(), nullptr);
190  EXPECT_EQ(p.getLight(), nullptr);
191  EXPECT_EQ(p.getBLOB(), nullptr);
192 
193  // A verification mechanism should protect the property from being associated to an invalid device
194  p.setBaseDevice(corrupted_device);
195  EXPECT_EQ(p.getBaseDevice(), nullptr);
196 }
197 
198 
199 TEST(CORE_PROPERTY_CLASS, Test_PropertyNumber)
200 {
202 
203  p[0].setName("widget name");
204  p[0].setLabel("widget label");
205  p[0].setValue(4);
206  p[0].setMinMax(-10, 10);
207 
208  p.setDeviceName("property device");
209  p.setName("property name");
210  p.setLabel("property label");
211  p.setGroupName("property group");
212  p.setPermission(IP_RW);
213  p.setTimeout(1000);
214  p.setState(IPS_OK);
215 
216  ASSERT_STREQ(p[0].getName(), "widget name");
217  ASSERT_STREQ(p[0].getLabel(), "widget label");
218  ASSERT_EQ(p[0].getValue(), 4);
219  ASSERT_EQ(p[0].getMin(), -10);
220  ASSERT_EQ(p[0].getMax(), 10);
221 
222  ASSERT_STREQ(p.getDeviceName(), "property device");
223  ASSERT_STREQ(p.getName(), "property name");
224  ASSERT_STREQ(p.getLabel(), "property label");
225  ASSERT_STREQ(p.getGroupName(), "property group");
226  ASSERT_EQ(p.getPermission(), IP_RW);
227  ASSERT_EQ(p.getTimeout(), 1000);
228  ASSERT_EQ(p.getState(), IPS_OK);
229 
230  // change values and test
231  p[0].setName("widget other name");
232  p[0].setLabel("widget other label");
233  p[0].setValue(40);
234  p[0].setMinMax(-100, 100);
235 
236  p.setDeviceName("property other device");
237  p.setName("property other name");
238  p.setLabel("property other label");
239  p.setGroupName("property other group");
240  p.setPermission(IP_RO);
241  p.setTimeout(500);
242  p.setState(IPS_ALERT);
243 
244  ASSERT_STREQ(p[0].getName(), "widget other name");
245  ASSERT_STREQ(p[0].getLabel(), "widget other label");
246  ASSERT_EQ(p[0].getValue(), 40);
247  ASSERT_EQ(p[0].getMin(), -100);
248  ASSERT_EQ(p[0].getMax(), 100);
249 
250  ASSERT_STREQ(p.getDeviceName(), "property other device");
251  ASSERT_STREQ(p.getName(), "property other name");
252  ASSERT_STREQ(p.getLabel(), "property other label");
253  ASSERT_STREQ(p.getGroupName(), "property other group");
254  ASSERT_EQ(p.getPermission(), IP_RO);
255  ASSERT_EQ(p.getTimeout(), 500);
256  ASSERT_EQ(p.getState(), IPS_ALERT);
257 
258  ASSERT_EQ(INDI::PropertyNumber(INDI::Property(p)).isValid(), true);
259  ASSERT_EQ(INDI::PropertySwitch(INDI::Property(p)).isValid(), false);
260  ASSERT_EQ(INDI::PropertyText(INDI::Property(p)).isValid(), false);
261  ASSERT_EQ(INDI::PropertyLight(INDI::Property(p)).isValid(), false);
262  ASSERT_EQ(INDI::PropertyBlob(INDI::Property(p)).isValid(), false);
263 }
264 
265 TEST(CORE_PROPERTY_CLASS, Test_PropertySwitch)
266 {
268 
269  p[0].setName("widget name");
270  p[0].setLabel("widget label");
271  p[0].setState(ISS_ON);
272 
273  p.setDeviceName("property device");
274  p.setName("property name");
275  p.setLabel("property label");
276  p.setGroupName("property group");
277  p.setPermission(IP_RW);
278  p.setTimeout(1000);
279  p.setState(IPS_OK);
280 
281  ASSERT_STREQ(p[0].getName(), "widget name");
282  ASSERT_STREQ(p[0].getLabel(), "widget label");
283  ASSERT_EQ(p[0].getState(), IPS_OK);
284 
285  ASSERT_STREQ(p.getDeviceName(), "property device");
286  ASSERT_STREQ(p.getName(), "property name");
287  ASSERT_STREQ(p.getLabel(), "property label");
288  ASSERT_STREQ(p.getGroupName(), "property group");
289  ASSERT_EQ(p.getPermission(), IP_RW);
290  ASSERT_EQ(p.getTimeout(), 1000);
291  ASSERT_EQ(p.getState(), IPS_OK);
292 
293  // change values and test
294  p[0].setName("widget other name");
295  p[0].setLabel("widget other label");
296  p[0].setState(ISS_OFF);
297 
298  p.setDeviceName("property other device");
299  p.setName("property other name");
300  p.setLabel("property other label");
301  p.setGroupName("property other group");
302  p.setPermission(IP_RO);
303  p.setTimeout(500);
304  p.setState(IPS_ALERT);
305 
306  ASSERT_STREQ(p[0].getName(), "widget other name");
307  ASSERT_STREQ(p[0].getLabel(), "widget other label");
308  ASSERT_EQ(p[0].getState(), ISS_OFF);
309 
310  ASSERT_STREQ(p.getDeviceName(), "property other device");
311  ASSERT_STREQ(p.getName(), "property other name");
312  ASSERT_STREQ(p.getLabel(), "property other label");
313  ASSERT_STREQ(p.getGroupName(), "property other group");
314  ASSERT_EQ(p.getPermission(), IP_RO);
315  ASSERT_EQ(p.getTimeout(), 500);
316  ASSERT_EQ(p.getState(), IPS_ALERT);
317 
318  ASSERT_EQ(INDI::PropertyNumber(INDI::Property(p)).isValid(), false);
319  ASSERT_EQ(INDI::PropertySwitch(INDI::Property(p)).isValid(), true);
320  ASSERT_EQ(INDI::PropertyText(INDI::Property(p)).isValid(), false);
321  ASSERT_EQ(INDI::PropertyLight(INDI::Property(p)).isValid(), false);
322  ASSERT_EQ(INDI::PropertyBlob(INDI::Property(p)).isValid(), false);
323 }
324 
325 TEST(CORE_PROPERTY_CLASS, Test_PropertyText)
326 {
327  INDI::PropertyText p{1};
328 
329  p[0].setName("widget name");
330  p[0].setLabel("widget label");
331  p[0].setText("widget text");
332 
333  p.setDeviceName("property device");
334  p.setName("property name");
335  p.setLabel("property label");
336  p.setGroupName("property group");
337  p.setPermission(IP_RW);
338  p.setTimeout(1000);
339  p.setState(IPS_OK);
340 
341  ASSERT_STREQ(p[0].getName(), "widget name");
342  ASSERT_STREQ(p[0].getLabel(), "widget label");
343  ASSERT_STREQ(p[0].getText(), "widget text");
344 
345  ASSERT_STREQ(p.getDeviceName(), "property device");
346  ASSERT_STREQ(p.getName(), "property name");
347  ASSERT_STREQ(p.getLabel(), "property label");
348  ASSERT_STREQ(p.getGroupName(), "property group");
349  ASSERT_EQ(p.getPermission(), IP_RW);
350  ASSERT_EQ(p.getTimeout(), 1000);
351  ASSERT_EQ(p.getState(), IPS_OK);
352 
353  // change values and test
354  p[0].setName("widget other name");
355  p[0].setLabel("widget other label");
356  p[0].setText("widget other text");
357 
358  p.setDeviceName("property other device");
359  p.setName("property other name");
360  p.setLabel("property other label");
361  p.setGroupName("property other group");
362  p.setPermission(IP_RO);
363  p.setTimeout(500);
364  p.setState(IPS_ALERT);
365 
366  ASSERT_STREQ(p[0].getName(), "widget other name");
367  ASSERT_STREQ(p[0].getLabel(), "widget other label");
368  ASSERT_STREQ(p[0].getText(), "widget other text");
369 
370  ASSERT_STREQ(p.getDeviceName(), "property other device");
371  ASSERT_STREQ(p.getName(), "property other name");
372  ASSERT_STREQ(p.getLabel(), "property other label");
373  ASSERT_STREQ(p.getGroupName(), "property other group");
374  ASSERT_EQ(p.getPermission(), IP_RO);
375  ASSERT_EQ(p.getTimeout(), 500);
376  ASSERT_EQ(p.getState(), IPS_ALERT);
377 
378  ASSERT_EQ(INDI::PropertyNumber(INDI::Property(p)).isValid(), false);
379  ASSERT_EQ(INDI::PropertySwitch(INDI::Property(p)).isValid(), false);
380  ASSERT_EQ(INDI::PropertyText(INDI::Property(p)).isValid(), true);
381  ASSERT_EQ(INDI::PropertyLight(INDI::Property(p)).isValid(), false);
382  ASSERT_EQ(INDI::PropertyBlob(INDI::Property(p)).isValid(), false);
383 }
384 
385 TEST(CORE_PROPERTY_CLASS, Test_PropertyLight)
386 {
387  INDI::PropertyLight p{1};
388 
389  p[0].setName("widget name");
390  p[0].setLabel("widget label");
391  p[0].setState(IPS_OK);
392 
393  p.setDeviceName("property device");
394  p.setName("property name");
395  p.setLabel("property label");
396  p.setGroupName("property group");
397  p.setPermission(IP_RW);
398  p.setTimeout(1000);
399  p.setState(IPS_OK);
400 
401  ASSERT_STREQ(p[0].getName(), "widget name");
402  ASSERT_STREQ(p[0].getLabel(), "widget label");
403  ASSERT_EQ(p[0].getState(), IPS_OK);
404 
405  ASSERT_STREQ(p.getDeviceName(), "property device");
406  ASSERT_STREQ(p.getName(), "property name");
407  ASSERT_STREQ(p.getLabel(), "property label");
408  ASSERT_STREQ(p.getGroupName(), "property group");
409  ASSERT_EQ(p.getPermission(), IP_RO); // cannot change
410  ASSERT_EQ(p.getTimeout(), 0); // cannot change
411  ASSERT_EQ(p.getState(), IPS_OK);
412 
413  // change values and test
414  p[0].setName("widget other name");
415  p[0].setLabel("widget other label");
416  p[0].setState(IPS_OK);
417 
418  p.setDeviceName("property other device");
419  p.setName("property other name");
420  p.setLabel("property other label");
421  p.setGroupName("property other group");
422  p.setPermission(IP_RO);
423  p.setTimeout(500);
424  p.setState(IPS_ALERT);
425 
426  ASSERT_STREQ(p[0].getName(), "widget other name");
427  ASSERT_STREQ(p[0].getLabel(), "widget other label");
428  ASSERT_EQ(p[0].getState(), IPS_OK);
429 
430  ASSERT_STREQ(p.getDeviceName(), "property other device");
431  ASSERT_STREQ(p.getName(), "property other name");
432  ASSERT_STREQ(p.getLabel(), "property other label");
433  ASSERT_STREQ(p.getGroupName(), "property other group");
434  ASSERT_EQ(p.getPermission(), IP_RO); // cannot change
435  ASSERT_EQ(p.getTimeout(), 0);
436  ASSERT_EQ(p.getState(), IPS_ALERT);
437 
438  ASSERT_EQ(INDI::PropertyNumber(INDI::Property(p)).isValid(), false);
439  ASSERT_EQ(INDI::PropertySwitch(INDI::Property(p)).isValid(), false);
440  ASSERT_EQ(INDI::PropertyText(INDI::Property(p)).isValid(), false);
441  ASSERT_EQ(INDI::PropertyLight(INDI::Property(p)).isValid(), true);
442  ASSERT_EQ(INDI::PropertyBlob(INDI::Property(p)).isValid(), false);
443 }
444 
445 TEST(CORE_PROPERTY_CLASS, Test_PropertyBlob)
446 {
447  INDI::PropertyBlob p{1};
448 
449  p[0].setName("widget name");
450  p[0].setLabel("widget label");
451  p[0].setBlob(nullptr);
452  p[0].setBlobLen(8);
453  p[0].setSize(16);
454  p[0].setFormat("format");
455 
456  p.setDeviceName("property device");
457  p.setName("property name");
458  p.setLabel("property label");
459  p.setGroupName("property group");
460  p.setPermission(IP_RW);
461  p.setTimeout(1000);
462  p.setState(IPS_OK);
463 
464  ASSERT_STREQ(p[0].getName(), "widget name");
465  ASSERT_STREQ(p[0].getLabel(), "widget label");
466  ASSERT_EQ(p[0].getBlob(), nullptr);
467  ASSERT_EQ(p[0].getBlobLen(), 8);
468  ASSERT_EQ(p[0].getSize(), 16);
469  ASSERT_STREQ(p[0].getFormat(), "format");
470 
471  ASSERT_STREQ(p.getDeviceName(), "property device");
472  ASSERT_STREQ(p.getName(), "property name");
473  ASSERT_STREQ(p.getLabel(), "property label");
474  ASSERT_STREQ(p.getGroupName(), "property group");
475  ASSERT_EQ(p.getPermission(), IP_RW);
476  ASSERT_EQ(p.getTimeout(), 1000);
477  ASSERT_EQ(p.getState(), IPS_OK);
478 
479  // change values and test
480  p[0].setName("widget other name");
481  p[0].setLabel("widget other label");
482  p[0].setBlob(reinterpret_cast<void*>(0x10));
483  p[0].setBlobLen(16);
484  p[0].setSize(32);
485  p[0].setFormat("format 2");
486 
487  p.setDeviceName("property other device");
488  p.setName("property other name");
489  p.setLabel("property other label");
490  p.setGroupName("property other group");
491  p.setPermission(IP_RO);
492  p.setTimeout(500);
493  p.setState(IPS_ALERT);
494 
495  ASSERT_STREQ(p[0].getName(), "widget other name");
496  ASSERT_STREQ(p[0].getLabel(), "widget other label");
497  ASSERT_EQ(p[0].getBlob(), reinterpret_cast<void*>(0x10));
498  ASSERT_EQ(p[0].getBlobLen(), 16);
499  ASSERT_EQ(p[0].getSize(), 32);
500  ASSERT_STREQ(p[0].getFormat(), "format 2");
501 
502  ASSERT_STREQ(p.getDeviceName(), "property other device");
503  ASSERT_STREQ(p.getName(), "property other name");
504  ASSERT_STREQ(p.getLabel(), "property other label");
505  ASSERT_STREQ(p.getGroupName(), "property other group");
506  ASSERT_EQ(p.getPermission(), IP_RO);
507  ASSERT_EQ(p.getTimeout(), 500);
508  ASSERT_EQ(p.getState(), IPS_ALERT);
509 
510  ASSERT_EQ(INDI::PropertyNumber(INDI::Property(p)).isValid(), false);
511  ASSERT_EQ(INDI::PropertySwitch(INDI::Property(p)).isValid(), false);
512  ASSERT_EQ(INDI::PropertyText(INDI::Property(p)).isValid(), false);
513  ASSERT_EQ(INDI::PropertyLight(INDI::Property(p)).isValid(), false);
514  ASSERT_EQ(INDI::PropertyBlob(INDI::Property(p)).isValid(), true);
515 }
Class to provide basic INDI device functionality.
Definition: basedevice.h:52
void setName(const char *name)
Provides generic container for INDI properties.
Definition: indiproperty.h:48
INDI::PropertyViewSwitch * getSwitch() const
const char * getGroupName() const
INDI::PropertyViewBlob * getBLOB() const
INDI::PropertyViewText * getText() const
const char * getDeviceName() const
INDI::PropertyViewNumber * getNumber() const
const char * getName() const
INDI::PropertyViewLight * getLight() const
IPerm getPermission() const
void setType(INDI_PROPERTY_TYPE t)
void * getProperty() const
bool isDynamic() const
BaseDevice getBaseDevice() const
const char * getLabel() const
IPState getState() const
void setBaseDevice(BaseDevice *idp)
bool getRegistered() const
INDI_PROPERTY_TYPE getType() const
void setProperty(void *)
const char * getTimestamp() const
@ ISS_OFF
Definition: indiapi.h:151
@ ISS_ON
Definition: indiapi.h:152
@ IP_RW
Definition: indiapi.h:186
@ IP_RO
Definition: indiapi.h:184
@ IPS_BUSY
Definition: indiapi.h:163
@ IPS_ALERT
Definition: indiapi.h:164
@ IPS_OK
Definition: indiapi.h:162
@ INDI_LIGHT
Definition: indidriver.c:60
@ INDI_TEXT
Definition: indidriver.c:59
@ INDI_UNKNOWN
Definition: indidriver.c:62
@ INDI_NUMBER
Definition: indidriver.c:57
@ INDI_SWITCH
Definition: indidriver.c:58
@ INDI_BLOB
Definition: indidriver.c:61
Provides decorator for Low-Level IXXXVectorProperty/IXXX.
void setTimestamp(const char *timestamp)
void setDeviceName(const char *name)
void setName(const char *name)
void setTimeout(double timeout)
void setPermission(IPerm permission)
void setAux(void *user)
void setState(IPState state)
void setGroupName(const char *name)
void setLabel(const char *label)
void setWidgets(WidgetType *w, size_t count)
Number vector property descriptor.
Definition: indiapi.h:319
TEST(CORE_PROPERTY_CLASS, Test_EmptyProperty)