# {{ interface_name | pascal_case }} SDK Wrapper Interface

{{ interface_description }}

Generated by MADSci template: `comm/sdk` v{{ template_version }}

## Overview

Vendor SDK wrapper interface that provides a consistent abstraction over a
vendor-provided library or SDK. Supports loading the library, connecting to
instruments, calling SDK functions, and managing properties.

## Usage

```python
from {{ interface_name }}_interface import {{ interface_name | pascal_case }}Interface

interface = {{ interface_name | pascal_case }}Interface(library_path="/opt/vendor/lib")
interface.load_library()
interface.connect()

# Call SDK functions
result = interface.call_function("measure", channel=1)

# Read/write properties
temperature = interface.get_property("temperature")
interface.set_property("mode", "auto")

interface.disconnect()
```

## Testing

Use the fake interface for development and testing without the vendor SDK:

```python
from {{ interface_name }}_fake_interface import {{ interface_name | pascal_case }}FakeInterface

interface = {{ interface_name | pascal_case }}FakeInterface(simulated_latency=0.0)
interface.set_function_response("measure", 42.0)
interface.load_library()
interface.connect()
result = interface.call_function("measure", channel=1)
assert result == 42.0
```

Run the test suite:

```bash
pytest test_{{ interface_name }}.py
```

## Dependencies

- The real interface depends on the vendor-specific SDK or library
- Common patterns include `importlib` for Python SDKs and `ctypes` for C/C++ shared libraries

## Common Pitfalls

- Ensure the vendor SDK is installed and its path is accessible
- Some SDKs require specific Python versions or platform architectures
- Vendor SDKs may not be thread-safe; protect shared state with locks if needed
- Always call `disconnect()` to release SDK resources, even on errors
- Consider wrapping SDK calls in try/except to handle vendor-specific exceptions
