Skip to content

Commit d2e60a8

Browse files
georgevigeletteebrahimebrahim
authored andcommitted
update sdk interface to include get version
1 parent edc773b commit d2e60a8

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, List
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
@@ -422,3 +424,10 @@ def __exit__(self, exc_type, exc_value, traceback):
422424
self.txdevice.close()
423425
if self.hvcontroller:
424426
self.hvcontroller.close()
427+
428+
@staticmethod
429+
def get_sdk_version() -> str:
430+
version = m.__version__
431+
# Match the version pattern X.Y.Z
432+
match = re.match(r'\d+\.\d+\.\d+', version)
433+
return match.group(0) if match else version

0 commit comments

Comments
 (0)