Campbell BMP5 Informações Técnicas Página 95

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 100
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 94
Appendix D. JAVA Example Code
D-25
case type_ascii:
{
// we need to read off all of the possible bytes for the
// string field from the data message. This way, the
// pointer will be positioned at the right loc for the
// next field.
byte[] temp = msg.read_bytes(column.piece_size);
k += column.piece_size; // short circuit
//loop for strings
for(int m = 0; m < temp.length && temp[m] != 0; ++m)
System.out.print((char)temp[m]);
System.out.println("");
break;
}
case type_int2_lsf:
System.out.println("Not used by CR2xx");
msg.move_past(2);
break;
case type_int4_lsf:
System.out.println("Not used by CR2xx");
msg.move_past(4);
break;
case type_uint2_lsf:
System.out.println("Not used by CR2xx");
msg.move_past(2);
break;
case type_uint4_lsf:
System.out.println("Not used by CR2xx");
msg.move_past(4);
break;
case type_nsec_lsf:
System.out.println("Not used by CR2xx");
msg.move_past(8);
break;
case type_ieee4_lsf:
System.out.println("Not used by CR2xx");
msg.move_past(4);
break;
default:
System.out.println("Unsupported data type " +
column.field_type);
throw new Exception("Unsupported data type " +
column.field_type);
}
}
}
}
return rtn;
} // print_records
Vista de página 94
1 2 ... 90 91 92 93 94 95 96 97 98 99 100

Comentários a estes Manuais

Sem comentários