source: trunk/MagicSoft/Cosy/candrv/ethernet.h@ 9614

Last change on this file since 9614 was 9439, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 906 bytes
Line 
1#ifndef COSY_Ethernet
2#define COSY_Ethernet
3
4#ifndef COSY_Interface
5#include "interface.h"
6#endif
7
8#ifndef COSY_MTcpIpIO
9#include "MTcpIpIO.h"
10#endif
11
12class Ethernet : public MTcpIpI, /*public MTcpIpO,*/ public Interface
13{
14private:
15 TString fTxAddress;
16 Int_t fTxPort;
17
18 // Send interface based on MTcpIpI
19 Bool_t ReadSocket(TSocket &rx);
20
21 // Start/stop communication inherited from Interface
22 void Start() { MTcpIpI::RunThread(); }
23 void Stop() { MTcpIpI::CancelThread(); }
24
25 Bool_t HasConnection() const { return MTcpIpI::IsConnectionEstablished(); }
26
27public:
28 Ethernet(const char *addr, const int tx, const int rx, CanOpen *receiver);
29 virtual ~Ethernet();
30
31 // Transmit interface inherited from Interface
32 void SendCanFrame(WORD_t cobid, BYTE_t m[8], BYTE_t rtr=0);
33
34// ClassDef(Ethernet, 0) // hardware interface to the vmodican can module (Janz)
35};
36
37#endif
Note: See TracBrowser for help on using the repository browser.