For SNMP MIB yang(non-configuration), I implemented both get_elem() and get_object() callbacks.
Only get_elem() is invoked by ConfD.
Even if get_elem() callback is not present, get_object() is not invoked and the following error is seen in the confd log.
There is no such restriction, ConfD will always invoke get_object() if it is registered and get_elem() is not (if both are registered, I believe the logic for SNMP will indeed always choose get_elem() since it’s actually preferable due to the way SNMP managers typically traverse tables).
But the error you see is very strange - it indicates that at the point of registration, you had a non-NULL value for confd_data_cbs.get_elem, but at invocation, it is actually NULL. Is it possible that your application code modifies the struct after registration? confd_register_data_cb() saves a copy of the struct you pass in, but the copy it’s actually accessible for the application via confd_daemon_ctx.data_cbs if it disregards the “ConfD internal fields” comment in the declaration…