diff --git a/.gitignore b/.gitignore index ec99986..c5fe551 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,8 @@ .LSOverride # Icon must end with two \r -Icon +Icon + # Thumbnails ._* @@ -80,3 +81,6 @@ compile_commands.json CTestTestfile.cmake _deps +# ---> Custom +Asset/Classes.txt + diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d718cf0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Swift-MessageUtils"] + path = Swift-MessageUtils + url = https://repositories.communitynotfound.work/PoliBa-Software-Architecture/Swift-MessageUtils.git diff --git a/Asset/MessageBytes.md b/Asset/MessageBytes.md new file mode 100644 index 0000000..f003520 --- /dev/null +++ b/Asset/MessageBytes.md @@ -0,0 +1,52 @@ +# Message Structure +``` ++-+ 64 - bits---+----------------+-------------+----------------+-----------------------+ +|0| Version 7 | Message Type 8 | Dev Type 8 | RESERVED 8 | Sign Type 32 | ++-+-------------+----------------+-------------+----------------+-----------------------+ +| Timestamp 64 | ++---------------------------------------------------------------------------------------+ +| DevID 128 bits | +| | ++---------------------------------------------------------------------------------------+ +| Location 192 bits | +| | +| | ++---------------------------------------------------------------------------------------+ +\ / + | Fields -----------------------------------------------------------------------------| +/ \ ++---------------------------------------------------------------------------------------+ +| 0 Padding 64 - n | ++---------------------------------------------------------------------------------------+ +| Signature up to-512 bits | +| | +| | +| | +| | +| | +| | +| | ++---------------------------------------------------------------------------------------+ +``` + +# Fields +each field can be at most 8 * 2^32 bits of length: +- 34359738368 bits +- 4294967296 Bytes + +## Key +**MUST** be a `String` + +## Value +It's up to the Application to decide whether the value is +a string or another type of datum + +``` ++-- 64 - bits--------------------------+----------------------------------------+ +| Key-Length 32 | Value-Length 32 | ++--------------------------------------+----------------------------------------+ +\ Key / + |-----------------------------------------------------------------------------| +/ Value \ ++-------------------------------------------------------------------------------+ +``` \ No newline at end of file diff --git a/Swift-MessageUtils b/Swift-MessageUtils new file mode 160000 index 0000000..8ae5892 --- /dev/null +++ b/Swift-MessageUtils @@ -0,0 +1 @@ +Subproject commit 8ae58929b01bf0b1a4a8c31b81dbbf18a3876feb