#ifndef _JOYSTICKSTATEBLOCKDISTRIBUTER_H #define _JOYSTICKSTATEBLOCKDISTRIBUTER_H #include #include #include #include #include #include #include #include #include class JoystickStateBlockDistributer { public: JoystickStateBlockDistributer(); ~JoystickStateBlockDistributer(); bool init(char* serverIP, unsigned short port, unsigned channelIdx, unsigned short localPort = 15123); void send(); protected: void encodeMessage(DEVICESTATE* src, OSG::BinaryMessage& dst); bool bStarted; unsigned short port; unsigned channelIdx; char* ip; OSG::DgramSocket server; }; #endif