-
Notifications
You must be signed in to change notification settings - Fork 32
Feature/add device information tlv to topology response #705
Feature/add device information tlv to topology response #705
Conversation
framework/tlvf/AutoGenerated/include/tlvf/ieee_1905_1/tlvDeviceInformation.h
Show resolved
Hide resolved
framework/tlvf/AutoGenerated/include/tlvf/ieee_1905_1/tlvDeviceInformation.h
Show resolved
Hide resolved
framework/tlvf/AutoGenerated/src/tlvf/ieee_1905_1/tlvDeviceInformation.cpp
Show resolved
Hide resolved
framework/tlvf/AutoGenerated/include/tlvf/ieee_1905_1/tlvDeviceInformation.h
Show resolved
Hide resolved
framework/tlvf/AutoGenerated/src/tlvf/ieee_1905_1/tlvDeviceInformation.cpp
Show resolved
Hide resolved
framework/tlvf/AutoGenerated/src/tlvf/ieee_1905_1/tlvDeviceInformation.cpp
Show resolved
Hide resolved
framework/tlvf/AutoGenerated/src/tlvf/ieee_1905_1/tlvDeviceInformation.cpp
Show resolved
Hide resolved
framework/tlvf/AutoGenerated/src/tlvf/ieee_1905_1/tlvDeviceInformation.cpp
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 3cf23b9 headline should be "bcl: utils: add method to get interface speed".
Also, the description should also explain a bit which TLV needs this information and for which interfaces we require to know the speed.
Other than that - LGTM, so approving. Any reason this still a draft?
framework/tlvf/AutoGenerated/include/tlvf/ieee_1905_1/tlvDeviceInformation.h
Show resolved
Hide resolved
std::shared_ptr<ieee1905_1::cLocalInterfaceInfo> localInterfaceInfo = | ||
tlvDeviceInformation->create_local_interface_list(); | ||
|
||
ieee1905_1::eMediaType media_type = ieee1905_1::eMediaType::UNKNONWN_MEDIA; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all this can go to a static function:
static bool fill_iface_info(ieee1905_1::tlvDeviceInformation &info, const std::string iface, const sMacAddr &iface_mac);
Then call it - fill_iface_info(*info, bridge_info.iface, network_utils::mac_from_string(bridge_info.mac));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still have to add a LocalInterfaceInfo field for each wireless interface. I'll refactor this code when I had the full picture. Promise.
@mariomaz What's the status of this PR? Can it be merged soon? |
8acd78b
to
eb992df
Compare
I have addressed requested changes, rebased onto master and changed the state to "Ready for review". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One bug, one important comment about the disappearing todos, but everything can be fixed up easily, so approving already.
eb992df
to
dcdb761
Compare
The nested type in `tlvDeviceInformation` was written as struct. This was done when TLVF didn't support nested classes yet. However, it must be a class since it has dynamically-sized content. Convert struct to class and change its name accordingly. Rename fields that do not match with those defined in the IEEE 1905 standard. Rename fields which type and purpose is not clear enough. Change type of media_info field from eMediaType to array of uint8_t since it is a variable length array which length media_info_length and contents depend on the value of media_type field. Signed-off-by: Mario Maz <[email protected]>
Signed-off-by: Mario Maz <[email protected]>
…name Signed-off-by: Mario Maz <[email protected]>
Ethernet interface speed is required to compute the MediaType field in different TLVs. It is also required to compute the PHY rate when collecting link metrics. Signed-off-by: Mario Maz <[email protected]>
Signed-off-by: Mario Maz <[email protected]>
2d4db46
to
6d6ec35
Compare
[TASK] Add Device Information TLV to Topology Response message #700