Skip to content
Snippets Groups Projects
Commit 79c58b8d authored by Taya Snijder's avatar Taya Snijder
Browse files

L2SS-1204 formatting

parent c63b24ac
No related branches found
No related tags found
1 merge request!549L2SS-1204 added station state stubs for the StationManager
...@@ -22,8 +22,8 @@ logger = logging.getLogger() ...@@ -22,8 +22,8 @@ logger = logging.getLogger()
__all__ = ["StationManager", "main"] __all__ = ["StationManager", "main"]
class StationState:
class StationState:
# all station states # all station states
OFF = "OFF" OFF = "OFF"
HIBERNATE = "HIBERNATE" HIBERNATE = "HIBERNATE"
...@@ -41,7 +41,6 @@ class StationState: ...@@ -41,7 +41,6 @@ class StationState:
@device_logging_to_python() @device_logging_to_python()
class StationManager(LOFARDevice): class StationManager(LOFARDevice):
# ----------------- # -----------------
# Device Properties # Device Properties
# ----------------- # -----------------
...@@ -54,14 +53,15 @@ class StationManager(LOFARDevice): ...@@ -54,14 +53,15 @@ class StationManager(LOFARDevice):
# Attributes # Attributes
# ---------- # ----------
station_name_R = attribute(dtype=str, fisallowed="is_attribute_access_allowed") station_name_R = attribute(dtype=str, fisallowed="is_attribute_access_allowed")
def read_station_name_R(self): def read_station_name_R(self):
return self.Station_Name return self.Station_Name
station_state_R = attribute(dtype=str, fisallowed="is_attribute_access_allowed") station_state_R = attribute(dtype=str, fisallowed="is_attribute_access_allowed")
def read_station_state_R(self): def read_station_state_R(self):
return self.Station_State return self.Station_State
# -------- # --------
# overloaded functions # overloaded functions
# -------- # --------
...@@ -80,7 +80,6 @@ class StationManager(LOFARDevice): ...@@ -80,7 +80,6 @@ class StationManager(LOFARDevice):
# -------- # --------
def _is_transition_allowed(self, to_state) -> bool: def _is_transition_allowed(self, to_state) -> bool:
# get allowed transitions for the current state # get allowed transitions for the current state
allowed_transitions = StationState.allowed_transitions[self.station_state] allowed_transitions = StationState.allowed_transitions[self.station_state]
...@@ -128,7 +127,6 @@ class StationManager(LOFARDevice): ...@@ -128,7 +127,6 @@ class StationManager(LOFARDevice):
# TODO: functionality # TODO: functionality
return return
# -------- # --------
# Commands # Commands
# -------- # --------
...@@ -182,7 +180,6 @@ class StationManager(LOFARDevice): ...@@ -182,7 +180,6 @@ class StationManager(LOFARDevice):
# update the station_state variable when successful # update the station_state variable when successful
self.station_state = StationState.STANDBY self.station_state = StationState.STANDBY
@command() @command()
@DebugIt() @DebugIt()
@log_exceptions() @log_exceptions()
...@@ -198,6 +195,7 @@ class StationManager(LOFARDevice): ...@@ -198,6 +195,7 @@ class StationManager(LOFARDevice):
# update the station_state variable when successful # update the station_state variable when successful
self.station_state = StationState.ON self.station_state = StationState.ON
# ---------- # ----------
# Run server # Run server
# ---------- # ----------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment