| @@ 5742-5791 (lines=50) @@ | ||
| 5739 | cmd.set_attribute("setting_id", setting_id) |
|
| 5740 | return self._send_xml_command(cmd) |
|
| 5741 | ||
| 5742 | def get_system_reports( |
|
| 5743 | self, |
|
| 5744 | *, |
|
| 5745 | name: Optional[str] = None, |
|
| 5746 | duration: Optional[int] = None, |
|
| 5747 | start_time: Optional[str] = None, |
|
| 5748 | end_time: Optional[str] = None, |
|
| 5749 | brief: Optional[bool] = None, |
|
| 5750 | slave_id: Optional[str] = None, |
|
| 5751 | ) -> Any: |
|
| 5752 | """Request a list of system reports |
|
| 5753 | ||
| 5754 | Arguments: |
|
| 5755 | name: A string describing the required system report |
|
| 5756 | duration: The number of seconds into the past that the system report |
|
| 5757 | should include |
|
| 5758 | start_time: The start of the time interval the system report should |
|
| 5759 | include in ISO time format |
|
| 5760 | end_time: The end of the time interval the system report should |
|
| 5761 | include in ISO time format |
|
| 5762 | brief: Whether to include the actual system reports |
|
| 5763 | slave_id: UUID of GMP scanner from which to get the system reports |
|
| 5764 | ||
| 5765 | Returns: |
|
| 5766 | The response. See :py:meth:`send_command` for details. |
|
| 5767 | """ |
|
| 5768 | cmd = XmlCommand("get_system_reports") |
|
| 5769 | ||
| 5770 | if name: |
|
| 5771 | cmd.set_attribute("name", name) |
|
| 5772 | ||
| 5773 | if duration is not None: |
|
| 5774 | if not isinstance(duration, numbers.Integral): |
|
| 5775 | raise InvalidArgument("duration needs to be an integer number") |
|
| 5776 | ||
| 5777 | cmd.set_attribute("duration", str(duration)) |
|
| 5778 | ||
| 5779 | if start_time: |
|
| 5780 | cmd.set_attribute("start_time", str(start_time)) |
|
| 5781 | ||
| 5782 | if end_time: |
|
| 5783 | cmd.set_attribute("end_time", str(end_time)) |
|
| 5784 | ||
| 5785 | if brief is not None: |
|
| 5786 | cmd.set_attribute("brief", _to_bool(brief)) |
|
| 5787 | ||
| 5788 | if slave_id: |
|
| 5789 | cmd.set_attribute("slave_id", slave_id) |
|
| 5790 | ||
| 5791 | return self._send_xml_command(cmd) |
|
| 5792 | ||
| 5793 | def get_tags( |
|
| 5794 | self, |
|
| @@ 4108-4157 (lines=50) @@ | ||
| 4105 | cmd.set_attribute("setting_id", setting_id) |
|
| 4106 | return self._send_xml_command(cmd) |
|
| 4107 | ||
| 4108 | def get_system_reports( |
|
| 4109 | self, |
|
| 4110 | *, |
|
| 4111 | name: Optional[str] = None, |
|
| 4112 | duration: Optional[int] = None, |
|
| 4113 | start_time: Optional[str] = None, |
|
| 4114 | end_time: Optional[str] = None, |
|
| 4115 | brief: Optional[bool] = None, |
|
| 4116 | slave_id: Optional[str] = None, |
|
| 4117 | ) -> Any: |
|
| 4118 | """Request a list of system reports |
|
| 4119 | ||
| 4120 | Arguments: |
|
| 4121 | name: A string describing the required system report |
|
| 4122 | duration: The number of seconds into the past that the system report |
|
| 4123 | should include |
|
| 4124 | start_time: The start of the time interval the system report should |
|
| 4125 | include in ISO time format |
|
| 4126 | end_time: The end of the time interval the system report should |
|
| 4127 | include in ISO time format |
|
| 4128 | brief: Whether to include the actual system reports |
|
| 4129 | slave_id: UUID of GMP scanner from which to get the system reports |
|
| 4130 | ||
| 4131 | Returns: |
|
| 4132 | The response. See :py:meth:`send_command` for details. |
|
| 4133 | """ |
|
| 4134 | cmd = XmlCommand("get_system_reports") |
|
| 4135 | ||
| 4136 | if name: |
|
| 4137 | cmd.set_attribute("name", name) |
|
| 4138 | ||
| 4139 | if duration is not None: |
|
| 4140 | if not isinstance(duration, numbers.Integral): |
|
| 4141 | raise InvalidArgument("duration needs to be an integer number") |
|
| 4142 | ||
| 4143 | cmd.set_attribute("duration", str(duration)) |
|
| 4144 | ||
| 4145 | if start_time: |
|
| 4146 | cmd.set_attribute("start_time", str(start_time)) |
|
| 4147 | ||
| 4148 | if end_time: |
|
| 4149 | cmd.set_attribute("end_time", str(end_time)) |
|
| 4150 | ||
| 4151 | if brief is not None: |
|
| 4152 | cmd.set_attribute("brief", _to_bool(brief)) |
|
| 4153 | ||
| 4154 | if slave_id: |
|
| 4155 | cmd.set_attribute("slave_id", slave_id) |
|
| 4156 | ||
| 4157 | return self._send_xml_command(cmd) |
|
| 4158 | ||
| 4159 | def get_tags( |
|
| 4160 | self, |
|