Commit Graph

208 Commits

Author SHA1 Message Date
Tristan B. Velloza Kildaire d3ffdd46db Packet
- Added `setType(MessageType)` which sets the messagr type
- The `type` field is no longer a `ubyte` but rather a `MessageType`

Packet (unit tests)

- Test the encoding of the type field

Types

- Added new module
- Added `MessageType` enum
2023-09-12 10:48:01 +02:00
Tristan B. Velloza Kildaire 8e8d1d2ba1 Packet (unit tests)
- Added a unit test which tests the encoding
- So far it just checks that the version is encoded correctly
2023-09-12 10:33:11 +02:00
Tristan B. Velloza Kildaire 3a3febc61e Packet
- `getByte()` now tacks on the calculated first byte
- `getBytes()` encodes the rquest/response code now as well
2023-09-11 22:26:29 +02:00
Tristan B. Velloza Kildaire d6a9f7d329 Packet
- Defined `CoapPacket` to represent a CoAP packet
- Added the required fields
- Constructor sets the version to `1` (the only version available)
- `getBytes()` no encodes the first byte of the CoAP header (versio, type and token length)
2023-09-11 22:18:19 +02:00
Tristan B. Velloza Kildaire ec4f57af5d Codes
- Added the codes for messages
- These are 8-bits
2023-09-11 21:39:31 +02:00
Tristan B. Velloza Kildaire d9a6eb3280 - Fixed `.gitignore` 2023-09-11 21:37:05 +02:00
Tristan B. Velloza Kildaire c3e29c41d0 Dub
- Added dub package descriptor
- Set `"targetType"` to `"library"`
2023-09-11 21:36:19 +02:00
Tristan B. Velloza Kildaire 718ef2833e - Added `.gitignore` 2023-09-11 21:35:18 +02:00