From ac9b216a75cfee7a840971bc0e331a04345f7c41 Mon Sep 17 00:00:00 2001 From: FedorSarafanov Date: Sat, 23 Apr 2022 20:25:46 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=20=D0=B4?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D1=83=D0=BF=20=D0=BA=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=8F=D0=BC=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B7=D0=B0=D0=BF=D0=B8=D1=81=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.cpp | 74 ++++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 472ed89..033e20a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -98,37 +98,37 @@ PYBIND11_MODULE(stormpci_bin_reader, m) { py::class_(m, "StormProcess_tSATELLITETYPE") .def(py::init<>()) - .def_readwrite("SVID", &StormProcess_tSATELLITETYPE::SVID) - .def_readwrite("mode", &StormProcess_tSATELLITETYPE::mode) - .def_readwrite("signal_strength", &StormProcess_tSATELLITETYPE::signal_strength) - .def_readwrite("channel_status", &StormProcess_tSATELLITETYPE::channel_status) + .def_readonly("SVID", &StormProcess_tSATELLITETYPE::SVID) + .def_readonly("mode", &StormProcess_tSATELLITETYPE::mode) + .def_readonly("signal_strength", &StormProcess_tSATELLITETYPE::signal_strength) + .def_readonly("channel_status", &StormProcess_tSATELLITETYPE::channel_status) ; py::class_(m, "StormProcess_tTIMESTAMPINFO") .def(py::init<>()) - .def_readwrite("TS_valid", &StormProcess_tTIMESTAMPINFO::TS_valid) - .def_readwrite("TS_Osc", &StormProcess_tTIMESTAMPINFO::TS_Osc) - .def_readwrite("TS_time", &StormProcess_tTIMESTAMPINFO::TS_time) - .def_readwrite("TS_10ms", &StormProcess_tTIMESTAMPINFO::TS_10ms) - .def_readwrite("capture_time", &StormProcess_tTIMESTAMPINFO::capture_time) - .def_readwrite("gps_data_valid", &StormProcess_tTIMESTAMPINFO::gps_data_valid) - .def_readwrite("month", &StormProcess_tTIMESTAMPINFO::month) - .def_readwrite("day", &StormProcess_tTIMESTAMPINFO::day) - .def_readwrite("year", &StormProcess_tTIMESTAMPINFO::year) - .def_readwrite("hours", &StormProcess_tTIMESTAMPINFO::hours) - .def_readwrite("minutes", &StormProcess_tTIMESTAMPINFO::minutes) - .def_readwrite("seconds", &StormProcess_tTIMESTAMPINFO::seconds) - .def_readwrite("latitude_mas", &StormProcess_tTIMESTAMPINFO::latitude_mas) - .def_readwrite("longitude_mas", &StormProcess_tTIMESTAMPINFO::longitude_mas) - .def_readwrite("latitude_ns", &StormProcess_tTIMESTAMPINFO::latitude_ns) - .def_readwrite("longitude_ew", &StormProcess_tTIMESTAMPINFO::longitude_ew) - .def_readwrite("height_cm", &StormProcess_tTIMESTAMPINFO::height_cm) - .def_readwrite("dop", &StormProcess_tTIMESTAMPINFO::dop) - .def_readwrite("satellites_visible", &StormProcess_tTIMESTAMPINFO::satellites_visible) - .def_readwrite("satellites_tracked", &StormProcess_tTIMESTAMPINFO::satellites_tracked) - .def_readwrite("receiver_status", &StormProcess_tTIMESTAMPINFO::receiver_status) - .def_readwrite("oscillator_temperature", &StormProcess_tTIMESTAMPINFO::oscillator_temperature) - .def_readwrite("serial_number", &StormProcess_tTIMESTAMPINFO::serial_number) + .def_readonly("TS_valid", &StormProcess_tTIMESTAMPINFO::TS_valid) + .def_readonly("TS_Osc", &StormProcess_tTIMESTAMPINFO::TS_Osc) + .def_readonly("TS_time", &StormProcess_tTIMESTAMPINFO::TS_time) + .def_readonly("TS_10ms", &StormProcess_tTIMESTAMPINFO::TS_10ms) + .def_readonly("capture_time", &StormProcess_tTIMESTAMPINFO::capture_time) + .def_readonly("gps_data_valid", &StormProcess_tTIMESTAMPINFO::gps_data_valid) + .def_readonly("month", &StormProcess_tTIMESTAMPINFO::month) + .def_readonly("day", &StormProcess_tTIMESTAMPINFO::day) + .def_readonly("year", &StormProcess_tTIMESTAMPINFO::year) + .def_readonly("hours", &StormProcess_tTIMESTAMPINFO::hours) + .def_readonly("minutes", &StormProcess_tTIMESTAMPINFO::minutes) + .def_readonly("seconds", &StormProcess_tTIMESTAMPINFO::seconds) + .def_readonly("latitude_mas", &StormProcess_tTIMESTAMPINFO::latitude_mas) + .def_readonly("longitude_mas", &StormProcess_tTIMESTAMPINFO::longitude_mas) + .def_readonly("latitude_ns", &StormProcess_tTIMESTAMPINFO::latitude_ns) + .def_readonly("longitude_ew", &StormProcess_tTIMESTAMPINFO::longitude_ew) + .def_readonly("height_cm", &StormProcess_tTIMESTAMPINFO::height_cm) + .def_readonly("dop", &StormProcess_tTIMESTAMPINFO::dop) + .def_readonly("satellites_visible", &StormProcess_tTIMESTAMPINFO::satellites_visible) + .def_readonly("satellites_tracked", &StormProcess_tTIMESTAMPINFO::satellites_tracked) + .def_readonly("receiver_status", &StormProcess_tTIMESTAMPINFO::receiver_status) + .def_readonly("oscillator_temperature", &StormProcess_tTIMESTAMPINFO::oscillator_temperature) + .def_readonly("serial_number", &StormProcess_tTIMESTAMPINFO::serial_number) .def_property_readonly("satellite", [](const StormProcess_tTIMESTAMPINFO <s2) { return std::vector (lts2.satellite, lts2.satellite + sizeof(lts2.satellite)); }) @@ -145,16 +145,16 @@ PYBIND11_MODULE(stormpci_bin_reader, m) { .def_property_readonly("EastBuf", [](const StrikeData &sdata) { return std::vector (sdata.EastBuf, sdata.EastBuf + BOLTEK_BUFFERSIZE); }) - .def_readwrite("NorthMaxPos", &StrikeData::NorthMaxPos) - .def_readwrite("NorthMinPos", &StrikeData::NorthMinPos) - .def_readwrite("EastMaxPos", &StrikeData::EastMaxPos) - .def_readwrite("EastMinPos", &StrikeData::EastMinPos) - .def_readwrite("North_Pk", &StrikeData::North_Pk) - .def_readwrite("East_Pk", &StrikeData::East_Pk) - .def_readwrite("NorthPol", &StrikeData::NorthPol) - .def_readwrite("EastPol", &StrikeData::EastPol) - .def_readwrite("EFieldPol", &StrikeData::EFieldPol) - .def_readwrite("lts2_data", &StrikeData::lts2_data) + .def_readonly("NorthMaxPos", &StrikeData::NorthMaxPos) + .def_readonly("NorthMinPos", &StrikeData::NorthMinPos) + .def_readonly("EastMaxPos", &StrikeData::EastMaxPos) + .def_readonly("EastMinPos", &StrikeData::EastMinPos) + .def_readonly("North_Pk", &StrikeData::North_Pk) + .def_readonly("East_Pk", &StrikeData::East_Pk) + .def_readonly("NorthPol", &StrikeData::NorthPol) + .def_readonly("EastPol", &StrikeData::EastPol) + .def_readonly("EFieldPol", &StrikeData::EFieldPol) + .def_readonly("lts2_data", &StrikeData::lts2_data) ;