Hi!
As per subject, I have a problem with the GetSumDCIValue when the result is greater than a 32bit integer.
This is my transformation:
It returns 0 when the result cannot be handled by a 32 bits integer.
I have another version of that DCI that uses a different approach to do the same computations and it works properly:
The data type assigned to both DCIs is "Unsigned Integer 64 bit" (NB in the last example the custom attribute is updated by another DCI).
Any hints?
Best regards,
Marco
As per subject, I have a problem with the GetSumDCIValue when the result is greater than a 32bit integer.
This is my transformation:
Code Select
return int64(GetSumDCIValue($node, FindDCIByDescription($node, "WAN: delta in (bytes)"), time()-86400, time()));
It returns 0 when the result cannot be handled by a 32 bits integer.
I have another version of that DCI that uses a different approach to do the same computations and it works properly:
Code Select
last = int64(GetCustomAttribute($node, "WANCumulativeIn"));
if (last == null)
last = 0;
SetCustomAttribute($node, "WANCumulativeIn", 0);
return last;
The data type assigned to both DCIs is "Unsigned Integer 64 bit" (NB in the last example the custom attribute is updated by another DCI).
Any hints?
Best regards,
Marco