program ptestnettopos;

uses
{$IFDEF LINUX}
  cthreads,
  cmem,
  uemuladorwinipc in '../../../src_libnettopos/fctopos/IPC/Linux/uemuladorwinipc.pas',
  usemaforopolenta in '../../../src_libnettopos/fctopos/IPC/Linux/usemaforopolenta.pas',
  ipcobjs in '../../../src_libnettopos/fctopos/IPC/Linux/ipcobjs.pas',
  ukeydir in '../../../src_libnettopos/libnettopos/ukeydir.pas',
  uwinmsgs in '../../../src_libnettopos/fctopos/IPC/Linux/uwinmsgs.pas',
  timeLib in '..\..\..\src_libnettopos\fctopos\timeLib.pas',
{$ELSE}
  ipcthrd in '../../../src_libnettopos/fctopos/IPC/Win32/ipcthrd.pas',
{$ENDIF}
{$IFDEF NETTOPOS_DLL}
  uimportnettopos in '../../../src_libnettopos/libnettopos/uimportnettopos.pas',
{$ELSE}
  unettopos in '../../../src_libnettopos/libnettopos/unettopos.pas',
  unettopostypes in '../../../src_libnettopos/libnettopos/unettopostypes.pas',
  uglobsharedmem in '../../../src_libnettopos/libnettopos/uglobsharedmem.pas',
  uHeapManager in '../../../src_libnettopos/libnettopos/uHeapManager.pas',
{$ENDIF}
  uconstantes_nettopos in '../../../src_libnettopos/libnettopos/uconstantes_nettopos.pas',  
  ubuffrw in '../../../src_libnettopos/fctopos/ubuffrw.pas',
  uLibFuncionesComunes in '../../../src_libnettopos/fctopos/uLibFuncionesComunes.pas',
  uServiciosTopo in '../../../src_libnettopos/topo/uServiciosTopo.pas',
  uDatosNodo in '..\..\..\src_libnettopos\fctopos\Despachador\uDatosNodo.pas',
  uDespachador in '..\..\..\src_libnettopos\fctopos\Despachador\uDespachador.pas',
  uFichaNodo in '..\..\..\src_libnettopos\fctopos\Despachador\uFichaNodo.pas',
  uMsgsDespachador in '..\..\..\src_libnettopos\fctopos\Despachador\uMsgsDespachador.pas',
  uTareas in '..\..\..\src_libnettopos\fctopos\Despachador\uTareas.pas',
  udatosconexionnodo in '..\..\..\src_libnettopos\topo\udatosconexionnodo.pas',  
  uTestNettopos in 'uTestNettopos.pas' {fX2},
  uMsgsTestNettopos in 'uMsgsTestNettopos.pas',
  uTestNettoposHandler in './testNettoposHandler\uTestNettoposHandler.pas',
  xmatdefs in '..\..\fc\rch30\xmatdefs.pas',
  uAuxiliares in '..\..\fc\base\uAuxiliares.pas',
  uevaluador in '..\..\fc\rch30\uevaluador.pas';

procedure TFmth_execute;
var
	m: TWinMsg;
begin
writeln('TFmth_execute->TTesteadorNettopos.Create');
  fTestNettopos:= TfTestNettopos.Create(nil);
  while fTestNettopos.recolectar do
  begin
   if xGetMessage_WAIT( m ) = 0 then
   begin
//     writeln('TestNettopos mensaje: ', m.msgCode,' : ',m.wParam,' : ',m.lParam);
     fTestNettopos.Dispatch(m);
   end
   else
     write('.');
  end;
writeln('TFmth_execute->TTesteadorNettopos.Free');
  fTestNettopos.Free;
writeln('TFmth_execute->fin.');
end;

begin
  //writeln(' Paso a modo SUBTERRANEO !');
  // test;
//  daemon(0,0);

//  tf:= TFmth.Create;
  TFmth_execute;

end.
