@@ -19,7 +19,17 @@ typedef enum {
1919 functE,
2020 functTen,
2121 functGettysburg,
22- functTime64
22+ functTime64,
23+ functInt8,
24+ functUInt8,
25+ functInt16,
26+ functUInt16,
27+ functInt32,
28+ functUInt32,
29+ functInt64,
30+ functUInt64,
31+ functFloat32,
32+ functFloat64
2333} myFunct_t;
2434
2535static int myAttrFunct1 (const char *paramString, void **functionPvt, functAttribute *pAttribute)
@@ -55,6 +65,46 @@ static int myAttrFunct1(const char *paramString, void **functionPvt, functAttrib
5565 pAttribute->setDataType (NDAttrUInt64);
5666 *paramIndex = functTime64;
5767 }
68+ else if (!strcmp (paramString, " INT8" )) {
69+ pAttribute->setDataType (NDAttrInt8);
70+ *paramIndex = functInt8;
71+ }
72+ else if (!strcmp (paramString, " UINT8" )) {
73+ pAttribute->setDataType (NDAttrUInt8);
74+ *paramIndex = functUInt8;
75+ }
76+ else if (!strcmp (paramString, " INT16" )) {
77+ pAttribute->setDataType (NDAttrInt16);
78+ *paramIndex = functInt16;
79+ }
80+ else if (!strcmp (paramString, " UINT16" )) {
81+ pAttribute->setDataType (NDAttrUInt16);
82+ *paramIndex = functUInt16;
83+ }
84+ else if (!strcmp (paramString, " INT32" )) {
85+ pAttribute->setDataType (NDAttrInt32);
86+ *paramIndex = functInt32;
87+ }
88+ else if (!strcmp (paramString, " UINT32" )) {
89+ pAttribute->setDataType (NDAttrUInt32);
90+ *paramIndex = functUInt32;
91+ }
92+ else if (!strcmp (paramString, " INT64" )) {
93+ pAttribute->setDataType (NDAttrInt64);
94+ *paramIndex = functInt64;
95+ }
96+ else if (!strcmp (paramString, " UINT64" )) {
97+ pAttribute->setDataType (NDAttrUInt64);
98+ *paramIndex = functUInt64;
99+ }
100+ else if (!strcmp (paramString, " FLOAT32" )) {
101+ pAttribute->setDataType (NDAttrFloat32);
102+ *paramIndex = functFloat32;
103+ }
104+ else if (!strcmp (paramString, " FLOAT64" )) {
105+ pAttribute->setDataType (NDAttrFloat64);
106+ *paramIndex = functFloat64;
107+ }
58108 else {
59109 printf (" Error, unknown parameter string = %s\n " , paramString);
60110 free (paramIndex);
@@ -90,6 +140,66 @@ static int myAttrFunct1(const char *paramString, void **functionPvt, functAttrib
90140 break ;
91141 }
92142
143+ case functInt8: {
144+ epicsInt8 val=-8 ;
145+ pAttribute->setValue (&val);
146+ break ;
147+ }
148+
149+ case functUInt8: {
150+ epicsUInt8 val=8 ;
151+ pAttribute->setValue (&val);
152+ break ;
153+ }
154+
155+ case functInt16: {
156+ epicsInt16 val=-16 ;
157+ pAttribute->setValue (&val);
158+ break ;
159+ }
160+
161+ case functUInt16: {
162+ epicsUInt16 val=16 ;
163+ pAttribute->setValue (&val);
164+ break ;
165+ }
166+
167+ case functInt32: {
168+ epicsInt32 val=-32 ;
169+ pAttribute->setValue (&val);
170+ break ;
171+ }
172+
173+ case functUInt32: {
174+ epicsUInt32 val=32 ;
175+ pAttribute->setValue (&val);
176+ break ;
177+ }
178+
179+ case functInt64: {
180+ epicsInt64 val=-64 ;
181+ pAttribute->setValue (&val);
182+ break ;
183+ }
184+
185+ case functUInt64: {
186+ epicsUInt64 val=64 ;
187+ pAttribute->setValue (&val);
188+ break ;
189+ }
190+
191+ case functFloat32: {
192+ epicsFloat32 val=32.0 ;
193+ pAttribute->setValue (&val);
194+ break ;
195+ }
196+
197+ case functFloat64: {
198+ epicsFloat64 val=64.0 ;
199+ pAttribute->setValue (&val);
200+ break ;
201+ }
202+
93203 default :
94204 return ND_ERROR;
95205 }
0 commit comments