V0.6.9 Arroyo Toad

Removed submodule as it needs special configurations before imports
This commit is contained in:
Christian Risi 2024-12-09 11:34:37 +00:00
parent 6940ad2b06
commit eb8e3639bb
5 changed files with 57 additions and 5 deletions

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "Sources/DataAcquisition"]
path = Sources/DataAcquisition
url = https://repositories.communitynotfound.work/PoliBa-Software-Architecture/embeddedLibrary.git

View File

@ -1,5 +1,5 @@
public class Field {
public class Field : Codable{
public let key: String
public let value: String

View File

@ -0,0 +1,54 @@
# Message Structure
```
+-- 64 - bits---+----------------+-------------+----------------+-----------------------+
| Version 8 | Message Type 8 | Dev Type 8 | RESERVED 8 | Sign Type 32 |
+---------------+----------------+-------------+----------------+-----------------------+
| Timestamp 64 |
+---------------------------------------------------------------------------------------+
| DevID 128 bits |
| |
+---------------------------------------------------------------------------------------+
| Location 192 bits |
| |
| |
+---------------------------------------------------------------------------------------+
\ /
| Fields -----------------------------------------------------------------------------|
/ \
+---------------------------------------------------------------------------------------+
| 0 Padding 64 - n |
+---------------------------------------------------------------------------------------+
| 0 FIELD STOP 64 |
+---------------------------------------------------------------------------------------+
| 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 \
+-------------------------------------------------------------------------------+
```

View File

@ -2,6 +2,7 @@ import Crypto // Equivalent to CryptoKit (more or less)
import Foundation
// ------------------
// --- Sign ---------
// ------------------

View File

@ -66,7 +66,7 @@ import Testing
@Test func stressLoop1() async throws {
let devices: Int = 5000
let devices: Int = 1000
let env = PhysicalEnvironment("Delta")
let truth = PhysicalData(.Temperature, 22)