Welch-allyn SureTemp PlusModule - User Manual Manuel d'utilisateur Page 56

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 85
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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]));
Vue de la page 55
1 2 ... 51 52 53 54 55 56 57 58 59 60 61 ... 84 85

Commentaires sur ces manuels

Pas de commentaire