Accueil
Accueil

Bienvenue invité ( Connexion | Inscription )

2 Pages V  1 2 >  
Reply to this topicStart new topic
> Gauge Composer
Gromich
post 20 Feb 2008, 14:11
Message #1



 


Messages : 87
Inscrit : 4/12/07
Lieu : Clermont Ferrand
Membre n° 2,779

Salut !

Bon... l'impossibilité d'interconnecter LOVP et LOSIOC me pose de plus en plus de problèmes. Y'a t'il des personnes qui ont déjà commencés à bosser sur Gauge Composer adapté à Lockon ?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Lynx
post 20 Feb 2008, 14:32
Message #2






Indicatif : BS-05
Messages : 2,417
Inscrit : 23/03/05
Lieu : FONTENAY-SOUS-BOIS
Membre n° 108

cheer.gif Notre "Copain de Nous" espagnol, j'ai dénommé l'excellent Tarochi. Regardes un peu par là :
http://www.3rd-wing.net/index.php?showtopic=5450&hl=tarochi

http://www.3rd-wing.net/index.php?showtopic=5715&hl=tarochi

http://www.3rd-wing.net/index.php?showtopic=5347&hl=tarochi

http://www.3rd-wing.net/index.php?showtopic=4402&hl=tarochi

Il passe de temps en temps, tu peux le contacter il est super sympa et un peu francophone et anglophone. thumbsup.gif

--------------------
3rdlynx.ddns.net

Serveur Discord Perso/Mission Editor : 965280400698146836

The agnostic dislexic insomniac: lies awake in bed at night wondering if there really is a dog.

