diff --git a/README.md b/README.md index f7afcfe..0cfbc90 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,13 @@ * TMYTEK general API for Windows/Linux platform. +# Menu + +* [Introduction](#introduction) +* [Latest Release & Examples](#latest-release--examples) +* [Prerequisites](#prerequisites) +* [Troubleshooting](#troubleshooting) + ## Introduction **TLKCore** is a core service which inside the TMXLAB KIT(TLK/[WEB-TLK](https://web-tlk.tmytek.com/)), it integrates Python built libraries which developing mmWave( n257 / n258 / n260 / n261 ) **beamforming** and **beam steering** applications on **BBox 5G Series(mmwave beamformer)** and **UDBox 5G Series(mmwave Up-down frequency converter)** and other standard products developed by TMYTEK. @@ -22,19 +29,39 @@ The **.pyd** format release is for Windows shared library and **.so** format rel * TMYCommService is maintaining physical communications for all devices, it usually not handled directly by developer. * TMYUtils defines all data structure for return data, let developer more easier to know current status of processed function. * **TMYPublic** is a open source code, it defines all data structure which developer might used, e.g. RFMode(TX/RX), RetCode(OK/ERROR/...), UDState...etc. -* (Optional) **TMYBeamConfig** is option solution for FBS (fast beam steering), it aims to parse assigned csv file to a dict structure and check beam configuration, please reference [FBS](/examples//Python/README.md#FBS) +* (Optional) **TMYBeamConfig** is option solution for FBS (fast beam steering), it aims to parse assigned csv file to a dict structure and check beam configuration, please reference [FBS](/examples/Python/README.md#FBS) * All files/function under tmydev/ are all operating logic of standard products * db/ used for WEB-TLK, developer could ignore it. ![architecture](/images/TLKCore_architecture.png) -##### Latest Release & Reference Guide +## Latest Release & Examples * [[Download Link](/release)] -* Supported languages - - ![support](/images/support_languages.png) +* [[Doc for function reference](/release/doc/)] + +* [[Example code for supported languages](/examples/)] + + + +

+ + Image 1 + + + Image 1 + + + Image 1 + + + Image 1 + + + Image 1 + +

