Mario Bambagini / ssWi

Dependents:   rover_car rover_pc supervisor watering_unit ... more

ssWiSocket.hpp

Committer:
mariob
Date:
2012-09-06
Revision:
3:1adc077d4906
Parent:
0:cc7218c5e5f7
Child:
4:dbbf82c966c2

File content as of revision 3:1adc077d4906:

#ifndef __SHARED_SLOTTED_WIRELESS_SOCKET_HPP__
#define __SHARED_SLOTTED_WIRELESS_SOCKET_HPP__

#include "ssWiPort.hpp"

class ssWiSocket
{

    friend class ssWi;

    //ssWi* w;
    ssWiPort* p;

    //ssWiSocket(ssWi* w, ssWiPort* p) {
    ssWiSocket(ssWiPort* p) {
        //this->w = w;
        this->p = p;
    }

public:

    PortValue read () {
        return p->getRXValue();
    }
    void write (PortValue value) {
        p->setTXValue(value);
    }

/*
    bool close() {
        w->unsetPort();
    }
*/
};


#endif //__SHARED_SLOTTED_WIRELESS_SOCKET_HPP__