T-IR 5, THRUSTMASTER WARTHOG +Virpil WAR BRD, Pilotseat GameRacer Pro, Oculus Rift S+ SIMSHAKER JETPAD(+ MFD's (démontés) )

Config
+ MSI 6950XT 340W
+ be quiet! Pure Rock 2
+ Mushkin Redline 64 Go 2 x 32 Go DDR4 3600 MHz
+ AMD Ryzen 7 5800X3D, 3,4 GHz (4,5 GHz Turbo Boost)
+ be quiet! Pure Power 11 FM 1000W,
+ SAMSUNG 980 PRO, 2 To, SSD
+ ASUS PRIME X570-P,
+ Sharkoon RGB LIT 100.

Image IPB

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Lecreole
post 21 Feb 2008, 09:55
Message #3






Messages : 379
Inscrit : 13/04/05
Lieu : 74100 Annemasse
Membre n° 125

CITATION(Gromich @ 20 Feb 2008, 16:11) *

Salut !

Bon... l'impossibilité d'interconnecter LOVP et LOSIOC me pose de plus en plus de problèmes. Y'a t'il des personnes qui ont déjà commencés à bosser sur Gauge Composer adapté à Lockon ?

Si c'est possible, envois moi tes fichiers lovp.lua et losioc.lua thumbsup.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
gillesdrone
post 21 Feb 2008, 11:23
Message #4






Messages : 6,185
Inscrit : 24/03/07
Lieu : Sendets 64320
Membre n° 1,668

idem que pour Gromich , soit j'ai le retour voyant soit j'ai LOVP celon l'adresse port que je mets
ce serai bien si ca pouvait se régler

par contre c'est pas plustot export.lua que tu veux ? car pour ma part j'utilise SIOC et ****.SSI donc pas losioc.lua

Ce message a été modifié par gillesdrone - 21 Feb 2008, 11:25.

--------------------
Image IPB
http://gilles.guesnel.free.fr
ma chaine
 menacer l' Ours dans son repère, l' Aigle pourrait y laisser quelques plumes

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Lecreole
post 21 Feb 2008, 11:43
Message #5






Messages : 379
Inscrit : 13/04/05
Lieu : 74100 Annemasse
Membre n° 125

CITATION(gillesdrone @ 21 Feb 2008, 13:23) *

idem que pour Gromich , soit j'ai le retour voyant soit j'ai LOVP celon l'adresse port que je mets
ce serai bien si ca pouvait se régler

par contre c'est pas plustot export.lua que tu veux ? car pour ma part j'utilise SIOC et ****.SSI donc pas losioc.lua

Je dois aller bosser mais voici l'idée à suivre :
Gérer LOSIOC et LOVP par les coroutines :
Voila un example vite fait qui fonctionne à vous de l'adapter ou attendre ce week-end pour en parler sur TS :

créer 3 fichiers:
losioc.lua
CITATION


-- LOSIOC - LOCKON SIOC PAR LECREOLE
-- Export script pour Lock On: Flaming Cliffs 1.12a
--Version du 12_02_2007 20h57
--[[
- DataListLast modifie
- Correction Volets A-10 et Su-25
- Coorection sorties + volets Su-27 et Su-33
- Correction bug RETAB
- Lights ready
--]]
-- POUR ACTIVER CE SCRIPT :
-- Mettre [EnableExportScript = true] dans [/Lock On/Config/export/config.lua]
-- Ajouter [dofile("./Config/export/LOSIOC.lua")] a la fin de [/Lock On/Config/export/export.lua]
dofile "lua.lua"
LOSIOC = {
-- Init variables
InitOK = false,
SocketPort = 8092, -- SocketPort
Retab = false,
PlaneType = 1, -- Type 1-(Su-25, Su-25T) 2-(MIG-29A, MIG-29S) 3-(Su-27, Su-33) 4-( A-10A) 5-(F-15C)
MecaState = {},
DataListLast = {},
CurSpeedUnit = 1, -- Mutiplicateur de conversion vitesse
CurAltUnit = 1, -- Mutiplicateur de conversion altitude
Unit = 0, -- (0-LOCKON 1-US 2-RUSSE)
BlinkLed = 0,
StartLOSIOC = function(self) -- Liste des commandes ---
-- Initialisation de la liste des commandes
self.CommandList = {

}
self.InitOK = self.InitConnection(self)
if self.InitOK then
socket.try(SocketLUA:settimeout(0))
-- Initialisation des variables LOSIOC
self.CurSpeedUnit, self.CurAltUnit = self.SetCurrentUnit(self.Unit)
self.MecaState = self.GetMecaStateWhenStart(self)
end
log("\tInitialisation LOSIOC = "..tostring(self.InitOK))
end,

-- Initialisation de la connection
InitConnection = function(self)
log("Initialisation de la connection LOSIOC:")
-- Demarre la connection
local init = false
local host = "localhost"
socket = require("socket")
-- Tentative de connection
SocketLUA = socket.connect(host, self.SocketPort)
if SocketLUA then
log("\tConnection LOSIOC = OK")
socket.try(SocketLUA:setoption("tcp-nodelay",true))
-- Initialise la liste des variable avec le SIOC
local SendString = self.ConcatToSIOCInicio(self.CommandList)
log("\tEnvoi: "..SendString)
socket.try(SocketLUA:send(SendString.."\n"))
-- Attende de reponse
socket.try(SocketLUA:settimeout(4000))
data,e= SocketLUA:receive()
if data == "Arn.Vivo:" then
log("\tAttente de reponse Arn.Vivo:[ "..data.."] = OK")
log("\tEnvoi: Arn.Vivo:")
socket.try(SocketLUA:send("Arn.Vivo:\n"))
data,e= SocketLUA:receive()
if data ~= nil then
log("\tAttente Arn.Resp:[ "..data.."] = OK")
init=true
else
log("\tAttente Arn.Inicio: = ECHEC")
end
else
log("\tAttente de reponse Arn.Vivo: = ECHEC")
end
else
log("\tConnection = ECHEC")
end
return init
end,

-- Reception des donnees
ReceptionData = function(self)
--
if self.InitOK then
data, error = SocketLUA:receive()
if data ~= nil then
log("recoit: "..data)
-- Traitement des donnees recues
local varSiocNumber
local varSiocValue
for v in string.gfind(data,"%w+=%w+") do
local i = 0
for d in string.gfind(v,"%w+") do
if i==0 then varSiocNumber = tonumber(d) else varSiocValue=tonumber(d) end
i = i+1
end
-- Execution de la commande demandee
LoSetCommand(varSiocValue)
--if self.CommandList[varSiocNumber] then self.CommandList[varSiocNumber](self, varSiocValue) end
end
end
end
end,
-- Envoi des donnees
SendData = function(self)



local EngineInfo = LoGetEngineInfo()
local HSIInfo = LoGetControlPanel_HSI()
local pitch, bank, yaw = LoGetADIPitchBankYaw()
local SystemeMode = self.LOSIOCGetSystemModeInfo()
--local MCPState = LoGetMCPState()
local TWSInfo = self.LOSIOCGetTWSInfo()
local Stations = self.LOSIOCGetPayloadInfo()
--local BlinkLedFlaps = self.BlinkLed==0 and self.MecaState.flaps or math.mod(self.BlinkLed,2)
if self.Retab then
--self.MecaState = self.GetMecaStateWhenStart(self)
--self.Retab = false
end
self.DataList = {
[3] = LoGetAltitudeAboveGroundLevel(), -- Altitude / Sol - QFE

[2] = LoGetTrueAirSpeed()*100000, -- Vitesse propre


}
local SendString = self.ConcatToSIOCResp(self.DataList)
log(SendString)
if SendString ~= "" then

--log("envoi: "..SendString)
socket.try(SocketLUA:send(SendString.."\n"))
end

end,

-- Change l'unite de mesure
SetCurrentUnit = function(u)
local speedUnit = {[0]=1, [1]=1.94384449,[2]=3.6} -- (1-LOCKON 1-US 2-RUSSE)
local altUnit = {[0]=1,[1]=3.28,[2]=1}
return speedUnit[u], altUnit[u]
end,

-- Converti une table en language SIOC Arn.Resp
ConcatToSIOCResp = function(array)
local result=""
local k
local v
local c=1
for k,v in pairs(array) do
local value = string.format("%.0f",v)
if value ~= LOSIOC.DataListLast[k] then
LOSIOC.DataListLast[k] = value
result = result..k.."="..value..":"
c = c + 1
end

--if c>= 100 then break end
end
if result~="" then result="Arn.Resp:"..result end
return result
end,

-- Converti une table en langaga SIOC Arn.Inicio
ConcatToSIOCInicio = function(array)
local result=""
for k,v in pairs(array) do
result = result..k..":"
end
result="Arn.Inicio:".."0:"
return result
end,
-- Recupere l'etats des elements mecaniques au debut du jeu (Piste jour)
GetMecaStateWhenStart = function(self)
local _Type = {Su25=1, MiG2=2, Su27=3, Su33=3, A10A=4, F15C=5}
local plane = string.gsub(string.sub(LoGetObjectById(LoGetPlayerPlaneId()).Name,1,5),"-","")
self.PlaneType = _Type[plane]
local _flaps, _gear, _canopy, _powerLeft, _powerRight, _gearLight, _posGearLight = 0, 0, 0, 0, 0, 0, 0
local atAir = LoGetAltitudeAboveGroundLevel()>3 -- and true or false -- Definit si l'avion est en vol
local engineStop = LoGetEngineInfo().RPM.left<1 -- and true or false -- Definit si le moteur est demarrer
local startTime = LoGetMissionStartTime()
if atAir then
-- Start en vol
_powerLeft=1
_powerRight=1
elseif engineStop then
-- Start parking
_gear=1
_canopy=1
else
-- Start piste
_gearLight=1
_posGearLight=2
_powerLeft=1
_powerRight=1
_gear=1
if self.PlaneType == 1 then _flaps=1 else _flaps=0 end
end
return {flaps=_flaps, gear=_gear, hook=0, wing=0, canopy=_canopy, wheelBrake=0, wingTipSmoke=0,
airBrake=0, cockpitLight=0, wingLight=0, posGearLight=_posGearLight, gearLight=_gearLight, powerLeft=_powerLeft, powerRight=_powerRight, refuelReady=0,
refuel=0, ECM=0}
end,

--
LOSIOCGetSystemModeInfo = function()
local NavigationInfo = LoGetNavigationInfo()
local SystemMode = NavigationInfo.SystemMode
local SystemRequirements = NavigationInfo.Requirements
local MasterModes = {OFF=0, NAV=1, BVR=2, CAC=3, LNG=4, A2G=5}
local Submodes = {OFF=0, ROUTE=1, ARRIVAL=2, LANDING=3, GUN=4, RWS=5, TWS=6, STT=7,
VERTICAL_SCAN=8, BORE=9, HELMET=10, FLOOD=11, ETS=12, PINPOINT=13, UNGUIDED=14}
local ACSModes = {OFF=0, FOLLOW8ROUTE=1, BARO_HOLD=2, RADIO_HOLD=3, BARO_ROLL_HOLD=4, HORIZON_HOLD=5,
PITCH_BANK_HOLD=6}

return {master = MasterModes[SystemMode.master],
submode = Submodes[SystemMode.submode],
roll = SystemRequirements.roll,
pitch = SystemRequirements.pitch,
speed = SystemRequirements.speed,
vertical_speed = SystemRequirements.vertical_speed,
altitude = SystemRequirements.altitude,
ACSMode = ACSModes[NavigationInfo.ACS.mode],
autothrust = NavigationInfo.ACS.autothrust and 1 or 0
}
end,

--
LOSIOCGetTWSInfo = function()
local TWSInfo = LoGetTWSInfo()
local _id = {}
local _signalType = {}
local _alert = 0
local _lock = 0
local Emitters = {scan=0, lock=1, missile_radio_guided=2, track_while_scan=3}
for i, cur in pairs(TWSInfo.Emitters) do
_id[0] = cur.ID
_signalType[0] = cur.SignalType
if cur.SignalType == "missile_radio_guided" then _alert = 1 end
if cur.SignalType == "lock" then _lock = 1 end
end
return { mode = TWSInfo.Mode,
id =_id[0],
--type = TWSInfo.Emitters.Type,
--power = TWSInfo.Emitters.Power,
--azimuth = TWSInfo.Emitters.Azimuth,
--priority = TWSInfo.Emitters.Priority,
signalType = Emitters[_signalType[0]],
missileAlert = _alert,
locked = _lock
}
end,

--
LOSIOCGetPayloadInfo = function()
local Stations = LoGetPayloadInfo()
local CurrentStation = 0
local CurWeaponType = -1
local CountCurWeapon = 0
local CountCurTotalWeapon = 0
local Weapons = {}
-- initialise les pylons a 0(vide)
for i = 1,12 do
Weapons[i]=0
end

if Stations then
local WeaponSelected=0
CurrentStation = Stations.CurrentStation
if CurrentStation ~= 0 then
WeaponSelected = Stations.Stations[CurrentStation].weapon
CurWeaponType = tonumber(WeaponSelected.level1..WeaponSelected.level2..WeaponSelected.level3..WeaponSelected.level4)
--if CurWeaponType==0 then CurWeaponType=-1 end
end
for i_st,st in pairs(Stations.Stations) do
if st.count~=0 then Weapons[ i_st]=tonumber(st.weapon.level1..st.weapon.level2..st.weapon.level3..st.weapon.level4) end
if CurrentStation == i_st then CountCurWeapon = st.count end
if Weapons[ i_st]==CurWeaponType then CountCurTotalWeapon=CountCurTotalWeapon+st.count end
end
end
--LOSIOCLog(CurrentStation)
return { CurrentStation = CurrentStation,
CountCurWeapon = CountCurWeapon,
CountTotalCurWeapon = CountCurTotalWeapon,
CurWeaponType = CurWeaponType,
[1] = Weapons[1],
[2] = Weapons[2],
[3] = Weapons[3],
[4] = Weapons[4],
[5] = Weapons[5],
[6] = Weapons[6],
[7] = Weapons[7],
[8] = Weapons[8],
[9] = Weapons[9],
[10] = Weapons[10],
[11] = Weapons[11],
[12] = Weapons[12]
}

end
}




lovp.lua
CITATION



pi = 3.141592

zeroX = 5000000
zeroZ = 6600000

centerX = 11465000 - zeroX --circle center
centerZ = 6500000 - zeroZ

pnSxW_X = 4468608 - zeroX -- point 40dgN : 24dgE
pnSxW_Z = 5730893 - zeroZ

pnNxW_X = 5357858 - zeroX -- point 48dgN : 24dgE
pnNxW_Z = 5828649 - zeroZ

pnSxE_X = 4468608 - zeroX -- point 40dgN : 42dgE
pnSxE_Z = 7269106 - zeroZ

pnNxE_X = 5357858 - zeroX -- point 48dgN : 42dgE
pnNxE_Z = 7171350 - zeroZ

lenNorth = math.sqrt((pnNxW_X-centerX)*(pnNxW_X-centerX) + (pnNxW_Z-centerZ)*(pnNxW_Z-centerZ))
lenSouth = math.sqrt((pnSxW_X-centerX)*(pnSxW_X-centerX) + (pnSxW_Z-centerZ)*(pnSxW_Z-centerZ))
lenN_S = lenSouth - lenNorth

RealAngleMaxLongitude = math.atan ((pnSxW_Z - centerZ)/(pnSxW_X - centerX)) * 180/pi
-- borders
EndWest = 24
EndEast = 42
EndNorth = 48
EndSouth = 40
MiddleLongitude = (EndWest + EndEast) / 2
ToLengthN_S = ((EndNorth - EndSouth) / lenN_S)
ToAngleW_E = (MiddleLongitude - EndWest) / RealAngleMaxLongitude

ToDegree = 360/(2*pi)


function getLongitude(x, z) -- degrees , (x (meters) - to North, z (meters) - to East)

ang = - math.atan (((z - centerZ)) / (x - centerX)) * ToDegree
return ang * ToAngleW_E + MiddleLongitude

end

function getLatitude(x, z) --degrees (x (meters) - to North, z (meters) - to East)

len = lenSouth - math.sqrt((x-centerX)*(x-centerX) + (z-centerZ)*(z-centerZ))
return len * ToLengthN_S + EndSouth

end

function getXYCoords(inLatitudeDegrees, inLongitudeDegrees) -- args: 2 numbers // Return two value in order: X, Y

-- Lo coordinates system
realAng = (inLongitudeDegrees - MiddleLongitude) / ToAngleW_E / ToDegree
realLen = lenSouth - (inLatitudeDegrees - EndSouth) / ToLengthN_S
outX = centerX - realLen * math.cos (realAng)
outZ = centerZ + realLen * math.sin (realAng)
return outX, outZ
end

dofile "lua.lua"

LOVP = {
-- Init variables
InitOK=false,
StartLOVP = function(self) -- Liste des commandes ---
log("Initialisation de la connection LOVP:")
-- Demarre la connection
local host = "localhost"
socket = require("socket")
-- Tentative de connection
SocketLOVP = socket.connect(host, 8080)
if SocketLOVP then
log("\tConnection LOVP = OK")
socket.try(SocketLOVP:setoption("tcp-nodelay",true))
socket.try(SocketLOVP:settimeout(0))
self.InitOK=true
end
log("\tInitialisation LOVP = "..tostring(self.InitOK))
end,


-- Envoi des donnees
SendData = function(self)
log("Envoi des donnée LOVP")

local t = LoGetModelTime()
local name = LoGetPilotName()

local IAS = LoGetIndicatedAirSpeed()
local TAS = LoGetTrueAirSpeed()
local AOA = LoGetAngleOfAttack()
local Gp = LoGetAccelerationUnits()
local VV = LoGetVerticalVelocity()

local altBar = LoGetAltitudeAboveSeaLevel()
local altRad = LoGetAltitudeAboveGroundLevel()
local pitch, bank, yaw = LoGetADIPitchBankYaw()
local Mach = LoGetMachNumber()

local HSI = LoGetControlPanel_HSI()
local engine = LoGetEngineInfo()

local route = LoGetRoute()

local PlaneID = LoGetPlayerPlaneId()
local obj = LoGetObjectById(PlaneID)

local myXCoord, myZCoord = getXYCoords(obj.LatLongAlt.Lat, obj.LatLongAlt.Long)

local navi = LoGetNavigationInfo()
local str = string.format("flight_params %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i %i\n",
t,
IAS*100, -- Speed
TAS*100, -- Speed
AOA*100,
Gp*100,
VV*100,
altBar*100,
altRad*100,
pitch*100,
bank*100,
yaw*100,
Mach*100,
HSI.ADF*100,
HSI.RMI*100,
HSI.Compass*100,
route.goto_point.world_point.x*100,
route.goto_point.world_point.y*100,
route.goto_point.world_point.z*100,
myXCoord*100, obj.LatLongAlt.Alt*100,
myZCoord*100, navi.Requirements.roll*100,
navi.Requirements.pitch*100,
navi.Requirements.altitude*100,
engine.RPM.left*100,
engine.RPM.right*100,
engine.Temperature.left*100,
engine.Temperature.right*100,
engine.fuel_internal*100,
engine.fuel_external*100)
socket.try(SocketLOVP:send(str))
end
}


coroutines.lua :
CITATION


function LOSIOCModelTimer(t)
local tNext = t
LOSIOC:StartLOSIOC()
while LOSIOC.InitOK do
if LoGetPlayerPlaneId() then
LOSIOC:ReceptionData()
LOSIOC:SendData()
else
LOSIOC.Retab = true
end
tNext = coroutine.yield()
end
end

function LOVPModelTimer(t)
local tNext = t
LOVP:StartLOVP()
while true do
LOVP:SendData()
tNext = coroutine.yield()
end
end

function log(s)
logText = s.."\n"
io.write(logText)
end

-- Declaration des coroutines
-- Creation de coroutines pour LOSIOC And LOVP

Coroutines = {} -- Tables des coroutines

function CoroutineResume(index, tCurrent)
coroutine.resume(Coroutines[index], tCurrent)
return coroutine.status(Coroutines[index]) ~= "dead"
end

Coroutines[1] = coroutine.create(LOVPModelTimer)
Coroutines[2] = coroutine.create(LOSIOCModelTimer)


-- Demarre les coroutines avec un timer de 5/100 secondes
LoCreateCoroutineActivity(1, 0, 0.05) -- Demarre LOVP
LoCreateCoroutineActivity(2, 0, 0.05) -- Démarre LOSIOC


et pour faire fonctionner tout ça :
export.lua(simplifié pour l'example)
CITATION

dofile "lua.lua"
local file = io.open("./Temp/Export.log", "w")
if file then
io.output(file)
end

function LuaExportStart()

end

function LuaExportBeforeNextFrame()
end

function LuaExportAfterNextFrame()
end

function LuaExportStop()
end


function LuaExportActivityNextEvent(t)
end

dofile("./Config/export/lovp.lua")
dofile("./Config/export/losioc.lua")
dofile("./Config/export/coroutines.lua")




voila, plus d'explication ce week si vous voulez,
Amusez-vous bien thumbsup.gif


User is offlineProfile CardPM
Go to the top of the page
+Quote Post
gillesdrone
post 21 Feb 2008, 13:21
Message #6






Messages : 6,185
Inscrit : 24/03/07
Lieu : Sendets 64320
Membre n° 1,668

notworthy.gif notworthy.gif notworthy.gif

Merci Lecreole notworthy.gif notworthy.gif

cheer.gif enfin mon pit vit !!!!

je viens de faire l'essai , et au demarrage des moteurs mes voyants programé sur le demarrage fonctionne comme sur l'ecran
ils s'allument et s'eteigne quand la T° et le régime est au bon noveau

enfin je vais pouvoir programmer les voyants par rapport à LOckon


cheer.gif bon bin Tournée de Vodka russieflag.gif


allez j' ose

Si tu t'apellais " lAcreole " je te ferai de gros bisous jesors.gif

--------------------
Image IPB
http://gilles.guesnel.free.fr
ma chaine
 menacer l' Ours dans son repère, l' Aigle pourrait y laisser quelques plumes

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Gromich
post 21 Feb 2008, 13:51
Message #7



 


Messages : 87
Inscrit : 4/12/07
Lieu : Clermont Ferrand
Membre n° 2,779

Ce type est M o n s t r u e u x !!!

C'est enorme !

Ahlalalalala j'en fretille d'avance...

Merci, merci merci !
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Lecreole
post 22 Feb 2008, 11:29
Message #8






Messages : 379
Inscrit : 13/04/05
Lieu : 74100 Annemasse
Membre n° 125

yo,
Qui a déja fait tourné gauge composer et lockon?
Merci.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Lecreole
post 23 Feb 2008, 11:43
Message #9






Messages : 379
Inscrit : 13/04/05
Lieu : 74100 Annemasse
Membre n° 125

Salut à tous.

Le serveur IOCP pour Lockon, c'est quoi?

Voila, j'ai voulu créer un serveur de données pour permetre par la suite de faire communiquer divers logiciels à lockon sans que les données soit traitées plusieurs fois comme dans l'example plus haut entre LOVP et SIOC. Pour éviter cela, lockon calcule les données une seule fois et les redistribuent aux divers clients.

Avantage : Les dévellopeurs n'ont plus qu'à envoyer les infos souhaités sous forme : ArnInicio:14:16:
ou 14 et 16 correspondent respectivement aux variables vitesse air et Altitude selon la table d'infos
un extrait de la table d'infos:
10 - Heure actuelle
11 - Heure début de mission
12 - Id Joueur
13 - Vitesse IAS
14 - Vitesse TAS
15 - AltBar
16 - AltRad
...
136 - Type d'arme
136 - Quatité arme
Pour executer une commande le client envoi : Arn.Resp:1=145:0=5000:1=3:
Ce qui corespond à sortir les volets(1=145) et tourner les rudders à 1/4(5000/10000=0.5) vers la droite(0=5000:1=3) ou 3 = commande des rudders.
les clients peuvent-être lancer avant ou aprés avoir démarrer la mission(en cas de bug pas besoin de relancer la mission).

Inconvénient : Actuellement LOVP, n'utilise pas ce protocole, mais j'ai déja pris contact avec son developpeur et je lui proposerais ce nouveau procédé.
Les données envoyées seront brutes et converti en entier (contrainte due au protocol IOCP), donc les infos devront être traiter en interne par le client.

Conclusion:
Pas trés utile pour l'instant, mais si des développeurs adopte ce procédé on aura un lockon moins gourmand en ressources s'il y a plusieurs logiciels connectés en meme temps tel que TacView, LoSIOC, SIOC, Gauge Composer, LOVP, PDA, clavier G15, ecran lcd etc..

voila disponible pour qui cela intérresse ici

-> Doug qu'en pense tu? je croyais que tu travaillais aussi sur quelque chose comme ça non!?

Lecreole.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
gillesdrone
post 27 Feb 2008, 12:56
Message #10






Messages : 6,185
Inscrit : 24/03/07
Lieu : Sendets 64320
Membre n° 1,668

hier avec Marseillais on a volé , et Pb

avec mon serveur LOVP reste deconecté comme avant l'aide de Lecreole en mode Solo. thumbsup.gif

j'ai installé losioc.lua, lovp.lua, coroutines.lua et l'export.lua modifié sur mon serveur
mais ca ne fonctionne toujours pas, => vol en mode degradé :
soit LOVP sans retour voyants
soit LOVP déconnecté


--------------------
Image IPB
http://gilles.guesnel.free.fr
ma chaine
 menacer l' Ours dans son repère, l' Aigle pourrait y laisser quelques plumes

User is offlineProfile CardPM
Go to the top of the page
+Quote Post

2 Pages V  1 2 >
Reply to this topicStart new topic
1 utilisateur(s) sur ce sujet (1 invité(s) et 0 utilisateur(s) anonyme(s))
0 membre(s) :
 

Haut de page · Retour à l'accueil · Contacter le Webmestre Nous sommes le : 22/05/24 - 13:00