import logging


class RobotCommSample:
    """
    This is a sample class for robot communication.
    For FB developers, this should be replaced with a real communication class to control robot or other devices.
    """
    def __init__(self):
        """
        Init parameters
        """
        pass

    def connect(self, ip, port) -> bool:
        """
        Mock connect a robot.
        @return: True or False
        """
        logging.info("Connect robot with ip：{}, port: {}".format(ip, port))
        return True

    def disconnect(self):
        """
        Mock disconnect a robot.
        @return:
        """
        logging.info("Disconnect robot.")

    def move_linear(self, pos, speed)-> bool:
        """
        Mock execute robot move linear command
        @param pos: target position and orientation
        @param speed: move speed
        @return: True or False
        """
        logging.info("Run robot move linear.")
        return True
