Commit a5463fe0 authored by Jiahang Chen's avatar Jiahang Chen
Browse files

add switching stage

parent dd70e6e1
Pipeline #513159 passed with stages
in 32 seconds
......@@ -83,6 +83,7 @@
from import PersonalName
from import RotationalSpeed
from import Route
from import SwitchingStage
from import Temperature
from import TimeSlot
from import Weight
from import Value
class SwitchingStage(Value):
def __init__(self, name="", identifier=""):
self.__min_stage = None
self.__current_stage = None
self.__max_stage = None
self.__json_out = dict()
def minStage(self):
return self.__min_stage
def minStage(self, value):
self.__min_stage = value
def currentStage(self):
return self.__current_stage
def currentStage(self, value):
self.__current_stage = value
def maxStage(self):
return self.__max_stage
def maxStage(self, value):
self.__max_stage = value
def to_json(self):
self.__json_out = super().to_json()
if self.minStage is not None:
self.__json_out["minStage"] = self.minStage
if self.maxStage is not None:
self.__json_out["maxStage"] = self.maxStage
if self.currentStage is not None:
self.__json_out["currentStage"] = self.currentStage
return self.__json_out
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment