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

Uploaded Source

Built Distribution

swarmnet-0.0.5-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: swarmnet-0.0.5.tar.gz
  • Upload date:
  • Size: 18.8 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.5.tar.gz
Algorithm Hash digest
SHA256 4a57851c58ff283f13836bd0febb985cef5df21d064fd38101b52fe08e41f268
MD5 2d525704d0eb220f88d8dd6f08e59c4b
BLAKE2b-256 09a57e2c84574a9feaeaf16567c246bb6a166d7eb85dcbbb3b9b7114ab847e69

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmnet-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 20.1 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 727d2ee4ed918e724e68b8a353341cb2bbae50e0764133e8d099f292f201029c
MD5 a450ef863b70fc8b272e552bedda3a76
BLAKE2b-256 0956cc6e91638eee86e734d642940cbd6c3402e6fff376561e2ee8cc1c702187

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