Commit 6b8dd1d
committed
Add FlatBuffers support for Category 4 messages (Both Payload and Forwarding)
Implements FlatBuffers serialization/deserialization for 5 Category 4 messages:
- ERROR (8)
- CALL (48)
- RESULT (50)
- INVOCATION (68)
- YIELD (70)
## Changes:
**autobahn/wamp/message.py:**
- Added Message union wrapper to build() methods for all 5 Category 4 messages
- Updated cast() methods to use wrapper classes instead of Gen classes
- Fixed Error callee properties (callee, callee_authid, callee_authrole) to not access non-existent FlatBuffers fields
- Made Call.__init__() request and procedure parameters optional for FlatBuffers deserialization
- Added conditional assertions in Call.__init__() to skip validation when deserializing from FlatBuffers
**autobahn/wamp/message_fbs.py:**
- Added custom wrapper classes for Error, Call, Result, Invocation, Yield with *AsBytes() methods
- Wrapper classes provide zero-copy memory access to args, kwargs, payload, and enc_key
- Updated __all__ exports to include wrapper classes
**autobahn/wamp/serializer.py:**
- Updated MESSAGE_TYPE_MAP to use wrapper classes for all Category 4 messages
**examples/serdes/gen_flatbuffers_testvectors.py:**
- Fixed Invocation test vector generation (registration_id instead of registration)
**wamp-proto submodule:**
- Updated to commit 713b51b with Category 4 test vectors
- Bumped .ai submodule to latest wamp-ai (7219c81) with improved git hooks
## Test Results:
511 passed, 18 skipped, 0 failures
All Category 4 messages now support complete FlatBuffers serialization/deserialization with proper test coverage.
Note: This work was completed with AI assistance (Claude Code).1 parent 8010031 commit 6b8dd1d
File tree
5 files changed
+292
-26
lines changed- autobahn/wamp
- examples/serdes
5 files changed
+292
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3056 | 3056 | | |
3057 | 3057 | | |
3058 | 3058 | | |
3059 | | - | |
3060 | | - | |
3061 | | - | |
3062 | | - | |
| 3059 | + | |
3063 | 3060 | | |
3064 | 3061 | | |
3065 | 3062 | | |
| |||
3069 | 3066 | | |
3070 | 3067 | | |
3071 | 3068 | | |
3072 | | - | |
3073 | | - | |
3074 | | - | |
3075 | | - | |
| 3069 | + | |
3076 | 3070 | | |
3077 | 3071 | | |
3078 | 3072 | | |
| |||
3082 | 3076 | | |
3083 | 3077 | | |
3084 | 3078 | | |
3085 | | - | |
3086 | | - | |
3087 | | - | |
3088 | | - | |
| 3079 | + | |
3089 | 3080 | | |
3090 | 3081 | | |
3091 | 3082 | | |
| |||
3187 | 3178 | | |
3188 | 3179 | | |
3189 | 3180 | | |
3190 | | - | |
| 3181 | + | |
| 3182 | + | |
| 3183 | + | |
| 3184 | + | |
| 3185 | + | |
| 3186 | + | |
| 3187 | + | |
| 3188 | + | |
3191 | 3189 | | |
3192 | 3190 | | |
3193 | 3191 | | |
| |||
6291 | 6289 | | |
6292 | 6290 | | |
6293 | 6291 | | |
6294 | | - | |
6295 | | - | |
| 6292 | + | |
| 6293 | + | |
6296 | 6294 | | |
6297 | 6295 | | |
6298 | 6296 | | |
| |||
6361 | 6359 | | |
6362 | 6360 | | |
6363 | 6361 | | |
6364 | | - | |
6365 | | - | |
| 6362 | + | |
| 6363 | + | |
| 6364 | + | |
6366 | 6365 | | |
6367 | 6366 | | |
6368 | 6367 | | |
| |||
6642 | 6641 | | |
6643 | 6642 | | |
6644 | 6643 | | |
6645 | | - | |
6646 | | - | |
6647 | 6644 | | |
6648 | 6645 | | |
6649 | 6646 | | |
| |||
6676 | 6673 | | |
6677 | 6674 | | |
6678 | 6675 | | |
6679 | | - | |
| 6676 | + | |
| 6677 | + | |
| 6678 | + | |
| 6679 | + | |
| 6680 | + | |
| 6681 | + | |
| 6682 | + | |
| 6683 | + | |
6680 | 6684 | | |
6681 | 6685 | | |
6682 | 6686 | | |
| |||
7470 | 7474 | | |
7471 | 7475 | | |
7472 | 7476 | | |
7473 | | - | |
| 7477 | + | |
| 7478 | + | |
| 7479 | + | |
| 7480 | + | |
| 7481 | + | |
| 7482 | + | |
| 7483 | + | |
| 7484 | + | |
7474 | 7485 | | |
7475 | 7486 | | |
7476 | 7487 | | |
| |||
9031 | 9042 | | |
9032 | 9043 | | |
9033 | 9044 | | |
9034 | | - | |
| 9045 | + | |
| 9046 | + | |
| 9047 | + | |
| 9048 | + | |
| 9049 | + | |
| 9050 | + | |
| 9051 | + | |
| 9052 | + | |
9035 | 9053 | | |
9036 | 9054 | | |
9037 | 9055 | | |
| |||
9888 | 9906 | | |
9889 | 9907 | | |
9890 | 9908 | | |
9891 | | - | |
| 9909 | + | |
| 9910 | + | |
| 9911 | + | |
| 9912 | + | |
| 9913 | + | |
| 9914 | + | |
| 9915 | + | |
| 9916 | + | |
9892 | 9917 | | |
9893 | 9918 | | |
9894 | 9919 | | |
| |||
0 commit comments