Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
python driver to control MPDSnCxx AOTF devices.
To install this package from PyPI, invoke: pip install aaopto-aotf
To install this package from the Github in editable mode, from this directory invoke: pip install -e .
To install this package in editable mode with dependencies for building the docs, invoke: pip install -e .[dev]
from aaopto_aotf.aotf import MPDS
aotf = MPDS("COM3")
Before writing values, you must first set the global blanking mode, and each channel's frequency, mode, and whether it is driven by external input or internal (software controlled) input.
from aaopto_aotf.aotf import MPDS, MAX_POWER_DBM
from aaopto_aotf.device_codes import DriverMode, BlankingMode, VoltageRange
aotf.set_blanking(BlankingMode.INTERNAL) # disable blanking control from external input pin.
aotf.set_external_input_voltage_range(VoltageRange.ZERO_TO_FIVE_VOLTS)
# Note: device channels are 1-indexed to be consistent with the datasheet.
for channel in range(1, aotf.num_channels + 1):
aotf.set_frequency(channel, 110.5)
aotf.set_driver_mode(DriverMode.EXTERNAL)
If the driver mode is set to DriverMode.EXTERNAL
, the device will take its output setpoint from the external input pin.
If set to DriverMode.INTERNAL
, you can control the output with software settings:
for channel in range(1, aotf.num_channels + 1):
aotf.set_driver_mode(DriverMode.INTERNAL)
aotf.set_power_dbm(channel, MAX_POWER_DBM)
aotf.enable_channel(channel)
Note that internal mode only enables a simple "On/Off" control scheme, and does not support linear scaling like external mode does vial the external analog input.
At this point, you might want to save the values set above to the current profile.
aotf.save_profile() # Now, calling an aotf.reset() will start with the saved settings.
Here are the minor dangling features that are not implemented.
Have a look at the examples folder to see other examples and make use of a useful calibration script.
FAQs
Python driver for AA OptoElectronics AOTF device.
We found that aaopto-aotf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.