Skip to content

space0915/jsonrpc-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSONRPC Client

jsonrpc client is the JSONRPC client for HMI/PLC master-slave architecture JSONRPC server. This code is used python3.12 and pyside6 as GUI.

demo.mp4

安裝

  • git client - git clone code 到本地工作目錄
  • python 3 - 現是以3.12開發
  • 以python venv module建置工作環境並啟動, 先切換到source 目錄下
    • Windows
    python3 -m venv venv
    venv\Script\Activate
    • Linux
    python3 -m venv venv
    source venv/bin/active
  • 以pip 安裝程式,這一個venv環境只要做一次
    pip install -e .
    python gen_dialog.py

測試

  • 啟動osprey後,設定IPC的TCP server 設定其IP和port。如 IP 127.0.0.1/port 51820
python client.py 127.0.0.1 51820

主畫面編輯

畫面設計檔其副檔名為ui

pyside6-designer ui/main_window.ui

打包成執行檔 - WINDOWS和Linux皆可支援, 以下以WINDOWS 終端機演示

環境架設及安裝 - venv 和 pyinstaller

在source code 工作目錄下執行以下指命

python -m venv venv
venv\Scripts\activate
pip install -e .
pip install pyinstaller

更新UI

在source code 工作目錄下執行以下指命且已進入venv模式

python gen_dialog.py

打包指命

在source code 工作目錄下執行以下指命且已進入venv模式

pyinstaller -F client.py

執行完後在dist有打包後執行檔

About

This client of JSONRPC uses pyside6

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%