コード例 #1
0
 def set_app_settings(self, app_settings: AppSettings) -> "StationInformation":
     """
     Sets the AppSettings.
     :param app_settings: AppSettings to set.
     :return: A modified instance of self.
     """
     common.check_type(app_settings, [AppSettings])
     self.get_proto().app_settings.CopyFrom(app_settings.get_proto())
     self._app_settings = AppSettings(self.get_proto().app_settings)
     return self
コード例 #2
0
 def set_service_urls(self, service_urls: ServiceUrls) -> "StationInformation":
     """
     Sets the service urls.
     :param service_urls: ServiceUrls to set.
     :return: A modified instance of self.
     """
     common.check_type(service_urls, [ServiceUrls])
     self.get_proto().service_urls.CopyFrom(service_urls.get_proto())
     self._service_urls = ServiceUrls(self.get_proto().service_urls)
     return self
コード例 #3
0
 def set_timestamps(self, timestamps: common.TimingPayload) -> "Xyz":
     """
     Sets the timestamps.
     :param timestamps: Timestamps to set.
     :return: A modified instance of self.
     """
     common.check_type(timestamps, [common.TimingPayload])
     self.get_proto().timestamps.CopyFrom(timestamps.get_proto())
     self._timestamps = common.TimingPayload(self.get_proto().timestamps)
     return self
コード例 #4
0
 def set_sensors(self, sensors: _sensors.Sensors) -> "WrappedRedvoxPacketM":
     """
     Sets the sensors.
     :param sensors: Sensors to set.
     :return: A modified instance of self.
     """
     check_type(sensors, [_sensors.Sensors])
     self.get_proto().sensors.CopyFrom(sensors.get_proto())
     self._sensors = _sensors.Sensors(self.get_proto().sensors)
     return self
コード例 #5
0
 def set_speed_timestamp(self,
                         speed_timestamp: BestTimestamp) -> "BestLocation":
     """
     Sets the speed timestamp.
     :param speed_timestamp: The BestTimestamp to set.
     :return: A modified instance of self.
     """
     common.check_type(speed_timestamp, [BestTimestamp])
     self.get_proto().speed_timestamp.CopyFrom(speed_timestamp.get_proto())
     self._speed_timestamp = BestTimestamp(self.get_proto().speed_timestamp)
     return self
コード例 #6
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
コード例 #7
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
コード例 #8
0
 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
コード例 #9
0
 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
コード例 #10
0
 def set_location_providers(
         self, location_providers: ProtoRepeatedMessage) -> "Location":
     """
     Sets the location provides.
     :param location_providers: An instance of a ProtoRepeatedMessage containing the location providers.
     :return: A modified instance of self.
     """
     common.check_type(location_providers, [ProtoRepeatedMessage])
     self._location_providers.clear_values()
     self._location_providers.append_values(location_providers.get_values())
     return self
コード例 #11
0
 def set_station_metrics(
     self, station_metrics: StationMetrics
 ) -> "StationInformation":
     """
     Sets the StationMetrics.
     :param station_metrics: StationMetrics to set.
     :return: A modified instance of self.
     """
     common.check_type(station_metrics, [StationMetrics])
     self.get_proto().station_metrics.CopyFrom(station_metrics.get_proto())
     self._station_metrics = StationMetrics(self.get_proto().station_metrics)
     return self
コード例 #12
0
 def set_event_streams(
         self,
         event_streams: ProtoRepeatedMessage) -> "WrappedRedvoxPacketM":
     """
     Set the event streams from the provided ProtoRepeatedMessage.
     :param event_streams: EventStreams embedded in a ProtoRepeatedMessage.
     :return: A modified instance of self.
     """
     check_type(event_streams, [ProtoRepeatedMessage])
     self._event_streams.clear_values()
     self._event_streams.append_values(event_streams.get_values())
     return self
コード例 #13
0
 def set_timestamps_gps(self,
                        timestamps_gps: common.TimingPayload) -> "Location":
     """
     Sets the GPS timing samples.
     :param timestamps_gps: Payload to set.
     :return: A modified instance of self.
     """
     common.check_type(timestamps_gps, [common.TimingPayload])
     self.get_proto().timestamps_gps.CopyFrom(timestamps_gps.get_proto())
     self._timestamps_gps = common.TimingPayload(
         self.get_proto().timestamps_gps)
     return self
コード例 #14
0
 def set_bearing_timestamp(
         self, bearing_timestamp: BestTimestamp) -> "BestLocation":
     """
     Sets the bearing timestamp.
     :param bearing_timestamp: The BestTimestamp to set.
     :return: A modified instance of self.
     """
     common.check_type(bearing_timestamp, [BestTimestamp])
     self.get_proto().bearing_timestamp.CopyFrom(
         bearing_timestamp.get_proto())
     self._bearing_timestamp = BestTimestamp(
         self.get_proto().bearing_timestamp)
     return self
コード例 #15
0
 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
コード例 #16
0
 def set_overall_best_location(
         self, overall_best_location: BestLocation) -> "Location":
     """
     Sets the overall best location.
     :param overall_best_location: BestLocation to set.
     :return: A modified instance of self.
     """
     common.check_type(overall_best_location, [BestLocation])
     self.get_proto().overall_best_location.CopyFrom(
         overall_best_location.get_proto())
     self._overall_best_location = BestLocation(
         self.get_proto().overall_best_location)
     return self
