V0.6.9 Arroyo Toad
Removed submodule as it needs special configurations before imports
This commit is contained in:
parent
6940ad2b06
commit
eb8e3639bb
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +0,0 @@
|
|||||||
[submodule "Sources/DataAcquisition"]
|
|
||||||
path = Sources/DataAcquisition
|
|
||||||
url = https://repositories.communitynotfound.work/PoliBa-Software-Architecture/embeddedLibrary.git
|
|
||||||
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
public class Field {
|
public class Field : Codable{
|
||||||
|
|
||||||
public let key: String
|
public let key: String
|
||||||
public let value: String
|
public let value: String
|
||||||
|
|||||||
54
Sources/IoT-Simulator-Core/Utils/MessageBytes.md
Normal file
54
Sources/IoT-Simulator-Core/Utils/MessageBytes.md
Normal 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 \
|
||||||
|
+-------------------------------------------------------------------------------+
|
||||||
|
```
|
||||||
@ -2,6 +2,7 @@ import Crypto // Equivalent to CryptoKit (more or less)
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ------------------
|
// ------------------
|
||||||
// --- Sign ---------
|
// --- Sign ---------
|
||||||
// ------------------
|
// ------------------
|
||||||
|
|||||||
@ -66,7 +66,7 @@ import Testing
|
|||||||
|
|
||||||
@Test func stressLoop1() async throws {
|
@Test func stressLoop1() async throws {
|
||||||
|
|
||||||
let devices: Int = 5000
|
let devices: Int = 1000
|
||||||
|
|
||||||
let env = PhysicalEnvironment("Delta")
|
let env = PhysicalEnvironment("Delta")
|
||||||
let truth = PhysicalData(.Temperature, 22)
|
let truth = PhysicalData(.Temperature, 22)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user