ssd.command =========== .. py:module:: ssd.command Classes ------- .. autoapisummary:: ssd.command.Command ssd.command.ReadCommand ssd.command.WriteCommand ssd.command.EraseCommand ssd.command.FlushCommand ssd.command.CommandFactory Module Contents --------------- .. py:class:: Command(args: List[str]) Bases: :py:obj:`abc.ABC` 기본 명령어 클래스입니다. .. attribute:: option 명령 옵션 :type: str .. attribute:: args 명령 인자 리스트 :type: list .. py:attribute:: option .. py:attribute:: args .. py:method:: validate_command() :abstractmethod: .. py:method:: get_value() -> List[str] 명령 인자를 반환합니다. :returns: 명령 인자 리스트 :rtype: list .. py:method:: get_key() .. py:class:: ReadCommand(args: List[str]) Bases: :py:obj:`Command` 읽기 명령어 클래스입니다. .. attribute:: lba 논리 블록 주소 :type: int .. py:attribute:: lba .. py:method:: validate_command() .. py:method:: get_key() -> Tuple[str, int] 명령 키를 반환합니다. :returns: 명령 키 (옵션, LBA) :rtype: tuple .. py:class:: WriteCommand(args: List[str]) Bases: :py:obj:`Command` 쓰기 명령어 클래스입니다. .. attribute:: lba 논리 블록 주소 :type: int .. attribute:: value 쓸 값 (16진수 형식) :type: int .. py:attribute:: lba .. py:attribute:: value .. py:method:: validate_command() .. py:method:: get_key() -> Tuple[str, int, int] 명령 키를 반환합니다. :returns: 명령 키 (옵션, 시작 LBA, 끝 LBA) :rtype: tuple .. py:class:: EraseCommand(args: List[str]) Bases: :py:obj:`Command` 삭제 명령어 클래스입니다. .. attribute:: lba 논리 블록 주소 :type: int .. attribute:: size 삭제할 블록 수 :type: int .. py:attribute:: lba .. py:attribute:: size .. py:method:: validate_command() .. py:method:: get_key() -> Tuple[str, int, int] 명령 키를 반환합니다. :returns: 명령 키 (옵션, 시작 LBA, 끝 LBA) :rtype: tuple .. py:class:: FlushCommand(args) Bases: :py:obj:`Command` 명령어 Buffer를 비우는 명령어 클래스입니다. .. attribute:: - .. py:method:: validate_command() .. py:class:: CommandFactory 명령어 생성 클래스입니다. 주어진 명령 인자 리스트를 통해 적절한 명령어 객체를 생성합니다. .. py:method:: parse_command(arg_list: List[str]) -> Command :staticmethod: 주어진 명령 인자 리스트를 통해 적절한 명령어 객체를 생성합니다. :param arg_list: 명령 인자 리스트 :type arg_list: list :returns: 생성된 명령어 객체 :rtype: Command