This commit is contained in:
+2
-1
@@ -574,7 +574,8 @@ int mEpicsCa<T>::put(V *value) {
|
||||
// it as a double. This means we have some loss of precision for large
|
||||
// integers, but it is the best we can do ...
|
||||
if (ca_field_type(_pChanID) == DBF_DOUBLE) {
|
||||
return putRaw<S>(static_cast<double>(*value));
|
||||
double dval = static_cast<double>(*value);
|
||||
return putRaw<S>(&dval);
|
||||
} else {
|
||||
return putRaw<S>(value);
|
||||
}
|
||||
|
||||
@@ -298,6 +298,14 @@ int main() {
|
||||
EQUAL(status, CM_SUCCESS);
|
||||
EQUAL(int_val, new_int_val);
|
||||
|
||||
// Write an int64 to a record and read it to check
|
||||
int64_t new_int64_val = 1111;
|
||||
status = int64_ca.put(&new_int64_val);
|
||||
EQUAL(status, CM_SUCCESS);
|
||||
status = int64_ca.get(&int64_val);
|
||||
EQUAL(status, CM_SUCCESS);
|
||||
EQUAL(int64_val, new_int64_val);
|
||||
|
||||
// Write to the limit field of the longin record
|
||||
new_int_val = 40;
|
||||
status = int_hopr_ca.put(&new_int_val);
|
||||
|
||||
Reference in New Issue
Block a user