-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
08ffea7
commit 14d57f7
Showing
18 changed files
with
155 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,59 +16,67 @@ | |
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
from __future__ import annotations | ||
|
||
# from logging import debug | ||
# from logging import error | ||
from typing import Optional | ||
|
||
# import pyvisa | ||
# from .driver import InstrumentInfo | ||
from .driver import VISABase | ||
|
||
|
||
# import vxi11 | ||
|
||
|
||
__author__: str = "Michael Sasser" | ||
__email__: str = "[email protected]" | ||
|
||
raise NotImplementedError() | ||
|
||
|
||
class PYVISA(VISABase): | ||
pass | ||
|
||
|
||
# def connect(self): | ||
# """Connect to the instrument.""" | ||
# self.__instrument = vxi11.Instrument(self.address) | ||
# self.info = InstrumentInfo(*self.ask("*IDN?").split(",")) | ||
# | ||
# def disconnect(self): | ||
# """Disconnect from the instrument.""" | ||
# self.__instrument.close() | ||
# | ||
# def ask(self, msg: str) -> str: | ||
# """Write and read afterwards from a instrument.""" | ||
# answer: Optional[str] = None | ||
# try: | ||
# answer = self.__instrument.ask(msg) | ||
# except vxi11.vxi11.Vxi11Exception as e: | ||
# # TODO: Raise before first release. | ||
# error(f"Error while asking: {e}") | ||
# finally: | ||
# debug(f'Asked: "{msg}", Answered: "{answer}"') | ||
# return answer | ||
# | ||
# def write(self, msg: str) -> None: | ||
# """Write to the instrument but don't wait for a response.""" | ||
# try: # Probably just for development | ||
# self.__instrument.write(msg) | ||
# except vxi11.vxi11.Vxi11Exception as e: | ||
# # TODO: Raise before first release. | ||
# error(f"Error while writing: {e}") | ||
# finally: | ||
# debug(f'Written: "{msg}"') | ||
# | ||
# def read_raw(self) -> bytes: | ||
# """Read binary data from the instrument.""" | ||
# msg: Optional[bytes] = None | ||
# try: | ||
# msg = self.__instrument.read_raw() | ||
# except vxi11.vxi11.Vxi11Exception as e: | ||
# # TODO: Raise before first release. | ||
# error(f"Error while writing: {e}") | ||
# return msg | ||
def connect(self) -> None: | ||
"""Connect to the instrument.""" | ||
pass | ||
# self.__instrument = vxi11.Instrument(self.address) | ||
# self.info = InstrumentInfo(*self.ask("*IDN?").split(",")) | ||
|
||
def disconnect(self) -> None: | ||
"""Disconnect from the instrument.""" | ||
pass | ||
# self.__instrument.close() | ||
|
||
def communicate(self, msg: str) -> Optional[str]: | ||
"""Write and read afterwards from a instrument.""" | ||
pass | ||
# answer: Optional[str] = None | ||
# try: | ||
# answer = self.__instrument.ask(msg) | ||
# except vxi11.vxi11.Vxi11Exception as e: | ||
# # TODO: Raise before first release. | ||
# error(f"Error while asking: {e}") | ||
# finally: | ||
# debug(f'Asked: "{msg}", Answered: "{answer}"') | ||
# return answer | ||
|
||
def write(self, msg: str) -> None: | ||
"""Write to the instrument but don't wait for a response.""" | ||
pass | ||
# try: # Probably just for development | ||
# self.__instrument.write(msg) | ||
# except vxi11.vxi11.Vxi11Exception as e: | ||
# # TODO: Raise before first release. | ||
# error(f"Error while writing: {e}") | ||
# finally: | ||
# debug(f'Written: "{msg}"') | ||
|
||
def read_raw(self) -> Optional[bytes]: | ||
"""Read binary data from the instrument.""" | ||
pass | ||
# msg: Optional[bytes] = None | ||
# try: | ||
# msg = self.__instrument.read_raw() | ||
# except vxi11.vxi11.Vxi11Exception as e: | ||
# # TODO: Raise before first release. | ||
# error(f"Error while writing: {e}") | ||
# return msg | ||
|
||
|
||
# vim: set ft=python : |
Oops, something went wrong.