Commit 050ddefb authored by Jiahang Chen's avatar Jiahang Chen
Browse files

add vitality sensor, barkbeetle sensor and vitality status

parent 517abb5e
Pipeline #389305 passed with stages
in 1 minute and 5 seconds
......@@ -43,7 +43,8 @@
from ml.fml40.roles.dts.persons.forest_worker import ForestWorker
from ml.fml40.roles.dts.persons.mini_tractor_operator import MiniTractorOperator
from ml.fml40.roles.dts.persons.skidder_operator import SkidderOperator
from ml.fml40.roles.dts.sensors.vitality_sensor import VilalitySensor
from ml.fml40.roles.dts.sensors.vitality_sensor import VitalitySensor
from ml.fml40.roles.dts.sensors.barkbeetle_sensor import BarkbeetleSensor
from ml.fml40.roles.dts.sites.forest_enterprise import ForestEnterprise
from ml.fml40.roles.dts.sites.hauler import Hauler
from ml.fml40.roles.dts.sites.mill.mill import Mill
......@@ -91,6 +92,7 @@
from ml.fml40.features.properties.values.tilt import Tilt
from ml.fml40.features.properties.values.tree_data import TreeData
from ml.fml40.features.properties.values.tree_type import TreeType
from ml.fml40.features.properties.values.vitality_status import VitalityStatus
from ml.fml40.features.properties.values.wood_quality import WoodQuality
from ml.fml40.features.properties.values.documents.jobs.felling_job import FellingJob
......
from ml.ml40.features.properties.values.value import Value
class VitalityStatus(Value):
def __init__(self, name="", identifier=""):
super().__init__(
name=name,
identifier=identifier)
self.__ok = None
self.__json_out = dict()
@property
def ok(self):
return self.__ok
@ok.setter
def ok(self, value):
self.__ok = value
def to_json(self):
self.__json_out = super().to_json()
if self.__ok is not None:
self.__json_out["ok"] = self.__ok
return self.__json_out
from ml.ml40.roles.dts.sensors.sensor import Sensor
class BarkbeetleSensor(Sensor):
def __init__(self, name="", identifier=""):
super().__init__(
name=name,
identifier=identifier)
from ml.ml40.roles.dts.sensors.sensor import Sensor
class VilalitySensor(Sensor):
class VitalitySensor(Sensor):
def __init__(self, name="", identifier=""):
super().__init__(
name=name,
......
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