lib_Transmission_TCP_example
Dependencies: lib_Transmission
Diff: main.cpp
- Revision:
- 1:b9a16f894120
- Parent:
- 0:bfe0a20512f3
--- a/main.cpp Wed Oct 06 09:20:05 2021 +0000 +++ b/main.cpp Thu Jun 30 16:19:14 2022 +0200 @@ -2,21 +2,13 @@ int main(void) { - transmission.ip(true); + transmission.ip(true, "192.168.1.25", 80); while(1) Led = transmission.recv(); } -void ethernet_up(void) -{ - transmission.smtp("yannic.simon@u-psud.fr", transmission.ip().c_str(), "CONNECTION", transmission_processing("*IDN?").c_str()); - char timeLogs[22] = {0}; - time_t ntpTimeStamp = transmission.ntp(); - if(ntpTimeStamp > 0) set_time(ntpTimeStamp); - strftime(timeLogs, 21, "%F;%T;", localtime(&ntpTimeStamp)); -} - string transmission_processing(string cmd) { + pc.write(cmd.c_str(), cmd.size()); ostringstream ssend; ssend << fixed; ssend.precision(2);