Is there a way to create auto-generated C/C++ code?

Dear Team,

I would like to know whether C/C++ source code could be auto-generated based on yang file using confdc like creating C header file using “confdc --emit-h dhcpd.h dhcpd.yang”.
If not using confdc, then any other command will help to create auto-generated code.

Confd version : confd-basic-5.4

Thanks in advance for your guidance.

confdc doesn’t have an option to auto generate C code or other types of code.
The reason being is because code design is highly tied to each user’s preference.

There is a way you can write a plugin to pyang (an open source YANG parser) that would allow you to generate code that will fit better for your system.

pyang can be found here: https://github.com/mbj4668/pyang

But it also comes with the ConfD distribution. man pyang will give you some more details.