Hydronet WMM API
Project description
Hydronet API
Summary: This API is for use with a Hydronet WMM API implementing the most recent version of the HydroMesh library.
To import the hydronet library:
from hydronet import wmm
To establish connection to a modem with an Ethernet interface IP of (xx.xx.xx.xx):
modem = wmm.wmm(<ipaddr>,<BufferSize>,<Port>)
In order to send data from an underwater node to a internet endpoint, the network must be made aware of the endpoint either by an edge node or an underwater node. To introduce a new internet UDP endpoint (at :) to the mesh network from an underwater application (where is an alias for the internet endpoint understood by HydroMesh):
<dest> = modem.establish_connection(<ipaddr>, port>)
The destination field is a one byte value representing an endpoint. The range of valid destinations are as follows:
- 0x00 : Reserved
- 0x01-0x3F : UW endpoints
- 0x40-0xFE : Alias destinations
- 0xFF : Reserved
Send data to a destination:
modem.send(<data>,<destination>)
Receive data from the LAN modem:
<data>,<addr>,<src> = modem.recv(self, <cut_header>=True)
The (source) field is of the same type as the destination, and can therefore be used as a destination for further communication.
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
Built Distribution
Hashes for hydronetapi-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d831020e0e4701168a585b42424418b2ebe1888c4c909a6e178a7de33da6b69 |
|
MD5 | 2fd118aa76907a3e8fac8f4dcedfde11 |
|
BLAKE2b-256 | 2dfbd31f58f070a71679afce1b5f1a7c207a66bd846f0f6a5049fa63611b8a6b |