-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from abocanegrab/FOR006
FOR006 Agregar Funcionalidad Lectura FTP
- Loading branch information
Showing
7 changed files
with
2,164 additions
and
1,966 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.