<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=windows-1257" http-equiv=Content-Type> <META name=GENERATOR content="MSHTML 8.00.6001.18812"> <STYLE></STYLE> </HEAD> <BODY> <DIV><FONT size=2 face=Arial></FONT> </DIV> <DIV><FONT size=2 face=Arial>> Gal galetum mestelt koki pavyzdi, kuris pasiuncia bet kokia uzklausa ir <BR>> parodo rezultata?<BR>> <BR><SPAN lang=RU></SPAN></FONT></DIV> <DIV><FONT size=2 face=Arial><SPAN lang=RU>Gaudyk...</SPAN></FONT></DIV> <DIV><FONT size=2 face=Arial><SPAN lang=RU> </DIV> <DIV><FONT size=3 face=System>type TSNMPdata=record</FONT></DIV> <DIV><FONT size=3 face=System> OID: AnsiString;</FONT></DIV> <DIV><FONT size=3 face=System> Community: AnsiString;</FONT></DIV> <DIV><FONT size=3 face=System> AgentIP: AnsiString;</FONT></DIV> <DIV><FONT size=3 face=System> Value: AnsiString;</FONT></DIV> <DIV><FONT size=3 face=System> ValueType: integer;</FONT></DIV> <DIV><FONT size=3 face=System> RetryCount: integer;</FONT></DIV> <DIV><FONT size=3 face=System> TimeOut: integer;</FONT></DIV> <DIV><FONT size=3 face=System> end;</FONT></DIV> <DIV><FONT size=3 face=System></FONT> </DIV> <DIV><FONT size=3 face=System></FONT> </DIV> <DIV><FONT size=3 face=System></FONT><SPAN lang=RU> </DIV> <DIV><FONT size=3 face=System>var SNMPdata: TSNMPdata;</FONT></DIV> <DIV><FONT size=3 face=System> GetValue: AnsiString;</FONT></DIV> <DIV><FONT size=3 face=System></FONT></SPAN></SPAN></FONT> </DIV> <DIV><FONT face=System></FONT> </DIV><SPAN lang=RU> <DIV><FONT face=System>function GetRequest(data: TSNMPdata): boolean;</FONT></DIV> <DIV><FONT face=System>var r: boolean;</FONT></DIV> <DIV><FONT face=System>c: integer;</FONT></DIV> <DIV><FONT face=System>begin</FONT></DIV> <DIV><FONT face=System> r:=false;</FONT></DIV> <DIV><FONT face=System> c:=data.RetryCount;</FONT></DIV> <DIV><FONT face=System> while (not r) and (c > 0) do</FONT></DIV> <DIV><FONT face=System> begin</FONT></DIV> <DIV><FONT face=System> Application.ProcessMessages;</FONT></DIV> <DIV><FONT face=System> r:=SNMPGet(data.OID, data.Community, data.AgentIP, data.TimeOut, GetValue);</FONT></DIV> <DIV><FONT face=System> dec(c);</FONT></DIV> <DIV><FONT face=System> end;</FONT></DIV> <DIV><FONT face=System> if not r then GetValue:='No response';</FONT></DIV> <DIV><FONT face=System> Result:=r;</FONT></DIV> <DIV><FONT face=System>end;</FONT></DIV></SPAN></BODY></HTML>