Skip to content

Commit

Permalink
Merge pull request #5 from abocanegrab/FOR006
Browse files Browse the repository at this point in the history
FOR006 Agregar Funcionalidad Lectura FTP
  • Loading branch information
abocanegrab authored Oct 18, 2022
2 parents e1e219d + dc85408 commit 0627db8
Show file tree
Hide file tree
Showing 7 changed files with 2,164 additions and 1,966 deletions.
18 changes: 18 additions & 0 deletions FTPServer/FTPServer.iri
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
procedure pStartServer;
sCode : SysCode;
begin
sCode := StartFTPServer;
if (sCode = SysOk) then
DisplayStatus("Server activo");
SetTimerMode(1, TimerContinuous);
SetTimer(1, 300);
StartTimer(1);

SetTimerMode(2, TimerContinuous);
SetTimer(2, 300);
StartTimer(2);

else
DisplayStatus(SysCodeToString(sCode));
end if;
end;
48 changes: 48 additions & 0 deletions FTPServer/FuncionesFTP.iri
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
procedure pValidaValorDeLinea (valor : string);
NombreLinea:string;

begin
if (Left$(valor, 3)="Uso") then
g_uso:=Right$(valor, Len(valor)-4);
--return g_uso;
elsif (Left$(valor, 7)="Especie") then
g_especie:=Right$(valor, Len(valor)-8);
--return g_especie;
elsif (Left$(valor, 11)="Embarcacion") then
g_embarcacion:=Right$(valor, Len(valor)-12);
--return g_embarcacion;
elsif (Left$(valor, 14)="TipoTransporte") then
g_tipotransporte:=Right$(valor, Len(valor)-15);
--return g_tipotransporte;
elsif (Left$(valor, 9)="Operacion") then
g_operacion:=Right$(valor, Len(valor)-10);
--return g_operacion;
elsif (Left$(valor, 5)="Fecha") then
g_fecha:=Right$(valor, Len(valor)-6);
--return g_fecha;
end if;

--return NombreLinea;
end;


procedure pCrearArchivoTxt;
l_NombreArchivo: string;
begin
l_NombreArchivo:="ArchivoCreado1280_"+DTTostring(SystemTime)+".txt";

if (FileExists(l_NombreArchivo,FTP)=SysOk) then
FileDelete(l_NombreArchivo,FTP);
FileClose;
end if;

FileOpen(l_NombreArchivo,FTP,FileCreate);
FileWriteLn("Operacion:"+ g_operacion);
FileWriteLn("Especie:"+ g_especie);
FileWriteLn("Uso:"+ g_uso);
FileWriteLn("TipoTransporte:"+ g_tipotransporte);
FileWriteLn("Embarcacion:"+ g_embarcacion);

FileClose;
DisplayStatus("Se creo el archivo");
end;
2 changes: 2 additions & 0 deletions Procedimientos.iri
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ begin
elsif g_TipoMant = tipoMantEditar then
pPutReceta(t_MantGenerico);
end if;
--pMuestraReceta;

elsif g_NombreMenuMantto = CONST_INSUMO_LABEL then
if g_TipoMant = tipoMantAgregar then
pPostInsumo(t_MantGenerico);
Expand Down
Loading

0 comments on commit 0627db8

Please sign in to comment.