Jump to content
The simFlight Network Forums

ckovoor

Members
  • Posts

    122
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by ckovoor

  1. Hi Pete, Thank you for separating this part of the thread from its parent at http://forum.simflight.com/topic/77415-tuning-radios-on-a-networked-client-running-fsx/ For those of us WidevieW users who do not use Input Director or Key2Lan or any equivalent network tool, or for those who would in any case prefer to use event.timer at the Client lua to automate the transfer of the data across the network, would running the lua there, say on a 500 msec interval, result in any significant addition to the processing load at the Clients? Thank you for your patience and encouragement. Regards, Chakko. For those who are interested, this is the alternative Client plugin: receivedata.lua (alternative) -- lua plugin to copy NAV/COM frequencies and other data from data.txt file in Server FSX\Modules to local FSUIPC offsets -- this plugin to be located in the CLIENT FSX\Modules folder, and is run automatically on a 500 mSec interval (can be changed) -- add this lua to the [Auto] section of the CLIENT FSUIPC function processdata(time) file = io.open("\\\\SERVER\\Microsoft Flight Simulator X\\Modules\\data.txt","r") value = file:read() file:close() -- decode string, just numbers in order with non-number separators w = string.gmatch(value, "[+-]?[0-9%.?]+") COM1freq = w() COM2freq = w() NAV1freq = w() NAV2freq = w() parkbrake = w() battery = w() ipc.writeUW(0x034E, COM1freq) ipc.writeUW(0x3118, COM2freq) ipc.writeUW(0x0350, NAV1freq) ipc.writeUW(0x0352, NAV2freq) ipc.writeUW(0x0BC8, parkbrake) ipc.writeUD(0x281C, battery) end event.timer(500, "processdata")
  2. Hi Pete, I have further simplified matters by writing the offsets into a single file as a string, so for those who are interested, these are the revised lua's: recorddata.lua -- lua plugin to write updated COM/NAV frequencies and other data to local data.txt file at SERVER -- this plugin to be located in the SERVER FSX\Modules folder -- add this lua to the [Auto] section of the SERVER FSUIPC function processdata(offset, value) COM1freq = ipc.readUW(0x034E) COM2freq = ipc.readUW(0x3118) NAV1freq = ipc.readUW(0x0350) NAV2freq = ipc.readUW(0x0352) parkbrake = ipc.readUW(0x0BC8) battery = ipc.readUD(0x281C) -- code string, just numbers in order with non-number separators local value = string.format("COMone=" .. COM1freq .. ",COMtwo=" .. COM2freq .. ",NAVone=" .. NAV1freq .. ",NAVtwo=" .. NAV2freq .. ",parkbrake=" .. parkbrake .. ",battery=" .. battery) file = io.open("data.txt","w") file:write(value) file:close() end event.offset(0x034E, "UW", "processdata") event.offset(0x3118, "UW", "processdata") event.offset(0x0350, "UW", "processdata") event.offset(0x0352, "UW", "processdata") event.offset(0x0BC8, "UW", "processdata") event.offset(0x281C, "UD", "processdata") and receivedata.lua -- lua plugin to copy NAV/COM frequencies and other data from data.txt file in Server FSX\Modules to local FSUIPC offsets -- this plugin to be located in the CLIENT FSX\Modules folder, and can be run by assigning a key in the CLIENT FSUIPC (I chose key "f") file = io.open("\\\\SERVER\\Microsoft Flight Simulator X\\Modules\\data.txt","r") value = file:read() file:close() -- decode string, just numbers in order with non-number separators w = string.gmatch(value, "[+-]?[0-9%.?]+") COM1freq = w() COM2freq = w() NAV1freq = w() NAV2freq = w() parkbrake = w() battery = w() ipc.writeUW(0x034E, COM1freq) ipc.writeUW(0x3118, COM2freq) ipc.writeUW(0x0350, NAV1freq) ipc.writeUW(0x0352, NAV2freq) ipc.writeUW(0x0BC8, parkbrake) ipc.writeUD(0x281C, battery) Rather than run the Client lua's at regular intervals using event.timer, I have decided instead to program a hotkey at the Server to initiate an Input Director macro which sends a keypress to the Clients FSUIPC. I have tested the lua's and they are working fine. Thank you and Paul for the help and patience. Warm Regards, Chakko.
  3. Hello Paul, Thank you for taking a look at this. I have implemented both your suggestions. It is indeed unnecessary to manually create the .txt files on the Server. And your snippet of code does indeed facilitate direct access of the Server files from the Client LUA, which makes the use of Autohotkey unnecessary. So here are the revised plugins: recordnavcom.lua -- lua plugin to write updated COM and NAV frequencies to local text files at SERVER -- this plugin to be located in the SERVER FSX\Modules folder -- add this lua to the [Auto] section of the SERVER FSUIPC function recordCOM1(offset, value) file = io.open("com1freq.txt","w") file:write(value) file:close() end function recordCOM2(offset, value) file = io.open("com2freq.txt","w") file:write(value) file:close() end function recordNAV1(offset, value) file = io.open("nav1freq.txt","w") file:write(value) file:close() end function recordNAV2(offset, value) file = io.open("nav2freq.txt","w") file:write(value) file:close() end event.offset(0x034E, "UW", "recordCOM1") event.offset(0x3118, "UW", "recordCOM2") event.offset(0x0350, "UW", "recordNAV1") event.offset(0x0352, "UW", "recordNAV2") and receivenavcom.lua -- lua plugin to copy updated NAV/COM frequencies from .txt files in Server FSX\Modules to local FSUIPC offsets -- this plugin to be located in the CLIENT FSX\Modules folder, and can be run by assigning a key in the CLIENT FSUIPC (I chose key "f") file = io.open("\\\\SERVER\\Microsoft Flight Simulator X\\Modules\\com1freq.txt","r") value = file:read() file:close() ipc.writeUW(0x034E, value) file = io.open("\\\\SERVER\\Microsoft Flight Simulator X\\Modules\\com2freq.txt","r") value = file:read() file:close() ipc.writeUW(0x3118, value) file = io.open("\\\\SERVER\\Microsoft Flight Simulator X\\Modules\\nav1freq.txt","r") value = file:read() file:close() ipc.writeUW(0x0350, value) file = io.open("\\\\SERVER\\Microsoft Flight Simulator X\\Modules\\nav2freq.txt","r") value = file:read() file:close() ipc.writeUW(0x0352, value) The only other thing needed is an Input Director macro (with hotkey) to send a key ("f" in my case) across the network to the Clients, and an assignation of that key at each Client FSUIPC to the Client Lua. Very neat and economical. I tested everything and it all works fine! Thank you once again! Warm Regards, Chakko.
  4. Hi, I know Pete is away, but for those who are interested in this issue, I now have a working solution to update all NAV and COM frequencies at network clients running FSX. It implements Pete's suggestion that I could write "the frequency to a file in the Client Lua and have an FSUIPC-based Lua plug-in read that file": (1) recordnavcom.lua in the Server Modules folder automatically updates 4 local text files with current nav/com frequencies. (2) an Autohotkey routine at each of the Clients copies the text files from the Server to the Client's Modules folder, and also runs receivenavcom.lua at the Client FSX which writes the contained updated frequencies to the various FSUIPC offsets. (3) Note A: to automate step (1) recordnavcom.lua is added to the [Auto] section of the Server FSUIPC, B: step (2) is triggered at all Clients by an Input Director macro at the Server. Thus only 1 action is necessary to transfer the frequencies to the 8 clients in my system, namely, pressing a hotkey at the Server. C: The Server Modules folder will initially need to contain (initially empty) text files named com1freq.txt, com2freq.txt, nav1freq.txt and nav2freq.txt, as lua cannot create these files. Here are the plugins: ............................ recordnavcom.lua -- lua plugin to write updated COM and NAV frequencies to local text files at SERVER -- this plugin to be located in the SERVER FSX\Modules folder along with the 4 empty text files -- these 4 files are to be named com1freq.txt, com2freq.txt, nav1freq.txt, nav2freq.txt -- add this lua to the [Auto] section of the SERVER FSUIPC function recordCOM1(offset, value) file = io.open("com1freq.txt","w") file:write(value) file:close() end function recordCOM2(offset, value) file = io.open("com2freq.txt","w") file:write(value) file:close() end function recordNAV1(offset, value) file = io.open("nav1freq.txt","w") file:write(value) file:close() end function recordNAV2(offset, value) file = io.open("nav2freq.txt","w") file:write(value) file:close() end event.offset(0x034E, "UW", "recordCOM1") event.offset(0x3118, "UW", "recordCOM2") event.offset(0x0350, "UW", "recordNAV1") event.offset(0x0352, "UW", "recordNAV2") ............................ receivenavcom.lua -- lua plugin to update NAV/COM offsets with updated frequencies contained in copied .txt files -- the 4 .txt files would have been copied into the local Modules folder by the .ahk routine -- this plugin to be located in the CLIENT FSX\Modules folder -- 4 text files will have been named com1freq.txt, com2freq.txt, nav1freq.txt, nav2freq.txt -- this lua can be assigned to key 'f' in the CLIENT FSUIPC file = io.open("com1freq.txt","r") value = file:read() file:close() ipc.writeUW(0x034E, value) file = io.open("com2freq.txt","r") value = file:read() file:close() ipc.writeUW(0x3118, value) file = io.open("nav1freq.txt","r") value = file:read() file:close() ipc.writeUW(0x0350, value) file = io.open("nav2freq.txt","r") value = file:read() file:close() ipc.writeUW(0x0352, value) ............................ .ahk script at the CLIENT(s) which copies .txt files from SERVER to CLIENT Modules folder, and then runs receivenavcom.lua at the Client FSX. #/:: ;receive NAV and COM frequencies and copy to offset FileCopy, \\SERVER\Microsoft Flight Simulator X\Modules\com1freq.txt, C:\FS Files\Microsoft Flight Simulator X\Modules\com1freq.txt, 1 FileCopy, \\SERVER\Microsoft Flight Simulator X\Modules\com2freq.txt, C:\FS Files\Microsoft Flight Simulator X\Modules\com2freq.txt, 1 FileCopy, \\SERVER\Microsoft Flight Simulator X\Modules\nav1freq.txt, C:\FS Files\Microsoft Flight Simulator X\Modules\nav1freq.txt, 1 FileCopy, \\SERVER\Microsoft Flight Simulator X\Modules\nav1freq.txt, C:\FS Files\Microsoft Flight Simulator X\Modules\nav1freq.txt, 1 IfWinExist Microsoft Flight Simulator X { WinMaximize, Microsoft Flight Simulator X WinActivate, Microsoft Flight Simulator X WinWaitActive, Microsoft Flight Simulator X Send {f} Reload } return ............................ I have tested this on my network and it works. The offsets are duly updated at the clients. I did not use WideFS or lua to transfer the .txt files across the network. So, if you do not use Autohotkey and Input Director then you will need to find other ways of sending the files to the Clients, running the Client lua's, and mapping these actions to a hotkey. I am sure there are more efficient ways of doing this, and I welcome your comments. Regards, Chakko.
  5. Hi Pete, No, the multiple disconnections/reconnections were myself just toggling the (fsuipc) button controlling the plugin at the server. The lua connection is actually itself quite stable. I anticipated this question, and perhaps I should have clarified this with my earlier message. I shall do as you suggest, and of course I understand the difficulty you would have in trying to diagnose the problem. But I was just wondering if the modified script is okay, at least superficially. For instance, is it appropriate that I transmit the offsets as a string, etc? Or have I deleted some essential part of the earlier script? Regards, Chakko.
  6. Hi Pete, I cleaned up everything and ran the modified MasterClient-SlaveServer duo, and successfully established a connection! :grin: :grin: Then I changed the COM1 frequencies at the Server, while monitoring offset 034E at both Server and Client. At the Server, 034E showed the appropriate changes, but there was no change at the Client, so the offset is not being transmitted across the connection. I am appending the Lua plugins, their respective logs, and the FSUIPC logs at Server and Client: MasterClient1.lua at Server ("SERVER") -- "Master Client" example LUA plug-in (MODIFIED), by Pete Dowson, October 2009 -- with modifications by ckovoor to transmit only COM and NAV frequencies -- To make the Server FS act as a slave, following the Client FS acting as Master -- The SOCKET module is built into FSUIPC, but is not active until "required" local socket = require"socket" -- Set the host name to the name of the PC running the Server host = "SILVERZERO"; -- The port must match the port selected in the client and not clash with others. port = "8384" local function pass(...) local s = string.format(unpack(arg)) io.stderr:write(s .. "\n") end local function fail(...) local s = string.format(unpack(arg)) io.stderr:write("ERROR: " .. s .. "!\n") socket.sleep(3) os.exit() end function processdata() COM1freq = ipc.readUW(0x034E) COM2freq = ipc.readUW(0x3118) NAV1freq = ipc.readUW(0x0350) NAV2freq = ipc.readUW(0x0352) -- This simply sets the aircraft COM and NAV frequencies -- according to the parameters received s = "COM1=" .. COM1freq .. ",COM2=" .. COM2freq .. ",NAV1=" .. NAV1freq .. ",NAV2=" .. NAV2freq -- now send it all in one string control:send(s .. "\n") end pass("attempting control connection...") control, err = socket.connect(host, port) if err then fail(err) else pass("connected!") end control:setoption("tcp-nodelay", true) event.offset(0x034E, "UW", "processdata") event.offset(0x3118, "UW", "processdata") event.offset(0x0350, "UW", "processdata") event.offset(0x0352, "UW", "processdata") MasterClient1.log at Server ********* LUA: "MasterClient1" Log [from FSUIPC version 4.934a] ********* 1422963 System time = 31/07/2014 15:04:56, Simulator time = 09:12:44 (12:12Z) 1422963 LUA: beginning "E:\Microsoft Flight Simulator X\Modules\MasterClient1.lua" 1422963 LUA: attempting control connection... 1422963 LUA: connected! FSUIPC4.log at Server ********* FSUIPC4, Version 4.934a by Pete Dowson ********* Reading options from "E:\Microsoft Flight Simulator X\Modules\FSUIPC4.ini" Running inside FSX on Windows 7 Module base=6D980000 User Name="Chakko Kovoor" User Addr="ckovoor@alum.mit.edu" FSUIPC4 Key is provided WideFS7 Key is provided 171 System time = 31/07/2014 14:41:13 171 FLT UNC path = "\\SERVER\Flight Simulator X Files\" 936 Trying to connect to SimConnect Acc/SP2 Oct07 ... 951 FS UNC path = "\\SERVER\Microsoft Flight Simulator X\" 2028 Run: "C:\Program Files (x86)\IObit\Game Booster 3\GameBooster.exe -game" 2496 Run: "C:\Program Files (x86)\CH Products\CMStart.exe" 2574 Run: "C:\Program Files (x86)\SPAD\Spad.exe" 2714 Run: "E:\Microsoft Flight Simulator X\FsRaas20\FsRaas20.exe" 2808 Run: "C:\Program Files (x86)\AivlaSoft\EFB\AivlaSoft.Efb.DataProvider.exe" 3369 Run: "E:\PILOTS_FSGRW_NETWORKBRIDGE\FS Global Real Weather Network Bridge.exe" 3666 Run: "C:\Windows\System32\cmd.exe /c "net stop "audiosrv" & net start "audiosrv"" 3666 Run: "C:\Program Files (x86)\WinLayoutManager\WinLayoutManager.exe" 4024 LogOptions=80000000 00000001 4024 SIM1 Frictions access gained 4040 Wind smoothing fix is fully installed 4040 G3D.DLL fix attempt installed ok 4040 SimConnect_Open succeeded: waiting to check version okay 4040 Trying to use SimConnect Acc/SP2 Oct07 9640 Running in "Microsoft Flight Simulator X", Version: 10.0.61472.0 (SimConnect: 10.0.61259.0) 9656 Initialising SimConnect data requests now 9656 FSUIPC Menu entry added 9672 \\SERVER\Flight Simulator X Files\FSX Startup for Complex Aircraft.FLT 9672 \\SERVER\Microsoft Flight Simulator X\SimObjects\Airplanes\Aircreation_582SL\Aircreation_582SL.AIR 10030 Monitor IPC:034E (U16) = 0 10342 Monitor IPC:034E (U16) = 10288 10342 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 36098 System time = 31/07/2014 14:41:49, Simulator time = 13:30:30 (20:30Z) 36785 Aircraft="Aircreation582SL red" 55832 \\SERVER\Microsoft Flight Simulator X\SimObjects\Airplanes\PMDG 737-800NGX\B737-800.AIR 55832 C:\Users\Chakko Kovoor\Documents\Flight Simulator X Files\SUMUSGAS01.PLN 55832 Weather Mode now = Global 55832 \\SERVER\Flight Simulator X Files\B737 standard triple.FLT 57190 Aircraft="Boeing 737-800NGX PMDG House" 62088 Starting everything now ... 62369 Advanced Weather Interface Enabled 186951 Sim stopped: average frame rate for last 92 secs = 36.4 fps 373466 Monitor IPC:034E (U16) = 6400 373466 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 6400 (0x00001900) 377553 Monitor IPC:034E (U16) = 10288 377553 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 378115 Monitor IPC:034E (U16) = 6400 378115 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 6400 (0x00001900) 378567 Monitor IPC:034E (U16) = 10288 378567 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 378973 Monitor IPC:034E (U16) = 6400 378973 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 6400 (0x00001900) 379488 Monitor IPC:034E (U16) = 10288 379488 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 379956 Monitor IPC:034E (U16) = 6400 379956 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 6400 (0x00001900) 380439 Monitor IPC:034E (U16) = 10288 380439 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 380923 Monitor IPC:034E (U16) = 6400 380923 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 6400 (0x00001900) 381422 Monitor IPC:034E (U16) = 10288 381422 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 381968 Monitor IPC:034E (U16) = 6400 381968 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 6400 (0x00001900) 382498 Monitor IPC:034E (U16) = 10288 382498 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 383169 Monitor IPC:034E (U16) = 6400 383169 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 6400 (0x00001900) 547142 Monitor IPC:034E (U16) = 10288 547142 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 548312 Monitor IPC:034E (U16) = 6400 548312 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 6400 (0x00001900) 666124 Sim stopped: average frame rate for last 472 secs = 39.2 fps 673050 C:\Users\Chakko Kovoor\Documents\Flight Simulator X Files\SUMUSGAS01.PLN 673628 Monitor IPC:034E (U16) = 10288 673628 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 749413 Monitor IPC:034E (U16) = 10277 749413 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 750832 Monitor IPC:034E (U16) = 10288 750832 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 751316 Monitor IPC:034E (U16) = 10277 751316 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 751722 Monitor IPC:034E (U16) = 10288 751722 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 752190 Monitor IPC:034E (U16) = 10277 752190 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 752502 Monitor IPC:034E (U16) = 10288 752502 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 753032 Monitor IPC:034E (U16) = 10277 753032 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 753656 Monitor IPC:034E (U16) = 10288 753656 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 754202 Monitor IPC:034E (U16) = 10277 754202 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 760972 Sim stopped: average frame rate for last 83 secs = 32.6 fps 806369 Sim stopped: average frame rate for last 42 secs = 38.0 fps 810971 Aircraft="Boeing 737-800NGX PMDG House" 842436 Sim stopped: average frame rate for last 24 secs = 39.7 fps 849331 C:\Users\Chakko Kovoor\Documents\Flight Simulator X Files\SUMUSGAS01.PLN 849909 Monitor IPC:034E (U16) = 10288 849909 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 889580 Sim stopped: average frame rate for last 36 secs = 23.8 fps 974834 Monitor IPC:034E (U16) = 10277 974834 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 976800 Monitor IPC:034E (U16) = 10288 976800 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 978765 Monitor IPC:034E (U16) = 10277 978765 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 993913 Monitor IPC:034E (U16) = 10288 993913 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 996019 Monitor IPC:034E (U16) = 10277 996019 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 998250 Monitor IPC:034E (U16) = 10288 998250 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 998890 Monitor IPC:034E (U16) = 10277 998890 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1000231 Monitor IPC:034E (U16) = 10288 1000231 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 1001074 Monitor IPC:034E (U16) = 10277 1001074 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1075751 Sim stopped: average frame rate for last 143 secs = 39.5 fps 1146123 Monitor IPC:034E (U16) = 10288 1146123 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 1150148 Monitor IPC:034E (U16) = 10277 1150148 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1151505 Monitor IPC:034E (U16) = 10288 1151505 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 1152161 Monitor IPC:034E (U16) = 10277 1152161 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1152457 Monitor IPC:034E (U16) = 10288 1152457 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 1152660 Monitor IPC:034E (U16) = 10277 1152660 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1152863 Monitor IPC:034E (U16) = 10288 1152863 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 1153112 Monitor IPC:034E (U16) = 10277 1153112 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1153315 Monitor IPC:034E (U16) = 10288 1153315 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 1153939 Monitor IPC:034E (U16) = 10277 1153939 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1155655 Monitor IPC:034E (U16) = 10288 1155655 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 1156107 Monitor IPC:034E (U16) = 10277 1156107 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1156451 Monitor IPC:034E (U16) = 10288 1156451 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 1156903 Monitor IPC:034E (U16) = 10277 1156903 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1157262 Monitor IPC:034E (U16) = 10288 1157262 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 1157511 Monitor IPC:034E (U16) = 10277 1157511 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1157823 Monitor IPC:034E (U16) = 10288 1157823 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 1158198 Monitor IPC:034E (U16) = 10277 1158198 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1158650 Monitor IPC:034E (U16) = 10288 1158650 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 1159118 Monitor IPC:034E (U16) = 10277 1159118 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1199211 Monitor IPC:034E (U16) = 10304 1199211 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10304 (0x00002840) 1201129 Monitor IPC:034E (U16) = 10277 1201129 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1202159 Monitor IPC:034E (U16) = 10304 1202159 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10304 (0x00002840) 1212049 Monitor IPC:034E (U16) = 10277 1212049 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1212720 Monitor IPC:034E (U16) = 10304 1212720 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10304 (0x00002840) 1213953 Monitor IPC:034E (U16) = 10277 1213953 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1215419 Monitor IPC:034E (U16) = 10304 1215419 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10304 (0x00002840) 1250114 Sim stopped: average frame rate for last 114 secs = 40.6 fps 1310439 Monitor IPC:034E (U16) = 10277 1310439 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1313809 Sim stopped: average frame rate for last 54 secs = 40.4 fps 1444974 Monitor IPC:034E (U16) = 9024 1444974 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 9024 (0x00002340) 1445037 Monitor IPC:034E (U16) = 10277 1445037 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1450575 Monitor IPC:034E (U16) = 9024 1450575 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 9024 (0x00002340) 1453102 Monitor IPC:034E (U16) = 10277 1453102 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1456019 Monitor IPC:034E (U16) = 9024 1456019 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 9024 (0x00002340) 1456581 Monitor IPC:034E (U16) = 10277 1456581 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1456971 Monitor IPC:034E (U16) = 9024 1456971 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 9024 (0x00002340) 1457423 Monitor IPC:034E (U16) = 10277 1457423 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1467844 Monitor IPC:034E (U16) = 9024 1467844 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 9024 (0x00002340) 1469186 Monitor IPC:034E (U16) = 10277 1469186 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1469607 Monitor IPC:034E (U16) = 9024 1469607 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 9024 (0x00002340) 1469888 Monitor IPC:034E (U16) = 10277 1469888 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1470184 Monitor IPC:034E (U16) = 9024 1470184 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 9024 (0x00002340) 1567794 Monitor IPC:034E (U16) = 10277 1567794 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1569307 Monitor IPC:034E (U16) = 9024 1569307 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 9024 (0x00002340) 1570961 Monitor IPC:034E (U16) = 10277 1570961 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10277 (0x00002825) 1571975 Monitor IPC:034E (U16) = 9024 SlaveServer1.lua at Client ("SILVERZERO") -- "Slave Server" example LUA plug-in (MODIFIED), by Pete Dowson, October 2009 -- with modifications by ckovoor to receive only COM and NAV frequencies -- To make the Server FS act as a slave, following the Client FS acting as Master -- The SOCKET module is built into FSUIPC, but is not active until "required" socket = require("socket"); -- Set the host name to the name of the PC running this Server host = "SILVERZERO"; -- The port must match the port selected in the client and not clash with others. port = "8384"; function processdata(command) -- decode string, just numbers in order with non-number separators w = string.gmatch(command, "[+-]?[0-9%.?]+") COM1freq = w() COM2freq = w() NAV1freq = w() NAV2freq = w() -- This simply sets the aircraft COM and NAV frequencies -- according to the parameters received -- now write it all in ipc.writeUW(0x034E, COM1freq) ipc.writeUW(0x3118, COM2freq) ipc.writeUW(0x0350, NAV1freq) ipc.writeUW(0x0352, NAV2freq) end server = assert(socket.bind(host, port)); ack = "\n"; while 1 do print("server: waiting for client connection..."); control = server:accept(); if control ~= nil then print("server: client connected!"); while 1 do command = control:receive(); if command == nil then print("server: client disconnected"); ipc.control(65794) -- Pause FS break end assert(control:send(ack)); processdata(command) end end end SlaveServer1.log at Client ********* LUA: "SlaveServer1" Log [from FSUIPC version 4.934a] ********* 396835 System time = 31/07/2014 14:43:00, Simulator time = 09:10:00 (12:10Z) 396835 LUA: beginning "C:\FS Files\Microsoft Flight Simulator X\Modules\SlaveServer1.lua" 396851 LUA: server: waiting for client connection... 1202065 LUA: server: client connected! 1218617 LUA: server: client disconnected 1218648 LUA: server: waiting for client connection... 1218648 LUA: server: client connected! 1497500 LUA: server: client disconnected 1497516 LUA: server: waiting for client connection... 1501291 LUA: server: client connected! 1503023 LUA: server: client disconnected 1503038 LUA: server: waiting for client connection... 1503038 LUA: server: client connected! FSUIPC4.log at Client ********* FSUIPC4, Version 4.934a by Pete Dowson ********* Reading options from "C:\FS Files\Microsoft Flight Simulator X\Modules\FSUIPC4.ini" Running inside FSX on Windows 7 Module base=645C0000 User Name="Chakko Kovoor" User Addr="ckovoor@alum,mit.edu" FSUIPC4 Key is provided WideFS7 Key is provided 15 System time = 31/07/2014 14:36:23 15 FLT UNC path = "\\SILVERZERO\Users\Chakko Kovoor\Documents\Flight Simulator X Files\" 47 Trying to connect to SimConnect Acc/SP2 Oct07 ... 47 FS UNC path = "\\SILVERZERO\FS Files\Microsoft Flight Simulator X\" 437 Run: "C:\FS Files\PILOTS_FSGRW_NETWORKBRIDGE\FS Global Real Weather Network Bridge.exe" 624 LogOptions=80000000 00000001 624 SIM1 Frictions access gained 624 Wind smoothing fix is fully installed 624 G3D.DLL fix attempt installed ok 624 SimConnect_Open succeeded: waiting to check version okay 624 Trying to use SimConnect Acc/SP2 Oct07 2745 Running in "Microsoft Flight Simulator X", Version: 10.0.61472.0 (SimConnect: 10.0.61259.0) 2745 Initialising SimConnect data requests now 2745 FSUIPC Menu entry added 2777 \\SILVERZERO\FS Files\Microsoft Flight Simulator X\FLIGHTS\OTHER\FLTSIM.FLT 2777 \\SILVERZERO\FS Files\Microsoft Flight Simulator X\SimObjects\Airplanes\Aircreation_582SL\Aircreation_582SL.AIR 3510 Monitor IPC:034E (U16) = 0 105519 \\SILVERZERO\FS Files\Microsoft Flight Simulator X\SimObjects\Airplanes\WidevieW_Dummy - PMDG B738NGX\WidevieW_Dummy.AIR 105519 Weather Mode now = Global 105519 \\SILVERZERO\Users\chakko kovoor\documents\flight simulator x files\WVD B737.FLT 106346 Monitor IPC:034E (U16) = 10288 106346 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 106346 Aircraft="WidevieW dummy PMDG B737-800 NGX" 106346 System time = 31/07/2014 14:38:10, Simulator time = 11:48:48 (04:48Z) 396835 Starting everything now ... 396944 Advanced Weather Interface Enabled 447816 Sim stopped: average frame rate for last 54 secs = 12.3 fps 753531 Sim stopped: average frame rate for last 281 secs = 24.1 fps 929812 Sim stopped: average frame rate for last 176 secs = 23.8 fps 1202112 Monitor IPC:034E (U16) = 1 1665794 Sim stopped: average frame rate for last 736 secs = 23.4 fps 1666668 \\SILVERZERO\Users\Chakko Kovoor\AppData\Roaming\Microsoft\FSX\Previous flight.FLT 2137260 Sim stopped: average frame rate for last 335 secs = 24.0 fps I look forward to your comments when you can find the time to look at these. Thank you ever so much for your patience. Warm Regards, Chakko.
  7. Hi Pete, About the <>......Oops! Sorry again, Pete. Anyway, I'll run everything again and get back to you. Regards, Chakko.
  8. Hi Pete, line 36 is: server = assert(socket.bind(host, port)) I'm sorry I messed up on the 'local' removal. I wasn't sure about which to remove actually, so I removed all. I'll try again. Thank you once again, Chakko.
  9. Hi Pete, I removed the 'local' prefixes and ran the lua's at the Modules folder in Server and Client using FSUIPC [Auto], and then changed the COM1 frequencies at the Server, while monitoring offset 034E at both Server and Client. At the Server, 034E showed the appropriate changes, but there was no change at the Client. Here are the lua's: MasterClient at Server("SERVER"): -- "Master Client" example LUA plug-in (MODIFIED), by Pete Dowson, October 2009 -- with modifications to transmit only COM and NAV frequencies -- To make the Server FS act as a slave, following the Client FS acting as Master -- The SOCKET module is built into FSUIPC, but is not active until "required" local socket = require"socket" -- Set the host name to the name of the PC running the Server host = "<SILVERZERO>"; -- The port must match the port selected in the client and not clash with others. port = "8384" function pass(...) local s = string.format(unpack(arg)) io.stderr:write(s .. "\n") end function fail(...) local s = string.format(unpack(arg)) io.stderr:write("ERROR: " .. s .. "!\n") socket.sleep(3) os.exit() end function processdata() COM1freq = ipc.readUW(0x034E) COM2freq = ipc.readUW(0x3118) NAV1freq = ipc.readUW(0x0350) NAV2freq = ipc.readUW(0x0352) -- This simply sets the aircraft COM and NAV frequencies -- according to the parameters received s = "COM1=" .. COM1freq .. ",COM2=" .. COM2freq .. ",NAV1=" .. NAV1freq .. ",NAV2=" .. NAV2freq -- now send it all in one string control:send(s .. "\n") end pass("attempting control connection...") control, err = socket.connect(host, port) if err then fail(err) else pass("connected!") end control:setoption("tcp-nodelay", true) event.offset(0x034E, "UW", "processdata") event.offset(0x3118, "UW", "processdata") event.offset(0x0350, "UW", "processdata") event.offset(0x0352, "UW", "processdata") SlaveServer at Client("SILVERZERO") -- "Slave Server" example LUA plug-in (MODIFIED), by Pete Dowson, October 2009 -- with modifications to receive only COM and NAV frequencies -- To make the Server FS act as a slave, following the Client FS acting as Master -- The SOCKET module is built into FSUIPC, but is not active until "required" socket = require("socket"); -- Set the host name to the name of the PC running this Server host = "<SILVERZERO>"; -- The port must match the port selected in the client and not clash with others. port = "8384"; function processdata(command) -- decode string, just numbers in order with non-number separators w = string.gmatch(command, "[+-]?[0-9%.?]+") COM1freq = w() COM2freq = w() NAV1freq = w() NAV2freq = w() -- This simply sets the aircraft COM and NAV frequencies -- according to the parameters received -- now write it all in ipc.writeUW(0x034E, COM1freq) ipc.writeUW(0x3118, COM2freq) ipc.writeUW(0x0350, NAV1freq) ipc.writeUW(0x0352, NAV2freq) end server = assert(socket.bind(host, port)); ack = "\n"; while 1 do print("server: waiting for client connection..."); control = server:accept(); if control ~= nil then print("server: client connected!"); while 1 do command = control:receive(); if command == nil then print("server: client disconnected"); ipc.control(65794) -- Pause FS break end assert(control:send(ack)); processdata(command) end end end and here are the logs: FSUIPC log at Server("SERVER"): ********* FSUIPC4, Version 4.934a by Pete Dowson ********* Reading options from "E:\Microsoft Flight Simulator X\Modules\FSUIPC4.ini" Running inside FSX on Windows 7 Module base=6C860000 User Name="Chakko Kovoor" User Addr="ckovoor@alum.mit.edu" FSUIPC4 Key is provided WideFS7 Key is provided 218 System time = 30/07/2014 21:47:22 218 FLT UNC path = "\\SERVER\Flight Simulator X Files\" 858 Trying to connect to SimConnect Acc/SP2 Oct07 ... 873 FS UNC path = "\\SERVER\Microsoft Flight Simulator X\" 1981 Run: "C:\Program Files (x86)\IObit\Game Booster 3\GameBooster.exe -game" 2355 Run: "C:\Program Files (x86)\CH Products\CMStart.exe" 2433 Run: "C:\Program Files (x86)\SPAD\Spad.exe" 2589 Run: "E:\Microsoft Flight Simulator X\FsRaas20\FsRaas20.exe" 2667 Run: "C:\Program Files (x86)\AivlaSoft\EFB\AivlaSoft.Efb.DataProvider.exe" 3401 Run: "E:\PILOTS_FSGRW_NETWORKBRIDGE\FS Global Real Weather Network Bridge.exe" 3666 Run: "C:\Windows\System32\cmd.exe /c "net stop "audiosrv" & net start "audiosrv"" 3681 Run: "C:\Program Files (x86)\WinLayoutManager\WinLayoutManager.exe" 4118 LogOptions=80000000 00000001 4118 SIM1 Frictions access gained 4134 Wind smoothing fix is fully installed 4134 G3D.DLL fix attempt installed ok 4134 SimConnect_Open succeeded: waiting to check version okay 4134 Trying to use SimConnect Acc/SP2 Oct07 11169 Running in "Microsoft Flight Simulator X", Version: 10.0.61472.0 (SimConnect: 10.0.61259.0) 11169 Initialising SimConnect data requests now 11169 FSUIPC Menu entry added 11201 \\SERVER\Flight Simulator X Files\FSX Startup for Complex Aircraft.FLT 11201 \\SERVER\Microsoft Flight Simulator X\SimObjects\Airplanes\Aircreation_582SL\Aircreation_582SL.AIR 11513 Monitor IPC:034E (U16) = 0 11513 Monitor IPC:66C0 (U16) = 0 11825 Monitor IPC:034E (U16) = 10288 11825 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 33883 System time = 30/07/2014 21:47:55, Simulator time = 13:30:30 (20:30Z) 34663 Aircraft="Aircreation582SL red" 85722 \\SERVER\Microsoft Flight Simulator X\SimObjects\Airplanes\PMDG 737-800NGX\B737-800.AIR 85722 C:\Users\Chakko Kovoor\Documents\Flight Simulator X Files\SUMUSGAS01.PLN 85722 Weather Mode now = Global 85722 \\SERVER\Flight Simulator X Files\B737 standard triple.FLT 87626 Aircraft="Boeing 737-800NGX PMDG House" 93054 Starting everything now ... 93304 Advanced Weather Interface Enabled 493759 Sim stopped: average frame rate for last 332 secs = 38.3 fps 501559 Monitor IPC:034E (U16) = 6400 501559 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 6400 (0x00001900) 502120 Monitor IPC:034E (U16) = 10288 502120 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 502682 Monitor IPC:034E (U16) = 6400 502682 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 6400 (0x00001900) 503228 Monitor IPC:034E (U16) = 10288 503228 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 503789 Monitor IPC:034E (U16) = 6400 503789 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 6400 (0x00001900) 504413 Monitor IPC:034E (U16) = 10288 504413 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) FSUIPC log at Client("SILVERZERO") ********* FSUIPC4, Version 4.934a by Pete Dowson ********* Reading options from "C:\FS Files\Microsoft Flight Simulator X\Modules\FSUIPC4.ini" Running inside FSX on Windows 7 Module base=64460000 User Name="Chakko Kovoor" User Addr="ckovoor@alum,mit.edu" FSUIPC4 Key is provided WideFS7 Key is provided 15 System time = 30/07/2014 21:43:09 15 FLT UNC path = "\\SILVERZERO\Users\Chakko Kovoor\Documents\Flight Simulator X Files\" 47 Trying to connect to SimConnect Acc/SP2 Oct07 ... 62 FS UNC path = "\\SILVERZERO\FS Files\Microsoft Flight Simulator X\" 452 Run: "C:\FS Files\PILOTS_FSGRW_NETWORKBRIDGE\FS Global Real Weather Network Bridge.exe" 827 LogOptions=00000000 00000001 827 SIM1 Frictions access gained 842 Wind smoothing fix is fully installed 842 G3D.DLL fix attempt installed ok 842 SimConnect_Open succeeded: waiting to check version okay 842 Trying to use SimConnect Acc/SP2 Oct07 3073 Running in "Microsoft Flight Simulator X", Version: 10.0.61472.0 (SimConnect: 10.0.61259.0) 3073 Initialising SimConnect data requests now 3073 FSUIPC Menu entry added 3104 \\SILVERZERO\FS Files\Microsoft Flight Simulator X\FLIGHTS\OTHER\FLTSIM.FLT 3104 \\SILVERZERO\FS Files\Microsoft Flight Simulator X\SimObjects\Airplanes\Aircreation_582SL\Aircreation_582SL.AIR 4009 Monitor IPC:034E (U16) = 0 4009 Monitor IPC:66C0 (U16) = 0 130448 \\SILVERZERO\FS Files\Microsoft Flight Simulator X\SimObjects\Airplanes\WidevieW_Dummy - PMDG B738NGX\WidevieW_Dummy.AIR 130448 Weather Mode now = Global 130448 \\SILVERZERO\Users\chakko kovoor\documents\flight simulator x files\WVD B737.FLT 131259 Monitor IPC:034E (U16) = 10288 131259 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 10288 (0x00002830) 216919 Sim stopped: average frame rate for last 86 secs = 8.0 fps 268322 System time = 30/07/2014 21:47:37, Simulator time = 09:06:00 (12:06Z) 268322 Aircraft="WidevieW dummy PMDG B737-800 NGX" 270318 Starting everything now ... 272643 *** LUA Error: ...icrosoft Flight Simulator X\Modules\SlaveServer1.lua:36: Valid name, no data record of requested type 330472 Sim stopped: average frame rate for last 62 secs = 12.2 fps 332110 Advanced Weather Interface Enabled 376103 Sim stopped: average frame rate for last 27 secs = 24.6 fps 501995 Sim stopped: average frame rate for last 74 secs = 22.9 fps 559373 Sim stopped: average frame rate for last 26 secs = 23.3 fps I am not sure I have implemented all your suggestions in the lua's. I look forward to our comments as and when you can find the time. Thank you as always for your patience and help. Warmest Regards, Chakko.
  10. Hi Pete, I am so grateful for the time you have taken out to help me learn so much more about FSUIPC and FSX. I thought I'd first attempt to modify your MasterClient and SlaveServer lua's before looking at the possibilities in keeping WideFS involved. These are my (yet untested) modified versions of MasterClient and SlaveServer: -- "Master Client" example LUA plug-in (MODIFIED), by Pete Dowson, October 2009 -- with modifications by CKOVOOR to transmit only COM and NAV frequencies -- To make the Server FS act as a slave, following the Client FS acting as Master -- The SOCKET module is built into FSUIPC, but is not active until "required" local socket = require"socket" -- Set the host name to the name of the PC running the Server host = "SILVERZERO"; -- The port must match the port selected in the client and not clash with others. port = "8384" function pass(...) local s = string.format(unpack(arg)) io.stderr:write(s .. "\n") end local function fail(...) local s = string.format(unpack(arg)) io.stderr:write("ERROR: " .. s .. "!\n") socket.sleep(3) os.exit() end local function processdata() COM1freq = ipc.readUW(0x034E) COM2freq = ipc.readUW(0x3118) NAV1freq = ipc.readUW(0x0350) NAV2freq = ipc.readUW(0x0352) -- This simply sets the aircraft COM and NAV frequencies -- according to the parameters received s = "COM1=" .. COM1freq .. ",COM2=" .. COM2freq .. ",NAV1=" .. NAV1freq .. ",NAV2=" .. NAV2freq -- now send it all in one string control:send(s .. "\n") end pass("attempting control connection...") control, err = socket.connect(host, port) if err then fail(err) else pass("connected!") end control:setoption("tcp-nodelay", true) event.offset(0x034E, "UW", "processdata") event.offset(0x3118, "UW", "processdata") event.offset(0x0350, "UW", "processdata") event.offset(0x0352, "UW", "processdata") ****************************************************************************************** -- "Slave Server" example LUA plug-in (MODIFIED), by Pete Dowson, October 2009 -- with modifications by CKOVOOR to receive only COM and NAV frequencies -- To make the Server FS act as a slave, following the Client FS acting as Master -- The SOCKET module is built into FSUIPC, but is not active until "required" socket = require("socket"); -- Set the host name to the name of the PC running this Server host = "SILVERZERO"; -- The port must match the port selected in the client and not clash with others. port = "8384"; local function processdata(command) -- decode string, just numbers in order with non-number separators w = string.gmatch(command, "[+-]?[0-9%.?]+") COM1freq = w() COM2freq = w() NAV1freq = w() NAV2freq = w() -- This simply sets the aircraft COM and NAV frequencies -- according to the parameters received -- now write it all in ipc.writeUW(0x034E, COM1freq) ipc.writeUW(0x3118, COM2freq) ipc.writeUW(0x0350, NAV1freq) ipc.writeUW(0x0352, NAV2freq) end server = assert(socket.bind(host, port)); ack = "\n"; while 1 do print("server: waiting for client connection..."); control = server:accept(); if control ~= nil then print("server: client connected!"); while 1 do command = control:receive(); if command == nil then print("server: client disconnected"); ipc.control(65794) -- Pause FS break end assert(control:send(ack)); processdata(command) end end end **************************************************************************************** I'm looking forward to your comments, when you can find the time. Thank you ever so much, Pete. Warmest Regards, Chakko.
  11. Hi Pete, I'll trim the code and send you the logs soon. The Client lua did start automatically on the Client, and I did use the [Auto] section to start the Server lua at the Server. I did monitor 66C0 and 034E on both machines. On the Server FSX, changing the COM1 frequency caused both offsets to change together. Just as they should. On the Client FSX the offset 034E was stuck at its initial value and 66C0 remained stuck at value 0. When I added the line ipc.display(COM1freq) in the Client Lua, I forgot to mention that the Lua window opened on the Server FSX and showed the COM1freq changing appropriately. I was surprised at this, but I suppose this is because the WideClient at the Client is linked to the Server, i.e. in its wideclient.ini file (with ClassInstance1) the ServerName entered is SERVER. I just want to make sure I've done that right. In fact what is puzzling to me is that the instance of WideClient opened at the Client is linked to the Server, so how would it communicate with FSX/FSUIPC locally at the Client? Thank you for your patience, Pete. Warm Regards, Chakko.
  12. Hello Pete, I wrote the following plugins: on the Server (Modules folder): navcomtransmit.lua function transmitCOM1(offset, value) COM1freq = ipc.readUW(0x034E) ipc.writeUW(0x66C0, COM1freq) end event.offset(0x034E, "UW", "transmitCOM1") and on the Client (WideClient folder): navcomreceive.lua function receiveCOM1(offset, value) COM1freq = ipc.readUW(0x66C0) ipc.writeUW(0x034E, COM1freq) end event.offset(0x66C0, "UW", "receiveCOM1") I started FS on both Server and Client, established a WideFS connection, and logged these offsets on both Server and Client. On the Server, I could see changes in COM1 being copied into offset 66C0. However, there was no corresponding change on the Client, where offset 66C0 remained stuck at value: 0 I also inserted the line ipc.display(COM1freq) in navcomreceive.lua at the Client and found the frequencies changing appropriately. So the information is being transmitted across the network and received at the Client, but for some reason is not being transferred to FSX. I am wondering if I have done everything necessary to establish a connection between WideClient and FSUIPC/FSX on the Client. Or is there something wrong with my script? Looking forward to your comments. Regards, Chakko.
  13. Dear Pete, Thank you for the clarification. I should clarify that the frequency that I need to transmit to the clients will depend on the scenery add-on in question, so it is not just a single frequency or channel (NAV/COM) that needs to considered. Also, as I have 7+1=8 client pc's generating scenery, I am looking for a semi-automated solution. Of course each of these 8 clients is also running FSUIPC alongside FS. It appears to me that this might be a solution strategy: (1) use WideClient on each of these 8 clients, using a non-zero ClassInstance parameter. I am familiar with this procedure. WideClient facilitates the transmission of the offset 0x66C0 to the clients. (2) use Input Director macros to transmit key presses from the Server to the 8 clients (each running FSUIPC and WideClient) to trigger the Lua plugin you have suggested, locally on each Client. Could you please comment on this? Thank you ever so much. Regards, Chakko.
  14. Dear Pete, I am a novice at programming, but would like to try to write this plugin as a challenge. Could you please clarify this for me, Pete: when offset 0x66C0 is written to on the Server through FSUIPC/lua, then the same offset is written to on the Client PC(s), without the involvement of WideFS? Or should I understand that the same offset can be accessed by the Client PC(s) without the involvement of WideFS? Thank you for your time and patience. Warm Regards, Chakko.
  15. Hello Pete, I use registered and current FSUIPC4 and WideFS on a network of 10 computers: (1) ONE Server PC (Win7-64): FSX SP2, WideviewX Server, FSUIPC4, WideFS Server: 7 touchscreen monitors, Saitek Yokes, Quadrants and Trim Wheel, CH Rudders, Saitek radio panels, Bodnar and Pokeys cards: used to generate 2-D cockpit panels exclusively. No scenery is displayed on the Server. (2) SEVEN Client PC's (Win7-64): FSX SP2, WideviewX Client, FSUIPC4: each driving a widescreen monitor used to display outside scenery views exclusively, over a total 180 degrees fov. No cockpit panels are displayed and no joysticks are connected to these Clients. (3) ONE Client PC (win7-64): FSX SP2, WideviewX Client, FSUIPC4, driving a widescreen monitor used to display an external Locked Spot view exclusively. No cockpit panels are displayed, and no joysticks are connected to this Client. (4) ONE Client PC (WinVista-32): WideClient, Jeppesen Navigation Suite, Instructor Station, etc: driving 3 monitors, used for Jeppesen Nav tracking and wx injection. No joysticks here either. This is with regard to pilot-activated runway lights on certain scenery add-ons; these are activated by tuning COM1/COM2 to certain frequencies. For instance, the new Aerosoft Ayers Rock X requires you to tune COM1 to 120.60 to activate the runway lights there. On my system, tuning this frequency on the Server (where the Saitek radio panels are located) will not achieve this, because no scenery is displayed on my Server. I need to transmit this frequency to the Clients, i.e. each Client needs to sense that this frequency is being dialled locally by a local joystick. Is there some way that FSUIPC/WideFS, perhaps in combination with a Lua script, could be used to transmit such information across the network to the clients? I would like to consider two options: (i) Transmit the frequency from the Server to the 7+1 scenery Clients, by dialling the appropriate frequency on the Server hardware (ii) Transmit the frequency from the Client PC not running FS [i.e. #(4) running on WinVista-32] to the 7+1 scenery Clients. This might be necessary if the frequency required to be dialled conflicts with what needs to be dialled on the Server for ATC comm/navigation purposes. Thank you for your help and support, as always. Warm Regards, Chakko.
  16. Hi Allesandro, As a matter of fact, I am using a mixture of touchscreen overlays and touchscreen panels integrated with monitors, but yes in all cases they are driven by external drivers, not the native Win 7 drivers, and they are all the older single-touch 5-wire resistive type. I did experiment with the native Win 7 drivers and multi-touch enabled IR screens, as I do have some HP touchscreens (L2105TM) based on this technology, but I found them difficult to use with MSFS, and soon gave up. If I remember correctly, lag and touch-location-inaccuracy were two of the main issues I faced at the time. Regards, Chakko.
  17. Hi Pete and Alessandro, I have been following this thread with some interest since I was the originator of the earlier thread at http://forum.simflight.com/topic/70959-lua-script-to-swap-mouse-buttons-for-touchscreen-users/?hl=mousebutton#entry438799 I have a touchscreen setup with 6 touchscreens (5-wire single-touch technology) connected to my server PC used exclusively to display cockpit instruments and I use both FS9.1 and FSX SP2 on Win 7 x64 with various payware aircraft. Pete, I have sent you an email containing a link to a presentation of my setup, which I hope you will have a look at. I have not encountered the lag described by Allessandro with my currently installed FSUIPC 3.999z5 and FSUIPC 4.910. I downloaded the new FSUIPC versions in this thread and I could not find any change in the behaviour either. I suspect that the lag experienced by Allesandro might be a system-specific issue. Regards, Chakko.
  18. Hi, You can direct the RC output from the network PC using the line-out, and into the FS PC using the line-in: I have done this using a male-to-male audio cable, and know it works. See the thread at: http://forum.avsim.n...worked-machine/ where this is discussed. Regards, Chakko.
  19. Dear Pete, This is to bring this thread up for your attention, and for your comments/suggestions. While the NoRightSingle.xml gauge works well with any aircraft with .xml gauges (like the DA Fokker) it cannot easily be implemented with most other payware aircraft which have .dll and .gau gauges. Would you have any other suggestions as to how the FSX right-click context menu could be suppressed or managed? Thank you for your help as always, Regards, Chakko.
  20. Hello Reinhard, My tests were carried out on the PMDG 737NGX. That aircraft has several gauges within each window, but each gauge covers several clickspots, and probably bypasses FS logic, as you say, with its own DLL code. The F1 ATR72-500 and the SimCheck A300B4 behave the same way as the NGX, and their gauges, similarly have .GAU and .DLL extensions. LIke you said, the DA Fokker 100 is the ideal candidate for this solution, and when I inserted NoRightClick.xml as gauge00, I got just the behaviour you describe...non-interference with gauges above, and suppression of the right-click context menu in all other areas. Thanks again, Chakko.
  21. Hi Reinhard, I have tried with RightSingle, and it works, just as you say! Thank you for the solution! Now, the difficulty is that if I draw the gauge to cover the entire window (either as Gauge00 or as Gaugexx (last drawn)) it captures all right-clicks and inhibits them, even the genuine ones directed at the gauges where I need right-click to operate normally. I had originally thought that if NoRightSingle was overlaid with gauges which do accept right-clicks, those would take precedence, but it appears not to be so in this case. So the only way I could use this in a panel where right-clicks are also necessary would be to draw this gauge into specific areas where the problem is more likely to occur, i.e. in the empty areas just adjacent to gauges which accept right-clicks, being careful not to overlap the areas covered by those gauges. It can be done. So you have certainly provided one solution to the problem. Thank you! Let us keep the discussion open to see if other solutions can be provided. For instance, I would be really interested in knowing if the FS context-menu can be edited in anyway, I should also mention that I have used NoLeftClick successfully with the SimCheck Airbus A300B4. I have explained the raison d'etre for this gauge in my post #14 in the other thread http://forum.simflig...pos#entry444265 It works, but LeftClick does not appear on the list from Microsoft. Thank you again, and I will get back to you after drawing NoRightSingle.xml into my right-click-prone areas ;-) . Regards, Chakko.
  22. Hi Reinhard, I should have mentioned that all my cockpit panels are in windowed mode. I do not use full-screen mode, even for my external scenery windows. Perhaps that might account for the different behaviour? I am certain that I do not need to use NoDrag.xml on any of my undocked panels in windowed mode, except for the main FS window (docked captain's panel). I should also say I am very impressed by the way you have modified your DA Fokker gauges. Really creative! Regards, Chakko.
  23. Hi Reinhard, I use the NoDrag.xml gauge only on the single docked parent panel window (which forms my captain's panel window). As far as I know, it is not necessary to use NoDrag.xml on undocked panel windows, because they are not susceptible to inadvertent dragging anyway. My experimentation with NoRightClick.xml was on undocked panel windows (like my centre panel as seen in the first post) where there was no interaction with NoDrag.xml in any case. So I do not think this is the problem. Thanks anyway, Regards, Chakko.
  24. Hello Reinhard, Thanks for your reply. There are many payware aircraft which use right-clicks: the PMDG aircraft use L/R clicks for turning knobs in different directions, and also for increment/decrement of multi-position switches; so do the Flight-One ATR72, Simcheck A300B4 and DA Fokker 100. Others like the LSH MD82, LD B767, and iFly B737, mercifully, do not. So one cannot avoid right-clicks on some panels. However, Pete added the mousebutton-swap facility to FSUIPC in order to help manage this; see the thread: http://forum.simflig...ght-click +swap So I currently have mousebutton-swap mapped to a joystick button and the facility works remarkably well. Guess we will have to wait for Pete to return and tell us if he has a solution. Regards, Chakko.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.