예제 #1
0
    def test_add_sensor(self):
        # platform object
        p1 = pyobs.Platform("platform 1", "p1")
        # sensor objects
        s1 = pyobs.Sensor("Sensor 1", "first sensor")
        s2 = pyobs.Sensor("Sensor 2", "second sensor")
        s3 = pyobs.Sensor("Sensor 3", "third sensor")

        #add sensors to platform 1
        p1.add_sensor(s1)
        p1.add_sensor(s2)
        p1.add_sensor(s3)

        this_graph = pyobs.get_graph()
        print(this_graph.serialize(format='turtle'))
예제 #2
0
 def test_add_observation(self):
     s1 = pyobs.Sensor("Sensor 1", "first sensor")
     obs1 = pyobs.Observation("Observation 1", "measuring temperature")
     s1.add_observation(obs1)
예제 #3
0
 def test_add_procedure(self):
     s1 = pyobs.Sensor("Sensor 1", "first sensor")
     pro1 = pyobs.Procedure("Procedure 1",
                            "setting height of temperature sensor")
     s1.add_procedure(pro1)
예제 #4
0
 def test_add_platform(self):
     s1 = pyobs.Sensor("Sensor 1", "first sensor")
     p1 = pyobs.Platform("platform 1", "p1")
     s1.add_platform(p1)
예제 #5
0
 def test_add_observable_property(self):
     s1 = pyobs.Sensor("Sensor 1", "first sensor")
     obs1 = pyobs.ObservableProperty("temperature", "property 1")
     s1.add_obs_property(obs1)