Vorlage für Projekt

Dependencies:   EthernetInterface mbed-rtos

Fork of Telemetrie_eth_h2m by Hochschule München

Revision:
2:e19b937a29c1
Parent:
1:2df3958877f2
Child:
3:94a735c744ff
--- a/Telemetry.h	Sat May 02 19:08:50 2015 +0000
+++ b/Telemetry.h	Sat Oct 31 17:33:18 2015 +0000
@@ -27,22 +27,44 @@
 {
     public:
         Telemetry();
+        char* ip_self;
+        Endpoint db_server;
+        Endpoint controller;
+        Endpoint input_Host;
+        
         #ifdef DEBUG
         void InitUSBSerialConnection();
         #endif
-        
+        //Struct Check Sum calc
+        char do_cs(char* buffer); 
+        //init with DHCP
         bool InitEthernetConnection();
+        //init with Static
         bool InitEthernetConnection(const char* IPAdress, const char* SubNetMask, const char* GateWay);
+        //Close Connection
         void CloseEthernetConnection();
         
-        void ConnectSocket_tcp(char* Host);
-        void ConnectSocket_udp();
-        void CloseSocket();
+        //Connect Ports
+        void ConnectSocket_tcp(Endpoint Host);
+        void ConnectSocket_udp_rec(int Port);
+        void ConnectSocket_udp_send();
+        
+        //Close Ports
+        void CloseSocket_tcp();
+        void CloseSocket_udp_rec();
+        void CloseSocket_udp_send();
+        
         
-        void TransmitDataoverUDP(char *Host, int Port, string Daten);
-        void TransmitDataoverTCP(char *Host, string Daten, string Username, string Passwort);
-        void ReadAnswerandTransmitoverSerial();
-        string ReadAnswer();
+        int  Rec_Data_UDP(char *buffer, int size);
+        bool Rec_Struct_UDP(char *buffer);
+        
+        int  Rec_Data_TCP(char *buffer, int size);
+        
+        void Send_Data_UDP(Endpoint Server, char* Daten, int size);
+        void Send_Struct_UDP(Endpoint Server, char* Daten);
+        
+        void Send_Data_TCP(char* Host, string Daten, string Username, string Passwort);
+        
 };
 
 #endif
\ No newline at end of file