Syntax for C++ meter

unsigned int res_meter (const char *res_name, void **attr_val)

You can assign any name to the function.

Set the VCSAgValidateAndSetEntryPoint() parameter as the name of function of the entry point.

Refer to See Return values for entry points .

In the following example, the function res_meter is defined as the meter entry point.

For example:

#include "VCSAgApi.h"
unsigned int
res_meter(const char *res_name, void **attr_val) {
// Implement the code to meter a resource here.
}
void VCSAgStartup()
{
VCSAG_LOG_INIT("VCSAgStartup");
VCSAgSetLogCategory(10051);
VCSAgInitEntryPointStruct(V60);
VCSAgValidateAndSetEntryPoint(VCSAgEPMeter, res_meter);
}

Along with attribute that is specified in ArgList, the meter entry point also gets the value of Meters and MeterUnit attributes.

You can refer to the Cluster Server Administrator's Guide for information on MeterUnit attribute.

See Meters.