Comment 4 for bug 541254

Revision history for this message
Jeff Hill (johill-lanl) wrote :

From Dirk,

 From Jeff's Mantis Notes:
> Its true that gdd::smartCopy() provides a nill enumeration string
> table to aitConvert(), but this should presumably be a non-issue for
> the GW since it should be preserving the native type (in this case
> aitEnum) for all of its internal PV.

This conversion only happens when an alarm handler is connected. The
reason is that in this case, we have a container holding data for
dbr_stsack_string. This structure stores the value as a string, not in
it's native type. Only in this case, gdd::smartCopy() is called.
Normally, when no alh is connected, the gateway indeed holds all data in
its native type and smartCopy() is not used.

In my opiniton, a generic function like smartCopy() does not make much
sense when it can't be called generically with all data types. All
generic clients, like gateway, have to check now if their data is
compatible with the generic function and have to handle conversions enun
to string separately.

If the gateway (or any other generic client) should hold the data in its
native type even when alh is conencted, is a different question (in
fact, it is mantis entry 213).

That's actually how I found out where the problem is. See above.