Source code for RsSmw.Implementations.Source.Fsimulator.DsSimulation.Shiptoship

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ......Internal.Utilities import trim_str_response


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ShiptoshipCls:
	"""
	| Commands in total: 18
	| Subgroups: 3
	| Direct child commands: 4
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("shiptoship", core, parent)

	@property
	def rx(self):
		"""
		| Commands in total: 6
		| Subgroups: 2
		| Direct child commands: 3
		"""
		if not hasattr(self, '_rx'):
			from .Rx import RxCls
			self._rx = RxCls(self._core, self._cmd_group)
		return self._rx

	@property
	def tx(self):
		"""
		| Commands in total: 6
		| Subgroups: 2
		| Direct child commands: 3
		"""
		if not hasattr(self, '_tx'):
			from .Tx import TxCls
			self._tx = TxCls(self._core, self._cmd_group)
		return self._tx

	@property
	def water(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_water'):
			from .Water import WaterCls
			self._water = WaterCls(self._core, self._cmd_group)
		return self._water

[docs] def preset(self) -> None: """ ``[SOURce<HW>]:FSIMulator:DSSimulation:SHIPtoship:PRESet`` \n Snippet: ``driver.source.fsimulator.dsSimulation.shiptoship.preset()`` \n No help available """ self._core.io.write(f'SOURce<HwInstance>:FSIMulator:DSSimulation:SHIPtoship:PRESet')
[docs] def preset_with_opc(self, opc_timeout_ms: int = -1) -> None: """ ``[SOURce<HW>]:FSIMulator:DSSimulation:SHIPtoship:PRESet`` \n Snippet: ``driver.source.fsimulator.dsSimulation.shiptoship.preset_with_opc()`` \n No help available Same as preset, but waits for the operation to complete before continuing further. Use the RsSmw.utilities.opc_timeout_set() to set the timeout value. :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ self._core.io.write_with_opc(f'SOURce<HwInstance>:FSIMulator:DSSimulation:SHIPtoship:PRESet', opc_timeout_ms)
[docs] def get_ttime(self) -> str: """ ``[SOURce<HW>]:FSIMulator:DSSimulation:SHIPtoship:TTIMe`` \n Snippet: ``value: str = driver.source.fsimulator.dsSimulation.shiptoship.get_ttime()`` \n No help available """ response = self._core.io.query_str('SOURce<HwInstance>:FSIMulator:DSSimulation:SHIPtoship:TTIMe?') return trim_str_response(response)
[docs] def set_ttime(self, turn_time: str) -> None: """ ``[SOURce<HW>]:FSIMulator:DSSimulation:SHIPtoship:TTIMe`` \n Snippet: ``driver.source.fsimulator.dsSimulation.shiptoship.set_ttime(turn_time = 'abc')`` \n No help available """ param = Conversions.value_to_quoted_str(turn_time) self._core.io.write(f'SOURce<HwInstance>:FSIMulator:DSSimulation:SHIPtoship:TTIMe {param}')
[docs] def get_xdistance(self) -> float: """ ``[SOURce<HW>]:FSIMulator:DSSimulation:SHIPtoship:XDIStance`` \n Snippet: ``value: float = driver.source.fsimulator.dsSimulation.shiptoship.get_xdistance()`` \n No help available """ response = self._core.io.query_str('SOURce<HwInstance>:FSIMulator:DSSimulation:SHIPtoship:XDIStance?') return Conversions.str_to_float(response)
[docs] def set_xdistance(self, xdistance: float) -> None: """ ``[SOURce<HW>]:FSIMulator:DSSimulation:SHIPtoship:XDIStance`` \n Snippet: ``driver.source.fsimulator.dsSimulation.shiptoship.set_xdistance(xdistance = 1.0)`` \n No help available """ param = Conversions.decimal_value_to_str(xdistance) self._core.io.write(f'SOURce<HwInstance>:FSIMulator:DSSimulation:SHIPtoship:XDIStance {param}')
[docs] def get_ydistance(self) -> float: """ ``[SOURce<HW>]:FSIMulator:DSSimulation:SHIPtoship:YDIStance`` \n Snippet: ``value: float = driver.source.fsimulator.dsSimulation.shiptoship.get_ydistance()`` \n No help available """ response = self._core.io.query_str('SOURce<HwInstance>:FSIMulator:DSSimulation:SHIPtoship:YDIStance?') return Conversions.str_to_float(response)
[docs] def set_ydistance(self, ydistance: float) -> None: """ ``[SOURce<HW>]:FSIMulator:DSSimulation:SHIPtoship:YDIStance`` \n Snippet: ``driver.source.fsimulator.dsSimulation.shiptoship.set_ydistance(ydistance = 1.0)`` \n No help available """ param = Conversions.decimal_value_to_str(ydistance) self._core.io.write(f'SOURce<HwInstance>:FSIMulator:DSSimulation:SHIPtoship:YDIStance {param}')
def clone(self) -> 'ShiptoshipCls': """ Clones the group by creating new object from it and its whole existing subgroups. Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group. """ new_group = ShiptoshipCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group