Welch-allyn SureTemp PlusModule - User Manual Manual do Utilizador Página 56

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 85
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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]));
Vista de página 55
1 2 ... 51 52 53 54 55 56 57 58 59 60 61 ... 84 85

Comentários a estes Manuais

Sem comentários