microsoft / nearobject-framework

Framework for interacting with short-range devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: nocli: --help output for mac addresses will only ever show the short-address description

corbin-phipps opened this issue · comments

Describe the bug
DeviceMacAddress and DestinationMacAddresses can have either 2-byte short addresses or 8-byte extended addresses. Currently, there are separate descriptions for each, with the correct description displayed based on MacAddressMode. However, because all options are displayed at the same time, the description only shows for the default value of MacAddressMode (2-bytes short address).

Expected behavior
Ideally, we would get the MacAddressMode first (if provided), then display the descriptions for the DeviceMacAddress and DestinationMacAddresses fields after, but I don't think that's possible. So instead, perhaps the description should be generalized, and then the value can be validated after all option parsing is completed.

Actual behavior
Descriptions for 2-byte short mac addresses are always displayed since that is the default MacAddressMode. It's currently impossible to make the descriptions for 8-byte extended addresses show in the --help nocli output (unless the default MacAddressMode is changed).