Beispiel #1
0
func InsertObservation(c gossamer.Client) {
	obs := &gossamer.ObservationEntity{}
	obs.PhenomenonTime = gossamer.NewTimePeriod(time.Now(), time.Now())
	obs.Result = "123"
	obs.ResultTime = gossamer.NewTimeInstant(time.Now())
	ds := &gossamer.DatastreamEntity{}
	ds.Id = "Datastream-1"
	obs.Datastream = ds

	err := c.InsertObservation(obs)
	if err != nil {
		log.Fatal(err)
	}
	log.Println("Inserted New Observation")
}