-
Couldn't load subscription status.
- Fork 547
Support OTN attenuator and amplifier #2217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
jjin62
commented
Oct 9, 2025
- Add a new precision attribute flag for optical analog values (e.g., gain, tilt, power), instead of using double/float point type which would introduce NaN issue.
- Add support for optical attenuator in experimental extensions, derived from openconfig-optical-attenuator.yang.
- Add support for optical amplifier in experimental extensions, derived from openconfig-optical-amplifier.yang.
|
|
Commenter does not have sufficient privileges for PR 2217 in repo opencomputeproject/SAI |
meta/parse.pl
Outdated
| return 0 unless defined $precision; | ||
|
|
||
| # Must be an integer >= 0 | ||
| if ($precision =~ /^\d+$/) { |
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.
{ to new line, and add empty libe before return same in line 434
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.
done.
| WriteSource ".iscustom = ($attr >= 0x10000000) && ($attr < 0x20000000),"; | ||
| WriteSource ".apiversion = $apiversion,"; | ||
| WriteSource ".nextrelease = $nextrelease,"; | ||
| WriteSource ".valueprecision = $precision,"; |
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.
there should be test in saisanitycheck.c for that value if it's in reasonable range, like 0..18 etc since you can put number like 23423542542 and it will be cast as int, truncated, to some absurd value which will make no sense
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.
1. Add a new precision attribute flag for optical analog values (e.g., gain, tilt, power), instead of using double/float point type which would introduce NaN issue. 2. Add support for optical attenuator in experimental extensions, derived from openconfig-optical-attenuator.yang. 3. Add support for optical amplifier in experimental extensions, derived from openconfig-optical-amplifier.yang. Signed-off-by: Lu.Mao <[email protected]>
