Commit 0d577bac authored by Jiahang Chen's avatar Jiahang Chen
Browse files

update fellingjob and req.txt

parent 4a4524dd
Pipeline #339596 passed with stage
in 16 seconds
{"thingId": "s3i:de59a481-dd97-429f-a0ca-fab013b6bfbc", "policyId": "s3i:de59a481-dd97-429f-a0ca-fab013b6bfbc", "attributes": {"class": "ml40::Thing", "name": "test", "roles": [{"class": "fml40::Harvester"}], "features": [{"class": "fml40::ProvidesProductionData"}, {"class": "fml40::AcceptsFellingJobs"}]}}
\ No newline at end of file
{"thingId": "s3i:af86ad33-63a4-427b-9914-3f199cd025c4", "policyId": "s3i:af86ad33-63a4-427b-9914-3f199cd025c4", "attributes": {"class": "ml40::Thing", "name": "test", "roles": [{"class": "fml40::Harvester"}], "features": [{"class": "fml40::ProvidesProductionData"}, {"class": "fml40::AcceptsFellingJobs"}]}}
\ No newline at end of file
......@@ -4,6 +4,7 @@
from import find_broker_endpoint, make_config_file, load_config
from ml.dt_factory import create_dt_ref
from import FellingJob
from ml.identifier import ID
import requests
import json, time
......@@ -25,7 +26,10 @@
serv_req = s3i.messages.ServiceRequest()
receiver = input("[S³I]: Please enter the id of your digital twin: ")
job_id = ID(identifier="s3i:{}".format(uuid.uuid4()))
job = FellingJob("", hmi_ref)
job.identifier = job_id.ID
senderUUID=hmi_id, receiverUUID=[receiver], sender_endpoint=hmi_endpoint,
......@@ -6,3 +6,5 @@ def __init__(self, name, ref_managing_actor):
super(FellingJob, self).__init__(
name=name, ref_managing_actor=ref_managing_actor
......@@ -27,6 +27,10 @@ def subfeatures(self):
def identifier(self):
return self.__identifier
def identifier(self, value):
self.__identifier = value
def from_json(self, json_obj):
self.__name = json_obj.get("name", "")
self.__class_name = json_obj.get("class", "")
Supports Markdown
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