Ver Mensaje Individual
  #11  
Antiguo 12-09-2006
Avatar de marcoszorrilla
marcoszorrilla marcoszorrilla is offline
Capo
 
Registrado: may 2003
Ubicación: Cantabria - España
Posts: 11.221
Reputación: 10
marcoszorrilla Va por buen camino
Para más facilidad:
Código Delphi [-]
// GET SYSTEMDATA
// com_port: [1..6]
// start_data: start Char for reading (typical:0)
// system_data: pointer with the adress of the Buffer to write the system data
// max_data: max number of the data which could be written in the Buffer
//           (use to protect against buffer (array) overwriting)
// rec_data: number of recived datas from the device
// NOTE: if max_data < rec_data datas got lost

// error_code: 0x00 .. no error
//             0x95 .. no port avaiable
//             0x97 .. no answer
//             0x99 .. timeout (no polling found)
procedure get_system_data(com_port,start_data:longint;system_data:PChar;
                          max_data:longint;
                          var rec_data,error_code:longint);stdcall;
external 'benzing_com.dll';
//------------------------------------------------------------------------------

// SET SYSTEM DATA
// With this command the atis TOP gets new system data from the PC.
// Only the following parts of system data will be changed:
// fancier's name 25 bytes  "Fancier One"
// club nr.       5 bytes   "12345"
// unused         6 bytes   "123456"
// fancier's nr.  6 bytes   "123456"

// The unused data just has a significance in Germany.
// In other countries those data are not necessary. Nevertheless memory is
// reserved for these data. By this way those data can be used in the future.

// Special of the club nr. data in Germany:
// club organization number   3 bytes   "123"
// travel organization number 2 bytes   "12"

// com_port: [1..6]
// system_data: pointer with the adress of the Buffer to read the system data
// len_data: number of datas to send

// error_code: 0x00 .. no error
//             0x20 .. general communication error
//             0x95 .. no port avaiable
//             0x97 .. no answer
//             0x99 .. timeout (no polling found)
procedure set_system_data(com_port:longint;system_data:PChar;len_data:longint;
                           var error_code:longint);stdcall;
external 'benzing_com.dll';

Un Saludo.
__________________
Guía de Estilo de los Foros
Cita:
- Ça c'est la caisse. Le mouton que tu veux est dedans.
Responder Con Cita