ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / SNMP Protocol functions
  • WLanguage procedure
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
SNMPTrapEnable (Function)
In french: SNMPTrapActive
Enables the interception of an SNMP trap sent by an agent.
Remark: the SNMP interruption service must be installed on the computer and this service must be started. If the user is an administrator or a user with rights, the service starts automatically (except if it was explicitly disabled).
// Intercept all the traps
nTrapID is int
nTrapID = SNMPTrapEnable("TrapProc", "", "", "")
Syntax
<Result> = SNMPTrapEnable(<WLanguage procedure> , <Agent address> , <SNMP community> , <Relevant OID>)
<Result>: Integer
  • Identifier of trap,
  • -1 if an error occurred. ErrorInfo returns more information on the error.
<WLanguage procedure>: Procedure name
WLanguage procedure that will be called whenever the SNMP agent sends a trap message (according to the requested filters). This procedure has the following format:
PROCEDURE <Procedure Name>(<Address>, <Community>, <OID>, <Type>, <Value>)
<Agent address>: Character string
Address of agent whose traps will be received. This address can be given in the following format:
  • IP address in XXX.XXX.XXX.XXX format (125.5.110.100 for example).
  • URL containing the server name (www.windev.com for example). This syntax is recommended.
This agent must be configured to send traps to the computer that runs the application.
If this parameter corresponds to an empty string (""), SNMPTrapEnable will e called on the traps of any agent.
<SNMP community>: Character string
Name of SNMP community of traps. Used to filter the traps according to their community.
If this parameter corresponds to an empty string (""), SNMPTrapEnable will be called on the traps of any community.
<Relevant OID>: Character string
OID affected by the traps. Used to filter the traps according to the relevant OID.
If this parameter corresponds to an empty string (""), SNMPTrapEnable will be called on the traps of any OID.
Remarks

WLanguage procedure

The WLanguage procedure will be called whenever the SNMP agent sends a trap message (according to the requested filters). This procedure has the following format:
PROCEDURE <Procedure Name>(<Address>, <Community>, <OID>, <Type>, <Value>)
In this code:
  • <Address> is a string. This parameter contains the IP address of the agent that generated the trap.
  • <Community> is a string. This parameter contains the community of the agent that generated the trap.
  • <OID> is an array of strings. This parameter contains the OID of the trap (in numeric format).
  • <Type> is an array of integers. This parameter contains the type of the returned OID.
  • <Value> is an array of strings. This parameter contains the value of the returned OID.
Component: wd290com.dll
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help