|
| 1 | +""" |
| 2 | +Description |
| 3 | +=========== |
| 4 | +
|
| 5 | +Module: ``geocompy.tps1100.edm`` |
| 6 | +
|
| 7 | +Definitions for the TPS1100 EDM subsystem. |
| 8 | +
|
| 9 | +Types |
| 10 | +----- |
| 11 | +
|
| 12 | +- ``TPS1100EDM`` |
| 13 | +
|
| 14 | +""" |
| 15 | +from __future__ import annotations |
| 16 | + |
| 17 | +from typing_extensions import deprecated |
| 18 | + |
| 19 | +from ..data import ( |
| 20 | + toenum, |
| 21 | + enumparser, |
| 22 | + TRACKLIGHT, |
| 23 | + GUIDELIGHT |
| 24 | +) |
| 25 | +from ..protocols import GeoComResponse |
| 26 | +from ..tps1000.edm import TPS1000EDM |
| 27 | + |
| 28 | + |
| 29 | +class TPS1100EDM(TPS1000EDM): |
| 30 | + """ |
| 31 | + Electronic distance measurement subsystem of the TPS1100 GeoCom |
| 32 | + protocol. |
| 33 | +
|
| 34 | + This subsystem provides access to control some of the EDM module |
| 35 | + functions. |
| 36 | +
|
| 37 | + """ |
| 38 | + |
| 39 | + def get_egl_intensity(self) -> GeoComResponse[GUIDELIGHT]: |
| 40 | + """ |
| 41 | + RPC 1058, ``EDM_GetEglIntensity`` |
| 42 | +
|
| 43 | + Gets the current intensity setting of the electronic guide light. |
| 44 | +
|
| 45 | + Returns |
| 46 | + ------- |
| 47 | + GeoComResponse |
| 48 | + Params: |
| 49 | + - `GUIDELIGHT`: Current intensity mode. |
| 50 | + Error codes: |
| 51 | + - ``EDM_DEV_NOT_INSTALLED``: Instrument has no |
| 52 | + EGL. |
| 53 | +
|
| 54 | + """ |
| 55 | + return self._request( |
| 56 | + 1058, |
| 57 | + parsers=enumparser(GUIDELIGHT) |
| 58 | + ) |
| 59 | + |
| 60 | + def set_egl_intensity( |
| 61 | + self, |
| 62 | + intensity: GUIDELIGHT | str |
| 63 | + ) -> GeoComResponse[None]: |
| 64 | + """ |
| 65 | + RPC 1059, ``EDM_SetEglIntensity`` |
| 66 | +
|
| 67 | + Sets the intensity setting of the electronic guide light. |
| 68 | +
|
| 69 | + Parameters |
| 70 | + ---------- |
| 71 | + intensity : GUIDELIGHT | str |
| 72 | + Intensity setting to activate. |
| 73 | +
|
| 74 | + Returns |
| 75 | + ------- |
| 76 | + GeoComResponse |
| 77 | + Error codes: |
| 78 | + - ``EDM_DEV_NOT_INSTALLED``: Instrument has no |
| 79 | + EGL. |
| 80 | +
|
| 81 | + """ |
| 82 | + _intesity = toenum(GUIDELIGHT, intensity) |
| 83 | + return self._request( |
| 84 | + 1059, |
| 85 | + [_intesity.value] |
| 86 | + ) |
| 87 | + |
| 88 | + @deprecated("This command was removed for TPS1100 instruments") |
| 89 | + def on( |
| 90 | + self, |
| 91 | + *args |
| 92 | + ) -> GeoComResponse[None]: |
| 93 | + """ |
| 94 | + RPC 1010, ``EDM_On`` |
| 95 | +
|
| 96 | + .. versionremoved:: GeoCom-TPS1100-1.00 |
| 97 | +
|
| 98 | + Raises |
| 99 | + ------ |
| 100 | + AttributeError |
| 101 | + """ |
| 102 | + raise AttributeError() |
| 103 | + |
| 104 | + @deprecated("This command was removed for TPS1100 instruments") |
| 105 | + def get_bumerang(self) -> GeoComResponse[bool]: |
| 106 | + """ |
| 107 | + RPC 1044, ``EDM_GetBumerang`` |
| 108 | +
|
| 109 | + .. versionremoved:: GeoCom-TPS1100-1.00 |
| 110 | +
|
| 111 | + Raises |
| 112 | + ------ |
| 113 | + AttributeError |
| 114 | + """ |
| 115 | + raise AttributeError() |
| 116 | + |
| 117 | + @deprecated("This command was removed for TPS1100 instruments") |
| 118 | + def set_bumerang( |
| 119 | + self, |
| 120 | + *args |
| 121 | + ) -> GeoComResponse[None]: |
| 122 | + """ |
| 123 | + RPC 1007, ``EDM_SetBumerang`` |
| 124 | +
|
| 125 | + .. versionremoved:: GeoCom-TPS1100-1.00 |
| 126 | +
|
| 127 | + Raises |
| 128 | + ------ |
| 129 | + AttributeError |
| 130 | + """ |
| 131 | + raise AttributeError() |
| 132 | + |
| 133 | + @deprecated("This command was removed for TPS1100 instruments") |
| 134 | + def get_trk_light_brightness(self) -> GeoComResponse[TRACKLIGHT]: |
| 135 | + """ |
| 136 | + RPC 1041, ``EDM_GetTrkLightBrightness`` |
| 137 | +
|
| 138 | + .. versionremoved:: GeoCom-TPS1100-1.00 |
| 139 | + Use `get_egl_intensity` instead. |
| 140 | +
|
| 141 | + Raises |
| 142 | + ------ |
| 143 | + AttributeError |
| 144 | + """ |
| 145 | + raise AttributeError() |
| 146 | + |
| 147 | + @deprecated("This command was removed for TPS1100 instruments") |
| 148 | + def set_trk_light_brightness( |
| 149 | + self, |
| 150 | + *args |
| 151 | + ) -> GeoComResponse[None]: |
| 152 | + """ |
| 153 | + RPC 1032, ``EDM_SetTrkLightBrightness`` |
| 154 | +
|
| 155 | + .. versionremoved:: GeoCom-TPS1100-1.00 |
| 156 | + Use `set_egl_intensity` instead. |
| 157 | +
|
| 158 | + Raises |
| 159 | + ------ |
| 160 | + AttributeError |
| 161 | + """ |
| 162 | + raise AttributeError() |
| 163 | + |
| 164 | + @deprecated("This command was removed for TPS1100 instruments") |
| 165 | + def get_trk_light_switch(self) -> GeoComResponse[bool]: |
| 166 | + """ |
| 167 | + RPC 1040, ``EDM_GetTrkLightSwitch`` |
| 168 | +
|
| 169 | + .. versionremoved:: GeoCom-TPS1100-1.00 |
| 170 | + Use `get_egl_intensity` instead. |
| 171 | +
|
| 172 | + Raises |
| 173 | + ------ |
| 174 | + AttributeError |
| 175 | + """ |
| 176 | + raise AttributeError() |
| 177 | + |
| 178 | + @deprecated("This command was removed for TPS1100 instruments") |
| 179 | + def set_trk_light_switch( |
| 180 | + self, |
| 181 | + *args |
| 182 | + ) -> GeoComResponse[None]: |
| 183 | + """ |
| 184 | + RPC 1031, ``EDM_SetTrkLightSwitch`` |
| 185 | +
|
| 186 | + .. versionremoved:: GeoCom-TPS1100-1.00 |
| 187 | + Use `set_egl_intensity` instead. |
| 188 | +
|
| 189 | + Raises |
| 190 | + ------ |
| 191 | + AttributeError |
| 192 | + """ |
| 193 | + raise AttributeError() |
0 commit comments