diff options
author | Matej Perina <mperina@cisco.com> | 2017-09-11 10:11:51 +0200 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2017-10-10 16:44:03 +0000 |
commit | ac1a7286500c18ac51beb66e4a2b99ea26c8c966 (patch) | |
tree | 62a4a0430bd0d5623c5e9945ca5bf671745351f9 /src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py | |
parent | d91c1dbdb31f80db7d967f2f57c43d0a81d65297 (diff) |
jvpp: adding callbacks for all messages (VPP-914)
1) In the previous version callbacks were generated based on
request-replay naming conventions. It turned out they were too
strict in case of events (e.g. BFD sends Details messages as
notifications). So now we generate callback for all messages,
allowing to receive any message as notification.(callback_gen.py)
2) "notification" suffix is no longer added because all messages
are treated same (dto_gen.py, jvpp_c_gen_.py)
3) name of property that holds notification/events changed in callback
facade and future apis
4) JVppNotification.java is no longer used since all events are treated
equally
Change-Id: I13f6438affc3473040d63cd4acb3984d03e97482
Signed-off-by: Matej <matej.perina@pantheon.tech>
Diffstat (limited to 'src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py')
-rw-r--r-- | src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py index 4fe7ab53fb9..e2f6aa4d505 100644 --- a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py +++ b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py @@ -70,23 +70,13 @@ def generate_class_cache(func_list, plugin_name): if util.is_ignored(c_name) or util.is_control_ping(class_name): continue - if util.is_reply(class_name): - class_references.append(class_reference_template.substitute( - ref_name=ref_name)) - find_class_invocations.append(find_class_invocation_template.substitute( - plugin_name=plugin_name, - ref_name=ref_name, - class_name=class_name)) - delete_class_invocations.append(delete_class_invocation_template.substitute(ref_name=ref_name)) - elif util.is_notification(c_name): - class_references.append(class_reference_template.substitute( - ref_name=util.add_notification_suffix(ref_name))) - find_class_invocations.append(find_class_invocation_template.substitute( - plugin_name=plugin_name, - ref_name=util.add_notification_suffix(ref_name), - class_name=util.add_notification_suffix(class_name))) - delete_class_invocations.append(delete_class_invocation_template.substitute( - ref_name=util.add_notification_suffix(ref_name))) + class_references.append(class_reference_template.substitute( + ref_name=ref_name)) + find_class_invocations.append(find_class_invocation_template.substitute( + plugin_name=plugin_name, + ref_name=ref_name, + class_name=class_name)) + delete_class_invocations.append(delete_class_invocation_template.substitute(ref_name=ref_name)) # add exception class to class cache ref_name = 'callbackException' @@ -270,10 +260,6 @@ def generate_msg_handlers(func_list, plugin_name, inputfile): if not util.is_reply(dto_name) and not util.is_notification(handler_name): continue - if util.is_notification(handler_name): - dto_name = util.add_notification_suffix(dto_name) - ref_name = util.add_notification_suffix(ref_name) - dto_setters = '' err_handler = '' # dto setters |