Skip to content

Commit c66099b

Browse files
committed
Add product arg to LicenseManager.SetLicense
Update to match C++ API change requiring a product parameter for SetLicense. Bump radarsimcpp submodule pointer, modify radarsimpy/includes/radarsimc.pxd to add the product string argument to both SetLicense overloads, and update src/radarsimpy/license.pyx to pass cpp_product = b"RadarSimPy" in all code paths (single path, multiple paths, and empty/free-tier). This ensures the Cython bindings call the new C++ signature.
1 parent fd22ecb commit c66099b

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/radarsimcpp

src/radarsimpy/includes/radarsimc.pxd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ cdef extern from "libs/license_manager.hpp":
101101
cdef cppclass LicenseManager:
102102
@staticmethod
103103
LicenseManager& GetInstance()
104-
void SetLicense(const string& license_file_path)
105-
void SetLicense(const vector[string]& license_file_paths)
104+
void SetLicense(const string& license_file_path, const string& product)
105+
void SetLicense(const vector[string]& license_file_paths, const string& product)
106106
bint IsLicensed() const
107107
bint IsFreeTier() const
108108
string GetLicenseInfo() const

src/radarsimpy/license.pyx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def set_license(license_file_path=None):
5151
"""
5252
cdef string cpp_license_path
5353
cdef vector[string] cpp_license_paths
54+
cdef string cpp_product = b"RadarSimPy"
5455

5556
if license_file_path is None:
5657
# No license file provided, search for all license_RadarSimPy_*.lic files
@@ -62,15 +63,15 @@ def set_license(license_file_path=None):
6263
# Pass all found license files to C++
6364
for lic_file in license_files:
6465
cpp_license_paths.push_back(lic_file.encode('utf-8'))
65-
LicenseManager.GetInstance().SetLicense(cpp_license_paths)
66+
LicenseManager.GetInstance().SetLicense(cpp_license_paths, cpp_product)
6667
else:
6768
# No license files found, use empty string (free tier mode)
6869
cpp_license_path = b""
69-
LicenseManager.GetInstance().SetLicense(cpp_license_path)
70+
LicenseManager.GetInstance().SetLicense(cpp_license_path, cpp_product)
7071
else:
7172
# Use provided path
7273
cpp_license_path = license_file_path.encode('utf-8')
73-
LicenseManager.GetInstance().SetLicense(cpp_license_path)
74+
LicenseManager.GetInstance().SetLicense(cpp_license_path, cpp_product)
7475

7576

7677
# Backwards compatibility alias

0 commit comments

Comments
 (0)