コード例 #17
0
 def set_last_best_location(self,
                            last_best_location: BestLocation) -> "Location":
     """
     Sets the most recent best location.
     :param last_best_location:  The most recent best location to set.
     :return: A modified instance of self.
     """
     common.check_type(last_best_location, [BestLocation])
     self.get_proto().last_best_location.CopyFrom(
         last_best_location.get_proto())
     self._last_best_location = BestLocation(
         self.get_proto().last_best_location)
     return self
コード例 #18
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
コード例 #19
0
 def set_altitude_timestamp(
         self, altitude_timestamp: BestTimestamp) -> "BestLocation":
     """
     Sets the altitude timestamp.
     :param altitude_timestamp: The BestTimestamp to set.
     :return: A modified instance of self.
     """
     common.check_type(altitude_timestamp, [BestTimestamp])
     self.get_proto().altitude_timestamp.CopyFrom(
         altitude_timestamp.get_proto())
     self._altitude_timestamp = BestTimestamp(
         self.get_proto().altitude_timestamp)
     return self
コード例 #20
0
 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
コード例 #21
0
 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
コード例 #22
0
 def set_screen_state(
     self, screen_state: redvox.api1000.common.generic.ProtoRepeatedMessage
 ) -> "StationMetrics":
     """
     Sets the screen state payload.
     :param screen_state: ScreenState repeated message to set.
     :return: A modified instance of self.
     """
     common.check_type(
         screen_state, [redvox.api1000.common.generic.ProtoRepeatedMessage]
     )
     self._screen_state.clear_values()
     self._screen_state.append_values(screen_state.get_values())
     return self
コード例 #23
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
コード例 #24
0
 def set_synch_exchanges(
     self,
     synch_exchanges: redvox.api1000.common.generic.ProtoRepeatedMessage
 ) -> "TimingInformation":
     """
     Sets the synch exchanges.
     :param synch_exchanges: An instance of a ProtoRepeatedMessage containing SyncExchanges.
     :return: A modified instance of self.
     """
     common.check_type(synch_exchanges,
                       [redvox.api1000.common.generic.ProtoRepeatedMessage])
     self._synch_exchanges.clear_values()
     self._synch_exchanges.append_values(synch_exchanges.get_values())
     return self
コード例 #25
0
 def set_power_state(
     self, power_state: redvox.api1000.common.generic.ProtoRepeatedMessage
 ) -> "StationMetrics":
     """
     Sets the power state payload.
     :param power_state: Payload to set.
     :return: A modified instance of self.
     """
     common.check_type(
         power_state, [redvox.api1000.common.generic.ProtoRepeatedMessage]
     )
     self._power_state.clear_values()
     self._power_state.append_values(power_state.get_values())
     return self
コード例 #26
0
 def set_wifi_wake_loc(
     self, wifi_wake_loc: redvox.api1000.common.generic.ProtoRepeatedMessage
 ) -> "StationMetrics":
     """
     Sets the wifi wake lock payload.
     :param wifi_wake_loc: The wifi wake lock payload to set.
     :return: A modified instance of self.
     """
     common.check_type(
         wifi_wake_loc, [redvox.api1000.common.generic.ProtoRepeatedMessage]
     )
     self._wifi_wake_loc.clear_values()
     self._wifi_wake_loc.append_values(wifi_wake_loc.get_values())
     return self
コード例 #27
0
 def set_cell_service_state(
     self, cell_service_state: redvox.api1000.common.generic.ProtoRepeatedMessage
 ) -> "StationMetrics":
     """
     Sets the cell service state payload.
     :param cell_service_state: The payload to set.
     :return: A modified instance of self.
     """
     common.check_type(
         cell_service_state, [redvox.api1000.common.generic.ProtoRepeatedMessage]
     )
     self._cell_service_state.clear_values()
     self._cell_service_state.append_values(cell_service_state.get_values())
     return self
コード例 #28
0
 def set_network_type(
     self, network_type: redvox.api1000.common.generic.ProtoRepeatedMessage
 ) -> "StationMetrics":
     """
     Sets the network type payload.
     :param network_type: The payload to set.
     :return: A modified instance of self.
     """
     common.check_type(
         network_type, [redvox.api1000.common.generic.ProtoRepeatedMessage]
     )
     self._network_type.clear_values()
     self._network_type.append_values(network_type.get_values())
     return self
コード例 #29
0
 def set_latitude_longitude_timestamp(
         self,
         latitude_longitude_timestamp: BestTimestamp) -> "BestLocation":
     """
     Sets the latitude/longitude best timestamp.
     :param latitude_longitude_timestamp: The BestTimestamp to set.
     :return: A modified instance of self.
     """
     common.check_type(latitude_longitude_timestamp, [BestTimestamp])
     self.get_proto().latitude_longitude_timestamp.CopyFrom(
         latitude_longitude_timestamp.get_proto())
     self._latitude_longitude_timestamp = BestTimestamp(
         self.get_proto().latitude_longitude_timestamp)
     return self
コード例 #30
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