An OrderedDict of `control.Observable` instances for this task. Task subclasses should generally NOT override this property. This property is automatically computed by combining the observables dict provided by each `Entity` present in this task, and any additional observables retu
(self)
| 46 | |
| 47 | @property |
| 48 | def observables(self): |
| 49 | """An OrderedDict of `control.Observable` instances for this task. |
| 50 | |
| 51 | Task subclasses should generally NOT override this property. |
| 52 | |
| 53 | This property is automatically computed by combining the observables dict |
| 54 | provided by each `Entity` present in this task, and any additional |
| 55 | observables returned via the `task_observables` property. |
| 56 | |
| 57 | To provide an observable to an agent, the task code should either set |
| 58 | `enabled` property of an `Entity`-bound observable to `True`, or override |
| 59 | the `task_observables` property to provide additional observables not bound |
| 60 | to an `Entity`. |
| 61 | |
| 62 | Returns: |
| 63 | An `collections.OrderedDict` mapping strings to instances of |
| 64 | `control.Observable`. |
| 65 | """ |
| 66 | # Make a shallow copy of the OrderedDict, not the Observables themselves. |
| 67 | observables = copy.copy(self.task_observables) |
| 68 | for entity in self.root_entity.iter_entities(): |
| 69 | observables.update(entity.observables.as_dict()) |
| 70 | return observables |
| 71 | |
| 72 | @property |
| 73 | def task_observables(self): |
nothing calls this directly
no test coverage detected