diff --git a/pyRF24Mesh/pyRF24Mesh.cpp b/pyRF24Mesh/pyRF24Mesh.cpp index e0e65c1..a507684 100644 --- a/pyRF24Mesh/pyRF24Mesh.cpp +++ b/pyRF24Mesh/pyRF24Mesh.cpp @@ -65,7 +65,14 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(renewAddress_overload, RF24Mesh::renewAdd // ******************** RF24Mesh exposed ************************** BOOST_PYTHON_MODULE(RF24Mesh) { - { //::RF24Mesh + { + + // ::RF24Mesh::addrListStruct + bp::class_("addrListStruct", bp::init<>()) + .def_readonly("nodeID", &RF24Mesh::addrListStruct::nodeID) + .def_readwrite("address", &RF24Mesh::addrListStruct::address); + + //::RF24Mesh bp::class_("RF24Mesh", bp::init((bp::arg("_radio"), bp::arg("_network")))) //bool begin(uint8_t channel = MESH_DEFAULT_CHANNEL, rf24_datarate_e data_rate = RF24_1MBPS, uint32_t timeout=MESH_RENEWAL_TIMEOUT ); .def("begin", &RF24Mesh::begin, begin_overload(bp::args("channel", "data_rate", "timeout"))) @@ -106,6 +113,8 @@ BOOST_PYTHON_MODULE(RF24Mesh) .def("loadDHCP", &RF24Mesh::loadDHCP) // mesh_address .def_readwrite("mesh_address", &RF24Mesh::mesh_address) + .def_readonly("addrListTop", &RF24Mesh::addrListTop) + .def_readonly("addrList", &RF24Mesh::addrList) //void setStaticAddress(uint8_t nodeID, uint16_t address); .def("setStaticAddress", &RF24Mesh::setStaticAddress, (bp::arg("nodeID"), bp::arg("address"))); }