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

add some new features

parent 050ddefb
Pipeline #389997 passed with stages
in 1 minute and 15 seconds
......@@ -38,6 +38,7 @@
from ml.fml40.roles.dts.parts.harvesting_head import HarvestingHead
from ml.fml40.roles.dts.parts.log_loading_area import LogLoadingArea
from ml.fml40.roles.dts.parts.saw import Saw
from ml.fml40.roles.dts.parts.stacking_shield import StackingShield
from ml.fml40.roles.dts.parts.winch import Winch
from ml.fml40.roles.dts.persons.forest_owner import ForestOwner
from ml.fml40.roles.dts.persons.forest_worker import ForestWorker
......@@ -63,11 +64,14 @@
from ml.ml40.features.properties.associations.shared import Shared
from ml.ml40.features.properties.values.address import Address
from ml.ml40.features.properties.values.dimensions import Dimensions
from ml.ml40.features.properties.values.expansion_length import ExpansionLength
from ml.ml40.features.properties.values.generic_property import GenericProperty
from ml.ml40.features.properties.values.last_service_check import LastServiceCheck
from ml.ml40.features.properties.values.liquid_filling_level import LiquidFillingLevel
from ml.ml40.features.properties.values.location import Location
from ml.ml40.features.properties.values.moisture import Moisture
from ml.ml40.features.properties.values.operating_hours import OperatingHours
from ml.ml40.features.properties.values.orientation_rpy import OrientationRPY
from ml.ml40.features.properties.values.personal_name import PersonalName
from ml.ml40.features.properties.values.rotational_speed import RotationalSpeed
from ml.ml40.features.properties.values.route import Route
......@@ -121,14 +125,17 @@
from ml.ml40.features.functionalities.renders import Renders
from ml.fml40.features.functionalities.accepts_felling_jobs import AcceptsFellingJobs
from ml.fml40.features.functionalities.accepts_felling_support_jobs import AcceptFellingSupportJobs
from ml.fml40.features.functionalities.accepts_felling_support_jobs import AcceptsFellingSupportJobs
from ml.fml40.features.functionalities.accepts_forwarding_jobs import AcceptsForwardingJobs
from ml.fml40.features.functionalities.accepts_log_measurements import AcceptsLogMeasurements
from ml.fml40.features.functionalities.accepts_log_transportaition_jobs import AcceptsLogTransportationJobs
from ml.fml40.features.functionalities.accepts_moisture_measurement import AcceptsMoistureMeasurement
from ml.fml40.features.functionalities.accepts_move_commands import AcceptsMoveCommands
from ml.fml40.features.functionalities.accepts_passability_report import AcceptsPassabilityReport
from ml.fml40.features.functionalities.accepts_proximity_alert import AcceptsProximityAlert
from ml.fml40.features.functionalities.accepts_winch_command import AcceptsWinchCommands
from ml.fml40.features.functionalities.accepts_single_tree_felling_jobs import AcceptsSingleTreeFellingJobs
from ml.fml40.features.functionalities.accepts_winch_command import AcceptsWinchCommands
from ml.fml40.features.functionalities.classifies_tree_species import ClassifiesTreeSpecies
from ml.fml40.features.functionalities.cuts import Cuts
from ml.fml40.features.functionalities.determines_passability import DeterminesPassability
......
......@@ -4,7 +4,7 @@
from ml.fml40.features.properties.values.documents.jobs.fellung_support_job import FellingSupportJob
class AcceptFellingSupportJobs(AcceptsJobs):
class AcceptsFellingSupportJobs(AcceptsJobs):
"""This functionality signalizes that FellingSupportJobs can be
processed."""
......
from ml.ml40.features.functionalities.functionality import Functionality
class AcceptsShieldCommands(Functionality):
"""This functionality signalizes that the thing's shield can be moved remotely
via S3I-B messages ."""
def __init__(self, name="", identifier=""):
"""Initializes the object.
:param name: Object name
:param identifier: Identifier
"""
super().__init__(
name=name,
identifier=identifier)
def shieldDown(self, speed):
"""roll down the winch with specified speed
:param speed: speed
:type speed: float
"""
print("shield moves down with the speed {}".format(speed))
def shieldUp(self, speed):
"""
roll up the winch with specified speed
:param speed: speed
:type speed: float
"""
print("shield moves up with the speed {}".format(speed))
from ml.ml40.features.functionalities.functionality import Functionality
class AcceptsWinchCommands(Functionality):
"""This functionality signalizes that the thing's winch can be moved remotely
via S3I-B messages ."""
def __init__(self, name="", identifier=""):
"""Initializes the object.
:param name: Object name
:param identifier: Identifier
"""
super().__init__(
name=name,
identifier=identifier)
def rollDown(self, speed):
"""roll down the winch with specified speed
:param speed: speed
:type speed: float
"""
print("roll down the winch with the speed {}".format(speed))
def rollUp(self, speed):
"""
roll up the winch with specified speed
:param speed: speed
:type speed: float
"""
print("roll up the winch with the speed {}".format(speed))
from ml.ml40.features.properties.values.value import Value
class ExpansionLength(Value):
def __init__(self, name="", identifier=""):
super().__init__(
name=name,
identifier=identifier)
self.__current_length = None
self.__max_length = None
self.__json_out = dict()
@property
def currentLength(self):
return self.__current_length
@currentLength.setter
def currentLength(self, value):
self.__current_length = value
@property
def maxLength(self):
return self.__max_length
@maxLength.setter
def maxLength(self, value):
self.__max_length = value
def to_json(self):
self.__json_out = super().to_json()
if self.__current_length is not None:
self.__json_out["currentLength"] = self.__current_length
if self.__max_length is not None:
self.__json_out["maxLength"] = self.__max_length
return self.__json_out
from ml.ml40.features.properties.values.value import Value
class LastServiceCheck(Value):
def __init__(self, name="", identifier=""):
super().__init__(
name=name,
identifier=identifier)
self.__timestamp = None
self.__json_out = dict()
@property
def timestamp(self):
return self.__timestamp
@timestamp.setter
def timestamp(self, value):
self.__timestamp = value
def to_json(self):
self.__json_out = super().to_json()
if self.__timestamp is not None:
self.__json_out["weight"] = self.__timestamp
return self.__json_out
from ml.ml40.features.properties.values.value import Value
class Lift(Value):
def __init__(self, name="", identifier=""):
super().__init__(
name=name,
identifier=identifier)
self.__current_lift = None
self.__max_lift = None
self.__min_lift = None
self.__json_out = dict()
@property
def currentLift(self):
return self.__current_lift
@currentLift.setter
def currentLift(self, value):
self.__current_lift = value
@property
def maxLift(self):
return self.__max_lift
@maxLift.setter
def maxLift(self, value):
self.__max_lift = value
@property
def minLift(self):
return self.__min_lift
@minLift.setter
def minLift(self, value):
self.__min_lift = value
def to_json(self):
self.__json_out = super().to_json()
if self.__current_lift is not None:
self.__json_out["currentLift"] = self.__current_lift
if self.__max_lift is not None:
self.__json_out["maxLift"] = self.__max_lift
if self.__min_lift is not None:
self.__json_out["minLift"] = self.__min_lift
return self.__json_out
from ml.ml40.features.properties.values.value import Value
class OrientationRPY(Value):
def __init__(self, name="", identifier=""):
super().__init__(
name=name,
identifier=identifier)
self.__roll = None
self.__pitch = None
self.__yaw = None
self.__json_out = dict()
@property
def roll(self):
return self.__roll
@roll.setter
def roll(self, value):
self.__roll = value
@property
def pitch(self):
return self.__pitch
@pitch.setter
def pitch(self, value):
self.__pitch = value
@property
def yaw(self):
return self.__yaw
@yaw.setter
def yaw(self, value):
self.__yaw = value
def to_json(self):
self.__json_out = super().to_json()
if self.__roll is not None:
self.__json_out["roll"] = self.__roll
if self.__yaw is not None:
self.__json_out["yaw"] = self.__yaw
if self.__pitch is not None:
self.__json_out["pitch"] = self.__pitch
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