Example #1
0
    def publish(self):
        rdt = ParameterHelper.rdt_for_data_product(self.data_product_id)
        rdt['time'] = np.random.random(1) + 3587463242.7904043 * 3600 * 24
        rdt['temp'] = [np.random.random(1) + 24 * 5]
        rdt['port_timestamp'] = [self.i] 
        rdt['driver_timestamp'] = [self.i] 
        rdt['preferred_timestamp'] = ['driver_timestamp']
        #rdt['battery_voltage'] = [10.0] 

        ParameterHelper.publish_rdt_to_data_product(self.data_product_id, rdt)
        self.i += 1
Example #2
0
    def publish(self):
        rdt = ParameterHelper.rdt_for_data_product(self.data_product_id)
        rdt['time'] = np.random.random(1) * 3600 * 24 + 3587463242.7904043
        rdt['temp'] = [np.random.random(1) * 5 + 24]
        rdt['port_timestamp'] = [self.i]
        rdt['driver_timestamp'] = [self.i]
        #rdt['preferred_timestamp'] = ['driver_timestamp']
        #rdt['battery_voltage'] = [10.0]

        ParameterHelper.publish_rdt_to_data_product(self.data_product_id, rdt)
        self.i += 1
    def publish(self):
        print 'publishing data'
        rdt = ParameterHelper.rdt_for_data_product(self.data_product_id)
        now = time.time()
        if self.simple_time:
            rdt['time'] = [self.i]
            t = self.i
        else:
            t = now + 2208988800
            rdt['time'] = [t]
        rdt['temp_sample'] = [np.random.random(1000000) * 5 + 20]

        ParameterHelper.publish_rdt_to_data_product(self.data_product_id, rdt)
        self.i += 1
    def publish(self):
        print "publishing data"
        rdt = ParameterHelper.rdt_for_data_product(self.data_product_id)
        now = time.time()
        if self.simple_time:
            rdt["time"] = [self.i]
            t = self.i
        else:
            t = now + 2208988800
            rdt["time"] = [t]
        rdt["temp_sample"] = [np.random.random(1000000) * 5 + 20]

        ParameterHelper.publish_rdt_to_data_product(self.data_product_id, rdt)
        self.i += 1
Example #5
0
    def publish(self):
        rdt = ParameterHelper.rdt_for_data_product(self.data_product_id)
        now = time.time()
        if self.simple_time:
            rdt['time'] = [self.i]
            t = self.i
        else:
            rdt['time'] = np.array([now + 2208988800])
            t = now + 2208988800
        rdt['temperature'] = [np.random.random(24) * 5 + 20]
        rdt['port_timestamp'] = [t]
        rdt['driver_timestamp'] = [t]
        rdt['preferred_timestamp'] = ['driver_timestamp']
        rdt['date_time_string'] = ['something']
        rdt['battery_voltage'] = [10.0]

        ParameterHelper.publish_rdt_to_data_product(self.data_product_id, rdt)
        self.i += 1
Example #6
0
    def publish(self):
        rdt = ParameterHelper.rdt_for_data_product(self.data_product_id)
        now = time.time()
        if self.simple_time:
            rdt['time'] = [self.i]
            t = self.i
        else:
            rdt['time'] = np.array([now + 2208988800])
            t = now + 2208988800
        rdt['temperature'] = [np.random.random(24) * 5 + 20]
        rdt['port_timestamp'] = [t]
        rdt['driver_timestamp'] = [t]
        rdt['preferred_timestamp'] = ['driver_timestamp']
        rdt['date_time_string'] = ['something']
        rdt['battery_voltage'] = [10.0]

        ParameterHelper.publish_rdt_to_data_product(self.data_product_id, rdt)
        self.i += 1