Skip to content

Commit 2574f25

Browse files
update sdk interface to include get version
1 parent 7017594 commit 2574f25

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/openlifu/io/LIFUInterface.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
import asyncio
44
import logging
5+
import re
56
from enum import Enum
67
from typing import Dict
78

89
import numpy as np
910
import pandas as pd
1011

12+
import openlifu as m
1113
from openlifu.io.LIFUHVController import HVController
1214
from openlifu.io.LIFUSignal import LIFUSignal
1315
from openlifu.io.LIFUTXDevice import TriggerModeOpts, TxDevice
@@ -395,3 +397,10 @@ def __exit__(self, exc_type, exc_value, traceback):
395397
self.txdevice.close()
396398
if self.hvcontroller:
397399
self.hvcontroller.close()
400+
401+
@staticmethod
402+
def get_sdk_version() -> str:
403+
version = m.__version__
404+
# Match the version pattern X.Y.Z
405+
match = re.match(r'\d+\.\d+\.\d+', version)
406+
return match.group(0) if match else version

0 commit comments

Comments
 (0)