def set_timestamps(self, timestamps: TimingPayload) -> "EventStream":
     """
     Sets the timing payload.
     :param timestamps: Timing payload to set.
     :return: A modified instance of self.
     """
     check_type(timestamps, [TimingPayload])
     self.get_proto().timestamps.CopyFrom(timestamps.get_proto())
     self.__timestamps = TimingPayload(self.get_proto().timestamps)
     return self
Esempio n. 2
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
Esempio n. 3
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
 def __init__(self, proto: RedvoxPacketM.EventStream):
     super().__init__(proto)
     self.__timestamps: TimingPayload = TimingPayload(proto.timestamps)
     self.__events: ProtoRepeatedMessage = ProtoRepeatedMessage(
         proto, proto.events, "events", Event,
         lambda event: event.get_proto())