Documentation
Converter Class Reference
Conversion Routines. More...
Public Member Functions | |
| Converter (boolean swapMode) | |
| Creates a Converter object. | |
| void | floatsToShorts (float[] floatArr, short[] shortArr) |
| Binary conversion from a float array to a short array. | |
| void | intsToShorts (int[] intArr, short[] shortArr) |
| Binary conversion from a int array to a short array. | |
| void | shortsToInts (short[] shortArr, int[] intArr) |
| Binary conversion from a short array to a int array. | |
| void | shortsToFloats (short[] shortArr, float[] floatArr) |
| Binary conversion from a short array to a float array. | |
Static Public Attributes | |
| static final boolean | BIG_ENDIAN = false |
| Big endian conversion. | |
| static final boolean | LITTLE_ENDIAN = true |
| Little endian conv. | |
Detailed Description
Conversion Routines.
Utility class which provides functions to convert between different binary data repesentations.
Constructor & Destructor Documentation
| Converter | ( | boolean | swapMode | ) |
Creates a Converter object.
- Parameters:
-
swapMode BIG_ENDIAN: most significant word is the 0th element, LITTLE_ENDIAN: least significant word is the 0th element.
Member Function Documentation
| void floatsToShorts | ( | float[] | floatArr, | |
| short[] | shortArr | |||
| ) |
Binary conversion from a float array to a short array.
- Note:
- The short array must be twice as large as the float array!
- Exceptions:
-
ArrayStoreException Array size mismatch
| void intsToShorts | ( | int[] | intArr, | |
| short[] | shortArr | |||
| ) |
Binary conversion from a int array to a short array.
- Note:
- The short array must be twice as large as the int array!
- Exceptions:
-
ArrayStoreException Array size mismatch
| void shortsToInts | ( | short[] | shortArr, | |
| int[] | intArr | |||
| ) |
Binary conversion from a short array to a int array.
- Note:
- The short array must be twice as large as the int array!
- Exceptions:
-
ArrayStoreException Array size mismatch
| void shortsToFloats | ( | short[] | shortArr, | |
| float[] | floatArr | |||
| ) |
Binary conversion from a short array to a float array.
- Note:
- The short array must be twice as large as the float array!
- Exceptions:
-
ArrayStoreException Array size mismatch
FieldTalk Modbus Master Library, Java Edition
Library version 2.6.5