#ifndef H1_ETH_DRIVER_H_ #define H1_ETH_DRIVER_H_ #include #include #include #include #include #define H1_ETH_ROS_VER "2.00.00.008" namespace free_optics{ class H1EthDriver : public LidarDriver { public: H1EthDriver(); ~H1EthDriver(); bool connect(const std::string hostname, int port=2111); void disconnect(); bool getDeviceState(uint8_t &state); bool getDeviceName(std::string &name); bool getFirmwareVersion(uint32_t &version); bool getSerialNumber(uint32_t &sn); bool login(uint8_t &state); bool getScanAngle(int32_t &start_angle, int32_t &stop_angle); bool setScanAngle(int32_t start_angle, int32_t stop_angle); bool setScanConfig(uint16_t frequency, uint16_t resolution); bool getMeasureRange(float &range_min, float &range_max); bool getScanData(uint8_t state); bool scanDataReceiver(); private: int socket_fd_; }; } #endif