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.3.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

swarmnet-0.0.3-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for swarmnet-0.0.3.tar.gz
Algorithm Hash digest
SHA256 836208144518281a5e3749bc321fa5306883db1f8be58fe5ac09a6271d0f48ad
MD5 0c59315fa4f2205611e92d06ca873f39
BLAKE2b-256 9a39fa8b3740e397a7829d02285c0e55fad364a2bab25b456d691d56766240a5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for swarmnet-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0d84179fb32eed0dbc68a44093d51a212089a67f39026b24f9c44237b28fc614
MD5 3c56e47a9c82fe02280e6671a0a873e0
BLAKE2b-256 89036ef35aa836879dc041aa5f4d4639c3eeb0f4b63e6de4111ad4f173d83cd5

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