blob: a076054336ce08ee204f1ba02793276e034aa54b [file] [log] [blame]
Ratan Guptae4e08e02018-04-16 15:32:48 +05301#pragma once
2
3#include "snmp_notification.hpp"
4
5namespace phosphor
6{
7namespace network
8{
9namespace snmp
10{
11
12/* @brief sends the trap to the snmp manager
13 * T - Notification type
14 * @param[in] tArgs - arguments for the trap.
15 */
16
17template <typename T, typename... ArgTypes> void sendTrap(ArgTypes&&... tArgs)
18{
19 T obj(std::forward<ArgTypes>(tArgs)...);
20 obj.sendTrap();
21}
22
23} // namespace snmp
24} // namespace network
25} // namespace phosphor