summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py
AgeCommit message (Collapse)AuthorFilesLines
2018-03-02jvpp: object model for jvpp generator (VPP-1184)Marek Gradzki1-389/+0
Introduces JSON parser which builds object model of Java API. Also rewrites JNI translation of typedefs to use per type translation functions instead of code inlining. Not covered: - integrate with vappigen plugin (VPP-1154) or vapi parser (VPP-1155) - use better templating engine (VPP-480) - improvements of generator structure (e.g. VPP-1186) Change-Id: I9e12d76c2f3c6ee041669f58e8a37917f656aa90 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-01-27jvpp: use Python's logging APIMarek Gradzki1-2/+2
Change-Id: Iec437e4672af1f0d1a24458afb977ba6fbeba4ed Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-12-09jvpp: do not hardcode event sufixes (VPP-940)Marek Gradzki1-8/+17
JVpp maps request messages with replies for Java API user convenience, e.g.: - do not polute send APIs with messages other than requests/dumps, - allow callback registration only for replies/details and events. Since there are no conventions for event message naming (https://wiki.fd.io/view/VPP/API_Concepts#API_Conventions), jvpp should not limit events to messages that end with 'event' or 'counters' suffix. Instead jvpp should treat all messages except for requests/dumps as potential events. Such behaviour was introduced on Java API level by https://gerrit.fd.io/r/#/c/8377/ in order support reusing details messages as events (e.g. BFD events). This patch goes one step forward by relaxing rules at jvpp generation level. Change-Id: I2a35e9eb2a288b2cf02d36ca95e6cb13e76e19e3 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-12-07jvpp: unify notification handlingMarek Gradzki1-1/+1
Since introduction of dedicated SW Interface Event, there is no need for special handling of messages that can be both requests and events. Change-Id: I76575e32c6d5b19e9a1ca953e5841d8ac3de4de7 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-12-07jvpp: remove special request<>reply mappingsMarek Gradzki1-10/+7
Since L2FibTable removal and introduction of dedicated SW Interface Event, special message handling code can be removed. The patch also fixes issues found by Intelij's code inspection tool. Change-Id: Ic4b2fd12ac30c7627f4cd6769716e4bb52ec0b10 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-10-10jvpp: adding callbacks for all messages (VPP-914)Matej Perina1-21/+7
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>
2017-10-03jvpp: added logs for sending and receiving event messages (VPP-982)Matej Perina1-0/+5
Change-Id: I47f9d12d934378f18c6f841b902af2a64ee7b187 Signed-off-by: Matej Perina <mperina@cisco.com>
2017-08-24jvpp: use (*env)->ExceptionClear before calling (*env)->ExceptionOccurredMarek Gradzki1-1/+4
Change-Id: I6cca455ead986cb8a507c84957a97a40b733b16c Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-14jvpp: ignore messages if callback method is missing (VPP-548)Marek Gradzki1-0/+8
Change-Id: I6a06dbcd8339bd6645a6b02ae70154aa0885dcf8 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-05-15jvpp: fix memory allocation for variable lenght messages (VPP-841)Marek Gradzki1-5/+18
Change-Id: I9a46125e3cf9815c08cf8cca17713ec6e9121eae Signed-off-by: Marek Gradzki <mgradzki@cisco.com> (cherry picked from commit 307cfd8eb14ff7df04316ffa56f2c2481d650d7e)
2017-01-27jvpp: utilize per-message CRCs (VPP-544)Marek Gradzki1-3/+28
Since messages ids are no longer statically referenced, fixes also VPP-611. Change-Id: Ic8e6ee2b7f1142c185595347984d69350be25ac3 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-01-01Move java,lua api and remaining plugins to src/Damjan Marion1-0/+343
Change-Id: I1c3b87e886603678368428ae56a6bd3327cbc90d Signed-off-by: Damjan Marion <damarion@cisco.com>