Welch-allyn SureTemp PlusModule - User Manual Manuale Utente Pagina 56

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 85
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 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]));
Vedere la pagina 55
1 2 ... 51 52 53 54 55 56 57 58 59 60 61 ... 84 85

Commenti su questo manuale

Nessun commento