Guest User

Brick

a guest
Dec 30th, 2011
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include "brick.h"
  2.  
  3.  
  4. #include "ip_connection.h" // Liegt im gleichem Ordner wie die restlichen Source files
  5.  
  6.  
  7. Brick::Brick(QString newHost, QString newPort, QString newUid)
  8. {
  9.     this->host = newHost;
  10.     this->port = newPort;
  11.     this->uid = newUid;
  12. }
  13.  
  14. void Brick::connectToBrick() {
  15.     IPConnection ipcon;
  16.     if(ipcon_create(&ipcon, this->host.toAscii(), this->port.toInt()) < 0) {
  17.         emit writeToLog("Konnte keine Verbindung herstellen!");
  18.     }
  19.     else {
  20.         emit writeToLog("Verbindung erfolgreich aufgebaut!");
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment