void send_alarm (void) {
/* Send a trap message when alarm input is activated.*/
U16 obj[2];
/* Change the community to "private". */
snmp_set_community ("private");
/* Add "KeyIn" value to trap message. */
obj[0] = 1;
obj[1] = 8; /* Index of "KeyIn" entry in MIB table. */
snmp_trap (NULL, 6, 1, obj);
/* Restore the community to "public". */
snmp_set_community ("public");
}
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.