Beamforming Series
BBoxOne (26/28/39GHz)
- class tlkcore.tmydev.DevBBoxOne.BBoxOne(*parent)
Bases:
BBox- exportDevLog(export_folder=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/tmytek-tlkcore/checkouts/v2.3.0rc1'))
Dump device log and export to file
- getBeamGainList(polar=<POLARIZATION.DUAL: 3>)
Read all channel gain settings with current mode, returns float list
- getBeamPhaseList(polar=<POLARIZATION.DUAL: 3>)
Read all channel phase settings with current mode, returns int list
- getBoardCount()
Get board numbers in device
- getChannelCount(inBoard=False)
Get total number of channel in this device (or in one RF board)
- getChannelSwitch(mode: RFMode | CellRFMode | int, polar: POLARIZATION | int = None, chain=1)
Read all channel DISABLE settings by the specific mode. It’s also the same func with ReadChannelSwitchValues() in old API
- getDFUSupport()
Check if the device supports Device Firmware Upgrade (DFU).
- getDevTypeName()
Retrieve current name of device
- Returns:
Name of device
Examples
>>> service.getDevTypeName(sn) 'RIS'
- getFastParallelMode()
Get fast parallel mode and external SPI status.
- Returns:
Fast parallel mode and external SPI enable/disable
- Return type:
bool
- getOperatingFreq()
Get current operating frequency
- getRFMode()
Only get RF mode from TLKCore after called setRFMode() before, not support fetch from device currently.
Examples
- Get the current RF mode of the device:
>>> device = BBox("D2123E001-28", "192.168.100.121", 9) >>> device.setRFMode(RFMode.TX) # Set the RF mode first >>> rf_mode = device.getRFMode().RetData >>> print(f"Current RF Mode: {rf_mode.name}")
- getTemperatureADC()
Get temperature adc value from device
- processDFU(file_path: str, dfu_dev_info: dict)
Process the Device Firmware Upgrade (DFU) at the local side.
- Parameters:
file_path (str) – The file path to the firmware file to be uploaded.
dfu_dev_info (dict) –
Information about the DFU device.
sn (str): Serial number of the device.
address (str): Address of the device.
devtype (int): Device type as defined in TMYDevType.
in_dfu (bool): Indicates if the device is already in DFU mode.
fw_ver (str): Firmware version of the device.
hw_ver (str): Hardware version of the device.
- Returns:
- An object containing the result of the DFU process.
OK: If the DFU process completes successfully.ERROR_METHOD_NOT_SUPPORT: If DFU is not supported on the device.ERROR_DFU: If the DFU process encounters an error.
- Return type:
- queryFWVer()
Query FW version of the device.
Examples
>>> fw_version = service.queryFWVer(sn).RetData >>> print(f"FW Version: {fw_version}") v1.0.0
- queryHWVer()
Query the hardware version of the device.
>>> device = BBox("D2123E001-28", "192.168.100.121", 9) >>> hw_version = device.queryHWVer() >>> print(f"Hardware Version: {hw_version.RetData}")
- Returns:
- An object containing the hardware version of the device.
str: The hardware version as a string.
- Return type:
- queryLoaderVer()
Query the bootloader version of the device.
- queryMAC()
Query the MAC address of the device.
- Returns:
- An object containing the MAC address of the device.
str: The MAC address as a string.
- Return type:
Examples
>>> device = BBox("D2123E001-28", "192.168.100.121", 9) >>> mac_address = device.queryMAC() >>> print(f"MAC Address: {mac_address.RetData}")
- querySN()
Query the serial number of the device.
- queryStaticIP()
Query the static IP address of the device.
- Parameters:
sn (str) – The serial number of the device.
- Returns:
RetDatastr: Static IP of the device.
- Return type:
Note
Some FW versions of device not support this feature
Examples
- Query the static IP address of a device:
>>> static_ip = service.queryStaticIP(sn).RetData >>> print(f"Static IP Address: {static_ip}") Static IP Address: 192.168.100.111
- queryTCConfig()
getTemperatureParams() in old API
- Parameters:
sn (str) – Device SN
- Returns:
TC config with list format, each board includes [TXC,TXQ,RXC,RXQ]
- Return type:
int[][][] as list
- reboot()
Reboot of the device.
- selectAAKit(kitName)
Set operating AAkit by AAKitName for device with AAKit name.
- setBeamAngle(gain_db, theta, phi, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, mode=None)
Set the specific beam angle with (gain_db, theta, phi) for the device. gain_db range is from DR(-xxx ~ +ooo), theta range is mapping to spacing of AAKit, phase_deg range is 0-359
- Parameters:
sn (str) – Device SN
gain_db (float) – Gain settings.
theta (int) – Theta angle.
phi (int) – Phi angle.
rf_mode (
RFMode) – RF mode.polar (Union[POLARIZATION, int]) – Polarization. Defaults to DUAL.
- Returns:
- Return type:
Examples
- Set a specific beam angle using the service:
>>> sn = "D2123E001-28" # Serial number of the device >>> gain_db = 10.0 # Gain setting >>> theta = 30 # Theta angle >>> phi = 45 # Phi angle >>> polar = 1 # Polarization (1 for horizontal, 2 for vertical, or POL.DUAL for both) >>> service.setBeamAngle(sn, gain_db=gain_db, theta=theta, phi=phi, polar=polar)
- setChannelGainPhase(channel: int, gain_db: float | list, phase_deg: float | list, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, board: int = -1, applySetting=True)
Set Gain and Phase setting for the specific channel or ALL channels board/channel usually starts from 1 (0 means ALL channels), gain_db range is from DR, phase_deg range is 0-359
- Parameters:
channel (int) – channel number starts from 1, it can also below with the board.
gain_db (Union[float, list]) – gain with db
phase_deg (Union[float, list]) – phase with degree
polar (Union[POLARIZATION, int], optional) – polarization. Defaults to POL.DUAL.
board (int) – The board number starts from 1. Defaults to -1
applySetting (bool, optional) – Batch apply for WEBTLK. Defaults to True.
- Returns:
- Return type:
Warning
If you only set the gain for a single channel and its difference from the other channels exceeds the allowable limit (element gain), an error might occur.
Changed in version v2.1.0: polar added for multi-polarization beamformer device
Warning
DO NOT set all channel iteratively
- setFastParallelMode(toEnable: bool)
Set fast parallel mode and external SPI enable or not. It’s also the same func with Set_Fast_Parallel_Mode() in old API
- Parameters:
toEnable (bool) – A flag to enable or disable fast parallel mode and external SPI.
- Returns:
- An object containing the result of the operation.
OK: If the operation is successful.ERROR_FW_NOT_SUPPORT: If the firmware version does not support this feature.ERROR: If there is an error during the operation.
- Return type:
- setIcChannelGain(board: int, ch_gain: list, common_gain=None, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, applySetting=True)
Set Gain settings for all channels in the specific board/IC.
- Parameters:
board (int) – board number, starts from 1, and 0 means for all boards
ch_gain (list) – channel gain list, and there are 4 items
common_gain (float, optional) – common gain is a gain base within 4 channels in one board. Defaults to None.
polar (Union[POLARIZATION, int]) – polarization. Defaults to DUAL.
applySetting (bool, optional) – batch apply and it used by WEBTLK. Defaults to True.
- Return type:
Changed in version v2.1.0: polar added for multi polarization beamform device
- setOperatingFreq(freq: int | float)
Set freq and reload cali/beam tables
- setRFMode(mode: RFMode | CellRFMode | int, slots: list = None)
Set RF mode to device
- setStaticIP(ip, reboot=False)
Set the static IP address of the device, and reboot or not.
Note
Support LAN device only,
- Parameters:
ip (str) – IP with x.x.x.x format
reboot (bool, optional) – reboot device after setting static IP. Defaults to False.
Note
Some FW versions of device not support this reboot feature.
- Return type:
Examples
- Set the static IP address of a device:
>>> service.setStaticIP(sn, "192.168.100.150", True)
- switchChannel(channel, disable: bool, board=-1)
Disable the specific channel power or not, the board/channel must start from 1. Or disable ALL channels if channel sets 0. It’s also the same func with switchChannelPower() in old API
- Parameters:
sn (str) – Device SN
int – Channel number
bool (Optional) – disable or not
- Returns:
- Return type:
Examples
- Disable a specific channel on a specific board:
>>> sn = "D2123E001-28" # Serial number of the device >>> channel = 2 # Channel number starts from 1 >>> board = 1 # Board number starts from 1 >>> service.switchChannel(sn, channel=channel, disable=True, board=board)
BBoxLite (26/28/39GHz)
- class tlkcore.tmydev.DevBBoxLite.BBoxLite(*parent)
Bases:
BBox- exportDevLog(export_folder=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/tmytek-tlkcore/checkouts/v2.3.0rc1'))
Dump device log and export to file
- getBeamGainList(polar=<POLARIZATION.DUAL: 3>)
Read all channel gain settings with current mode, returns float list
- getBeamPhaseList(polar=<POLARIZATION.DUAL: 3>)
Read all channel phase settings with current mode, returns int list
- getBoardCount()
Get board numbers in device
- getChannelCount(inBoard=False)
Get total number of channel in this device (or in one RF board)
- getChannelSwitch(mode: RFMode | CellRFMode | int, polar: POLARIZATION | int = None, chain=1)
Read all channel DISABLE settings by the specific mode. It’s also the same func with ReadChannelSwitchValues() in old API
- getDFUSupport()
Check if the device supports Device Firmware Upgrade (DFU).
- getDevTypeName()
Retrieve current name of device
- Returns:
Name of device
Examples
>>> service.getDevTypeName(sn) 'RIS'
- getFastParallelMode()
Get fast parallel mode and external SPI status.
- Returns:
Fast parallel mode and external SPI enable/disable
- Return type:
bool
- getOperatingFreq()
Get current operating frequency
- getRFMode()
Only get RF mode from TLKCore after called setRFMode() before, not support fetch from device currently.
Examples
- Get the current RF mode of the device:
>>> device = BBox("D2123E001-28", "192.168.100.121", 9) >>> device.setRFMode(RFMode.TX) # Set the RF mode first >>> rf_mode = device.getRFMode().RetData >>> print(f"Current RF Mode: {rf_mode.name}")
- getTemperatureADC()
Get temperature adc value from device
- processDFU(file_path: str, dfu_dev_info: dict)
Process the Device Firmware Upgrade (DFU) at the local side.
- Parameters:
file_path (str) – The file path to the firmware file to be uploaded.
dfu_dev_info (dict) –
Information about the DFU device.
sn (str): Serial number of the device.
address (str): Address of the device.
devtype (int): Device type as defined in TMYDevType.
in_dfu (bool): Indicates if the device is already in DFU mode.
fw_ver (str): Firmware version of the device.
hw_ver (str): Hardware version of the device.
- Returns:
- An object containing the result of the DFU process.
OK: If the DFU process completes successfully.ERROR_METHOD_NOT_SUPPORT: If DFU is not supported on the device.ERROR_DFU: If the DFU process encounters an error.
- Return type:
- queryFWVer()
Query FW version of the device.
Examples
>>> fw_version = service.queryFWVer(sn).RetData >>> print(f"FW Version: {fw_version}") v1.0.0
- queryHWVer()
Query the hardware version of the device.
>>> device = BBox("D2123E001-28", "192.168.100.121", 9) >>> hw_version = device.queryHWVer() >>> print(f"Hardware Version: {hw_version.RetData}")
- Returns:
- An object containing the hardware version of the device.
str: The hardware version as a string.
- Return type:
- queryLoaderVer()
Query the bootloader version of the device.
- queryMAC()
Query the MAC address of the device.
- Returns:
- An object containing the MAC address of the device.
str: The MAC address as a string.
- Return type:
Examples
>>> device = BBox("D2123E001-28", "192.168.100.121", 9) >>> mac_address = device.queryMAC() >>> print(f"MAC Address: {mac_address.RetData}")
- querySN()
Query the serial number of the device.
- queryStaticIP()
Query the static IP address of the device.
- Parameters:
sn (str) – The serial number of the device.
- Returns:
RetDatastr: Static IP of the device.
- Return type:
Note
Some FW versions of device not support this feature
Examples
- Query the static IP address of a device:
>>> static_ip = service.queryStaticIP(sn).RetData >>> print(f"Static IP Address: {static_ip}") Static IP Address: 192.168.100.111
- queryTCConfig()
getTemperatureParams() in old API
- Parameters:
sn (str) – Device SN
- Returns:
TC config with list format, each board includes [TXC,TXQ,RXC,RXQ]
- Return type:
int[][][] as list
- reboot()
Reboot of the device.
- selectAAKit(kitName)
Set operating AAkit by AAKitName for device with AAKit name.
- setBeamAngle(gain_db, theta, phi, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, mode=None)
Set the specific beam angle with (gain_db, theta, phi) for the device. gain_db range is from DR(-xxx ~ +ooo), theta range is mapping to spacing of AAKit, phase_deg range is 0-359
- Parameters:
sn (str) – Device SN
gain_db (float) – Gain settings.
theta (int) – Theta angle.
phi (int) – Phi angle.
rf_mode (
RFMode) – RF mode.polar (Union[POLARIZATION, int]) – Polarization. Defaults to DUAL.
- Returns:
- Return type:
Examples
- Set a specific beam angle using the service:
>>> sn = "D2123E001-28" # Serial number of the device >>> gain_db = 10.0 # Gain setting >>> theta = 30 # Theta angle >>> phi = 45 # Phi angle >>> polar = 1 # Polarization (1 for horizontal, 2 for vertical, or POL.DUAL for both) >>> service.setBeamAngle(sn, gain_db=gain_db, theta=theta, phi=phi, polar=polar)
- setChannelGainPhase(channel: int, gain_db: float | list, phase_deg: float | list, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, board: int = -1, applySetting=True)
Set Gain and Phase setting for the specific channel or ALL channels board/channel usually starts from 1 (0 means ALL channels), gain_db range is from DR, phase_deg range is 0-359
- Parameters:
channel (int) – channel number starts from 1, it can also below with the board.
gain_db (Union[float, list]) – gain with db
phase_deg (Union[float, list]) – phase with degree
polar (Union[POLARIZATION, int], optional) – polarization. Defaults to POL.DUAL.
board (int) – The board number starts from 1. Defaults to -1
applySetting (bool, optional) – Batch apply for WEBTLK. Defaults to True.
- Returns:
- Return type:
Warning
If you only set the gain for a single channel and its difference from the other channels exceeds the allowable limit (element gain), an error might occur.
Changed in version v2.1.0: polar added for multi-polarization beamformer device
Warning
DO NOT set all channel iteratively
- setFastParallelMode(toEnable: bool)
Set fast parallel mode and external SPI enable or not. It’s also the same func with Set_Fast_Parallel_Mode() in old API
- Parameters:
toEnable (bool) – A flag to enable or disable fast parallel mode and external SPI.
- Returns:
- An object containing the result of the operation.
OK: If the operation is successful.ERROR_FW_NOT_SUPPORT: If the firmware version does not support this feature.ERROR: If there is an error during the operation.
- Return type:
- setIcChannelGain(board: int, ch_gain: list, common_gain=None, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, applySetting=True)
Set Gain settings for all channels in the specific board/IC.
- Parameters:
board (int) – board number, starts from 1, and 0 means for all boards
ch_gain (list) – channel gain list, and there are 4 items
common_gain (float, optional) – common gain is a gain base within 4 channels in one board. Defaults to None.
polar (Union[POLARIZATION, int]) – polarization. Defaults to DUAL.
applySetting (bool, optional) – batch apply and it used by WEBTLK. Defaults to True.
- Return type:
Changed in version v2.1.0: polar added for multi polarization beamform device
- setOperatingFreq(freq: int | float)
Set freq and reload cali/beam tables
- setRFMode(mode: RFMode | CellRFMode | int, slots: list = None)
Set RF mode to device
- setStaticIP(ip, reboot=False)
Set the static IP address of the device, and reboot or not.
Note
Support LAN device only,
- Parameters:
ip (str) – IP with x.x.x.x format
reboot (bool, optional) – reboot device after setting static IP. Defaults to False.
Note
Some FW versions of device not support this reboot feature.
- Return type:
Examples
- Set the static IP address of a device:
>>> service.setStaticIP(sn, "192.168.100.150", True)
- switchChannel(channel, disable: bool, board=-1)
Disable the specific channel power or not, the board/channel must start from 1. Or disable ALL channels if channel sets 0. It’s also the same func with switchChannelPower() in old API
- Parameters:
sn (str) – Device SN
int – Channel number
bool (Optional) – disable or not
- Returns:
- Return type:
Examples
- Disable a specific channel on a specific board:
>>> sn = "D2123E001-28" # Serial number of the device >>> channel = 2 # Channel number starts from 1 >>> board = 1 # Board number starts from 1 >>> service.switchChannel(sn, channel=channel, disable=True, board=board)
BBoard (26/28/39GHz)
- class tlkcore.tmydev.DevBBoard.BBoard(*parent)
Bases:
BBox- exportDevLog(export_folder=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/tmytek-tlkcore/checkouts/v2.3.0rc1'))
Dump device log and export to file
- getBeamGainList(polar=<POLARIZATION.DUAL: 3>)
Read all channel gain settings with current mode, returns float list
- getBeamPhaseList(polar=<POLARIZATION.DUAL: 3>)
Read all channel phase settings with current mode, returns int list
- getBoardCount()
Get board numbers in device
- getChannelCount(inBoard=False)
Get total number of channel in this device (or in one RF board)
- getChannelSwitch(mode: RFMode | CellRFMode | int, polar: POLARIZATION | int = None, chain=1)
Read all channel DISABLE settings by the specific mode. It’s also the same func with ReadChannelSwitchValues() in old API
- getDFUSupport()
Check if the device supports Device Firmware Upgrade (DFU).
- getDevTypeName()
Retrieve current name of device
- Returns:
Name of device
Examples
>>> service.getDevTypeName(sn) 'RIS'
- getFastParallelMode()
Get fast parallel mode and external SPI status.
- Returns:
Fast parallel mode and external SPI enable/disable
- Return type:
bool
- getOperatingFreq()
Get current operating frequency
- getRFMode()
Only get RF mode from TLKCore after called setRFMode() before, not support fetch from device currently.
Examples
- Get the current RF mode of the device:
>>> device = BBox("D2123E001-28", "192.168.100.121", 9) >>> device.setRFMode(RFMode.TX) # Set the RF mode first >>> rf_mode = device.getRFMode().RetData >>> print(f"Current RF Mode: {rf_mode.name}")
- getTemperatureADC()
Get temperature adc value from device
- processDFU(file_path: str, dfu_dev_info: dict)
Process the Device Firmware Upgrade (DFU) at the local side.
- Parameters:
file_path (str) – The file path to the firmware file to be uploaded.
dfu_dev_info (dict) –
Information about the DFU device.
sn (str): Serial number of the device.
address (str): Address of the device.
devtype (int): Device type as defined in TMYDevType.
in_dfu (bool): Indicates if the device is already in DFU mode.
fw_ver (str): Firmware version of the device.
hw_ver (str): Hardware version of the device.
- Returns:
- An object containing the result of the DFU process.
OK: If the DFU process completes successfully.ERROR_METHOD_NOT_SUPPORT: If DFU is not supported on the device.ERROR_DFU: If the DFU process encounters an error.
- Return type:
- queryFWVer()
Query FW version of the device.
Examples
>>> fw_version = service.queryFWVer(sn).RetData >>> print(f"FW Version: {fw_version}") v1.0.0
- queryHWVer()
Query the hardware version of the device.
>>> device = BBox("D2123E001-28", "192.168.100.121", 9) >>> hw_version = device.queryHWVer() >>> print(f"Hardware Version: {hw_version.RetData}")
- Returns:
- An object containing the hardware version of the device.
str: The hardware version as a string.
- Return type:
- queryLoaderVer()
Query the bootloader version of the device.
- queryMAC()
Query the MAC address of the device.
- Returns:
- An object containing the MAC address of the device.
str: The MAC address as a string.
- Return type:
Examples
>>> device = BBox("D2123E001-28", "192.168.100.121", 9) >>> mac_address = device.queryMAC() >>> print(f"MAC Address: {mac_address.RetData}")
- querySN()
Query the serial number of the device.
- queryStaticIP()
Query the static IP address of the device.
- Parameters:
sn (str) – The serial number of the device.
- Returns:
RetDatastr: Static IP of the device.
- Return type:
Note
Some FW versions of device not support this feature
Examples
- Query the static IP address of a device:
>>> static_ip = service.queryStaticIP(sn).RetData >>> print(f"Static IP Address: {static_ip}") Static IP Address: 192.168.100.111
- queryTCConfig()
getTemperatureParams() in old API
- Parameters:
sn (str) – Device SN
- Returns:
TC config with list format, each board includes [TXC,TXQ,RXC,RXQ]
- Return type:
int[][][] as list
- reboot()
Reboot of the device.
- selectAAKit(kitName)
Set operating AAkit by AAKitName for device with AAKit name.
- setBeamAngle(gain_db, theta, phi, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, mode=None)
Set the specific beam angle with (gain_db, theta, phi) for the device. gain_db range is from DR(-xxx ~ +ooo), theta range is mapping to spacing of AAKit, phase_deg range is 0-359
- Parameters:
sn (str) – Device SN
gain_db (float) – Gain settings.
theta (int) – Theta angle.
phi (int) – Phi angle.
rf_mode (
RFMode) – RF mode.polar (Union[POLARIZATION, int]) – Polarization. Defaults to DUAL.
- Returns:
- Return type:
Examples
- Set a specific beam angle using the service:
>>> sn = "D2123E001-28" # Serial number of the device >>> gain_db = 10.0 # Gain setting >>> theta = 30 # Theta angle >>> phi = 45 # Phi angle >>> polar = 1 # Polarization (1 for horizontal, 2 for vertical, or POL.DUAL for both) >>> service.setBeamAngle(sn, gain_db=gain_db, theta=theta, phi=phi, polar=polar)
- setChannelGainPhase(channel: int, gain_db: float | list, phase_deg: float | list, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, board: int = -1, applySetting=True)
Set Gain and Phase setting for the specific channel or ALL channels board/channel usually starts from 1 (0 means ALL channels), gain_db range is from DR, phase_deg range is 0-359
- Parameters:
channel (int) – channel number starts from 1, it can also below with the board.
gain_db (Union[float, list]) – gain with db
phase_deg (Union[float, list]) – phase with degree
polar (Union[POLARIZATION, int], optional) – polarization. Defaults to POL.DUAL.
board (int) – The board number starts from 1. Defaults to -1
applySetting (bool, optional) – Batch apply for WEBTLK. Defaults to True.
- Returns:
- Return type:
Warning
If you only set the gain for a single channel and its difference from the other channels exceeds the allowable limit (element gain), an error might occur.
Changed in version v2.1.0: polar added for multi-polarization beamformer device
Warning
DO NOT set all channel iteratively
- setChannelGainStep(channel, gain_step, board=-1)
Set the specific channel gain step
- Parameters:
channel (int) – The channel number.
gain_step (float) – The gain step value.
board (int, optional) – The board number. Defaults to -1.
- Returns:
- Return type:
- setChannelPhaseStep(channel, phase_step, board=-1)
Set the specific channel phase step
- setComGainStep(gain_step, board=-1)
Set the specific board common-arm gain with the common-arm gain step.
- setFastParallelMode(toEnable: bool)
Set fast parallel mode and external SPI enable or not. It’s also the same func with Set_Fast_Parallel_Mode() in old API
- Parameters:
toEnable (bool) – A flag to enable or disable fast parallel mode and external SPI.
- Returns:
- An object containing the result of the operation.
OK: If the operation is successful.ERROR_FW_NOT_SUPPORT: If the firmware version does not support this feature.ERROR: If there is an error during the operation.
- Return type:
- setIcChannelGain(board: int, ch_gain: list, common_gain=None, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, applySetting=True)
Set Gain settings for all channels in the specific board/IC.
- Parameters:
board (int) – board number, starts from 1, and 0 means for all boards
ch_gain (list) – channel gain list, and there are 4 items
common_gain (float, optional) – common gain is a gain base within 4 channels in one board. Defaults to None.
polar (Union[POLARIZATION, int]) – polarization. Defaults to DUAL.
applySetting (bool, optional) – batch apply and it used by WEBTLK. Defaults to True.
- Return type:
Changed in version v2.1.0: polar added for multi polarization beamform device
- setOperatingFreq(freq: int | float)
Set freq and reload cali/beam tables
- setRFMode(mode: RFMode | CellRFMode | int, slots: list = None)
Set RF mode to device
- setStaticIP(ip, reboot=False)
Set the static IP address of the device, and reboot or not.
Note
Support LAN device only,
- Parameters:
ip (str) – IP with x.x.x.x format
reboot (bool, optional) – reboot device after setting static IP. Defaults to False.
Note
Some FW versions of device not support this reboot feature.
- Return type:
Examples
- Set the static IP address of a device:
>>> service.setStaticIP(sn, "192.168.100.150", True)
- setTCConfig(config: list, board=1)
Set temperature compensation parameters via _setTCChainConfig(). The config list should be in the order of [TXC, TXQ, RXC, RXQ]. The TXC and TXQ are the temperature compensation parameters for TX and RX channels respectively.
- Parameters:
config (list) – The temperature compensation parameters.
board (int, optional) – The board number. Defaults to 1.
- Returns:
The result of the operation.
- Return type:
- switchChannel(channel, disable: bool, board=-1)
Disable the specific channel power or not, the board/channel must start from 1. Or disable ALL channels if channel sets 0. It’s also the same func with switchChannelPower() in old API
- Parameters:
sn (str) – Device SN
int – Channel number
bool (Optional) – disable or not
- Returns:
- Return type:
Examples
- Disable a specific channel on a specific board:
>>> sn = "D2123E001-28" # Serial number of the device >>> channel = 2 # Channel number starts from 1 >>> board = 1 # Board number starts from 1 >>> service.switchChannel(sn, channel=channel, disable=True, board=board)
CloverCell (28GHz)
- class tlkcore.tmydev.DevCloverCell.CloverCellEvb(*parent)
Bases:
CloverCellEVB: 2x2 28GHz
- exportDevLog(export_folder=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/tmytek-tlkcore/checkouts/v2.3.0rc1'))
Dump device log and export to file
- getBeamGainList(polar=<POLARIZATION.DUAL: 3>)
Read all channel gain settings with current mode, returns float list
- getBeamPhaseList(polar=<POLARIZATION.DUAL: 3>)
Read all channel phase settings with current mode, returns int list
- getBoardCount()
Get board numbers in device
- getChannelCount(inBoard=False)
Get total number of channel in this device (or in one RF board)
- getChannelSwitch(mode: RFMode | CellRFMode | int, polar: POLARIZATION | int = None, chain=1)
Read all channel DISABLE settings by the specific mode. It’s also the same func with ReadChannelSwitchValues() in old API
- getDFUSupport()
Check if the device supports Device Firmware Upgrade (DFU).
- getDevTypeName()
Retrieve current name of device
- Returns:
Name of device
Examples
>>> service.getDevTypeName(sn) 'RIS'
- getFastParallelMode()
Get fast parallel mode and external SPI status.
- Returns:
Fast parallel mode and external SPI enable/disable
- Return type:
bool
- getOperatingConfig(mode: CellRFMode | int)
- Get current operating register config, it returns current config of the whole module
maybe rename to getChainConfig()
- Parameters:
mode (Union[CellRFMode, int]) – The RF mode to apply or query. It can be an instance of CellRFMode or an integer. - CellRFMode.TX: Transmit mode. - CellRFMode.RX: Receive mode. - CellRFMode.STANDBY: Standby mode.
- Returns:
RetDatadict: all current operating register config, format will be {
HORIZON: {DISABLE:[],GAIN:[],COM_STEP:int,PHASE:[]}}
- Return type:
- getOperatingFreq()
Get current operating frequency
- getOperatingStatus()
Get IC operating Status with H/V pdet, temperature and power consumption
- getPolarSynthesis()
Retrieve the current delta phase for polarization synthesis.
- Returns:
An object containing the delta phase data.
- Return type:
- getPolarSynthesisName()
Retrieve the name corresponding to the current delta phase for polarization synthesis.
- Returns:
An object containing the name of the delta phase or “Unknown” if not found.
- Return type:
- getRFMode()
Only get RF mode from TLKCore after called setRFMode() before, not support fetch from device currently.
- getTemperatureADC()
Get temperature adc value from device
- processDFU(file_path: str, dfu_dev_info: dict)
Process the Device Firmware Upgrade (DFU) at the local side.
- Parameters:
file_path (str) – The file path to the firmware file to be uploaded.
dfu_dev_info (dict) –
Information about the DFU device.
sn (str): Serial number of the device.
address (str): Address of the device.
devtype (int): Device type as defined in TMYDevType.
in_dfu (bool): Indicates if the device is already in DFU mode.
fw_ver (str): Firmware version of the device.
hw_ver (str): Hardware version of the device.
- Returns:
- An object containing the result of the DFU process.
OK: If the DFU process completes successfully.ERROR_METHOD_NOT_SUPPORT: If DFU is not supported on the device.ERROR_DFU: If the DFU process encounters an error.
- Return type:
- queryFWVer()
Query FW version of the device.
Examples
>>> fw_version = service.queryFWVer(sn).RetData >>> print(f"FW Version: {fw_version}") v1.0.0
- queryHWVer()
Query the hardware version of the device.
>>> device = BBox("D2123E001-28", "192.168.100.121", 9) >>> hw_version = device.queryHWVer() >>> print(f"Hardware Version: {hw_version.RetData}")
- Returns:
- An object containing the hardware version of the device.
str: The hardware version as a string.
- Return type:
- queryLoaderVer()
Query the bootloader version of the device.
- queryMAC()
Query the MAC address of the device.
- Returns:
- An object containing the MAC address of the device.
str: The MAC address as a string.
- Return type:
Examples
>>> device = BBox("D2123E001-28", "192.168.100.121", 9) >>> mac_address = device.queryMAC() >>> print(f"MAC Address: {mac_address.RetData}")
- querySN()
Query the serial number of the device.
- queryStaticIP()
Query the static IP address of the device.
- Parameters:
sn (str) – The serial number of the device.
- Returns:
RetDatastr: Static IP of the device.
- Return type:
Note
Some FW versions of device not support this feature
Examples
- Query the static IP address of a device:
>>> static_ip = service.queryStaticIP(sn).RetData >>> print(f"Static IP Address: {static_ip}") Static IP Address: 192.168.100.111
- queryTCConfig()
getTemperatureParams() in old API
- Parameters:
sn (str) – Device SN
- Returns:
TC config with list format, each board includes [TXC,TXQ,RXC,RXQ]
- Return type:
int[][][] as list
- reboot()
Reboot of the device.
- selectAAKit(kitName)
Set operating AAkit by AAKitName for device with AAKit name.
- setAllGainPhase(polar: POLARIZATION | int, common_gain=None, gain_db=None, phase_deg=None, applySetting=True)
Set ONE com/gain/phase to apply to all channels (for specific channel)
- Parameters:
polar (Union[POL, int]) – The polarization type.
common_gain (float) – The common gain to apply to all channels.
gain_db (float) – The gain in dB to apply to all channels.
phase_deg (float) – The phase in degrees to apply to all channels.
applySetting (bool) – Whether to apply the settings immediately.
- Return type:
- setBeamAngle(gain_db, theta, phi, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, mode=None)
Set the specific beam angle with (gain_db, theta, phi) for the device. gain_db range is from DR(-xxx ~ +ooo), theta range is mapping to spacing of AAKit, phase_deg range is 0-359
- Parameters:
sn (str) – Device SN
gain_db (float) – Gain settings.
theta (int) – Theta angle.
phi (int) – Phi angle.
rf_mode (
RFMode) – RF mode.polar (Union[POLARIZATION, int]) – Polarization. Defaults to DUAL.
- Returns:
- Return type:
Examples
- Set a specific beam angle using the service:
>>> sn = "D2123E001-28" # Serial number of the device >>> gain_db = 10.0 # Gain setting >>> theta = 30 # Theta angle >>> phi = 45 # Phi angle >>> polar = 1 # Polarization (1 for horizontal, 2 for vertical, or POL.DUAL for both) >>> service.setBeamAngle(sn, gain_db=gain_db, theta=theta, phi=phi, polar=polar)
- setChannelGainPhase(channel: int, gain_db: float | list, phase_deg: float | list, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, board: int = -1, applySetting=True)
Set Gain and Phase setting for the specific channel or ALL channels board/channel usually starts from 1 (0 means ALL channels), gain_db range is from DR, phase_deg range is 0-359
- Parameters:
channel (int) – channel number starts from 1, it can also below with the board.
gain_db (Union[float, list]) – gain with db
phase_deg (Union[float, list]) – phase with degree
polar (Union[POLARIZATION, int], optional) – polarization. Defaults to POL.DUAL.
board (int) – The board number starts from 1. Defaults to -1
applySetting (bool, optional) – Batch apply for WEBTLK. Defaults to True.
- Returns:
- Return type:
Warning
If you only set the gain for a single channel and its difference from the other channels exceeds the allowable limit (element gain), an error might occur.
Changed in version v2.1.0: polar added for multi-polarization beamformer device
Warning
DO NOT set all channel iteratively
- setFastParallelMode(toEnable: bool)
Set fast parallel mode and external SPI enable or not. It’s also the same func with Set_Fast_Parallel_Mode() in old API
- Parameters:
toEnable (bool) – A flag to enable or disable fast parallel mode and external SPI.
- Returns:
- An object containing the result of the operation.
OK: If the operation is successful.ERROR_FW_NOT_SUPPORT: If the firmware version does not support this feature.ERROR: If there is an error during the operation.
- Return type:
- setIcChannelGain(board: int, ch_gain: list, common_gain=None, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, applySetting=True)
Set Gain settings for all channels in the specific board/IC.
- Parameters:
board (int) – board number, starts from 1, and 0 means for all boards
ch_gain (list) – channel gain list, and there are 4 items
common_gain (float, optional) – common gain is a gain base within 4 channels in one board. Defaults to None.
polar (Union[POLARIZATION, int]) – polarization. Defaults to DUAL.
applySetting (bool, optional) – batch apply and it used by WEBTLK. Defaults to True.
- Return type:
Changed in version v2.1.0: polar added for multi polarization beamform device
- setIcComGain(polar: POLARIZATION | int, board: int, common_gain: float)
Set common gain for specific polarization and board/IC
- Parameters:
polar (Union[POL, int]) – polarization
board (int) – board number, starts from 1, and 0 means for all boards
common_gain (float) – common gain is a gain base within 4 channels in one board
- Returns:
- Return type:
- setOperatingFreq(freq: int | float)
Set freq and reload cali/beam tables
- setPolarSynthesis(delta_phase)
For polarization synthesis, set delta phase from V-H, only workable if dual polarization
- Parameters:
delta_phase (float) – The phase difference between vertical and horizontal polarization.
- Return type:
- setRFMode(mode: RFMode | CellRFMode | int, slots: list = None)
Set RF mode to device
- setStaticIP(ip, reboot=False)
Set the static IP address of the device, and reboot or not.
Note
Support LAN device only,
- Parameters:
ip (str) – IP with x.x.x.x format
reboot (bool, optional) – reboot device after setting static IP. Defaults to False.
Note
Some FW versions of device not support this reboot feature.
- Return type:
Examples
- Set the static IP address of a device:
>>> service.setStaticIP(sn, "192.168.100.150", True)
- switchChannel(channel=0, disable: bool = False, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>)
Disable the specific channel power or not, the board/channel must start from 1. Or disable ALL channels if channel sets 0.
- Parameters:
sn (str) – Device SN
channel (int) – Channel number
disable (bool, optional) – Whether to disable the channel. Defaults to False.
polar (Union[POL, int], optional) – The polarization type. Defaults to POL.DUAL.
- Returns:
- Return type: