Diff of /trunk/Device/Plc Logic/Application/FTP/FB_FtpClient/GetIpAndPortFromMessage/svnobj [000000] .. [r2]  Maximize  Restore

Switch to side-by-side view

--- a
+++ b/trunk/Device/Plc Logic/Application/FTP/FB_FtpClient/GetIpAndPortFromMessage/svnobj
@@ -0,0 +1,39 @@
+Gx_lG
+!0…jüoò	'Œ@-1ÄßöSystem.StringL{f8a58466-d7f6-439f-bbb8-d4600e41d099}ImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocumentL{f3878285-8e4f-490b-bb1b-9acbb7eb04db}0TextBlobForSerialisation”	idx1 := FIND(sString , '(' );
+idx2 := FIND(sString , ')' );
+IF idx1 > 0 AND idx2 > idx1+1 THEN
+	str1 := MID(sString, idx2 - idx1 - 1, idx1+1);
+	FOR idx1 := 0 TO 5 DO
+		str2 := ElementGet(SEP:=BYTE#44,POS:=idx1,sElement:=str1);
+		byar[idx1] := STRING_TO_BYTE(str2);
+	END_FOR;
+	dw_tmp := BytesToDword(byar[0],byar[1],byar[2],byar[3]); (* IP Adresse des Datenkanals *)
+	s_tmp := DwordToIPString(dwIP := dw_tmp);
+	w_tmp := BytesToWord(byar[4],byar[5]); (* Port Nummer des Datenkanals *)
+END_IF
+IF psIP <> 0 THEN
+	psIP^ := s_tmp;
+END_IF
+IF pwPort <> 0 THEN
+	pwPort^ := TO_UINT(w_tmp);
+END_IF	&LineInfoPersistence
+bba410ed1-ccc4-4d06-96a3-f7e498dd6820_Impl_LineIdsInterfaceL{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}
–{attribute 'hide'}
+METHOD PROTECTED GetIpAndPortFromMessage : BOOL
+VAR_INPUT
+	sString : STRING;
+	psIP : POINTER TO STRING(255);
+	pwPort : POINTER TO UINT;
+END_VAR
+VAR_OUTPUT
+END_VAR
+VAR
+	idx1: INT;
+	idx2: INT;
+	str1: STRING(255);
+	byar: ARRAY[0..5] OF BYTE;
+	str2: STRING;
+	dw_tmp: DWORD;
+	s_tmp: STRING(255);
+	w_tmp: WORD;
+END_VARbba410ed1-ccc4-4d06-96a3-f7e498dd6820_Decl_LineIdsÐÐÐÐ-Ð	-
+ÐÐÐ-
Ð	-
\ No newline at end of file