lib_Transmission_TCP_example

Dependencies:   lib_Transmission

Files at this revision

API Documentation at this revision

Comitter:
YSI
Date:
Thu Jun 30 16:19:14 2022 +0200
Parent:
0:bfe0a20512f3
Commit message:
test up lib_Transmission

Changed in this revision

.hgignore Show annotated file Show diff for this revision Revisions of this file
lib_Transmission.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
main.h Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Thu Jun 30 16:19:14 2022 +0200
@@ -0,0 +1,3 @@
+^BUILD$
+^.mbed$
+^mbed-os$
--- a/lib_Transmission.lib	Wed Oct 06 09:20:05 2021 +0000
+++ b/lib_Transmission.lib	Thu Jun 30 16:19:14 2022 +0200
@@ -1,1 +1,1 @@
-https://os.mbed.com/users/YSI/code/lib_Transmission/#24f7e0ddf6f5
+https://os.mbed.com/users/YSI/code/lib_Transmission/#0d321d298d3727c011e6dcaf9e5d7d499aeb3554
\ No newline at end of file
--- 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);
--- a/main.h	Wed Oct 06 09:20:05 2021 +0000
+++ b/main.h	Thu Jun 30 16:19:14 2022 +0200
@@ -12,7 +12,6 @@
 #endif
 EthernetInterface   eth;
 
-void                ethernet_up(void);
 string              transmission_processing(string);
-Transmission        transmission(&pc, &eth, &transmission_processing, &ethernet_up);
+Transmission        transmission(&pc, &eth, &transmission_processing);
 #endif
\ No newline at end of file
--- a/mbed-os.lib	Wed Oct 06 09:20:05 2021 +0000
+++ b/mbed-os.lib	Thu Jun 30 16:19:14 2022 +0200
@@ -1,1 +1,1 @@
-https://github.com/ARMmbed/mbed-os/#b1796dedeb8accde1cbaecf136fab96895e23d81
+https://github.com/ARMmbed/mbed-os/#4cfbea43cabe86bc3ed7a5287cd464be7a218938
\ No newline at end of file