發表文章

Shared Memory

摘要 因工作需求用上了「Shared Memory」這個方法,因此特別整理一篇文章備忘,包含了Shard Memory運作原理,各語言的實作範例(C#, C++, Boost C++),以及如何在UE4中應用。 何謂Shared Memory (截錄自 黑暗執行緒 ) 跨 Process溝通有個術語,Interprocess Communictaion(IPC),在 Windows 平台有以下選擇: 參考 Clipboard  程式 A 將内容貼進剪貼簿,程式 B 自剪貼簿取出内容。 COM OLE複合文件(Compound Document)讓Word文件可以內嵌Excel工作表,點兩下還能叫出 Excel進行編輯, OLE的基礎為 COM元件技術。 Data Copy 程序 A向程式 B依約定的格式内容傳送WM_COPYDATA訊息 DDE DDE是一種允許不同應用程式交換不同格式資料的通訊協定,可視為剪貼簿的沿伸,除了一次性抛轉,還能持續傳輸資料。(效能相對差,已不建議使用) File Mapping File Mapping意指將檔案模擬成 Process中的一塊記憶體,當多個應用程式間透過共用 File Mapping交換資料,稱之為Named Shared Memory,在各種IPC方法中效能最佳,但必須透過Mutex等同步機制防止讀寫衝突。 Mailslots 單向溝通,Mailslot Client送訊息給Mailslot Server,訊息在Server讀取後删除,支援跨機器傳送,還可一對多廣播。(廣播訊息長度限制 400bytes,一對一傳輸時訊息長度則由 Mailslot Server建立時決定) Pipes 雙向傳輸,分為Anonymous Pipe及Named Pipe。Anonymous Pipe一般用於父程序與子程序間的標準輸入/輸出導向,雙向溝通要建兩條Pipe,不能跨網路且限於有從屬關係的 Process;Named Pipe則可用於任意Process間交換資料,並支援跨網路Process間傳輸。 RPC Remote Procedure Call(RPC)允許應用程式呼叫其他應用程式提供的函式功能,並可跨網路呼叫。Windows RPC符合 ISO DCE標準,支援跨作業系統系統整合。 Wi...

Line Robot (LineageM_Assistant)

圖片
Abstract This is a line robot app for mobile game - LineageM . The main features developed with node.js, through the Line Messaging API to achieve automatic reply and push notification and deployment to Heroku , the database uses MySQL. Line Messaging API https://developers.line.me/en/docs/messaging-api/overview/ The Messaging API allows for data to be passed between the server of your bot application and the LINE Platform. When a user sends your bot a message, a webhook is triggered and the LINE Platform sends a request to your webhook URL. Your server then sends a request to the LINE Platform to respond to the user. Requests are sent over HTTPS in JSON format. Follow Getting started to complete the following steps Step 1: Log in to the console Step 2: Register as a developer (only on first login) Step 3: Create a new provider Step 4: Create a channel GitHub https://github.com/cjo4m06/eatBoss Step 1: Fork a repository (GitHub Help - Fork A Repo ) Ste...

Acer AH100 (Windows Mixed Reality) in UE4

Ref : Using SteamVR with Windows Mixed Reality

Acer Windows Mixed Reality (Acer AH100) test

Getting Started > Step01. Install Developer mode in Win10 RS2 (Windows 10 Redstone2, Version 1703) > Step02. Connect controller, HMD and headset > Step03. Next, step by step, finished other settings 程式入口 : 開始 -> 混合實境入口 Other references : Windows Mixed Reality Controller Use Speech in Windows Mixed Reality 心得: Windows內建的混合實境入口裡的展示內容沉浸感不錯,串接的應用程式很多,包含音樂、電影、瀏覽器等,畫質清晰;缺點是必須持續用手壓著面罩才能取得最清晰的畫面,穿戴舒適度不足,耳機插入口位置不方便。

[UE4] Use Swarm to distribute Lighting build on Local Network

ref: Use Swarm to distribute Lighting build on Local Network

[UE4] Create plugin and call dll function

ref: Integrating OpenCV Into Unreal Engine 4

[UE4] Build UnrealEngine-VRWorks-4.16-Fullscreen (use Git)

圖片
VRWorks-Graphics-4.16 Step 01. Setup Git Step 02. Setup TortoiseGit Step 03. Fork a Repo Step 04. Create a new branch with git and manage branches > a. Git clone >b. Create brance >c. Change working branch >d. Push the branch on github Step 05. Add fullscreen settings & push on github Step 06. Bulid UE4