Source code for RsSmw.Implementations.Source.Bb.Gnss.Galileo.Osnma.AesKey

from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
from ....... import enums


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class AesKeyCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

	# noinspection PyTypeChecker
[docs] def get_length(self) -> enums.OsnmaAes: """ ``[SOURce<HW>]:BB:GNSS:GALileo:OSNMa:AESKey:LENGth`` \n Snippet: ``value: enums.OsnmaAes = driver.source.bb.gnss.galileo.osnma.aesKey.get_length()`` \n Sets the length of the cipher-based message authentication code (CMAC) key. Setting requires a MAC Function (MF) field value of 1: SOURce1:BB:GNSS:GALileo:OSNMa:MF 1 See also method ``RsSmw.source.bb.gnss.galileo.osnma.mf()`` . :return: key_length: AES128 | AES256 AES128 The length of the CMAC key is 128 bits. AES256 The length of the CMAC key is 256 bits. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:GNSS:GALileo:OSNMa:AESKey:LENGth?') return Conversions.str_to_scalar_enum(response, enums.OsnmaAes)
[docs] def set_length(self, key_length: enums.OsnmaAes) -> None: """ ``[SOURce<HW>]:BB:GNSS:GALileo:OSNMa:AESKey:LENGth`` \n Snippet: ``driver.source.bb.gnss.galileo.osnma.aesKey.set_length(key_length = enums.OsnmaAes.AES128)`` \n Sets the length of the cipher-based message authentication code (CMAC) key. Setting requires a MAC Function (MF) field value of 1: SOURce1:BB:GNSS:GALileo:OSNMa:MF 1 See also method ``RsSmw.source.bb.gnss.galileo.osnma.mf()`` . :param key_length: AES128 | AES256 AES128 The length of the CMAC key is 128 bits. AES256 The length of the CMAC key is 256 bits. """ param = Conversions.enum_scalar_to_str(key_length, enums.OsnmaAes) self._core.io.write(f'SOURce<HwInstance>:BB:GNSS:GALileo:OSNMa:AESKey:LENGth {param}')