2024-08-02 04:27:56 +00:00
|
|
|
<a id="base-primary-filtering-functionality"></a>
|
|
|
|
|
|
|
|
# base: Primary filtering functionality
|
2024-07-29 03:47:27 +00:00
|
|
|
|
|
|
|
### *class* Sponge.base.Filter(cache, onodeID, todo, cLog)
|
|
|
|
|
2024-08-01 01:00:46 +00:00
|
|
|
Packet filtering orchestration
|
|
|
|
|
2024-08-01 21:09:50 +00:00
|
|
|
[🔗 Source](https://git.utopic.work/PierMesh/piermesh/src/branch/main/Sponge/base.py)
|
|
|
|
|
2024-08-01 01:00:46 +00:00
|
|
|
cLog
|
|
|
|
: Reference to run.Node.cLog for logging
|
|
|
|
|
|
|
|
cache: Daisy.Cache.Cache
|
|
|
|
: Reference to our Daisy Cache instance
|
|
|
|
|
|
|
|
completed: list
|
|
|
|
: List of completed messages IDs
|
|
|
|
|
|
|
|
todo
|
|
|
|
: Reference to list of actions to do in the Node
|
|
|
|
|
|
|
|
onodeID
|
|
|
|
: PierMesh node ID
|
|
|
|
|
2024-07-29 03:47:27 +00:00
|
|
|
#### cache
|
|
|
|
|
|
|
|
Messages is temporary storage for unfinished messages
|
|
|
|
|
2024-08-01 01:00:46 +00:00
|
|
|
#### mCheck(payload: bytes)
|
|
|
|
|
|
|
|
Check if payload bytes are msgpack encoded, otherwise skip
|
|
|
|
|
|
|
|
#### *async* protoMap(protocolID: int)
|
|
|
|
|
|
|
|
Get protocol from protocol ID using the mlookup table
|
2024-07-29 03:47:27 +00:00
|
|
|
|
2024-08-01 01:00:46 +00:00
|
|
|
#### *async* protoRoute(completeMessage: dict)
|
|
|
|
|
|
|
|
Route message to proper protocol handler
|
|
|
|
|
|
|
|
#### selfCheck(packet)
|
|
|
|
|
|
|
|
Check if this is a self packet, if so skip
|
|
|
|
|
|
|
|
#### *async* sieve(packet)
|
|
|
|
|
|
|
|
Base filtering logic, takes a single MeshTastic packet
|
2024-07-29 03:47:27 +00:00
|
|
|
|
2024-08-02 04:27:56 +00:00
|
|
|
<a id="protocols"></a>
|
|
|
|
|
|
|
|
# Protocols
|
|
|
|
|
2024-08-01 21:09:50 +00:00
|
|
|
#### *async* bubble.filter(recipient, recipientNode, onodeID, todo)
|
2024-07-29 03:47:27 +00:00
|
|
|
|
2024-08-01 01:00:46 +00:00
|
|
|
Peer to peer protol
|
|
|
|
|
2024-08-01 22:03:59 +00:00
|
|
|
[🔗 Source](https://git.utopic.work/PierMesh/piermesh/src/branch/main/src/Sponge/Protocols/bubble.py)
|
2024-08-01 21:09:50 +00:00
|
|
|
|
|
|
|
#### *async* catch.filter(recipient, recipientNode, todo)
|
2024-07-29 03:47:27 +00:00
|
|
|
|
2024-08-01 01:00:46 +00:00
|
|
|
Catch exchange protocol
|
|
|
|
|
2024-08-01 22:03:59 +00:00
|
|
|
[🔗 Source](https://git.utopic.work/PierMesh/piermesh/src/branch/main/Sponge/Protocols/catch.py)
|
2024-08-01 21:09:50 +00:00
|
|
|
|
|
|
|
#### *async* cryptography.filter(recipientNode, todo)
|
2024-07-29 03:47:27 +00:00
|
|
|
|
2024-08-01 01:00:46 +00:00
|
|
|
Cryptographic operations protocol
|
|
|
|
|
2024-08-01 22:03:59 +00:00
|
|
|
[🔗 Source](https://git.utopic.work/PierMesh/piermesh/src/branch/main/Sponge/Protocols/cryptography.py)
|
2024-08-01 21:09:50 +00:00
|
|
|
|
|
|
|
#### *async* map.filter(todo)
|
2024-08-01 01:00:46 +00:00
|
|
|
|
|
|
|
Network mapping protocol
|
2024-08-01 21:09:50 +00:00
|
|
|
|
|
|
|
[🔗 Source](https://git.utopic.work/PierMesh/piermesh/src/branch/main/Sponge/Protocols/map.py)
|