Ratan Gupta | e4e08e0 | 2018-04-16 15:32:48 +0530 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "snmp_notification.hpp" |
| 4 | |
| 5 | namespace phosphor |
| 6 | { |
| 7 | namespace network |
| 8 | { |
| 9 | namespace 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 Williams | 1334b7b | 2021-02-22 17:15:12 -0600 | [diff] [blame] | 17 | template <typename T, typename... ArgTypes> |
| 18 | void sendTrap(ArgTypes&&... tArgs) |
Ratan Gupta | e4e08e0 | 2018-04-16 15:32:48 +0530 | [diff] [blame] | 19 | { |
| 20 | T obj(std::forward<ArgTypes>(tArgs)...); |
| 21 | obj.sendTrap(); |
| 22 | } |
| 23 | |
| 24 | } // namespace snmp |
| 25 | } // namespace network |
| 26 | } // namespace phosphor |