-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support parameterized messages in PyRFLX
ref #743
- Loading branch information
Showing
5 changed files
with
104 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package Parameterized is | ||
|
||
type Length is range 0 .. 2**16 - 1 with Size => 16; | ||
type Tag is (Tag_A, Tag_B) with Size => 8; | ||
|
||
type Message (Length : Length; Has_Tag : Boolean; Tag_Value : Tag) is | ||
message | ||
Payload : Opaque | ||
with Size => Length * 8 | ||
then Tag | ||
if Has_Tag = True | ||
then null | ||
if Has_Tag = False; | ||
Tag : Tag | ||
then null | ||
if Tag = Tag_Value; | ||
end message; | ||
|
||
end Parameterized; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters