-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for union types #1
Labels
enhancement
New feature or request
Comments
Implemented support for Wire-encoding is not supported as there is no way in Julia currently to enumerate union component types in a documented way. Undocumented ways exist, but are likely to break with Julia versions. It is better for users to explicitly define the header type field to avoid this risk. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently PDUs cannot contain union types, where a field may contain different types of nested PDUs depending on the value of another field. This is a common use case in many protocols, and so we should support it.
Support could be added by allowing a declaration of
fieldtype(...)
for a PDU field, similar to what we do forlength(...)
. The function will return a field type based on inspecting the PDU. If it returnsnothing
, we wire-encode a field type in the PDU, otherwise we use the returned type to correctly decode the PDU.The text was updated successfully, but these errors were encountered: