-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Heya,
thanks for this tool!
I'm trying to compile this on Windows 10 PC within a Cygwin installation.
I downloaded the rlog 1.4 source code from here and copied it to /usr/include
Looks fine as far as I can see. However your code seems to be having lots of issues unfortunately and cannot be compiled. Could you perhaps have a look at this?
I don't think that it has to do with my, let's say unusual setup. I'm using E3DC-Control for example, which I can compile without any issues.
Digioso@DigiSlave ~
$ git clone https://github.com/RalfJL/S10history.git
Cloning into 'S10history'...
cd Sremote: Enumerating objects: 49, done.
remote: Total 49 (delta 0), reused 0 (delta 0), pack-reused 49
Unpacking objects: 100% (49/49), done.
Digioso@DigiSlave ~
$ cd S10history/
Digioso@DigiSlave ~/S10history
$ make
rm S10history
/usr/bin/g++ -lrlog -Irlog -O2 -Wall S10history.cpp RscpReader.cpp RscpProtocol.cpp AES.cpp SocketConnection.cpp -o S10history
S10history.cpp: In function ‘int main(int, char**)’:
S10history.cpp:83:20: error: ‘STDERR_FILENO’ was not declared in this scope
83 | StdioNode stdLog( STDERR_FILENO, StdioNode::OutputChannel);
| ^~~~~~~~~~~~~
S10history.cpp:126:11: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
126 | putenv("TZ=UTC");
| ^~~~~~~~
RscpReader.cpp: In function ‘int handleResponseValue(RscpProtocol*, SRscpValue*)’:
RscpReader.cpp:379:11: warning: variable ‘ucBatteryIndex’ set but not used [-Wunused-but-set-variable]
379 | uint8_t ucBatteryIndex = 0;
| ^~~~~~~~~~~~~~
RscpReader.cpp: In function ‘int db_value_container(RscpProtocol*, std::vector)’:
RscpReader.cpp:176:8: warning: ‘val.db_value_container(RscpProtocol, std::vector)::val_t::consumption’ may be used uninitialized in this function [-Wmaybe-uninitialized]
176 | printf("[%d]-%s-CSV: %d;%.2f;%.2f;%.2f;%.2f;%.2f;%.2f;%.2f\n", graph_index, value_prefix, (int) d, val.bat_in, val.bat_out, val.bat_charge_level, val.production, val.grid_in,
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
177 | val.grid_out, val.consumption);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RscpReader.cpp:176:8: warning: ‘val.db_value_container(RscpProtocol, std::vector)::val_t::bat_in’ may be used uninitialized in this function [-Wmaybe-uninitialized]
RscpReader.cpp:176:8: warning: ‘val.db_value_container(RscpProtocol, std::vector)::val_t::grid_out’ may be used uninitialized in this function [-Wmaybe-uninitialized]
RscpReader.cpp:176:8: warning: ‘val.db_value_container(RscpProtocol, std::vector)::val_t::bat_charge_level’ may be used uninitialized in this function [-Wmaybe-uninitialized]
RscpReader.cpp:176:8: warning: ‘val.db_value_container(RscpProtocol, std::vector)::val_t::bat_out’ may be used uninitialized in this function [-Wmaybe-uninitialized]
RscpReader.cpp:176:8: warning: ‘val.db_value_container(RscpProtocol, std::vector)::val_t::grid_in’ may be used uninitialized in this function [-Wmaybe-uninitialized]
RscpReader.cpp:176:8: warning: ‘val.db_value_container(RscpProtocol, std::vector)::val_t::production’ may be used uninitialized in this function [-Wmaybe-uninitialized]
RscpReader.cpp: In function ‘int db_sum_container(RscpProtocol, std::vector)’:
RscpReader.cpp:291:8: warning: ‘sum.db_sum_container(RscpProtocol, std::vector)::sum_t::grid_out’ may be used uninitialized in this function [-Wmaybe-uninitialized]
291 | printf("%s-CSV: %d;%.2f;%.2f;%.2f;%.2f;%.2f;%.2f;%.2f\n", sum_prefix, (int) start.seconds, sum.bat_in, sum.bat_out, sum.bat_charge_level, sum.production, sum.grid_in, sum.grid_out,
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
292 | sum.consumption);
| ~~~~~~~~~~~~~~~~
RscpReader.cpp:291:8: warning: ‘sum.db_sum_container(RscpProtocol, std::vector)::sum_t::bat_charge_level’ may be used uninitialized in this function [-Wmaybe-uninitialized]
RscpReader.cpp:291:8: warning: ‘sum.db_sum_container(RscpProtocol, std::vector)::sum_t::bat_in’ may be used uninitialized in this function [-Wmaybe-uninitialized]
RscpReader.cpp:291:8: warning: ‘sum.db_sum_container(RscpProtocol, std::vector)::sum_t::grid_in’ may be used uninitialized in this function [-Wmaybe-uninitialized]
RscpReader.cpp:291:8: warning: ‘sum.db_sum_container(RscpProtocol, std::vector)::sum_t::consumption’ may be used uninitialized in this function [-Wmaybe-uninitialized]
RscpReader.cpp:291:8: warning: ‘sum.db_sum_container(RscpProtocol, std::vector)::sum_t::bat_out’ may be used uninitialized in this function [-Wmaybe-uninitialized]
RscpReader.cpp:291:8: warning: ‘sum.db_sum_container(RscpProtocol, std::vector)::sum_t::production’ may be used uninitialized in this function [-Wmaybe-uninitialized]
RscpProtocol.cpp:46:2: warning: #warning No time source is available. [-Wcpp]
46 | #warning No time source is available.
| ^~~~~~~
RscpProtocol.cpp: In member function ‘bool RscpProtocol::setHeaderTimestamp(SRscpFrame)’:
RscpProtocol.cpp:48:16: error: ‘struct SRscpFrameHeader’ has no member named ‘timeSec’
48 | frame->header.timeSec = 0;
| ^~~~~~~
RscpProtocol.cpp:49:16: error: ‘struct SRscpFrameHeader’ has no member named ‘timeNanosec’
49 | frame->header.timeNanosec = 0;
| ^~~~~~~~~~~
SocketConnection.cpp: In function ‘int SocketConnect(const char*, int)’:
SocketConnection.cpp:55:9: warning: unused variable ‘iRetries’ [-Wunused-variable]
55 | int iRetries = 3;
| ^~~~~~~~
make: *** [Makefile:9: S10history] Error 1
Digioso@DigiSlave ~/S10history
$ echo $?
2
Digioso@DigiSlave ~/S10history
$