Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Jul 5, 2024
1 parent 9e5d916 commit fc36cd5
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions src/pyRF24Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,40 +282,48 @@ void init_rf24mesh(py::module& m)
// *****************************************************************************

.def("release_address", static_cast<bool (RF24MeshWrapper::*)()>(&RF24MeshWrapper::releaseAddress), R"docstr(
release_address() -> bool
release_address() -> bool \
release_address(address: int) -> bool
Use this function to manually expire a leased `Logical Address <logical_address>` from the mesh network's master node.
Use this function from a child node (without a parameter) to manually expire a leased `Logical Address <logical_address>`
from the mesh network's master node.
.. tip:: This function allows re-use of the assigned address for other mesh network nodes.
Call this function from mesh network nodes that are going offline (or to sleep).
:Returns: `True` if the mesh network's master node received the request to de-allocate
the assigned address. `False` means the wireless transaction did not complete.
:Returns:
- `True` if the mesh network's master node received the request to de-allocate
the assigned address.
- `False` means the wireless transaction did not complete.
)docstr")

.def("releaseAddress", static_cast<bool (RF24MeshWrapper::*)()>(&RF24MeshWrapper::releaseAddress), R"docstr(
releaseAddress() -> bool
)docstr")

// *****************************************************************************
// *****************************************************************************
#ifndef MESH_NOMASTER

.def("release_address", static_cast<bool (RF24MeshWrapper::*)(uint16_t)>(&RF24MeshWrapper::releaseAddress), R"docstr(
release_address(address: int) -> bool
When called from the master node, this function takes a parameter and returns
without using wireless transactions.
Releases the specified address if leased to a mesh node's ID.
This is specific to master nodes, so network administrators can
manage assigned addresses without notifying the nodes that
might be appropriating them.
:param address: The address to release from any mesh node.
:Returns: True if successfully released, otherwise false.
)docstr")
.. hint::
This overloaded function signature is specific to master nodes,
so network administrators can manage assigned `Logical Addresses <logical_address>`
without notifying the nodes that might be appropriating them.
:param address: The `Logical Address <logical_address>` to release from any mesh node.
:Returns:
- `True` if successfully released the specified ``address``.
- `False` if the specified ``address`` was not assigned to any child node.
)docstr",
py::arg("address"))

.def("releaseAddress", static_cast<bool (RF24MeshWrapper::*)(uint16_t)>(&RF24MeshWrapper::releaseAddress), R"docstr(
releaseAddress(address: int) -> bool
)docstr")
)docstr",
py::arg("address"))

#endif
// *****************************************************************************
Expand Down

0 comments on commit fc36cd5

Please sign in to comment.