Welch-allyn SureTemp PlusModule - User Manual Instrukcja Użytkownika Strona 56

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 85
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 55
Command and Response Strings: Examples SureTemp Plus Module OEM Implementation
56 Confidential Welch Allyn OEM Technologies
These steps are shown in the following code sample:
float f; // Where you want the result converted...
unsigned char s[5]; // Array holding the message starting at the float data element unconverted.
unsigned char d[5]; // Array holding the message starting at the float data element converted to
// the endianness of the processor.
// For little-endian processors (Intel x86, Pentium, etc.)....
// Move data from source to destination.
d [0] = s [0];
d [1] = s [1];
d [2] = s [2];
d [3] = s [3];
f = (float) *((float *) (&d[0]));
// For big-endian processors (Motorola CPU32, etc.)....
// Move data from source to destination.
d [3] = s [0];
d [2] = s [1];
d [1] = s [2];
d [0] = s [3];
f = (float) *((float *) (&d[0]));
Przeglądanie stron 55
1 2 ... 51 52 53 54 55 56 57 58 59 60 61 ... 84 85

Komentarze do niniejszej Instrukcji

Brak uwag