actions
Module¶
These are the actions that can be executed by the users.
-
class
AYABInterface.actions.
ActionMetaClass
(name, bases, attributes)[source]¶ Bases:
type
Metaclass for the actions.
This class makes sure each
Action
has tests.If a class is named
MyAction
, eachAction
gets the methodis_my_action()
which returnsFalse
for allActions
expcept forMyAction
it returnsTrue
.
-
class
AYABInterface.actions.
Action
(*arguments)[source]¶ Bases:
object
A base class for actions.
-
__init__
(*arguments)[source]¶ Create a new
Action
.Parameters: arguments¶ (tuple) – The arguments passed to the action. These are also used to determine equality
and thehash
.
-
__weakref__
¶ list of weak references to the object (if defined)
-
is_move_carriage_over_left_hall_sensor
()¶ Test whether this is a MoveCarriageOverLeftHallSensor.
Return type: bool Returns: False
-
is_move_carriage_to_the_left
()¶ Test whether this is a MoveCarriageToTheLeft.
Return type: bool Returns: False
-
is_move_carriage_to_the_right
()¶ Test whether this is a MoveCarriageToTheRight.
Return type: bool Returns: False
-
is_move_needles_into_position
()¶ Test whether this is a MoveNeedlesIntoPosition.
Return type: bool Returns: False
-
is_switch_carriage_to_mode_kc
()¶ Test whether this is a SwitchCarriageToModeKc.
Return type: bool Returns: False
-
-
class
AYABInterface.actions.
SwitchCarriageToModeKc
(*arguments)[source]¶ Bases:
AYABInterface.actions.Action
The user switches the mode of the carriage to KC.
-
class
AYABInterface.actions.
SwitchCarriageToModeNl
(*arguments)[source]¶ Bases:
AYABInterface.actions.Action
The user switches the mode of the carriage to NL.
-
class
AYABInterface.actions.
MoveCarriageOverLeftHallSensor
(*arguments)[source]¶ Bases:
AYABInterface.actions.Action
The user moves the carriage over the left hall sensor.
-
class
AYABInterface.actions.
MoveCarriageToTheLeft
(*arguments)[source]¶ Bases:
AYABInterface.actions.Action
The user moves the carriage to the left.
-
class
AYABInterface.actions.
MoveCarriageToTheRight
(*arguments)[source]¶ Bases:
AYABInterface.actions.Action
The user moves the carriage to the right.
-
class
AYABInterface.actions.
PutColorInNutA
(*arguments)[source]¶ Bases:
AYABInterface.actions.Action
The user puts a color into nut A.
-
class
AYABInterface.actions.
PutColorInNutB
(*arguments)[source]¶ Bases:
AYABInterface.actions.Action
The user puts a color into nut B.
-
class
AYABInterface.actions.
MoveNeedlesIntoPosition
(*arguments)[source]¶ Bases:
AYABInterface.actions.Action
The user moves needles into position.
-
class
AYABInterface.actions.
SwitchOffMachine
(*arguments)[source]¶ Bases:
AYABInterface.actions.Action
The user switches off the machine.