Transfer floating-point data (Server)

To transfer floating-point data between different computer architectures, the DataBlade API provides functions that handle type alignment and byte order.

Table 1. DataBlade API functions that handle type alignment and byte order
DataBlade API function Description
mi_get_decimal() Copies an aligned mi_decimal value, converting any difference in alignment or byte order on the client computer to that of the server computer
mi_get_double_precision() Copies an aligned mi_double_precision value, converting any difference in alignment or byte order on the client computer to that of the server computer
mi_get_real() Copies an aligned mi_real value, converting any difference in alignment or byte order on the client computer to that of the server computer
mi_put_decimal() Copies an aligned mi_decimal value, converting any difference in alignment or byte order on the server computer to that of the client computer
mi_put_double_precision() Copies an aligned mi_double_precision value, converting any difference in alignment or byte order on the server computer to that of the client computer
mi_put_real() Copies an aligned mi_real value, converting any difference in alignment or byte order on the server computer to that of the client computer

The mi_get_decimal(), mi_get_double_precision(), mi_get_real(), mi_put_decimal(), mi_put_double_precision(), and mi_put_real() functions are useful in the send and receive support function of an opaque data type that contains mi_decimal, mi_double_precision, or mi_real values. They ensure that floating-point (DECIMAL, FLOAT, or SMALLFLOAT) values remain aligned when transferred to and from client applications.


Copyright© 2019 HCL Technologies Limited