Advertisement
Guest User

RS232.hpp

a guest
Jun 16th, 2013
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. #ifndef __RS232_HPP__
  2. #define __RS232_HPP__
  3.  
  4.  
  5. #include <iostream>
  6. #include <windows.h>
  7. #include <string> //為了使用string,注意一定要加using std::string;
  8. #include <stdio.h>//為了顯示printf
  9. #include <cstring>
  10.  
  11. //using namespace std;
  12.  
  13. class RS232
  14. {
  15. private:
  16.  
  17.     HANDLE RS232::RS232_open();
  18.  
  19.     void RS232::RS232_write(char* buf);
  20.  
  21.     void RS232::RS232_read();
  22.  
  23.     int RS232::RS232_close();
  24.  
  25.     int COM_flg;
  26.  
  27. public:
  28.     RS232();
  29.  
  30.     ~RS232();
  31.  
  32.     int RS232::Write(double* joints);
  33.  
  34.     int RS232::Read();
  35.    
  36. };
  37.  
  38.  
  39. //HANDLE RS232_open();
  40. //void RS232_write(char* buf);
  41. //void RS232_read();
  42.  
  43.  
  44.  
  45.  
  46.  
  47. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement