Fundamentals

Class which manages the connection to the IM7

This class provides methods for communicating with an IM7 device and executing jobs.

Parameter:
  • hostname – IP address of the IM7

  • port – port of the IM7

  • flags – optional flags of type zahner_link.ZahnerLinkConnectionFlags for the connection can be combined with bitwise OR operation

  • http_user – user name from the settings

  • http_password – password from the settings

append_to_resource(self: zahner_link._zahner_link.ZahnerLink, resource: zahner_link._zahner_link.Resource, data: collections.abc.Buffer) ErrorObject

Append data to a resource

Parameter:
  • resource – Resource object

  • data – Data as bytearray

Rückgabe:

zahner_link.ErrorObject (falsy on success)

cancel_pending_operations(self: zahner_link._zahner_link.ZahnerLink) None

Thread-safe cancellation of all pending client-side operations.

Immediately interrupts any blocking calls on this zahner_link.ZahnerLink instance, such as do_job(), get_job_result_data(), or wait_for_job_to_finish(), causing them to return with zahner_link.ErrorCodeEnum.STOPPED_MANUALLY.

Unlike disconnect(), this method is explicitly thread-safe and may be called from any thread while another thread is blocked on a zahner_link.ZahnerLink operation. The connection to the remote workstation remains established and the server-side data acquisition system is unaffected — jobs already running on the device will continue normally.

After cancellation, the caller must still call disconnect() from the thread that owns the zahner_link.ZahnerLink to properly close the connection.

check_job_parameters(self: zahner_link._zahner_link.ZahnerLink, job: AbstractMeasurementJob) ErrorObject

Check job parameters before execution

Parameter:

job – job object

Rückgabe:

zahner_link.ErrorObject (falsy if parameters are valid)

clear_event_handler(self: zahner_link._zahner_link.ZahnerLink, event_handler: zahner_link._zahner_link.ZahnerLinkEventHandler) None

Remove a previously registered event handler.

Parameter:

event_handlerZahnerLinkEventHandler previously passed to set_event_handler()

clear_flag(self: zahner_link._zahner_link.ZahnerLink, flag: SupportsInt | SupportsIndex) None

Clear a connection flag.

Parameter:

flag – flag to clear (e.g. from zahner_link.ZahnerLinkConnectionFlags)

connect(self: zahner_link._zahner_link.ZahnerLink) ErrorObject

Connect to a running IM7

Rückgabe:

zahner_link.ErrorObject (falsy on success)

create_resource(self: zahner_link._zahner_link.ZahnerLink, type: ResourceTypeEnum, resource_name: str) zahner_link._zahner_link.Resource | ErrorObject

Create a resource

Parameter:
Rückgabe:

zahner_link.Resource on success, zahner_link.ErrorObject on failure

create_resource_from_file(self: zahner_link._zahner_link.ZahnerLink, type: ResourceTypeEnum, file_name_and_path: os.PathLike | str | bytes, resource_name: str = '') zahner_link._zahner_link.Resource | ErrorObject

Create a resource from a file

Parameter:
Rückgabe:

zahner_link.Resource on success, zahner_link.ErrorObject on failure

delete_resource(self: zahner_link._zahner_link.ZahnerLink, resource: zahner_link._zahner_link.Resource) ErrorObject

Delete a resource

Parameter:

resourcezahner_link.Resource object

Rückgabe:

zahner_link.ErrorObject (falsy on success)

disconnect(self: zahner_link._zahner_link.ZahnerLink) None

Disconnect from the device

Jobs can no longer be executed after disconnect has been called. However, data that is available in the job objects after the job has been executed remains valid and can still be used.

do_job(self: zahner_link._zahner_link.ZahnerLink, job: AbstractMeasurementJob) ErrorObject

Perform a job

Parameter:

job – job object

Rückgabe:

zahner_link.ErrorObject (falsy if the job was successful)

download_resource_to_file(self: zahner_link._zahner_link.ZahnerLink, resource: zahner_link._zahner_link.Resource, file_name_and_path: os.PathLike | str | bytes) ErrorObject

Download resource to file

Parameter:
Rückgabe:

zahner_link.ErrorObject (falsy on success)

drop_ecw_connection(self: zahner_link._zahner_link.ZahnerLink, connection_info: zahner_link._zahner_link.WebsocketConnectionInfo) ErrorObject

Drop a specific ECW connection.

The connection identified by the given zahner_link.WebsocketConnectionInfo will be disconnected. Use get_ecw_connection_list() to obtain the available connections.

Parameter:

connection_infozahner_link.WebsocketConnectionInfo of the connection to drop

Rückgabe:

zahner_link.ErrorObject (falsy on success)

get_available_resources(self: zahner_link._zahner_link.ZahnerLink, type: ResourceTypeEnum) list[zahner_link._zahner_link.Resource] | ErrorObject

Get available resources of a type

Parameter:

typezahner_link.ResourceTypeEnum

Rückgabe:

List of zahner_link.Resource objects on success, zahner_link.ErrorObject on failure

get_connection_status(self: zahner_link._zahner_link.ZahnerLink) ZahnerLinkConnectionStatusEnum

Get the connection state

Rückgabe:

enum with the connection state

get_ecw_connection_list(self: zahner_link._zahner_link.ZahnerLink) list[zahner_link._zahner_link.WebsocketConnectionInfo] | ErrorObject

Get list of all active WebSocket connections to the ECW.

Rückgabe:

list of zahner_link.WebsocketConnectionInfo on success, zahner_link.ErrorObject on failure

get_job_info(self: zahner_link._zahner_link.ZahnerLink, job: AbstractMeasurementJob) JobInfo | ErrorObject

Get job info for a specific job

Parameter:

job – job object

Rückgabe:

zahner_link.JobInfo on success, zahner_link.ErrorObject on failure

WebSocket JSON Example
{
  "do":"/job/info",
  "request_id":"jobinfo-uuid-example"
}
get_job_info_list(self: zahner_link._zahner_link.ZahnerLink, exclude_finished_jobs: bool = False) list[JobInfo] | ErrorObject

Get job info list

Parameter:

exclude_finished_jobs – If True, finished jobs are excluded

Rückgabe:

list with zahner_link.JobInfo objects on success, zahner_link.ErrorObject on failure

WebSocket JSON Example
{
  "do":"/job/list",
  "exclude_finished":false,
  "request_id":"joblist-uuid-example"
}
get_job_result_data(self: zahner_link._zahner_link.ZahnerLink, job: AbstractMeasurementJob) DataSet | ErrorObject

Get the result data from a job

This must be used for jobs that return measurement data and online data that have a longer duration. For example EIS with zahner_link.meas.EisGenerateJob or zahner_link.meas.CvJob.

Parameter:

job – job object

Rückgabe:

zahner_link.DataSet (e.g. zahner_link.EisDataset/zahner_link.DcDataset) on success, zahner_link.ErrorObject on failure

static get_library_revision() str

Get the revision of the C++ ZahnerLink library

get_own_connection_info(self: zahner_link._zahner_link.ZahnerLink) zahner_link._zahner_link.WebsocketConnectionInfo | ErrorObject

Get information about the own WebSocket connection to the ECW.

Rückgabe:

zahner_link.WebsocketConnectionInfo on success, zahner_link.ErrorObject on failure

get_settings(self: zahner_link._zahner_link.ZahnerLink) SettingsSet | ErrorObject

Get the current device settings

Rückgabe:

zahner_link.SettingsSet on success, zahner_link.ErrorObject on failure

static get_supported_protocol_version() int

Get the protocol version of the C++ ZahnerLink library

get_updated_resource_info(self: zahner_link._zahner_link.ZahnerLink, resource: zahner_link._zahner_link.Resource) ErrorObject

Update resource info

Parameter:

resourcezahner_link.Resource object

Rückgabe:

zahner_link.ErrorObject (falsy on success)

get_workstation_info(self: zahner_link._zahner_link.ZahnerLink) zahner_link._zahner_link.WorkstationInfo | ErrorObject

Get device information

Rückgabe:

zahner_link.WorkstationInfo on success, zahner_link.ErrorObject on failure

get_workstation_status(self: zahner_link._zahner_link.ZahnerLink) zahner_link._zahner_link.WorkstationStatus | ErrorObject

Get device status

Rückgabe:

zahner_link.WorkstationStatus on success, zahner_link.ErrorObject on failure

id(self: zahner_link._zahner_link.ZahnerLink, timeout: datetime.timedelta = datetime.timedelta(0)) zahner_link._zahner_link.WorkstationInfo | ErrorObject

Query device identification without a persistent connection

Parameter:

timeout – timeout for the request

Rückgabe:

zahner_link.WorkstationInfo on success, zahner_link.ErrorObject on failure

is_connected(self: zahner_link._zahner_link.ZahnerLink) bool

Check if it is connected to IM7

Rückgabe:

True if it is connected

retrieve_resource(self: zahner_link._zahner_link.ZahnerLink, resource: zahner_link._zahner_link.Resource, limit: SupportsInt | SupportsIndex = 0, offset: SupportsInt | SupportsIndex = 0) bytes | ErrorObject

Retrieve resource data

Parameter:
  • resourcezahner_link.Resource object

  • limit – Max bytes to retrieve (0 = max)

  • offset – Offset in resource

Rückgabe:

Data as bytes on success, zahner_link.ErrorObject on failure

send_stop(self: zahner_link._zahner_link.ZahnerLink, queue_stop_mode: QueueStopModeEnum) None

Stop the device

Parameter:

queue_stop_mode – enum how to stop the job

set_connection_status_callback(self: zahner_link._zahner_link.ZahnerLink, callback: collections.abc.Callable[[ZahnerLinkConnectionStatusEnum], None] | None) None

Set callback that will be called on connection status change. Pass None to clear the callback.

Parameter:

callback – callable(zahner_link.ZahnerLinkConnectionStatusEnum) or None

set_destination_host(self: zahner_link._zahner_link.ZahnerLink, hostname: str, port: str) None

Set the destination host and port.

Parameter:
  • hostname – IP address or hostname of the IM7

  • port – port of the IM7

set_event_handler(self: zahner_link._zahner_link.ZahnerLink, event_handler: zahner_link._zahner_link.ZahnerLinkEventHandler) None

Register an event handler.

Parameter:

event_handlerZahnerLinkEventHandler created via a factory method

set_flag(self: zahner_link._zahner_link.ZahnerLink, flag: SupportsInt | SupportsIndex) None

Set a connection flag.

Parameter:

flag – flag to set (e.g. from zahner_link.ZahnerLinkConnectionFlags)

set_http_authentication_info(self: zahner_link._zahner_link.ZahnerLink, http_user: str, http_password: str) None

Set HTTP authentication information.

Parameter:
  • http_user – user name

  • http_password – password

set_request_timeout(self: zahner_link._zahner_link.ZahnerLink, arg0: datetime.timedelta) None

Set the request timeout

Parameter:

timeout – timeout value in seconds

ssl_get_last_verification_result(self: zahner_link._zahner_link.ZahnerLink) zahner_link._zahner_link.TlsVerificationResult

Get the result of the last TLS verification.

Rückgabe:

zahner_link.TlsVerificationResult object

ssl_set_tls_configuration(self: zahner_link._zahner_link.ZahnerLink, tls_configuration: zahner_link._zahner_link.TlsConfiguration) None

Set the TLS configuration used when connecting with the USE_SSL flag.

Configures trusted CA files, in-memory CA certificates, pinned certificate fingerprints and an optional custom validation hostname. Call before connect().

Parameter:

tls_configuration – a zahner_link.TlsConfiguration object

test_flag(self: zahner_link._zahner_link.ZahnerLink, flag: SupportsInt | SupportsIndex) bool

Test if a connection flag is set.

Parameter:

flag – flag to test (e.g. from zahner_link.ZahnerLinkConnectionFlags)

Rückgabe:

True if the flag is set

update_settings(self: zahner_link._zahner_link.ZahnerLink, settings: SettingsSet) None

Update device settings

Parameter:

settings – List of settings to update

wait_for_job_to_finish(self: zahner_link._zahner_link.ZahnerLink, job: AbstractMeasurementJob) ErrorObject

Wait for a job to finish

Parameter:

job – job object

Rückgabe:

zahner_link.ErrorObject (falsy if the job was successful)

class ZahnerLinkExc(self: zahner_link._zahner_link.ZahnerLinkExc, hostname: str, port: str = '1994', flags: SupportsInt | SupportsIndex = 0, http_user: str = '', http_password: str = '')

Class which manages the connection to the IM7

This class provides methods for communicating with an IM7 device and executing jobs. Variant of ZahnerLink which raises zahner_link.ZahnerLinkException on errors for all methods.

All methods raise zahner_link.ZahnerLinkException when the underlying operation fails.

Parameter:
  • hostname – IP address of the IM7

  • port – port of the IM7

  • flags – optional flags of type zahner_link.ZahnerLinkConnectionFlags for the connection can be combined with bitwise OR operation

  • http_user – user name from the settings

  • http_password – password from the settings

append_to_resource(self: zahner_link._zahner_link.ZahnerLink, resource: zahner_link._zahner_link.Resource, data: collections.abc.Buffer) ErrorObject

Append data to a resource

Parameter:
  • resource – Resource object

  • data – Data as bytearray

Rückgabe:

zahner_link.ErrorObject (falsy on success)

cancel_pending_operations(self: zahner_link._zahner_link.ZahnerLink) None

Thread-safe cancellation of all pending client-side operations.

Immediately interrupts any blocking calls on this zahner_link.ZahnerLink instance, such as do_job(), get_job_result_data(), or wait_for_job_to_finish(), causing them to return with zahner_link.ErrorCodeEnum.STOPPED_MANUALLY.

Unlike disconnect(), this method is explicitly thread-safe and may be called from any thread while another thread is blocked on a zahner_link.ZahnerLink operation. The connection to the remote workstation remains established and the server-side data acquisition system is unaffected — jobs already running on the device will continue normally.

After cancellation, the caller must still call disconnect() from the thread that owns the zahner_link.ZahnerLink to properly close the connection.

check_job_parameters(self: zahner_link._zahner_link.ZahnerLinkExc, job: AbstractMeasurementJob) ErrorObject

Check job parameters before execution.

Parameter:

job – job object

Rückgabe:

zahner_link.ErrorObject (falsy if parameters are valid)

clear_event_handler(self: zahner_link._zahner_link.ZahnerLink, event_handler: zahner_link._zahner_link.ZahnerLinkEventHandler) None

Remove a previously registered event handler.

Parameter:

event_handlerZahnerLinkEventHandler previously passed to set_event_handler()

clear_flag(self: zahner_link._zahner_link.ZahnerLink, flag: SupportsInt | SupportsIndex) None

Clear a connection flag.

Parameter:

flag – flag to clear (e.g. from zahner_link.ZahnerLinkConnectionFlags)

connect(self: zahner_link._zahner_link.ZahnerLink) ErrorObject

Connect to a running IM7

Rückgabe:

zahner_link.ErrorObject (falsy on success)

create_resource(self: zahner_link._zahner_link.ZahnerLink, type: ResourceTypeEnum, resource_name: str) zahner_link._zahner_link.Resource | ErrorObject

Create a resource

Parameter:
Rückgabe:

zahner_link.Resource on success, zahner_link.ErrorObject on failure

create_resource_from_file(self: zahner_link._zahner_link.ZahnerLink, type: ResourceTypeEnum, file_name_and_path: os.PathLike | str | bytes, resource_name: str = '') zahner_link._zahner_link.Resource | ErrorObject

Create a resource from a file

Parameter:
Rückgabe:

zahner_link.Resource on success, zahner_link.ErrorObject on failure

delete_resource(self: zahner_link._zahner_link.ZahnerLink, resource: zahner_link._zahner_link.Resource) ErrorObject

Delete a resource

Parameter:

resourcezahner_link.Resource object

Rückgabe:

zahner_link.ErrorObject (falsy on success)

disconnect(self: zahner_link._zahner_link.ZahnerLink) None

Disconnect from the device

Jobs can no longer be executed after disconnect has been called. However, data that is available in the job objects after the job has been executed remains valid and can still be used.

do_job(self: zahner_link._zahner_link.ZahnerLinkExc, job: AbstractMeasurementJob) ErrorObject

Perform a job.

Parameter:

job – job object

Rückgabe:

zahner_link.ErrorObject (falsy if the job was successful)

Verursacht:

ZahnerLinkException – if the job failed

download_resource_to_file(self: zahner_link._zahner_link.ZahnerLink, resource: zahner_link._zahner_link.Resource, file_name_and_path: os.PathLike | str | bytes) ErrorObject

Download resource to file

Parameter:
Rückgabe:

zahner_link.ErrorObject (falsy on success)

drop_ecw_connection(self: zahner_link._zahner_link.ZahnerLinkExc, connection_info: zahner_link._zahner_link.WebsocketConnectionInfo) ErrorObject

Drop a specific ECW connection.

The connection identified by the given zahner_link.WebsocketConnectionInfo will be disconnected. Use get_ecw_connection_list() to obtain the available connections.

Parameter:

connection_infozahner_link.WebsocketConnectionInfo of the connection to drop

Rückgabe:

zahner_link.ErrorObject (falsy on success)

Verursacht:

ZahnerLinkException – if the operation failed

enable_do_job_exception(self: zahner_link._zahner_link.ZahnerLinkExc, code: ErrorCodeEnum) None

Re-enable raising an exception in do_job() for a specific error code.

Parameter:

codezahner_link.ErrorCodeEnum to enable

get_available_resources(self: zahner_link._zahner_link.ZahnerLink, type: ResourceTypeEnum) list[zahner_link._zahner_link.Resource] | ErrorObject

Get available resources of a type

Parameter:

typezahner_link.ResourceTypeEnum

Rückgabe:

List of zahner_link.Resource objects on success, zahner_link.ErrorObject on failure

get_connection_status(self: zahner_link._zahner_link.ZahnerLink) ZahnerLinkConnectionStatusEnum

Get the connection state

Rückgabe:

enum with the connection state

get_ecw_connection_list(self: zahner_link._zahner_link.ZahnerLinkExc) list[zahner_link._zahner_link.WebsocketConnectionInfo]

Get list of all active WebSocket connections to the ECW.

Rückgabe:

list of zahner_link.WebsocketConnectionInfo

Verursacht:

ZahnerLinkException – if retrieval failed

get_job_info(self: zahner_link._zahner_link.ZahnerLinkExc, job: AbstractMeasurementJob) JobInfo

Get job info for a specific job

Parameter:

job – job object

Rückgabe:

zahner_link.JobInfo

Verursacht:

ZahnerLinkException – if retrieval failed

get_job_info_list(self: zahner_link._zahner_link.ZahnerLinkExc, exclude_finished_jobs: bool = False) list[JobInfo]

Get job info list

Parameter:

exclude_finished_jobs – If True, finished jobs are excluded

Rückgabe:

list of zahner_link.JobInfo objects

Verursacht:

ZahnerLinkException – if retrieval failed

get_job_result_data(self: zahner_link._zahner_link.ZahnerLinkExc, job: AbstractMeasurementJob) DataSet

Get the result data from a previously executed job.

Parameter:

job – job object

Rückgabe:

zahner_link.DataSet (e.g. zahner_link.EisDataset/zahner_link.DcDataset)

Verursacht:

ZahnerLinkException – if retrieval failed or job did not finish successfully

static get_library_revision() str

Get the revision of the C++ ZahnerLink library

get_own_connection_info(self: zahner_link._zahner_link.ZahnerLinkExc) zahner_link._zahner_link.WebsocketConnectionInfo

Get information about the own WebSocket connection to the ECW.

Rückgabe:

zahner_link.WebsocketConnectionInfo

Verursacht:

ZahnerLinkException – if retrieval failed

get_settings(self: zahner_link._zahner_link.ZahnerLink) SettingsSet | ErrorObject

Get the current device settings

Rückgabe:

zahner_link.SettingsSet on success, zahner_link.ErrorObject on failure

static get_supported_protocol_version() int

Get the protocol version of the C++ ZahnerLink library

get_updated_resource_info(self: zahner_link._zahner_link.ZahnerLink, resource: zahner_link._zahner_link.Resource) ErrorObject

Update resource info

Parameter:

resourcezahner_link.Resource object

Rückgabe:

zahner_link.ErrorObject (falsy on success)

get_workstation_info(self: zahner_link._zahner_link.ZahnerLink) zahner_link._zahner_link.WorkstationInfo | ErrorObject

Get device information

Rückgabe:

zahner_link.WorkstationInfo on success, zahner_link.ErrorObject on failure

get_workstation_status(self: zahner_link._zahner_link.ZahnerLink) zahner_link._zahner_link.WorkstationStatus | ErrorObject

Get device status

Rückgabe:

zahner_link.WorkstationStatus on success, zahner_link.ErrorObject on failure

id(self: zahner_link._zahner_link.ZahnerLink, timeout: datetime.timedelta = datetime.timedelta(0)) zahner_link._zahner_link.WorkstationInfo | ErrorObject

Query device identification without a persistent connection

Parameter:

timeout – timeout for the request

Rückgabe:

zahner_link.WorkstationInfo on success, zahner_link.ErrorObject on failure

is_connected(self: zahner_link._zahner_link.ZahnerLink) bool

Check if it is connected to IM7

Rückgabe:

True if it is connected

is_do_job_exception_suppressed(self: zahner_link._zahner_link.ZahnerLinkExc, code: ErrorCodeEnum) bool

Check whether do_job() exception throwing is suppressed for a specific error code.

Parameter:

codezahner_link.ErrorCodeEnum to check

Rückgabe:

True if the error code is currently suppressed

retrieve_resource(self: zahner_link._zahner_link.ZahnerLink, resource: zahner_link._zahner_link.Resource, limit: SupportsInt | SupportsIndex = 0, offset: SupportsInt | SupportsIndex = 0) bytes | ErrorObject

Retrieve resource data

Parameter:
  • resourcezahner_link.Resource object

  • limit – Max bytes to retrieve (0 = max)

  • offset – Offset in resource

Rückgabe:

Data as bytes on success, zahner_link.ErrorObject on failure

send_stop(self: zahner_link._zahner_link.ZahnerLink, queue_stop_mode: QueueStopModeEnum) None

Stop the device

Parameter:

queue_stop_mode – enum how to stop the job

set_connection_status_callback(self: zahner_link._zahner_link.ZahnerLink, callback: collections.abc.Callable[[ZahnerLinkConnectionStatusEnum], None] | None) None

Set callback that will be called on connection status change. Pass None to clear the callback.

Parameter:

callback – callable(zahner_link.ZahnerLinkConnectionStatusEnum) or None

set_destination_host(self: zahner_link._zahner_link.ZahnerLink, hostname: str, port: str) None

Set the destination host and port.

Parameter:
  • hostname – IP address or hostname of the IM7

  • port – port of the IM7

set_event_handler(self: zahner_link._zahner_link.ZahnerLink, event_handler: zahner_link._zahner_link.ZahnerLinkEventHandler) None

Register an event handler.

Parameter:

event_handlerZahnerLinkEventHandler created via a factory method

set_flag(self: zahner_link._zahner_link.ZahnerLink, flag: SupportsInt | SupportsIndex) None

Set a connection flag.

Parameter:

flag – flag to set (e.g. from zahner_link.ZahnerLinkConnectionFlags)

set_http_authentication_info(self: zahner_link._zahner_link.ZahnerLink, http_user: str, http_password: str) None

Set HTTP authentication information.

Parameter:
  • http_user – user name

  • http_password – password

set_request_timeout(self: zahner_link._zahner_link.ZahnerLink, arg0: datetime.timedelta) None

Set the request timeout

Parameter:

timeout – timeout value in seconds

ssl_get_last_verification_result(self: zahner_link._zahner_link.ZahnerLink) zahner_link._zahner_link.TlsVerificationResult

Get the result of the last TLS verification.

Rückgabe:

zahner_link.TlsVerificationResult object

ssl_set_tls_configuration(self: zahner_link._zahner_link.ZahnerLink, tls_configuration: zahner_link._zahner_link.TlsConfiguration) None

Set the TLS configuration used when connecting with the USE_SSL flag.

Configures trusted CA files, in-memory CA certificates, pinned certificate fingerprints and an optional custom validation hostname. Call before connect().

Parameter:

tls_configuration – a zahner_link.TlsConfiguration object

suppress_do_job_exception(self: zahner_link._zahner_link.ZahnerLinkExc, code: ErrorCodeEnum) None

Suppress raising an exception in do_job() for a specific error code.

Parameter:

codezahner_link.ErrorCodeEnum to suppress

test_flag(self: zahner_link._zahner_link.ZahnerLink, flag: SupportsInt | SupportsIndex) bool

Test if a connection flag is set.

Parameter:

flag – flag to test (e.g. from zahner_link.ZahnerLinkConnectionFlags)

Rückgabe:

True if the flag is set

update_settings(self: zahner_link._zahner_link.ZahnerLink, settings: SettingsSet) None

Update device settings

Parameter:

settings – List of settings to update

wait_for_job_to_finish(self: zahner_link._zahner_link.ZahnerLinkExc, job: AbstractMeasurementJob) ErrorObject

Wait for a job to finish

Parameter:

job – job object

Rückgabe:

zahner_link.ErrorObject (falsy if the job was successful)

Verursacht:

ZahnerLinkException – if the job failed

class ZahnerLinkEventHandler
static make_job_log_message_event_handler(callback: collections.abc.Callable[[str, LogSeverityEnum, str, str], None]) zahner_link._zahner_link.ZahnerLinkEventHandler

Create an event handler for job-specific log messages.

Parameter:

callback – callable(str, zahner_link.LogSeverityEnum, str, str) - (job_id, severity, datetime, message)

Rückgabe:

event handler to pass to ZahnerLink.set_event_handler()

static make_job_status_update_event_handler(callback: collections.abc.Callable[[JobStatusEnum, JobInfo], None]) zahner_link._zahner_link.ZahnerLinkEventHandler

Create an event handler for job status updates.

Parameter:

callback – callable(zahner_link.JobStatusEnum, zahner_link.JobInfo)

Rückgabe:

event handler to pass to ZahnerLink.set_event_handler()

static make_live_data_finished_event_handler(callback: collections.abc.Callable[[JobInfo], None]) zahner_link._zahner_link.ZahnerLinkEventHandler

Create an event handler for live data finished events.

Parameter:

callback – callable(zahner_link.JobInfo)

Rückgabe:

event handler to pass to ZahnerLink.set_event_handler()

static make_live_data_header_eis_event_handler(callback: collections.abc.Callable[[LiveDataHeaderEis, JobInfo], None]) zahner_link._zahner_link.ZahnerLinkEventHandler

Create an event handler for EIS live data headers.

Parameter:

callback – callable(zahner_link.LiveDataHeaderEis, zahner_link.JobInfo)

Rückgabe:

event handler to pass to ZahnerLink.set_event_handler()

static make_live_data_header_event_handler(callback: collections.abc.Callable[[LiveDataHeader, JobInfo], None]) zahner_link._zahner_link.ZahnerLinkEventHandler

Create an event handler for DC live data headers.

Parameter:

callback – callable(zahner_link.LiveDataHeader, zahner_link.JobInfo)

Rückgabe:

event handler to pass to ZahnerLink.set_event_handler()

static make_live_data_row_eis_event_handler(callback: collections.abc.Callable[[LiveDataRowEis], None]) zahner_link._zahner_link.ZahnerLinkEventHandler

Create an event handler for EIS live data rows.

The rows are described by the event ZahnerLinkEventHandler.make_live_data_header_eis_event_handler().

Parameter:

callback – callable(zahner_link.LiveDataRowEis)

Rückgabe:

event handler to pass to ZahnerLink.set_event_handler()

static make_live_data_rows_event_handler(callback: collections.abc.Callable[[collections.abc.Sequence[collections.abc.Sequence[SupportsFloat | SupportsIndex]]], None]) zahner_link._zahner_link.ZahnerLinkEventHandler

Create an event handler for DC live data rows.

The rows are described by the event ZahnerLinkEventHandler.make_live_data_header_event_handler().

Parameter:

callback – callable(list[list[float]])

Rückgabe:

event handler to pass to ZahnerLink.set_event_handler()

static make_live_data_wave_event_handler(callback: collections.abc.Callable[[LiveDataWavesEis], None]) zahner_link._zahner_link.ZahnerLinkEventHandler

Create an event handler for EIS live data waves.

Parameter:

callback – callable(zahner_link.LiveDataWavesEis)

Rückgabe:

event handler to pass to ZahnerLink.set_event_handler()

static make_log_message_event_handler(callback: collections.abc.Callable[[LogSeverityEnum, str, str], None]) zahner_link._zahner_link.ZahnerLinkEventHandler

Create an event handler for device log messages.

Parameter:

callback – callable(zahner_link.LogSeverityEnum, str, str) - (severity, datetime, message)

Rückgabe:

event handler to pass to ZahnerLink.set_event_handler()

class AbstractDataset
finished_successfully(self: zahner_link._zahner_link.AbstractDataset) bool
get_job_info(self: zahner_link._zahner_link.AbstractDataset) JobInfo

Get info to the job

Rückgabe:

object with the job info

get_row_count(self: zahner_link._zahner_link.AbstractDataset) int
class AbstractMeasurementJob

Abstract base class from which all jobs are derived.

Each job is an instantiation of a C++ template derived from this class.

get_last_job_error_message(self: zahner_link._zahner_link.AbstractMeasurementJob) str

Get the last job error message when failing.

The job must have been previously executed with zahner_link.ZahnerLink.do_job().

returns:

string containing the error message or empty string

get_last_job_info(self: zahner_link._zahner_link.AbstractMeasurementJob) zahner_link._zahner_link.JobInfo

Get the info of the last job.

The job must have been previously executed with zahner_link.ZahnerLink.do_job().

returns:

object with the job info

get_last_job_status(self: zahner_link._zahner_link.AbstractMeasurementJob) zahner_link._zahner_link.JobStatusEnum

Get status of the last job.

The job must have been previously executed with zahner_link.ZahnerLink.do_job().

returns:

object with the job status

was_successful(self: zahner_link._zahner_link.AbstractMeasurementJob) bool

Get status if the last job was successful.

The job must have been previously executed with zahner_link.ZahnerLink.do_job().

Rückgabe:

True if job was successful

class BandwidthRange
property index

index of the bandwidth

enum CalibrationDataTypeEnum(value)

Enum which indicates the data type of the calibration data.

Valid values are as follows:

UNDEFINED = <CalibrationDataTypeEnum.UNDEFINED: 0>
FLOAT = <CalibrationDataTypeEnum.FLOAT: 1>
FLOAT_VECTOR = <CalibrationDataTypeEnum.FLOAT_VECTOR: 2>
SPECTRA = <CalibrationDataTypeEnum.SPECTRA: 3>
STRING = <CalibrationDataTypeEnum.STRING: 4>
class zahner_link.CalibrationTypesEnum

Enum which indicates the type of the calibration.

DC = 2

perform full DC calibration

class CardInfo
property firmware

firmware version of the card

property hardware

hardware revision of the card

property name

name of the card

property serialnumber

serial number of the card

property symbol

symbol of the card

class Channel(self: zahner_link._zahner_link.Channel, uri: str, dimension: str, unit: str, polynomial: zahner_link._zahner_link.UserPolynomial)

Class which contains the settings of a channel.

Parameter:
  • uri – identifier of the channel as URI

  • dimension – dimension of the channel

  • unit – unit of the channel

  • polynomial

    • polynomial used to calculate the DC value of this channel

    • it is also included in the impedance calculation

property dimension

dimension of the channel

property polynomial
  • polynomial used to calculate the DC value of this channel

  • it is also included in the impedance calculation

property unit

unit of the channel

property uri

identifier of the channel as URI

class ColumnHeader
get_dimension(self: zahner_link._zahner_link.ColumnHeader) str

Get the dimension name of the column.

Rückgabe:

dimension name

get_unit(self: zahner_link._zahner_link.ColumnHeader) str

Get the unit of the column.

Rückgabe:

unit name

get_urn(self: zahner_link._zahner_link.ColumnHeader) str

Get the urn of the column.

Rückgabe:

urn

class ComplianceRange
property compliance

maximum compliance voltage

property index

index of the range

class CurrentRange
property current

maximum current

property index

index of the range

property resistance

nominal shunt resistance

class PathDataHeader
get_columns(self: zahner_link._zahner_link.PathDataHeader) list[zahner_link._zahner_link.ColumnHeader]

Get the paths headers

These are the extracted headers from the live data header object.

Rückgabe:

object with the headers

get_polynomial(self: zahner_link._zahner_link.PathDataHeader) UserPolynomial
get_uri(self: zahner_link._zahner_link.PathDataHeader) str
get_wave_size(self: zahner_link._zahner_link.PathDataHeader) int
class DataSet
finished_successfully(self: zahner_link._zahner_link.AbstractDataset) bool
get_job_info(self: zahner_link._zahner_link.DataSet) JobInfo

Get info to the job

Rückgabe:

object with the job info

get_row_count(self: zahner_link._zahner_link.AbstractDataset) int
enum DatasetType(value)

Enum which indicates the type of the dataset.

Valid values are as follows:

DC = <DatasetType.DC: False>
AC = <DatasetType.AC: True>
class DatasetInfo(self: zahner_link._zahner_link.DatasetInfo)
property first_time_value

first timestamp in the dataset

property jobInfo

information about the job that created this dataset

property job_type

dataset type name

property job_type_short

shortened dataset type name

property num_rows

number of rows in the dataset

property type

dataset type identifier

class DcDataset(self: zahner_link._zahner_link.DcDataset)

Class which contains DC data.

EMPTY_TRACK = []
append(self: zahner_link._zahner_link.DcDataset, to_append: zahner_link._zahner_link.DcDataset, time_offset: SupportsFloat | SupportsIndex = 0.0) bool

Append a dataset by another.

Parameter:
  • to_append – dataset to be appended to the data

  • time_offset – additional offset for the time track

Rückgabe:

true if append was successful

finished_successfully(self: zahner_link._zahner_link.AbstractDataset) bool
get_dc_dimensions(self: zahner_link._zahner_link.DcDataset) list[str]

Get a list of all track dimension names

Rückgabe:

list with the names

get_dc_track(self: zahner_link._zahner_link.DcDataset, dimension: str) list[float]

Get the data track by a dimension name

Parameter:

dimension – name of the dimension to search in columns

Rückgabe:

list of data points for the track DcDataset.EMPTY_TRACK if the dimension does not exist

get_dc_tracks(self: zahner_link._zahner_link.DcDataset) dict[str, list[float]]

Get a dictionary with all tracks

Keys are a dimension and values are the data as a list of floats.

Rückgabe:

dictionary with the data

get_header(self: zahner_link._zahner_link.DcDataset) zahner_link._zahner_link.LiveDataHeader

Get the header object

Rückgabe:

header object

get_included_datasets(self: zahner_link._zahner_link.DcDataset) list[zahner_link._zahner_link.DatasetInfo]

Get included datasets

Rückgabe:

list with pairs. First item type and second item number of rows.

get_job_info(self: zahner_link._zahner_link.DataSet) JobInfo

Get info to the job

Rückgabe:

object with the job info

get_row_count(self: zahner_link._zahner_link.DcDataset) int

Get number of measured points

Rückgabe:

number of points

get_tracks(self: zahner_link._zahner_link.DcDataset) list[list[float]]

Get all data tracks

Rückgabe:

list of lists containing the data points for the tracks

index_of(self: zahner_link._zahner_link.DcDataset, column_header: zahner_link._zahner_link.ColumnHeader) int

Get the index of the column by a header object

Parameter:

column_header – name of the header to search

Rückgabe:

index or -1 if not found

index_of_dimension(self: zahner_link._zahner_link.DcDataset, dimension_name: str) int

Get the index of the column by a dimension name

Parameter:

dimension_name – name of the dimension to search in columns

Rückgabe:

index or -1 if not found

index_of_urn(self: zahner_link._zahner_link.DcDataset, urn: str) int

Get the index of the column by a urn

Parameter:

urn – urn to search in columns

Rückgabe:

index or -1 if not found

recreate_original_job(self: zahner_link._zahner_link.DcDataset) object

Recreate the original job that produced this dataset.

Automatically detects the job type from the dataset metadata and returns the corresponding job object with the original parameters, metadata, and stop conditions.

Rückgabe:

the recreated job object, or None if the job type is unknown or parameters are missing

class EisDataset(self: zahner_link._zahner_link.EisDataset)

Class which contains EIS data.

EMPTY_COMPLEX_TRACK = []
EMPTY_SPECTRA = []
EMPTY_TRACK = []
EMPTY_TRACKWAVE = []
INVALID_IMPEDANCE_DATA = <zahner_link._zahner_link.ImpedanceData object>
INVALID_PATH = <zahner_link._zahner_link.PathData object>
INVALID_POTENTIOSTAT = <zahner_link._zahner_link.PotentiostatData object>
append(self: zahner_link._zahner_link.EisDataset, to_append: zahner_link._zahner_link.EisDataset, time_offset: SupportsFloat | SupportsIndex = 0.0) bool

Append a dataset by another

AFTER THAT OPERATION ALL HELPER OBJECTS ARE INVALID

Parameter:
  • to_append – dataset to be appended to the data

  • time_offset – additional offset for the time track

Rückgabe:

true if append was successful

finished_successfully(self: zahner_link._zahner_link.AbstractDataset) bool
get_frequencies(self: zahner_link._zahner_link.EisDataset) list[float]

Get measured impedance points

Rückgabe:

list with frequencies

get_impedance_data(*args, **kwargs)

Overloaded function.

  1. get_impedance_data(self: zahner_link._zahner_link.EisDataset, numerator_dimension: str, denominator_dimension: str) -> zahner_link._zahner_link.ImpedanceData

    Get a zahner_link.ImpedanceData object which uses the passed dimension for numerator and denominator

    param numerator_dimension:

    dimension of the numerator

    param denominator_dimension:

    dimension of the denominator

    returns:

    zahner_link.ImpedanceData object or EisDataset.INVALID_IMPEDANCE_DATA if it does not exist

  2. get_impedance_data(self: zahner_link._zahner_link.EisDataset, dimension: str) -> zahner_link._zahner_link.ImpedanceData

    Get a zahner_link.ImpedanceData object which uses the passed dimension

    param dimension:

    dimension for which zahner_link.ImpedanceData objects are searched for

    returns:

    zahner_link.ImpedanceData object or EisDataset.INVALID_IMPEDANCE_DATA if it does not exist

  3. get_impedance_data(self: zahner_link._zahner_link.EisDataset) -> zahner_link._zahner_link.ImpedanceData

    Get the first zahner_link.ImpedanceData object

    returns:

    zahner_link.ImpedanceData object or EisDataset.INVALID_IMPEDANCE_DATA if it does not exist

get_impedances_data(self: zahner_link._zahner_link.EisDataset) dict[tuple[str, str], zahner_link._zahner_link.ImpedanceData]

Get a dictionary with all zahner_link.ImpedanceData objects

Keys are a pair of numerator and denominator dimension and values ar the zahner_link.ImpedanceData objects.

Rückgabe:

dictionary with the data

get_impedances_dimensions(self: zahner_link._zahner_link.EisDataset) list[tuple[str, str]]

Get a list with numerator and denominator dimensions of the impedances

Rückgabe:

list with the dimensions

get_job_info(self: zahner_link._zahner_link.DataSet) JobInfo

Get info to the job

Rückgabe:

object with the job info

get_path_data(self: zahner_link._zahner_link.EisDataset, identifier: str) zahner_link._zahner_link.PathData

Get a PathData object by identifier

Parameter:

identifier – name of the potentiostat

Rückgabe:

PathData object

get_paths_data(self: zahner_link._zahner_link.EisDataset) dict[str, zahner_link._zahner_link.PathData]

Get a dictionary with all PathData objects

Keys are a dimension names and values the objects.

Rückgabe:

dictionary with the data

get_paths_dimensions(self: zahner_link._zahner_link.EisDataset) list[str]

Get a list with all available dimensions

Rückgabe:

list with the dimensions

get_periods(self: zahner_link._zahner_link.EisDataset) list[float]

Get number of measured periods per impedance point

Rückgabe:

list with periods

get_potentiostat_data(*args, **kwargs)

Overloaded function.

  1. get_potentiostat_data(self: zahner_link._zahner_link.EisDataset) -> zahner_link._zahner_link.PotentiostatData

    Get the first PotentiostatData object

    returns:

    PotentiostatData object or EisDataset.INVALID_POTENTIOSTAT if the potentiostat does not exist

  2. get_potentiostat_data(self: zahner_link._zahner_link.EisDataset, identifier: str) -> zahner_link._zahner_link.PotentiostatData

    Get a PotentiostatData by a potentiostat name

    param identifier:

    name of the potentiostat

    returns:

    PotentiostatData object or EisDataset.INVALID_POTENTIOSTAT if the potentiostat does not exist

get_potentiostats_data(self: zahner_link._zahner_link.EisDataset) dict[str, zahner_link._zahner_link.PotentiostatData]

Get a dictionary with all PotentiostatData objects

Keys are a potentiostats names and values the objects.

Rückgabe:

dictionary with the data

get_potentiostats_identifiers(self: zahner_link._zahner_link.EisDataset) list[str]

Get a list with all available potentiostat names

Rückgabe:

list with the names

get_row_count(self: zahner_link._zahner_link.EisDataset) int

Get number of measured impedance points

Rückgabe:

number points

get_times(self: zahner_link._zahner_link.EisDataset) list[float]

Get relative start time per impedance point

Rückgabe:

list with times

recreate_original_job(self: zahner_link._zahner_link.EisDataset) object

Recreate the original job that produced this dataset.

Automatically detects the job type from the dataset metadata and returns the corresponding job object with the original parameters and metadata.

Rückgabe:

the recreated job object, or None if the job type is unknown or parameters are missing

class FilterRange
property enabled

is enabled

property frequency

maximum impedance frequnecy

property index

index of the range

class GainRange
property enabled

is enabled

property index

index of the range

property nominal_gain

nominal gain factor

class HardwareInfo
property cards

list of zahner_link.CardInfo objects

constains_url(self: zahner_link._zahner_link.HardwareInfo, url: str) bool

Verify that the object contains the url.

The zahner_link.DeviceTree must first be retrieved from the device in order to use this method.

Parameter:

url – urn to check for

Rückgabe:

True if the url exists

constains_urn(self: zahner_link._zahner_link.HardwareInfo, urn: str) bool

Verify that the object contains the urn.

Parameter:

urn – urn to check for

Rückgabe:

True if the urn exists

convert_url_to_urn(self: zahner_link._zahner_link.HardwareInfo, url: str) str

Convert an url to a urn with the device tree.

Parameter:

url – url to convert

Rückgabe:

urn or an empty string

convert_urn_to_url(self: zahner_link._zahner_link.HardwareInfo, urn: str) str

Convert an urn to a url with the device tree.

Parameter:

urn – urn to convert

Rückgabe:

url or an empty string

property paths

list of zahner_link.PathInfo objects

property potentiostats

list of zahner_link.PotentiostatInfo objects

property workstation

zahner_link.WorkstationInfo object

class HardwareSettings

Class which contains the settings adopted by the IM7.

The channels were sorted by the IM7 according to parallel_channels and sequential_channels.

property async_channels
  • channels which are sampled sequentially after the synchronous channels

  • async_channels can only be measured sequentially, which slows down the internal oversampling

property impedance_configurations

configuration of the channels to be divided for impedance measurements

property output_potentiostats

output potentiostats to which the measurement methods are to be output

property sync_channels

channels which are sampled synchronous

class HardwareSettingsHelper
CHANNELS = 'channels'
IMPEDANCE_CONFIGURATIONS = 'impedance_configurations'
MAIN_POT = 'MAIN:1:POT'
MAIN_POT_I_PAD_I = 'MAIN:1:POT:I~PAD:1:PAD_I'
MAIN_POT_U_PAD_U = 'MAIN:1:POT:U~PAD:1:PAD_U'
OUTPUT_POTENTIOSTATS = 'output_potentiostats'
PAD_I = 'PAD:1:PAD_I'
PAD_U = 'PAD:1:PAD_U'
SEPARATOR = '~'
static get_config_for_main_potentiostat() zahner_link._zahner_link.UserHardwareSettings

Get the default configuration

U and I channel on the main potentiostat are measured and the impedance is calculated from the two channels.

Rückgabe:

object with the settings

static get_config_for_main_with_sync_channel_impedance(connections: collections.abc.Sequence[zahner_link._zahner_link.Pad4ImpedanceConfiguration]) zahner_link._zahner_link.UserHardwareSettings

Get the default configuration for the main potentiostat with impedance between PAD4 channels.

U and I channel on the main potentiostat are measured and the impedance is calculated from the two channels. In addition, an impedance is calculated between two PAD4 channels.

Parameter:

connections – list with with objects of type Pad4ImpedanceConfiguration which specify the numerator and denominator as Pad4Connection with card index and connector number

Rückgabe:

object with the settings

static get_config_for_main_with_sync_current_channel(connections: collections.abc.Sequence[zahner_link._zahner_link.Pad4Connection]) zahner_link._zahner_link.UserHardwareSettings

Get the default configuration for the main potentiostat with PAD4 channels.

U and I channel on the main potentiostat are measured and the impedance is calculated from the two channels. In addition, an impedance is calculated between the PAD4 channel as current and the voltage channel of the main potentiostat.

Parameter:

connections – list with PAD4 connections with card index and connector number

Rückgabe:

object with the settings

static get_config_for_main_with_sync_voltage_channel(connections: collections.abc.Sequence[zahner_link._zahner_link.Pad4Connection]) zahner_link._zahner_link.UserHardwareSettings

Get the default configuration for the main potentiostat with PAD4 channels.

U and I channel on the main potentiostat are measured and the impedance is calculated from the two channels. In addition, an impedance is calculated between the PAD4 channel and the current of the main potentiostat.

Parameter:

connections – list with PAD4 connections with card index and connector number

Rückgabe:

object with the settings

static get_config_for_potentiostat(*args, **kwargs)

Overloaded function.

  1. get_config_for_potentiostat(pot_serial_number: str) -> zahner_link._zahner_link.UserHardwareSettings

    Get the default configuration for a potentiostat with a specific serialnumber.

    U and I channel are measured on the potentiostat with the serial number pot_serial_number and the impedance is calculated from the two channels.

    param pot_serial_number:

    serialnumber of the potentiostat as a string

    returns:

    object with the settings

  2. get_config_for_potentiostat(pot_connection: zahner_link._zahner_link.PotConnection) -> zahner_link._zahner_link.UserHardwareSettings

    Get the default configuration for a potentiostat at a specific EPC slot.

    The U and I channels are measured at the potentiostat with the specified slot on the EPC card, and the impedance is calculated from the two channels.

    param pot_connection:

    slot of the potentiostat on the EPC card with card index and slot number

    returns:

    object with the settings

static get_config_for_potentiostat_with_sync_channel_impedance(*args, **kwargs)

Overloaded function.

  1. get_config_for_potentiostat_with_sync_channel_impedance(pot_serial_number: str, connections: collections.abc.Sequence[zahner_link._zahner_link.Pad4ImpedanceConfiguration]) -> zahner_link._zahner_link.UserHardwareSettings

    Get the default configuration for the main potentiostat with impedance between PAD4 channels.

    U and I channel are measured on the potentiostat with the serial number pot_serial_number and the impedance is calculated from the two channels. In addition, an impedance is calculated between two PAD4 channels.

    param pot_serial_number:

    serialnumber of the potentiostat as a string

    param connections:

    list with with objects of type Pad4ImpedanceConfiguration which specify the numerator and denominator as Pad4Connection with card index and connector number

    returns:

    object with the settings

  2. get_config_for_potentiostat_with_sync_channel_impedance(pot_connection: zahner_link._zahner_link.PotConnection, connections: collections.abc.Sequence[zahner_link._zahner_link.Pad4ImpedanceConfiguration]) -> zahner_link._zahner_link.UserHardwareSettings

    Get the default configuration for the main potentiostat with impedance between PAD4 channels.

    U and I channel are measured on the potentiostat with the connections pot_connection and the impedance is calculated from the two channels. In addition, an impedance is calculated between two PAD4 channels.

    param pot_connection:

    slot of the potentiostat on the EPC card with card index and slot number

    param connections:

    list with with objects of type Pad4ImpedanceConfiguration which specify the numerator and denominator as Pad4Connection with card index and connector number

    returns:

    object with the settings

static get_config_for_potentiostat_with_sync_current_channel(*args, **kwargs)

Overloaded function.

  1. get_config_for_potentiostat_with_sync_current_channel(pot_serial_number: str, connections: collections.abc.Sequence[zahner_link._zahner_link.Pad4Connection]) -> zahner_link._zahner_link.UserHardwareSettings

    Get the default configuration for a potentiostat with a specific serialnumber and PAD4 channels.

    U and I channel are measured on the potentiostat with the serial number pot_serial_number and the impedance is calculated from the two channels. In addition, an impedance is calculated between the PAD4 channel as current and the voltage channel of the potentiostat which has the pot_serial_number.

    param pot_serial_number:

    serialnumber of the potentiostat as a string

    param connections:

    list with PAD4 connections with card index and connector number

    returns:

    object with the settings

  2. get_config_for_potentiostat_with_sync_current_channel(pot_connection: zahner_link._zahner_link.PotConnection, connections: collections.abc.Sequence[zahner_link._zahner_link.Pad4Connection]) -> zahner_link._zahner_link.UserHardwareSettings

    Get the default configuration for a potentiostat with a specific serialnumber and PAD4 channels.

    U and I channel are measured on the potentiostat with the connections pot_connection and the impedance is calculated from the two channels. In addition, an impedance is calculated between the PAD4channel as current and the voltage channel of the potentiostat which has the connections pot_connection.

    param pot_connection:

    slot of the potentiostat on the EPC card with card index and slot number

    param connections:

    list with PAD4 connections with card index and connector number

    returns:

    object with the settings

static get_config_for_potentiostat_with_sync_voltage_channel(*args, **kwargs)

Overloaded function.

  1. get_config_for_potentiostat_with_sync_voltage_channel(pot_serial_number: str, connections: collections.abc.Sequence[zahner_link._zahner_link.Pad4Connection]) -> zahner_link._zahner_link.UserHardwareSettings

    Get the default configuration for a potentiostat with a specific serialnumber and PAD4 channels.

    U and I channel are measured on the potentiostat with the serial number pot_serial_number and the impedance is calculated from the two channels. In addition, an impedance is calculated between the PAD4 channel and the current channel of the potentiostat which has the pot_serial_number.

    param pot_serial_number:

    serialnumber of the potentiostat as a string

    param connections:

    list with PAD4 connections with card index and connector number

    returns:

    object with the settings

  2. get_config_for_potentiostat_with_sync_voltage_channel(pot_connection: zahner_link._zahner_link.PotConnection, connections: collections.abc.Sequence[zahner_link._zahner_link.Pad4Connection]) -> zahner_link._zahner_link.UserHardwareSettings

    Get the default configuration for a potentiostat with a specific serialnumber and PAD4 channels.

    U and I channel are measured on the potentiostat with the connections pot_connection and the impedance is calculated from the two channels. In addition, an impedance is calculated between the PAD4 channel and the current channel of the potentiostat which has the connections pot_connection.

    param pot_connection:

    slot of the potentiostat on the EPC card with card index and slot number

    param connections:

    list with PAD4 connections with card index and connector number

    returns:

    object with the settings

class DiscoveredDevice

Network location of a device found by zahner_link.AutoDiscovery.

Only contains the address and port. To read a device’s details (serial number, model, firmware, …), construct a zahner_link.ZahnerLink with the address and port and call zahner_link.ZahnerLink.id().

property ip_address

IPv4 address of the device.

property port

Port the device listens on.

property recovery_mode

True if the device is in recovery mode.

property url

Address and port in ip:port notation.

class AutoDiscovery(self: zahner_link._zahner_link.AutoDiscovery, discovery_timeout: datetime.timedelta = datetime.timedelta(seconds=3))

Discovers Zahner devices on the local network.

Broadcasts a discovery request on every local network interface; reachable devices answer with their address and port.

Create an auto discovery scanner.

Parameter:

discovery_timeout – how long to listen for device responses as a datetime.timedelta

discover(self: zahner_link._zahner_link.AutoDiscovery) list[zahner_link._zahner_link.DiscoveredDevice]

Scan the local network for Zahner devices.

Broadcasts a discovery request on every local network interface and blocks until the timeout passed to the constructor has elapsed, then returns the devices that answered.

from datetime import timedelta
import zahner_link as zl

discovery = zl.AutoDiscovery(discovery_timeout=timedelta(seconds=3))

devices = discovery.discover()

print(f"Found {len(devices)} device(s):")
for index, device in enumerate(devices, start=1):
    recovery = "  <<RECOVERY MODE>>" if device.recovery_mode else ""
    print(f"Device {index}: {device.url}{recovery}")
    print(f"    {device!r}")

The returned zahner_link.DiscoveredDevice objects only contain the address and port. To additionally read a device’s serial number, model name, firmware version and so on, pass its address and port to a zahner_link.ZahnerLink and call zahner_link.ZahnerLink.id(), which queries the identification without establishing a persistent connection.

Rückgabe:

list of zahner_link.DiscoveredDevice objects found on the network

class ImpedanceConfiguration(self: zahner_link._zahner_link.ImpedanceConfiguration, numerator: str, denominator: str)

Class that contains the impedance configuration for a pair of channels.

Numerator and denominator can be any parallel signal paths in the system. For example, the numerator does not necessarily have to be U. For each impedance configuration, the numerator is simply returned divided by the denominator as a complex number, which even if impedance is in the name, special cases such as admittance spectra can be measured directly.

Parameter:
  • numerator – numerator for the impedance calculation

  • denominator – denominator for the impedance calculation

property denominator

denominator for the impedance calculation

property numerator

numerator for the impedance calculation

class ImpedanceData
get_calculated_complex_impedance_track(self: zahner_link._zahner_link.ImpedanceData) list[complex]

Get the impedance as a list of complex numbers

Calculates the impedance as complex number from the phase and absolute value.

Rückgabe:

list with the complex numbers

get_calculated_spectra(self: zahner_link._zahner_link.ImpedanceData) dict[float, complex]

Get the spectra as a dictionary with the frequency as key and the complex number as value

Calculates the impedance as complex number from the phase and absolute value.

Rückgabe:

dictionary with the frequency as key and the complex number as value

get_denominator_dimension(self: zahner_link._zahner_link.ImpedanceData) str

Get the name of the denominator dimension of the path

Rückgabe:

dimension name

get_numerator_dimension(self: zahner_link._zahner_link.ImpedanceData) str

Get the name of the numerator dimension of the path

Rückgabe:

dimension name

get_track(self: zahner_link._zahner_link.ImpedanceData, track_name: str) list[float]

Get a track by a track name

Parameter:

track_name – name of the track

Rückgabe:

list with the track data or EisDataset.EMPTY_TRACK if the track name does not exist

get_track_names(self: zahner_link._zahner_link.ImpedanceData) list[str]

Get a list with all available track names

Rückgabe:

list with the track names

get_tracks(self: zahner_link._zahner_link.ImpedanceData) dict[str, list[float]]

Get a dictionary with all tracks

Keys are a dimension and values are the data as a list of floats.

Rückgabe:

dictionary with the data

class ImpedanceDataHeader
get_columns(self: zahner_link._zahner_link.ImpedanceDataHeader) list[zahner_link._zahner_link.ColumnHeader]
get_denominator_path(self: zahner_link._zahner_link.ImpedanceDataHeader) str
get_numerator_path(self: zahner_link._zahner_link.ImpedanceDataHeader) str
class JobInfo

Class which contains information about the job.

get_creation_date(self: zahner_link._zahner_link.JobInfo) str

Get the creation date.

Rückgabe:

string with the date

get_end_date(self: zahner_link._zahner_link.JobInfo) str

Get the end date.

Rückgabe:

string with the date

get_error(self: zahner_link._zahner_link.JobInfo) zahner_link._zahner_link.ErrorObject

Get the error object of the job

Rückgabe:

object with the error details

get_error_message(self: zahner_link._zahner_link.JobInfo) str

Get the error message of the job

Rückgabe:

string containing the error message or empty string

get_job_id(self: zahner_link._zahner_link.JobInfo) str

Get the ID of the job that was assigned by the IM7.

Rückgabe:

string with the id

get_start_date(self: zahner_link._zahner_link.JobInfo) str

Get the start date.

Rückgabe:

string with the date

get_status(self: zahner_link._zahner_link.JobInfo) zahner_link._zahner_link.JobStatusEnum

Get the status of the job.

Rückgabe:

status object

get_status_detail(self: zahner_link._zahner_link.JobInfo) zahner_link._zahner_link.JobStatusDetailEnum

Get the detailed status of the job.

Rückgabe:

reason object

get_status_detail_string(self: zahner_link._zahner_link.JobInfo) str

Get the detailed status of the job as string.

Rückgabe:

string with the reason

get_status_string(self: zahner_link._zahner_link.JobInfo) str

Get the status of the job as string.

Rückgabe:

string with the status

get_user_metadata(self: zahner_link._zahner_link.JobInfo) dict[str, str]

Get the meta data.

Rückgabe:

dict with the data

enum JobStatusDetailEnum(value)

An enum that explains the status in more detail.

Valid values are as follows:

NOT_FINISHED = <JobStatusDetailEnum.NOT_FINISHED: 0>
RUN_TO_COMPLETION = <JobStatusDetailEnum.RUN_TO_COMPLETION: 1>
NOT_CONNECTED = <JobStatusDetailEnum.NOT_CONNECTED: 2>
FAILED_TO_CREATE = <JobStatusDetailEnum.FAILED_TO_CREATE: 3>
CANCELLED_BEFORE_RUN = <JobStatusDetailEnum.CANCELLED_BEFORE_RUN: 4>
STOPPED_BY_USER = <JobStatusDetailEnum.STOPPED_BY_USER: 5>
FUNCTIONAL_LIMIT_OCCURRED = <JobStatusDetailEnum.FUNCTIONAL_LIMIT_OCCURRED: 6>
SAFETY_LIMIT_OCCURRED = <JobStatusDetailEnum.SAFETY_LIMIT_OCCURRED: 7>
CONNECTION_LOSS = <JobStatusDetailEnum.CONNECTION_LOSS: 8>
RUNTIME_ERROR = <JobStatusDetailEnum.RUNTIME_ERROR: 9>
enum JobStatusEnum(value)

Enum which indicates the status of the job.

Valid values are as follows:

UNKNOWN = <JobStatusEnum.UNKNOWN: 0>
PENDING = <JobStatusEnum.PENDING: 1>
RUNNING = <JobStatusEnum.RUNNING: 2>
FINISHED = <JobStatusEnum.FINISHED: 3>
FAILED = <JobStatusEnum.FAILED: 4>
DELETED = <JobStatusEnum.DELETED: 5>
class LiveDataHeader
get_columns(self: zahner_link._zahner_link.LiveDataHeader) list[ColumnHeader]

Get the zahner_link.ColumnHeader list of the job.

The list with zahner_link.ColumnHeader objects describe the tracks that were measured in the job.

Rückgabe:

list with the headers of the job

get_number_of_columns(self: zahner_link._zahner_link.LiveDataHeader) int
get_short_type(self: zahner_link._zahner_link.LiveDataHeader) str
get_type(self: zahner_link._zahner_link.LiveDataHeader) str
class LiveDataHeaderEis
get_async_paths_data_headers(self: zahner_link._zahner_link.LiveDataHeaderEis) list[zahner_link._zahner_link.PathDataHeader]

Get the async headers

Rückgabe:

object with the headers

get_columns(self: zahner_link._zahner_link.LiveDataHeader) list[ColumnHeader]

Get the zahner_link.ColumnHeader list of the job.

The list with zahner_link.ColumnHeader objects describe the tracks that were measured in the job.

Rückgabe:

list with the headers of the job

get_impedances_headers(self: zahner_link._zahner_link.LiveDataHeaderEis) list[zahner_link._zahner_link.ImpedanceDataHeader]

Get the impedance headers

These are the extracted headers from the live data header object.

Rückgabe:

object with the headers

get_meta_data_header(self: zahner_link._zahner_link.LiveDataHeaderEis) list[zahner_link._zahner_link.ColumnHeader]

Get the meta data headers

These are the extracted headers from the live data header object.

Rückgabe:

object with the headers

get_number_of_columns(self: zahner_link._zahner_link.LiveDataHeader) int
get_paths_data_headers(self: zahner_link._zahner_link.LiveDataHeaderEis) list[zahner_link._zahner_link.PathDataHeader]

Get the paths data headers

These are the extracted headers from the live data header object.

Rückgabe:

object with the headers

get_potentiostats_data_headers(self: zahner_link._zahner_link.LiveDataHeaderEis) list[PotentiostatDataHeader]

Get the potentiostats data headers

These are the extracted headers from the live data header object.

Rückgabe:

object with the headers

get_short_type(self: zahner_link._zahner_link.LiveDataHeader) str
get_type(self: zahner_link._zahner_link.LiveDataHeader) str
class LiveDataRowEis
get_async_paths(self: zahner_link._zahner_link.LiveDataRowEis) list[list[float]]
get_impedances(self: zahner_link._zahner_link.LiveDataRowEis) list[list[float]]
get_meta(self: zahner_link._zahner_link.LiveDataRowEis) list[float]
get_paths(self: zahner_link._zahner_link.LiveDataRowEis) list[list[float]]
get_paths_waves(self: zahner_link._zahner_link.LiveDataRowEis) list[list[float]]
get_potentiostats(self: zahner_link._zahner_link.LiveDataRowEis) list[list[float]]
class LiveDataWavesEis
get_position(self: zahner_link._zahner_link.LiveDataWavesEis) int
get_waves(self: zahner_link._zahner_link.LiveDataWavesEis) list[list[float]]
class Pad4Connection(self: zahner_link._zahner_link.Pad4Connection, card_index: SupportsInt | SupportsIndex, connector_index: SupportsInt | SupportsIndex, polynomial: zahner_link._zahner_link.UserPolynomial = <zahner_link._zahner_link.UserPolynomial object at 0x7f0ba4dfec70>, dimension: str = '', unit: str = '')

Class which contains the settings of a PAD4 channel.

Parameter:
  • card_index – index of the PAD4 card

  • connector_index – index of the connector on the PAD4 card

  • polynomial

    • polynomial used to calculate the DC value of this channel

    • it is also included in the impedance calculation

  • dimension – dimension of the channel

  • unit – unit of the channel

property card_index

index of the PAD4 card

property connector_index

index of the connector on the PAD4 card

property dimension

dimension of the channel

getPath(self: zahner_link._zahner_link.Pad4Connection) str

Get the path of the PAD4 as string.

Rückgabe:

the path as string

property polynomial
  • polynomial used to calculate the DC value of this channel

  • it is also included in the impedance calculation

property unit

unit of the channel

class Pad4ImpedanceConfiguration(self: zahner_link._zahner_link.Pad4ImpedanceConfiguration, numerator: Pad4Connection, denominator: Pad4Connection)

Class that contains the impedance configuration for a pair of PAD4 channels.

Parameter:
  • numerator – numerator for the impedance calculation

  • denominator – denominator for the impedance calculation

property denominator

denominator for the impedance calculation

property numerator

numerator for the impedance calculation

class PathData
get_dc_track(self: zahner_link._zahner_link.PathData) list[float]

Get a track with the dc data

Rückgabe:

list with the track data or EisDataset.EMPTY_TRACK if the track name does not exist

get_dimension(self: zahner_link._zahner_link.PathData) str

Get the name of the dimension of the path

Rückgabe:

dimension name

get_impedance_data(*args, **kwargs)

Overloaded function.

  1. get_impedance_data(self: zahner_link._zahner_link.PathData, dimension: str) -> zahner_link._zahner_link.ImpedanceData

    Get a zahner_link.ImpedanceData object which uses this PathInfo and the passed dimension

    param dimension:

    dimension for which zahner_link.ImpedanceData objects are searched for

    returns:

    zahner_link.ImpedanceData object or EisDataset.INVALID_IMPEDANCE_DATA if it does not exist

  2. get_impedance_data(self: zahner_link._zahner_link.PathData) -> zahner_link._zahner_link.ImpedanceData

    Get the first zahner_link.ImpedanceData object

    returns:

    zahner_link.ImpedanceData object or EisDataset.INVALID_IMPEDANCE_DATA if it does not exist

get_impedances_data(self: zahner_link._zahner_link.PathData) dict[tuple[str, str], zahner_link._zahner_link.ImpedanceData]

Get a dictionary with all zahner_link.ImpedanceData objects which use this path

Keys are a pair of numerator and denominator dimension and values ar the zahner_link.ImpedanceData objects.

Rückgabe:

dictionary with the data

get_track(self: zahner_link._zahner_link.PathData, track_name: str) list[float]

Get a track by a track name

Parameter:

track_name – name of the track

Rückgabe:

list with the track data or EisDataset.EMPTY_TRACK if the track name does not exist

get_track_names(self: zahner_link._zahner_link.PathData) list[str]

Get a list with all available track names

Rückgabe:

list with the track names

get_tracks(self: zahner_link._zahner_link.PathData) dict[str, list[float]]

Get a dictionary with all tracks

Keys are a dimension and values are the data as a list of floats.

Rückgabe:

dictionary with the data

get_waves(self: zahner_link._zahner_link.PathData) list[list[float]]

Get the waves of the path

The first dimension of the list is the spectra. Each list contains a list with the values of the wave.

Rückgabe:

list with the waves

class PathInfo
property filter_ranges

Filter ranges of the path.

Contains an array with the index and the maximum filter frequency used for impedance measurements. The user does not have to adjust anything on the filter.

property gain_ranges

Gain factor ranges of the path.

Contains an array with the index and the nominal Gain factor of the path. The user does not have to adjust anything on the gains.

property relevance

Hint how relevant is the channel.

  • 1.0 is the best 0 is worst

  • current, voltage and speed make a signal relevant

property sampling

Sampling type of the path:

  • simultan for parallel channels like PAD and PAD4 that are sampled at the same time

  • acq for sequential aquisition channels that are sampled after the parallel channels one after the other

  • high_precision for slow high precision 32 bit channels

property source

Description of where the signal is measured from:

  • shunt current channel of a potentiostat,

  • voltage voltage channel of a potentiostat

  • input analog input like PAD4

property url

path in url notation

property urn

path in urn notation

class PotConnection(self: zahner_link._zahner_link.PotConnection, card_index: SupportsInt | SupportsIndex, connector_index: SupportsInt | SupportsIndex)

Class which describes the connection of a potentiostat to an EPC card.

Parameter:
  • card_index – index of the card to which the potentiostat is connected

  • connector_index – index of the connector on the card to which the potentiostat is connected

property card_index

index of the card to which the potentiostat is connected

property connector_index

index of the connector on the card to which the potentiostat is connected

class PotentiostatConfiguration(self: zahner_link._zahner_link.PotentiostatConfiguration, uri: str, potentiostatic_polynomial: object = [0.0, 1.0], galvanostatic_polynomial: object = [0.0, 1.0])

Class that contains the impedance configuration for a pair of channels.

Numerator and denominator can be any parallel signal paths in the system. For example, the numerator does not necessarily have to be U. For each impedance configuration, the numerator is simply returned divided by the denominator as a complex number, which even if impedance is in the name, special cases such as admittance spectra can be measured directly.

Parameter:
  • uri – identifier of the potentiostat as URI

  • potentiostatic_polynomial – polynomial to calculate potentiostatic output for reference electrode and FRA

  • galvanostatic_polynomial – polynomial to calculate galvanostatic output for FRA

property galvanostatic_polynomial

polynomial to calculate galvanostatic output for FRA

property potentiostatic_polynomial

polynomial to calculate potentiostatic output for reference electrode and FRA

property uri

identifier of the potentiostat as uri

enum PotentiostatCoupling(value)

Enum with which you can select the feedback mode.

Valid values are as follows:

POTENTIOSTATIC = <PotentiostatCoupling.POTENTIOSTATIC: 0>

voltage feedback

GALVANOSTATIC = <PotentiostatCoupling.GALVANOSTATIC: 1>

current feedback

FRA_PROBE = <PotentiostatCoupling.FRA_PROBE: 2>

internal feedback, mode must be used in combination with an FRA probe

class PotentiostatData
get_identifier(self: zahner_link._zahner_link.PotentiostatData) str

Get the name of the potentiostat

Rückgabe:

name of the potentiostat

get_track(self: zahner_link._zahner_link.PotentiostatData, track_name: str) list[float]

Get a track by a track name

Parameter:

track_name – name of the track

Rückgabe:

list with the track data or EisDataset.EMPTY_TRACK if the track name does not exist

get_track_names(self: zahner_link._zahner_link.PotentiostatData) list[str]

Get a list with all available track names

Rückgabe:

list with the track names

get_tracks(self: zahner_link._zahner_link.PotentiostatData) dict[str, list[float]]

Get a dictionary with all tracks

Keys are a dimension and values are the data as a list of floats.

Rückgabe:

dictionary with the data

class PotentiostatInfo
property bandwidth_ranges
property compliance_ranges

Array with objects, that describe the compliance ranges.

Contain an Index for the index of the range and the maximum voltage of the range. This measurement configuration must be set by the user and is never set automatically by the device.

property current_ranges

Array with json objects, that describe the current ranges.

Contain an Index for the index of the range and the maximum current and resistor value of the range. The user could select individual current ranges via the API, but this is rarely required.

property dac_resolution

resolution of the dac that is used for output values in bits

property has_calibration_data

flag if there is calibration data, if false no measurements are possible

property identifier

unique identification of the potentiostat

property serialnumber

serial number of the potentiostat

property software

software version of the potentiostat

property url

path in url notation

property urn

path in urn notation

property voltage_ranges

Array with objects, that describe the voltage ranges.

Contain an Index for the index of the range and the maximum voltage of the range. This measurement configuration must be set by the user and is never set automatically by the device.

enum QueueStopModeEnum(value)

Enum with which you can select what should happen when the criteria is met.

Valid values are as follows:

QUEUE_STOP_MODE_FLUSH = <QueueStopModeEnum.QUEUE_STOP_MODE_FLUSH: 0>

flush all the following jobs

QUEUE_STOP_MODE_CONTINUE = <QueueStopModeEnum.QUEUE_STOP_MODE_CONTINUE: 1>

continue with the following job

class Resource(self: zahner_link._zahner_link.Resource)
DATA_CHUNK_SIZE_LIMIT = 393216
static from_id(type: ResourceTypeEnum, resource_id: str) zahner_link._zahner_link.Resource
get_creation_date(self: zahner_link._zahner_link.Resource) str
get_id(self: zahner_link._zahner_link.Resource) str
get_last_updated_date(self: zahner_link._zahner_link.Resource) str
get_name(self: zahner_link._zahner_link.Resource) str
get_size(self: zahner_link._zahner_link.Resource) int
get_type(self: zahner_link._zahner_link.Resource) ResourceTypeEnum
is_valid(self: zahner_link._zahner_link.Resource) bool
enum ResourceTypeEnum(value)

Enum which indicates the type of the resource.

Valid values are as follows:

UNDEFINED = <ResourceTypeEnum.UNDEFINED: 0>
FIRMWARE_UPDATE = <ResourceTypeEnum.FIRMWARE_UPDATE: 1>
WAVE = <ResourceTypeEnum.WAVE: 2>
CALIB_MESH = <ResourceTypeEnum.CALIB_MESH: 3>
ZAHNER_BINARY = <ResourceTypeEnum.ZAHNER_BINARY: 4>
DEBUG_INFO = <ResourceTypeEnum.DEBUG_INFO: 5>
JOB_RESULT = <ResourceTypeEnum.JOB_RESULT: 6>
class UserHardwareSettings(self: zahner_link._zahner_link.UserHardwareSettings, channels: collections.abc.Sequence[zahner_link._zahner_link.Channel], impedance_configurations: collections.abc.Sequence[zahner_link._zahner_link.ImpedanceConfiguration], output_potentiostats: collections.abc.Sequence[zahner_link._zahner_link.PotentiostatConfiguration])

Class which contains the information about the sampling configuration to be set

Parameter:
  • channels

    • channels to be measured during the measurement

    • asynchron and synchron channels together these are automatically split

  • impedance_configurations

    • synchron sampled channels

    • as a list of lists from which impedances are calculated

    • in the sub list, the first element (index 0) divided by the second element (index 1) is used for the impedance calculation

  • output_potentiostats – potentiostat on which the measurement is to be output

add_channel(self: zahner_link._zahner_link.UserHardwareSettings, channel: zahner_link._zahner_link.Channel) None

Adding a channel to the configuration.

The channel is automatically classified as synchronous or asynchronous based on the hardware capabilities. In Python this appends directly to the internal channels list. Use this instead of config.channels.append(…) which does not work due to copy semantics.

Parameter:

channel – channel to add

add_sync_current_channel(self: zahner_link._zahner_link.UserHardwareSettings, connections: collections.abc.Sequence[zahner_link._zahner_link.Pad4Connection]) None

Adding a synchronous current channel to the configuration.

With the added channels, an impedance is calculated with the main voltage channel.

Parameter:

connections – synchronous channels

add_sync_voltage_channel(self: zahner_link._zahner_link.UserHardwareSettings, connections: collections.abc.Sequence[zahner_link._zahner_link.Pad4Connection]) None

Adding a synchronous voltage channel to the configuration.

With the added channels, an impedance is calculated with the main current channel.

Parameter:

connections – synchronous channels

property channels

The channels to be measured during the measurement. asynchron and synchron channels together these are automatically split.

property impedance_configurations

Configuration of the channels to be divided, for example for impedance measurements.

property output_potentiostats

Configuration of the output potentiostats to which the measurement methods are to be output.

remove_duplicates_from_channels(self: zahner_link._zahner_link.UserHardwareSettings) None

Removal of duplicates from the channels.

class UserPolynomial(*args, **kwargs)

Overloaded function.

  1. __init__(self: zahner_link._zahner_link.UserPolynomial, coefficients: collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex]) -> None

    Class which contains the polynomial for the channel configuration.

    param coefficients:

    array containing the coefficients of the polynomial

  2. __init__(self: zahner_link._zahner_link.UserPolynomial, arg0: collections.abc.Sequence) -> None

property coefficients

Array containing the coefficients of the polynomial.

class VoltageRange
property index

index of the range

property voltage

maximum voltage

class WorkstationInfo
property cpu_card_uuid
property firmware_version
property mode
property model_name
property protocol_version
property serial_number
property system_mac
property system_name
enum WorkstationModeEnum(value)

Enum indicating the operating mode of the IM7

Indicates whether the device can be used normally or whether it is in recovery mode for resetting settings.

Valid values are as follows:

NORMAL = <WorkstationModeEnum.NORMAL: 0>
RECOVERY = <WorkstationModeEnum.RECOVERY: 1>
EMULATION = <WorkstationModeEnum.EMULATION: 1000>
class WorkstationStatus
property busy
property last_dc_calibration
property uptime
class WebsocketConnectionInfo
property connected_since
property connection_id
property remote_addr
property remote_port
property target
property user_agent
property using_tls
class TlsCertificateInfo
property common_name
property is_expired
property issuer_dn
property pem_string
property public_key_bits
property public_key_type
property sans
property serial_number
property sha256_fingerprint
property subject_dn
property valid_from
property valid_until
class TlsConfiguration(self: zahner_link._zahner_link.TlsConfiguration, trusted_ca_files: collections.abc.Sequence[str] = [], trusted_ca_certificates: collections.abc.Sequence[str] = [], trusted_cert_fingerprints: collections.abc.Sequence[str] = [], certificate_hostname: str = '')

Bundles all TLS trust and validation parameters for a connection.

Pass an instance to zahner_link.ZahnerLink.ssl_set_tls_configuration() before connecting with the zahner_link.ZahnerLinkConnectionFlags.USE_SSL flag.

Parameter:
  • trusted_ca_files – Paths to trusted CA certificates in PEM format, loaded from disk.

  • trusted_ca_certificates – Trusted CA certificates supplied directly in memory as PEM-encoded strings. Each entry may contain a bundle of multiple concatenated PEM certificates.

  • trusted_cert_fingerprints – SHA-256 fingerprint allow-list (uppercase hex pairs separated by colons, e.g. „AB:CD:EF..“). A leaf certificate whose fingerprint matches is trusted unconditionally, overriding chain and hostname validation.

  • certificate_hostname – Hostname the server certificate is validated against, overriding the host used to connect. Only takes effect when the zahner_link.ZahnerLinkConnectionFlags.SSL_VERIFY_CUSTOM_HOSTNAME flag is set.

property certificate_hostname
property trusted_ca_certificates
property trusted_ca_files
property trusted_cert_fingerprints
class TlsVerificationResult
property chain
property error_depth
property error_message
property openssl_error_code
property trusted_by_system
class LogSeverityEnum(*values)

Enum indicating the severity of a log message.

DEBUG = 0
MESSAGE = 1
WARNING = 2
CRITICAL_ERROR = 3
enum ZahnerLinkConnectionStatusEnum(value)

Indicates the connection status.

Valid values are as follows:

DISCONNECTED = <ZahnerLinkConnectionStatusEnum.DISCONNECTED: 0>
CONNECTED = <ZahnerLinkConnectionStatusEnum.CONNECTED: 1>
exception ZahnerLinkException

Base class for all ZahnerLink exceptions.

exception ErrorObject

Class which contains information about an error.

get_error_code_enum(self: zahner_link._zahner_link.ErrorObject) zahner_link._zahner_link.ErrorCodeEnum

Get the error code enum.

Rückgabe:

error code

get_message_format_string(self: zahner_link._zahner_link.ErrorObject) str

Get the format string for the error message.

Rückgabe:

format string

get_message_formatted(self: zahner_link._zahner_link.ErrorObject) str

Get the formatted error message.

Rückgabe:

formatted error message

get_message_parameters(self: zahner_link._zahner_link.ErrorObject) list[bool | float | int | int | str]

Get the parameters for formatting the error message.

Rückgabe:

list with the parameters

is_none(self: zahner_link._zahner_link.ErrorObject) bool

Check if the error code is NONE (no error).

Rückgabe:

True if the error code is NONE, False otherwise

class ErrorParameter
enum ErrorCodeEnum(value)

Enum which indicates error codes for various operations.

Valid values are as follows:

NONE = <ErrorCodeEnum.NONE: 0>
CONNECTION_NOT_ESTABLISHED = <ErrorCodeEnum.CONNECTION_NOT_ESTABLISHED: 4096>
ALREADY_CONNECTED = <ErrorCodeEnum.ALREADY_CONNECTED: 4097>
CONNECTION_FAILED = <ErrorCodeEnum.CONNECTION_FAILED: 4098>
CONNECTION_BROKEN = <ErrorCodeEnum.CONNECTION_BROKEN: 4099>
CONNECTION_WAS_CLOSED = <ErrorCodeEnum.CONNECTION_WAS_CLOSED: 4100>
FAILED_TO_WRITE_TO_SOCKET = <ErrorCodeEnum.FAILED_TO_WRITE_TO_SOCKET: 4101>
FAILED_TO_READ_FROM_SOCKET = <ErrorCodeEnum.FAILED_TO_READ_FROM_SOCKET: 4102>
OPERATION_TIMED_OUT = <ErrorCodeEnum.OPERATION_TIMED_OUT: 4103>
CONNECTION_DNS_ERROR = <ErrorCodeEnum.CONNECTION_DNS_ERROR: 4104>
CONNECTION_HTTP_ERROR = <ErrorCodeEnum.CONNECTION_HTTP_ERROR: 4105>
UNAUTHORIZED = <ErrorCodeEnum.UNAUTHORIZED: 4106>
FAILED_TO_ESTABLISH_WEBSOCKET_CONNECTION = <ErrorCodeEnum.FAILED_TO_ESTABLISH_WEBSOCKET_CONNECTION: 4107>
PROTOCOL_VERSION_MISMATCH = <ErrorCodeEnum.PROTOCOL_VERSION_MISMATCH: 4108>
JSON_MALFORMED = <ErrorCodeEnum.JSON_MALFORMED: 8192>
JSON_OBJECT_EXPECTED = <ErrorCodeEnum.JSON_OBJECT_EXPECTED: 8193>
ENDPOINT_NOT_FOUND = <ErrorCodeEnum.ENDPOINT_NOT_FOUND: 8194>
TYPE_NAME_UNKNOWN = <ErrorCodeEnum.TYPE_NAME_UNKNOWN: 8195>
PARAMETER_MISSING = <ErrorCodeEnum.PARAMETER_MISSING: 16384>
PARAMETER_FORMAT_INVALID = <ErrorCodeEnum.PARAMETER_FORMAT_INVALID: 16385>
PARAMETER_FORMAT_INVALID_HINT = <ErrorCodeEnum.PARAMETER_FORMAT_INVALID_HINT: 16386>
PARAMETER_IS_NOT_A_NUMBER = <ErrorCodeEnum.PARAMETER_IS_NOT_A_NUMBER: 16387>
PARAMETER_VALUE_TOO_HIGH = <ErrorCodeEnum.PARAMETER_VALUE_TOO_HIGH: 16388>
PARAMETER_VALUE_TOO_LOW = <ErrorCodeEnum.PARAMETER_VALUE_TOO_LOW: 16389>
PARAMETER_RELATIVE_CONSTRAINT_VIOLATED = <ErrorCodeEnum.PARAMETER_RELATIVE_CONSTRAINT_VIOLATED: 16390>
PARAMETER_CONSTRAINT_VIOLATED = <ErrorCodeEnum.PARAMETER_CONSTRAINT_VIOLATED: 16391>
RAMP_ODR_CONSTRAINT_VIOLATED = <ErrorCodeEnum.RAMP_ODR_CONSTRAINT_VIOLATED: 16392>
PARAMETER_COMBINATION_INVALID = <ErrorCodeEnum.PARAMETER_COMBINATION_INVALID: 16393>
PARAMETER_VALUES_TOO_CLOSE = <ErrorCodeEnum.PARAMETER_VALUES_TOO_CLOSE: 16394>
PARAMETER_STRING_LENGTH_INVALID = <ErrorCodeEnum.PARAMETER_STRING_LENGTH_INVALID: 16395>
PARAMETER_VECTOR_SIZE_INVALID = <ErrorCodeEnum.PARAMETER_VECTOR_SIZE_INVALID: 16396>
PARAMETER_SYMBOLIC_PATH_INVALID = <ErrorCodeEnum.PARAMETER_SYMBOLIC_PATH_INVALID: 16397>
PROPERTY_OBJECT_MISSING = <ErrorCodeEnum.PROPERTY_OBJECT_MISSING: 16398>
INVALID_PARAMETER = <ErrorCodeEnum.INVALID_PARAMETER: 16399>
ID_NOT_FOUND = <ErrorCodeEnum.ID_NOT_FOUND: 16400>
SETTINGS_NOT_APPLIED = <ErrorCodeEnum.SETTINGS_NOT_APPLIED: 32768>
SETTING_OK_BUT_NOT_COMMITTED = <ErrorCodeEnum.SETTING_OK_BUT_NOT_COMMITTED: 32769>
TLS_NOT_SUPPORTED_BY_LIBRARY = <ErrorCodeEnum.TLS_NOT_SUPPORTED_BY_LIBRARY: 32770>
TLS_SETUP_FAILED = <ErrorCodeEnum.TLS_SETUP_FAILED: 32771>
TLS_HANDSHAKE_FAILED = <ErrorCodeEnum.TLS_HANDSHAKE_FAILED: 32772>
TLS_CERTIFICATE_INVALID = <ErrorCodeEnum.TLS_CERTIFICATE_INVALID: 32773>
TLS_PRIVATE_KEY_INVALID = <ErrorCodeEnum.TLS_PRIVATE_KEY_INVALID: 32774>
TLS_KEY_CERTIFICATE_MISMATCH = <ErrorCodeEnum.TLS_KEY_CERTIFICATE_MISMATCH: 32775>
TLS_CERTIFICATE_EXPIRED = <ErrorCodeEnum.TLS_CERTIFICATE_EXPIRED: 32776>
STOP_CONDITION_MISCONFIGURED = <ErrorCodeEnum.STOP_CONDITION_MISCONFIGURED: 65536>
STOP_CONDITION_TRIGGERED = <ErrorCodeEnum.STOP_CONDITION_TRIGGERED: 65537>
STOPPED_MANUALLY_BEFORE_RUN = <ErrorCodeEnum.STOPPED_MANUALLY_BEFORE_RUN: 65538>
STOPPED_MANUALLY = <ErrorCodeEnum.STOPPED_MANUALLY: 65539>
RESOURCE_CREATION_FAILED = <ErrorCodeEnum.RESOURCE_CREATION_FAILED: 131072>
RESOURCE_TYPE_MISMATCH = <ErrorCodeEnum.RESOURCE_TYPE_MISMATCH: 131073>
RESOURCE_CONTENT_INVALID = <ErrorCodeEnum.RESOURCE_CONTENT_INVALID: 131074>
QUEUE_BYPASS_NOT_ALLOWED = <ErrorCodeEnum.QUEUE_BYPASS_NOT_ALLOWED: 262144>
QUEUE_FULL = <ErrorCodeEnum.QUEUE_FULL: 262145>
FILE_NOT_FOUND = <ErrorCodeEnum.FILE_NOT_FOUND: 524288>
FILE_COULD_NOT_BE_OPENED = <ErrorCodeEnum.FILE_COULD_NOT_BE_OPENED: 524289>
FILE_COULD_NOT_BE_CLOSED = <ErrorCodeEnum.FILE_COULD_NOT_BE_CLOSED: 524290>
FILE_COULD_NOT_BE_READ = <ErrorCodeEnum.FILE_COULD_NOT_BE_READ: 524291>
FILE_COULD_NOT_BE_WRITTEN = <ErrorCodeEnum.FILE_COULD_NOT_BE_WRITTEN: 524292>
FILE_IS_EMPTY = <ErrorCodeEnum.FILE_IS_EMPTY: 524293>
POT_STATUS_MISMATCH = <ErrorCodeEnum.POT_STATUS_MISMATCH: 1048576>
PSEUDO_GAL_NEEDS_GAL = <ErrorCodeEnum.PSEUDO_GAL_NEEDS_GAL: 1048577>
HARDWARE_CONFIGURATION_ISSUE = <ErrorCodeEnum.HARDWARE_CONFIGURATION_ISSUE: 1048579>
POTENTIOSTAT_SWITCH_ON_ISSUE = <ErrorCodeEnum.POTENTIOSTAT_SWITCH_ON_ISSUE: 1048580>
CALIBRATION_TYPE_UNKNOWN = <ErrorCodeEnum.CALIBRATION_TYPE_UNKNOWN: 2097152>
CALIBRATION_GAIN_CALIB_ERROR = <ErrorCodeEnum.CALIBRATION_GAIN_CALIB_ERROR: 2097153>
CALIBRATION_NO_SETTINGS = <ErrorCodeEnum.CALIBRATION_NO_SETTINGS: 2097154>
CALIBRATION_ERROR = <ErrorCodeEnum.CALIBRATION_ERROR: 2097155>
PREMATURELY_STOPPED = <ErrorCodeEnum.PREMATURELY_STOPPED: 2097156>
OUT_OF_MEMORY = <ErrorCodeEnum.OUT_OF_MEMORY: 4194304>
UNEXPECTED_EXCEPTION = <ErrorCodeEnum.UNEXPECTED_EXCEPTION: 8388608>
UNKNOWN_ERR = <ErrorCodeEnum.UNKNOWN_ERR: 195948557>
enum SettingType(value)

Type enumeration for Setting values

Valid values are as follows:

UNINITIALIZED = <SettingType.UNINITIALIZED: 0>

uninitialized setting

BOOL = <SettingType.BOOL: 1>

boolean setting

INT = <SettingType.INT: 2>

integer setting

DOUBLE = <SettingType.DOUBLE: 3>

double precision floating point setting

STRING = <SettingType.STRING: 4>

string setting

class ZahnerLinkConnectionFlags

Flags for the ZahnerLink connection.

IGNORE_PROTOCOL_MISMATCH = 16
NONE = 0
SKIP_SSL_CERT_VALIDATION = 2
SKIP_SSL_HOSTNAME_MATCHING = 4
SSL_DO_NOT_USE_SYSTEM_CAS = 8
SSL_VERIFY_CUSTOM_HOSTNAME = 32
USE_SSL = 1
class TrackNames

Constants for track names used in datasets.

AMPLITUDE = 'amplitude'
BANDWITH = 'bandwith'
CURRENT = 'current'
DC = 'dc'
DRIFT = 'drift'
FILTER = 'filter'
FREQUENCY = 'frequency'
GAIN = 'gain'
IMPEDANCE_ABSOLUTE = '|impedance|'
IMPEDANCE_DRIFT = 'impedance drift'
IMPEDANCE_ERROR = 'impedance error'
PERIODS = 'periods'
PHASE = 'phase'
PHASE_DRIFT = 'phase drift'
PHASE_ERROR = 'phase error'
SHUNT = 'shunt'
THD = 'thd'
TIME = 'time'
VOLTAGE = 'voltage'
class UnitNames

Constants for unit names used in datasets.

BANDWITH = ''
CURRENT = 'A'
DRIFT = '1/period'
FILTER = ''
FILTER_HZ = 'Hz'
FREQUENCY = 'Hz'
GAIN = ''
IMPEDANCE_ABSOLUTE = 'Ω'
IMPEDANCE_DRIFT = ''
IMPEDANCE_ERROR = ''
PERIODS = ''
PHASE_DRIFT = ''
PHASE_ERROR = ''
PHASE_RAD = 'rad'
SHUNT = ''
THD = '%'
TIME = 's'
VOLTAGE = 'V'
class Setting(*args, **kwargs)

Overloaded function.

  1. __init__(self: zahner_link._zahner_link.Setting) -> None

    A setting that can hold different types of values

  2. __init__(self: zahner_link._zahner_link.Setting, value: str) -> None

    A setting that can hold different types of values

    This class represents a single configuration setting that can store boolean, integer, double or string values with automatic type management.

    param value:

    String value to store

  3. __init__(self: zahner_link._zahner_link.Setting, value: str) -> None

    A setting that can hold different types of values

    This class represents a single configuration setting that can store boolean, integer, double or string values with automatic type management.

    param value:

    C string value to store

  4. __init__(self: zahner_link._zahner_link.Setting, value: bool) -> None

    A setting that can hold different types of values

    This class represents a single configuration setting that can store boolean, integer, double or string values with automatic type management.

    param value:

    Boolean value to store

  5. __init__(self: zahner_link._zahner_link.Setting, value: typing.SupportsInt | typing.SupportsIndex) -> None

    A setting that can hold different types of values

    This class represents a single configuration setting that can store boolean, integer, double or string values with automatic type management.

    param value:

    Integer value to store

  6. __init__(self: zahner_link._zahner_link.Setting, value: typing.SupportsFloat | typing.SupportsIndex) -> None

    A setting that can hold different types of values

    This class represents a single configuration setting that can store boolean, integer, double or string values with automatic type management.

    param value:

    Double value to store

as_string(self: zahner_link._zahner_link.Setting) str

Convert value to string representation

Rückgabe:

String representation of the value

assign_bool(self: zahner_link._zahner_link.Setting, value: bool) zahner_link._zahner_link.Setting

Assign boolean value

Parameter:

value – Boolean value to assign

Rückgabe:

Reference to self

assign_double(self: zahner_link._zahner_link.Setting, value: SupportsFloat | SupportsIndex) zahner_link._zahner_link.Setting

Assign double value

Parameter:

value – Double value to assign

Rückgabe:

Reference to self

assign_int(self: zahner_link._zahner_link.Setting, value: SupportsInt | SupportsIndex) zahner_link._zahner_link.Setting

Assign integer value

Parameter:

value – Integer value to assign

Rückgabe:

Reference to self

assign_string(self: zahner_link._zahner_link.Setting, value: str) zahner_link._zahner_link.Setting

Assign string value

Parameter:

value – String value to assign

Rückgabe:

Reference to self

get_bool_value(self: zahner_link._zahner_link.Setting) bool

Get boolean value

Rückgabe:

Boolean value

get_double_value(self: zahner_link._zahner_link.Setting) float

Get double value

Rückgabe:

Double value

get_int_value(self: zahner_link._zahner_link.Setting) int

Get integer value

Rückgabe:

Integer value

get_string_value(self: zahner_link._zahner_link.Setting) str

Get string value

Rückgabe:

String value

get_type(self: zahner_link._zahner_link.Setting) zahner_link._zahner_link.SettingType

Get the type of the setting

Rückgabe:

zahner_link.SettingType enum value

get_update_failure_reason(self: zahner_link._zahner_link.Setting) zahner_link._zahner_link.ErrorObject

Get reason for update failure

Rückgabe:

zahner_link.ErrorObject with failure reason

successfully_updated(self: zahner_link._zahner_link.Setting) bool

Check if setting was successfully updated

Rückgabe:

True if setting was successfully updated

class SettingsSet(*args, **kwargs)

Overloaded function.

  1. __init__(self: zahner_link._zahner_link.SettingsSet) -> None

    Create an empty settings set

  2. __init__(self: zahner_link._zahner_link.SettingsSet, settings: collections.abc.Sequence[tuple[str, zahner_link._zahner_link.Setting]]) -> None

    Create settings set from vector of name and Setting pairs

    param settings:

    Vector of (key, Setting) pairs

  3. __init__(self: zahner_link._zahner_link.SettingsSet, settings: collections.abc.Sequence[tuple[str, object]]) -> None

    Create settings set from Python list of (key, value) pairs

    Automatically converts Python values to appropriate Setting types.

    param settings:

    List of (key, value) tuples where values can be bool, int, float, or str

all_successfully_updated(self: zahner_link._zahner_link.SettingsSet) bool

Check if all settings were successfully updated

Rückgabe:

True if all settings were successfully updated

keys(self: zahner_link._zahner_link.SettingsSet) list[str]

Get list of all setting keys

Rückgabe:

List of setting key names

size(self: zahner_link._zahner_link.SettingsSet) int

Get number of settings

Rückgabe:

Number of settings in the set