forked from sonic-net/sonic-sairedis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Switch.h
57 lines (41 loc) · 1.33 KB
/
Switch.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#pragma once
extern "C" {
#include "saimetadata.h"
}
#include <string>
namespace sairedis
{
class Switch
{
public:
Switch(
_In_ sai_object_id_t switchId);
Switch(
_In_ sai_object_id_t switchId,
_In_ uint32_t attrCount,
_In_ const sai_attribute_t *attrList);
virtual ~Switch() = default;
public:
void clearNotificationsPointers();
/**
* @brief Update switch notifications from attribute list.
*
* A list of attributes which was passed to create switch API.
*/
void updateNotifications(
_In_ uint32_t attrCount,
_In_ const sai_attribute_t *attrList);
const sai_switch_notifications_t& getSwitchNotifications() const;
sai_object_id_t getSwitchId() const;
const std::string& getHardwareInfo() const;
private:
sai_object_id_t m_switchId;
/**
* @brief Notifications pointers holder.
*
* Each switch instance can have it's own notifications defined.
*/
sai_switch_notifications_t m_switchNotifications;
std::string m_hardwareInfo;
};
}