Skip to content

ynl-gen-cpp: add support for generating rt-link #8

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

zb-gong
Copy link
Contributor

@zb-gong zb-gong commented Aug 11, 2025

This PR adds code generation support for rt-link, with most of the logic ported from ynl_gen_c.py. The main feature introduced is sub-message handling, along with fixes for several minor formatting issues.

Better format for C++ lambda: a space between return type and function body.

Signed-off-by: Zibo Gong <[email protected]>
rt- family can contain - in its family name. It should be correct to use c_name.

Signed-off-by: Zibo Gong <[email protected]>
The patch fixes an issue in the determination of type_consistent. It used to set type_consistent to be False when dump exists but do does not exist.
This is inaccurate and will lead to exceptions. This case should be treated as consistent but one-sided.

Signed-off-by: Zibo Gong <[email protected]>
op attribute lists are referenced without checking if they are present.
Attibute list can be a optional property so this patch add them initially
if missing.

Signed-off-by: Zibo Gong <[email protected]>
rt-link spec has multi binary attribute with struct.
This patch adds support for that.

Signed-off-by: Zibo Gong <[email protected]>
@zb-gong zb-gong force-pushed the rt_family branch 4 times, most recently from 15b479c to 6a5134b Compare August 11, 2025 20:05
IPv6 are expressed as binary with exact len. This patch adds support for that.

Signed-off-by: Zibo Gong <[email protected]>
rt-link operation can have its fixed header, which may not be the
same as the the family one.

Signed-off-by: Zibo Gong <[email protected]>
The notification op should use crud-style op when it is classic
netlink-raw family.

Signed-off-by: Zibo Gong <[email protected]>
The patch adds header specified in attribute-set.

Signed-off-by: Zibo Gong <[email protected]>
A operation can have multiple values with random order. The value of max_num
in array should use the max value after traversing the ops.

Signed-off-by: Zibo Gong <[email protected]>
Prepare for construting Struct that represent sub messages.

Signed-off-by: Zibo Gong <[email protected]>
This patch enables generation for rt-link and adds a simple application test in samples/.

Signed-off-by: Zibo Gong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant