Note
Go to the end to download the full example code.
Client#
Showcases the life-cycle of an Aseba client.
1. Create the client#
2. Connect one or more Aseba networks#
connection = client.connect("udp:")
connection
1
Connections are positive integers that index connected Dashel targets.
{1: 'udp:port=5000;address=0.0.0.0;sock=-1'}
3. Interact with the network[s]#
See the other examples.
4. Clean up#
Once done, either close the connections one by one:
client.close_connection(connection)
or close the client directly, which in turn closes all connections.
{}
Hint
The client will automatically shutdown when it is deleted. Therefore, cleaning up is not strictly needed unless you want to release resources before the client is deleted, which would happen the latest when the script exits.
Total running time of the script: (0 minutes 1.860 seconds)