blob: 2479c2400cd077a5ecc546f0f59e754b14ebd5c5 [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
Patrick Williams1334b7b2021-02-22 17:15:12 -060017template <typename T, typename... ArgTypes>
18void sendTrap(ArgTypes&&... tArgs)
Ratan Guptae4e08e02018-04-16 15:32:48 +053019{
20 T obj(std::forward<ArgTypes>(tArgs)...);
21 obj.sendTrap();
22}
23
24} // namespace snmp
25} // namespace network
26} // namespace phosphor