Skip to main content

A gossip-based swarm communication library

Project description

SwarmNet

A robust communications library for robot swarms. This is based on gossip protocols where the message will propagate around the swarm. When an agent receives a message it has not seen before, it will broadcast it to all other members of the swarm.

Usage

A SwarmNet object must be created that handles all of the communication. Only one instance should be created. To start the communication framework, the start() method must be run.

All devices must use the same port number

This start() command will broadcast a JOIN command to register with the rest of the swarm.

Message Format

All messages follow the format: <CMD> <DATA1> <DATA2> ...

A dictionary that maps command tokens to functions is passed to the SwarmNet constructor. The signature of this map is Dict[str, Callable[[Optional[str]], None]] where the str passed to the parser function is the rest of the message string (if any)

Internally, every message is prefixed with an identifier that is not overwritten when the message is forwarded by receivers. This means agents will not parse their own message or parse the same message more than once.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmnet-0.0.1.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

swarmnet-0.0.1-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file swarmnet-0.0.1.tar.gz.

File metadata

  • Download URL: swarmnet-0.0.1.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for swarmnet-0.0.1.tar.gz
Algorithm Hash digest
SHA256 54362a6712c6c755d8f474dfab1169ccdb4ad7da9c159df45524a70fc080acc4
MD5 7dcaa951ef44a82b4561955ebc7ae8e1
BLAKE2b-256 eb424dfac9b00588725cf4a7340bade491d0b76715a6b4048479210966fdbc6f

See more details on using hashes here.

File details

Details for the file swarmnet-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: swarmnet-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for swarmnet-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 33cb8afda0d1ff8aec102b6cf87527dd1beb631d2f5c6b8c31607efcfa3e7eb9
MD5 8090bb5e4781ed0d59ea7f84a4ae8c94
BLAKE2b-256 d8ea8e14e038db6df431b7781a11f8b08bd83911cf9cfb584089a37afef8cf83

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page