示例#1
0
 def set_samples(self, audio_samples: common.SamplePayload) -> "Audio":
     """
     Sets the SamplePayload associated with the audio sensor.
     :param audio_samples:
     :return:
     """
     self.get_proto().samples.CopyFrom(audio_samples.get_proto())
     self._samples = common.SamplePayload(self.get_proto().samples)
     return self
 def set_battery(self, battery: common.SamplePayload) -> "StationMetrics":
     """
     Sets the battery payload.
     :param battery: Payload to set.
     :return: A modified instance of self.
     """
     common.check_type(battery, [common.SamplePayload])
     # noinspection Mypy
     self.get_proto().battery.CopyFrom(battery.get_proto())
     self._battery = common.SamplePayload(self.get_proto().battery)
     return self
示例#3
0
 def set_x_samples(self, x_samples: common.SamplePayload) -> "Xyz":
     """
     Sets the X channel samples.
     :param x_samples: Samples to set.
     :return: A modified instance of self.
     """
     common.check_type(x_samples, [common.SamplePayload])
     # noinspection Mypy
     self.get_proto().x_samples.CopyFrom(x_samples.get_proto())
     self._x_samples = common.SamplePayload(self.get_proto().x_samples)
     return self
示例#4
0
 def set_samples(self, samples: common.SamplePayload) -> "Single":
     """
     Sets the samples for this sensor.
     :param samples: Samples to set.
     :return: A modified instance of self.
     """
     common.check_type(samples, [common.SamplePayload])
     # noinspection Mypy
     self.get_proto().samples.CopyFrom(samples.get_proto())
     self._samples = common.SamplePayload(self.get_proto().samples)
     return self
 def set_temperature(self, temperature: common.SamplePayload) -> "StationMetrics":
     """
     Sets the temperature payload.
     :param temperature: The payload to set.
     :return: A modified instance of self.
     """
     common.check_type(temperature, [common.SamplePayload])
     # noinspection Mypy
     self.get_proto().temperature.CopyFrom(temperature.get_proto())
     self._temperature = common.SamplePayload(self.get_proto().temperature)
     return self
 def set_network_strength(
     self, network_strength: common.SamplePayload
 ) -> "StationMetrics":
     """
     Sets the network strength payload.
     :param network_strength: The payload to set.
     :return: A modified instance of self.
     """
     common.check_type(network_strength, [common.SamplePayload])
     # noinspection Mypy
     self.get_proto().network_strength.CopyFrom(network_strength.get_proto())
     self._network_strength = common.SamplePayload(self.get_proto().network_strength)
     return self
 def set_cpu_utilization(
     self, cpu_utilization: common.SamplePayload
 ) -> "StationMetrics":
     """
     Sets the CPU utilization payload.
     :param cpu_utilization: The payload to set.
     :return: A modified instance of self.
     """
     common.check_type(cpu_utilization, [common.SamplePayload])
     # noinspection Mypy
     self.get_proto().cpu_utilization.CopyFrom(cpu_utilization.get_proto())
     self._cpu_utilization = common.SamplePayload(self.get_proto().cpu_utilization)
     return self
 def set_available_disk(
     self, available_disk: common.SamplePayload
 ) -> "StationMetrics":
     """
     Sets the available disk payload.
     :param available_disk: Payload to set.
     :return: A modified instance of self.
     """
     common.check_type(available_disk, [common.SamplePayload])
     # noinspection Mypy
     self.get_proto().available_disk.CopyFrom(available_disk.get_proto())
     self._available_disk = common.SamplePayload(self.get_proto().available_disk)
     return self
示例#9
0
 def set_bearing_samples(
         self, bearing_samples: common.SamplePayload) -> "Location":
     """
     Sets the bearing samples.
     :param bearing_samples: Payload to set.
     :return: A modified instance of self.
     """
     common.check_type(bearing_samples, [common.SamplePayload])
     # noinspection Mypy
     self.get_proto().bearing_samples.CopyFrom(bearing_samples.get_proto())
     self._bearing_samples = common.SamplePayload(
         self.get_proto().bearing_samples)
     return self
示例#10
0
 def set_speed_accuracy_samples(
         self, speed_accuracy_samples: common.SamplePayload) -> "Location":
     """
     Sets the speed accuracy samples.
     :param speed_accuracy_samples: Payload to set.
     :return: A modified instance of self.
     """
     common.check_type(speed_accuracy_samples, [common.SamplePayload])
     # noinspection Mypy
     self.get_proto().speed_accuracy_samples.CopyFrom(
         speed_accuracy_samples.get_proto())
     self._speed_accuracy_samples = common.SamplePayload(
         self.get_proto().speed_accuracy_samples)
     return self
示例#11
0
 def set_altitude_samples(
         self, altitude_samples: common.SamplePayload) -> "Location":
     """
     Sets the altitude samples.
     :param altitude_samples: Payload to set.
     :return: A modified instance of self.
     """
     common.check_type(altitude_samples, [common.SamplePayload])
     # noinspection Mypy
     self.get_proto().altitude_samples.CopyFrom(
         altitude_samples.get_proto())
     self._altitude_samples = common.SamplePayload(
         self.get_proto().altitude_samples)
     return self
 def set_screen_brightness(
     self, screen_brightness: common.SamplePayload
 ) -> "StationMetrics":
     """
     Sets the screen brightness payload.
     :param screen_brightness: A SamplePayload containing screen brightness.
     :return: A modified instance of self.
     """
     common.check_type(screen_brightness, [common.SamplePayload])
     # noinspection Mypy
     self.get_proto().screen_brightness.CopyFrom(screen_brightness.get_proto())
     self._screen_brightness = common.SamplePayload(
         self.get_proto().screen_brightness
     )
     return self