A Python Multicast Client
Project description
Blackboard
Interface
Constructor
Blackboard(addr=MCAST_GRP, port=MCAST_PORT, read_size=READ_SIZE, TTL=MULTICAST_TTL)
addr
: This is the network address to connect to. It must be an unreserved, available network block that supports the Multicasting protocol. It will default to244.1.1.1
.port
: This is the port on the network address the Blackboard will connect to. It will default to5007
.read_size
: This will specify the standard read size when getting data from the network address. It will default to256
bytes.TTL
: This is the number of times the signal will propagate through the network before being cut off. It will default to32
.
Methods
write_json(channel, data)
: This will write the specified data to the specified channel. The channel can be any arbitrary string.get(channel)
: This will return the most recent piece of data received on a specified channel.register_callback(channel, f)
: This will add a callback function that will be called when a specific channel gets data. The callback must be a function that gets a single argument of the data from the channel.is_open()
: This function will returnTrue
if the Blackboard is connected to the network, andFalse
otherwise.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Blackboard-0.1.0.tar.gz
(1.5 kB
view hashes)
Built Distribution
Close
Hashes for Blackboard-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdc20a9173de1627b0092d2c75eea9aea14eded94ae778e47015d155abf8f058 |
|
MD5 | 137da4ca54f88ff9d1721afe1c8be96c |
|
BLAKE2b-256 | 7b74c345c66af444fa2cfc760ca518c4c95c5e256014c16ee461efab910e3164 |