Sending traps from within agent code

From: Victor Kirhenshtein <victor_at_DOMAIN_REMOVED>
Date: Wed, 28 Sep 2005 10:23:55 +0300

Core agent components can use function SendTrap to send an event (trap)
to server. This function has two forms:

void SendTrap(DWORD dwEventCode, int iNumArgs, TCHAR **ppArgList);
void SendTrap(DWORD dwEventCode, char *pszFormat, ...);

dwEventCode is NetXMS event code.

In first form, iNumArgs defines number of arguments, and ppArgList is a
pointer to array of pointers to string arguments.
In second form, pszFormat defines number, type and conversion procedure
of arguments. Each parameter represented by one character, and the
following format characters can be used:
        s - String (parameter is TCHAR*)
        d - Decimal integer (parameter is long or DWORD)
        x - Hex integer (parameter is long or DWORD)
        a - IP address (parameter is DWORD)
        i - Object ID (parameter is DWORD)

Regards,
Victor
Received on Wed Sep 28 2005 - 10:23:55 EEST

This archive was generated by hypermail 2.2.0 : Wed Sep 28 2005 - 10:34:30 EEST