## Prerequisites @@ -48,7 +75,7 @@ Host PC can communicate with TMYTEK product through physical connection as the f #### Ethernet/RJ-45 -* DHCP - Put devide and host PC in the LAN. +* DHCP - Put the device and host PC in the LAN. * Static IP - Configure your network environment to IP: **192.168.100**.xxx, and Subnet Mask Bits <= `/24`, likes: 255.255.255.0 ![network](/images/Network.png) diff --git a/examples/C_Cpp/lib_tlkcore_cpp/src/tlkcore_lib.cpp b/examples/C_Cpp/lib_tlkcore_cpp/src/tlkcore_lib.cpp index 4407a3d..58a9bcd 100644 --- a/examples/C_Cpp/lib_tlkcore_cpp/src/tlkcore_lib.cpp +++ b/examples/C_Cpp/lib_tlkcore_cpp/src/tlkcore_lib.cpp @@ -129,7 +129,7 @@ class tlkcore_lib_impl : public tlkcore_lib } auto config = devs.attr("get")(sn); if (config == Py_None) { // equals Python: if config is None: - cout << "[TLKCore] Not found: " << sn << endl; + cout << "[TLKCore] Not found: " << sn << "in the config file" << endl; return -1; } // cout << config << endl; diff --git a/examples/MATLAB/README.md b/examples/MATLAB/README.md index dbd0fef..bd46520 100644 --- a/examples/MATLAB/README.md +++ b/examples/MATLAB/README.md @@ -23,4 +23,8 @@ P.S. The following example executes *MATLAB R2021b & Pyhton 3.8 64bit* on Window ![MATLAB_copy](/images/MATLAB_copy.png) 2. Double-click TLKCoreExample.m to launch MATLAB process. -3. Press **Run** to execute. +3. Modify to your Python version + + ![MATLAB_ver](/images/MATLAB_Python_version.png) + +4. Press **Run** to execute. diff --git a/examples/MATLAB/TLKCoreExample.m b/examples/MATLAB/TLKCoreExample.m index b7c9cbf..aa1720d 100644 --- a/examples/MATLAB/TLKCoreExample.m +++ b/examples/MATLAB/TLKCoreExample.m @@ -1,12 +1,18 @@ -% Setup your Python execution version for MATLAB interface engine (just +% Setup your Python execution version for MATLAB interface engine (just % execute it once after MATLAB started), assign the version name to Windows % registry (Windows Only) or set the full path + +terminate(pyenv) pe = pyenv; if pe.Status == "NotLoaded" - disp("Set to out") + disp(" ----- Calling pyenv to check Python environment, and it's NotLoaded -> Start loading(OutOfProcess) -----") + + % PLEASE MODIFY TO YOUR PYTHON VERSION (3.8/3.10/...) HERE pyenv(ExecutionMode="OutOfProcess")%, "Version", "3.8") end -py.list % Call a Python function to load interpreter +disp(" ----- Calling a simple Pytohn function: py.list to load Python interpreter -----") +py.list +disp(" ----- Calling pyenv to check Python environment -----") pyenv % Setup TLKCore lib path @@ -14,14 +20,16 @@ if count(py.sys.path, pylibfolder) == 0 insert(py.sys.path, int64(0), pylibfolder); end +disp(" ----- Calling py.sys.path to get Python execute sequence -----") py.sys.path -% Create instance -tlkcore = py.TLKCoreService.TLKCoreService; +% Create instance, it finds TLKCoreService class under pylibfolder +tlkcore = py.tlkcore.TLKCoreService.TLKCoreService; disp("TLKCore version: " + tlkcore.version) -% Exevute scan devices +% Scan devices via your main.py calls "scanDevices" function scan_list = py.main.wrapper("scanDevices"); +disp("Scan result:") disp(scan_list) % Display system information then init each device to control @@ -42,7 +50,7 @@ % Initial device ret = py.main.wrapper("initDev", SN); disp(ret) - + % Simple query test disp(py.main.wrapper("querySN", SN)) disp(py.main.wrapper("queryFWVer", SN)) @@ -64,17 +72,19 @@ % Remember to de-int device to free memory py.main.wrapper("DeInitDev", SN) end +disp(" ----- Terminate pyenv -----") terminate(pyenv) function testBBox(SN) disp("Test BBox") % Load basic enums - tmy_public = py.importlib.import_module('TMYPublic'); + tmy_public = py.importlib.import_module('tlkcore.TMYPublic'); RFMode = tmy_public.RFMode; - % Set TX, 28GHz here, please modify for your purpose, and make sure - % related tables exist + % Set TX & 28GHz here as example, + % please modify for your purpose, + % and make sure related tables exist. mode = RFMode.TX; py.main.wrapper("setRFMode", SN, mode) py.main.wrapper("setOperatingFreq", SN, 28) @@ -87,7 +97,7 @@ function testBBox(SN) aakit_pat = "4x4"; aakitList = py.main.wrapper("getAAKitList", SN, mode); disp(aakitList) - if length(aakitList) == 0 + if isempty(aakitList) warning("PhiA mode") end % Check each aakit_name in aakitList meets the seaching pattern @@ -114,7 +124,7 @@ function testUDBox(SN) disp("Test UDBox") % Load basic enums - tmy_public = py.importlib.import_module('TMYPublic'); + tmy_public = py.importlib.import_module('tlkcore.TMYPublic'); UDState = tmy_public.UDState; state = py.main.wrapper("getUDState", SN, UDState.PLO_LOCK); @@ -127,7 +137,7 @@ function testUDBox(SN) disp(py.main.wrapper("setUDState", SN, int32(0), UDState.CH1)) input("Wait for ch1 off") disp(py.main.wrapper("setUDState", SN, int32(1), UDState.CH1)) - + disp(py.main.wrapper("setUDState", SN, int32(1), UDState.OUT_10M)) disp(py.main.wrapper("setUDState", SN, int32(1), UDState.OUT_100M)) disp(py.main.wrapper("setUDState", SN, int32(1), UDState.PWR_5V)) @@ -138,4 +148,4 @@ function testUDBox(SN) disp(py.main.wrapper("getHarmonic", SN, 24e6, 28e6, 4e6, 100000)) disp(py.main.wrapper("setUDFreq", SN, 24e6, 28e6, 4e6, 100000)) -end \ No newline at end of file +end diff --git a/examples/Python/README.md b/examples/Python/README.md index 7e7221a..baca331 100644 --- a/examples/Python/README.md +++ b/examples/Python/README.md @@ -209,7 +209,7 @@ This topic introduces TLKCore how to process FBS (Fast Beam Steering), it loads ![scanned](/images/scanned.png) - 2. Direct connect v + 2. Direct connect 1. Via typing: python3 main.py --dc D2230E013-28 192.168.100.121 9 diff --git a/images/Logo_CSharp.png b/images/Logo_CSharp.png new file mode 100644 index 0000000..69fb0eb Binary files /dev/null and b/images/Logo_CSharp.png differ diff --git a/images/Logo_Cpp.png b/images/Logo_Cpp.png new file mode 100644 index 0000000..532467a Binary files /dev/null and b/images/Logo_Cpp.png differ diff --git a/images/Logo_LabVIEW.svg b/images/Logo_LabVIEW.svg new file mode 100644 index 0000000..dd1e75c --- /dev/null +++ b/images/Logo_LabVIEW.svg @@ -0,0 +1,360 @@ + + + + + + image/svg+xml + + Certified labview embeded Developer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Certified labview embeded Developer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/Logo_MATLAB.png b/images/Logo_MATLAB.png new file mode 100644 index 0000000..30e66d3 Binary files /dev/null and b/images/Logo_MATLAB.png differ diff --git a/images/Logo_Python.png b/images/Logo_Python.png new file mode 100644 index 0000000..0789865 Binary files /dev/null and b/images/Logo_Python.png differ diff --git a/images/MATLAB_Python_version.png b/images/MATLAB_Python_version.png new file mode 100644 index 0000000..7f76bcc Binary files /dev/null and b/images/MATLAB_Python_version.png differ diff --git a/images/Network.png b/images/Network.png index 2479a32..4a0e6c2 100644 Binary files a/images/Network.png and b/images/Network.png differ diff --git a/release/TLKCore Reference Guide v0.1.8.pdf b/release/doc/TLKCore Reference Guide v0.1.8.pdf similarity index 100% rename from release/TLKCore Reference Guide v0.1.8.pdf rename to release/doc/TLKCore Reference Guide v0.1.8.pdf