Reads the content of the buffer at the given timestamp.
(self, current_time)
| 160 | 'got {!r}'.format(delay)) |
| 161 | |
| 162 | def read(self, current_time): |
| 163 | """Reads the content of the buffer at the given timestamp.""" |
| 164 | self._update_arrived_deque(current_time) |
| 165 | if self._has_buffer_dim: |
| 166 | out = np.empty(self._buffered_shape, dtype=self._dtype) |
| 167 | for i, obs in enumerate(self._arrived_deque): |
| 168 | out[i] = obs.value |
| 169 | else: |
| 170 | out = self._arrived_deque[0].value.copy() |
| 171 | return out |
| 172 | |
| 173 | def drop_unobserved_upcoming_items(self, observation_schedule, read_interval): |
| 174 | """Plans an optimal observation schedule for an upcoming control period. |