Using SNMP Notifications with files generated by smidump

My MIB- file includes notifications like f. ex.
OBJECTS {group1chA, group1chB, group2chA, group2chB}
STATUS current
“External alarm notification”
::= {traps 4}

This is SNMPv2c. TM_SNMP_VERSION is set to 2 in file trsystem.h.
When using the smidump, some functions is generated in the *_var.c files used to send the notifications.

For the trap shown here is generated a function
int tfexternalalarmtrap_trap(struct externalalarmtrap *entry)

The structure format is defined in file *_local.h as

struct externalalarmtrap {
int trap_id;
unsigned long group1cha;
int index0_0;
unsigned long group1chb;
int index1_0;
unsigned long group2cha;
int index2_0;
unsigned long group2chb;
int index3_0;

I am not quite sure what these elements means.
The four variables are my variables for the trap.
What is the trap_id?
What are the four index*_0?

Is it normal that when compiling the program, a lot of warnings from unused variables is generated in the files used to send the notifications in file *_var.c?

The send traps/notifications using smidump is not covered by any example from DIGI and the SNMP manual from Treck has not documented the functions used to send traps/notifications. I cannot get any help there.