Uživatelské nástroje

Nástroje pro tento web


xpl_sasl

Rozdíly

Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.

Odkaz na výstup diff

Obě strany předchozí revizePředchozí verze
Následující verze
Předchozí verze
xpl_sasl [2015/12/15 22:06] – [Vize autora] djbuldogxpl_sasl [2025/08/28 10:09] (aktuální) – upraveno mimo DokuWiki 127.0.0.1
Řádek 1: Řádek 1:
 ====== Sasl ====== ====== Sasl ======
- 
- 
-===== Původní vize autora ===== 
- 
-http://forums.x-plane.org/index.php?showtopic=38827 
- 
-Everybody who tried to make own aircraft model discovered that real avionics often can't be simulated by default X-Plane gauges. Generic gauges was a great step to avionics simulation but it lacks most important thing: ability to specify custom logic. For example it is not possible to simulate Boeing FMC with generics and it is not possible to make Tu-16 autopilot AP-5 (I believe it is weirdest autopilot in the world) by using default features. 
- 
-Some day I decided to solve this problem. Actually there was a lot of more problems those days because of generics doesn't existed yet. My goal was to make technology which will allow: 
- 
-  - Simulate virtually any avionics 
-  - Avionics should work in 3D cockpit, 2D panels and 2D popup panels 
-  - Avionics should work over network (internet) on remote computers to allow creation of complex training devices 
-  - Avionics development should to be easy and fast 
- 
-After few years of development I've finished with SASL toolkit. While it is in active development phase it is already can do everything from list above. 
- 
-SASL approach to avionics can be described as "components and scripting". Everything in SASL world consist of 'components'. For example, typical simple gauge consists of 2 components: background texture and needle which can rotate depending on value of variable. Often X-Plane variable is not enough and one can write any function which can describe needle rotation. For example one can add jitter to ADF needle to make it more realistic. Complex gauges can use other gauges as their subcomponents. Components haven't to be visual: one can make some logic as component. For example such component can add few more failures (may be useful for training) or entire autopilot. 
- 
-Developing new avionics is relative fast. First of all easiest way is to find completed required gauge. While number of aircrafts increasing more and more gauges sees light. If you are no lucky you have to create your own one. It is fast because you haven't recompile your project and wait for X-Plane startup after every change. Just edit gauge description text file, press F8 key and it will be loaded instantly. Properly designed gauge can be copied to another aircraft or launched over network on another computer. 
- 
-SASL is open source project and can be used in any simulator, not just X-Plane. For now it is employed in following X-Plane models: 
- 
-  - Tu-104B (http://code.google.com/p/sasl/): SASL usage example and playground 
-  - IL-14 (http://www.store.x-plane.su/): complex payware aircraft by Felis. Has a lot of custom logic and failures 
-  - Yak-40 (http://code.google.com/p/yk40/): open source work-in-progress, will be another SASL demonstrator 
- 
-SASL source codes and snapshot builds available here: http://code.google.com/p/sasl/ 
- 
-You can download Tu-104 example aircraft (just unpack it to your X-Plane directory; everything required is inside of archive; no additional installation steps required). Also you can download stand-alone avionics application (slava) which allows to run gauges over network. Generic soviet stile navigator panel included in slava archive. In order to run it you have to open Tu-104 (or other sasl enabled aircraft) in X-Plane, specify network password in plugins menu and start server. Next you have to edit slava.bat (or slava.sh depending on your OS) end set the same password and X-Plane computer IP address. Run slava.bat (slava.sh) after that and you'll see navigator panel working over network. 
- 
-For now I'm going to stop adding new features for a while and write documentation for avionics developers. I'm highly very interested in your thoughts about future of this project. Don't hesitate to ask any questions.  
  
 ===== Obecně ===== ===== Obecně =====
Řádek 57: Řádek 25:
         * součástí pluginu musí být ta proprietární licence         * součástí pluginu musí být ta proprietární licence
       * ze zdrojových kódů je odstraněn Slava       * ze zdrojových kódů je odstraněn Slava
-===== Kompilace Slava =====+      * plánují úplně odstranit podporu pro Slava (remote connection), pokud to nebude nikdo používat
  
-  * svn http://sasl.googlecode.com/svn/trunk +===== Kompilace Slava =====
-  * na webu se mluví o verzi 0.8 a 1.0 RC, v svn je ale verze kompatibilní s 2.0 (aktuálně 2.0.3) +
-  * kompilace se spouští pomocí //./mkdistr.sh// +
-  * soubor je potřeba upravit :) +
-    * není tam žádný configure, takže se musí upravit cesty a doinstalovat závislosti +
-    * pro kompilaci slava není potřeba kompilovat xap, který závisí na X-Plane SDK od XSquawkBox +
- +
-  * já jsem řešil tyto problémy při kompilaci+
  
 +  * stáhnout
 <code> <code>
-luna.h:10:17: fatal error: lua.h: Adresář nebo soubor neexistuje +svn co http://sasl.googlecode.com/svn/trunk
- #include <lua.h> +
-                 ^+
 </code> </code>
  
 +  * projekt neobsahuje žádný configure, takže se musí upravit cesty a doinstalovat závislosti
 +  * pro kompilaci slava není potřeba kompilovat xap, který závisí na X-Plane [[http://www.xsquawkbox.net/xpsdk/index.html|SDK od XSquawkBox]]
 +  *  minimálně budou potřeba balíčky
 <code> <code>
-locate lua.h+apt-get install libluajit-5.1-dev libsoil-dev libsdl2-dev libopenal-dev
 </code> </code>
  
 +  * upravit konfigurační soubor - zohlednit cesty knihoven a vypnout xap
 <code> <code>
-fps.h:5:17: fatal error: SDL.h: Adresář nebo soubor neexistuje +cp conf.mk-dist conf.mk
- #include <SDL.h>+
 </code> </code>
  
 <code> <code>
-apt-get install libsdl2-dev ++BUILD_XAP ?= no 
-</code>+-BUILD_XAP ?= yes
  
-<code> ++LUAJIT ?= /usr/ 
- #include <SOIL.h> +-LUAJIT ?= /usr/local 
-                  ^+  
 ++SOIL ?= /usr/ 
 +-SOIL ?= /usr/local 
 +  
 ++EXTRA_CXXFLAGS ?= -I/usr/include/SOIL 
 +-EXTRA_CXXFLAGS ?=
 </code> </code>
  
-<code> +  * spustit kompilaci 
-locate SOIL.h +  * lze použít přímo make, ale lepší je ./mkdisr, který navíc vytváří rovnou výstupní archív s binárkama 
-<code>+  * mkdistr ale ignoruje conf.mk a snaží se buildovat i xap, lze upravit takto
  
 <code> <code>
-apt-get install libsoil-dev+# build x-plane plugin 
 + cd ../xap 
 +-make clean 
 +-make  
 ++#make clean 
 ++#make 
 </code> </code>
  
-EXTRA_CXXFLAGS = -I/usr/include/lua5.1/ -I/usr/include/SOIL/+  * výsledek je ve složce distr
  
-ln -s /usr/lib/x86_64-linux-gnu/libopenal.so.1 slava/libopenal.so+==== Řešené problémy ====
  
--I/usr/include/lua5.1/ -I/usr/include/SOIL/ +  * obecně jsem postupoval takto
-./mkdistr.sh +
  
-/usr/bin/ld: cannot find -lalsound +<code> 
-/usr/bin/ldcannot find -lluajit-5.1 +luna.h:10:17: fatal error: lua.h: Adresář nebo soubor neexistuje 
-/usr/bin/ld: cannot find -lopenal+ #include <lua.h> 
 +                 ^ 
 +</code>
  
--L./ -L../  +<code> 
 +$ locate lua.
 +</code>
  
-ln -s /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2 libluajit-5.1.so+  * pak jsem kouknul na web debian, který balíček soubor poskytuje a v jaké cestě
  
-n.cpp +  * další zajímavý problém byl s kompilací lokálních adresářů 
-g++ -o slava -L/usr/lib/x86_64-linux-gnu/ -L./ -L../  -L../libavionics -L../libaccgl -L../alsound -L/usr/local/lib -L/usr/local/lib  utils.o cmdline.o fps.o main.o -lm `sdl2-config --libs` -lavionics -lalsound -laccgl -lluajit-5.1 -ldl -lSOIL -lGL -lopenal +  * pokud jsem dal make clean, tak to vyčistilo i složky, které se v mkdistr nebuildují přímo 
-/usr/bin/ld: cannot find -lalsound +  například chyba
-collect2: error: ld returned 1 exit status +
-Makefile:25: návod pro cíl „slava“ selhal +
-make: **[slava] Chyba 1+
  
 +<code>
 +make: *** Žádné pravidlo jak vyrobit cíl „../libaccgl/libaccgl.a“ potřebný pro „slava“. Konec.
 +</code>
  
-ten alsound se musi zkompilovat :) +  * oprava jednoduchá, zavoláním make nebo
-je to adresar... a vyzdauje+
  
-alsound.cpp:19:20: fatal error: AL/al.h: Adresář nebo soubor neexistuje +<code> 
-  #include <AL/al.h>+make -C libaccgl 
 +</code>
  
-install libopenal-dev+  * lze vyřešit i úpravou mkdistr, například pro alsound následovně
  
-a pozooor.. nasel jsem ten divnej build :)+<code> 
-https://github.com/der-On/sasl .tady server posila NP1 na NP2 :)+--- mkdistr.sh (revision 224
 ++++ mkdistr.sh (working copy)
  
-uprava default conf.mk++# build alsound 
 ++cd alsound 
 ++make clean 
 ++make 
 ++if [ $? != 0 ] ; then 
 ++    echo "Can't build alsound!" 
 ++    exit -1 
 ++fi 
 ++cd .
 +</code> 
 + 
 +===== Testování slava-Sasl ===== 
 + 
 +  * po zbuildování Slava jsem přišel na to, že s aplikaci nelze spojit Carenado SASL pluginem 
 +  * používají nejspíš verzi s bugem v handshake (jako [[https://github.com/der-On/sasl/blob/master/libavionics/propsserv.cpp|zde]]).. chovalo se to následovně
  
 <code> <code>
-# extra CXXFLAGS +server: 
-EXTRA_CXXFLAGS = -I/usr/include/lua5.1/ -I/usr/include/SOIL/+con.send((unsigned char*)"NP1\n", 4); 
 +con.send(seed, 16);
  
-# extra LNFLAGS +client: 
-EXTRA_LNFLAGS = -L/usr/lib/x86_64-linux-gnu/ -L./ -L../+md5_append(&md5, buf.getData(), 20); 
 +md5_append(&md5, (md5_byte_t*)secret, strlen(secret)); 
 +md5_byte_t digest[16]; 
 +md5_finish(&md5, digest); 
 +con.send(digest, 16); 
 +   
 +server: 
 +md5_append(&md5, (const md5_byte_t*)"NP2\n", 4); 
 +md5_append(&md5, seed, 16); 
 +md5_append(&md5, (const md5_byte_t*)secret.c_str(), secret.length()); 
 +unsigned char digest[16];
 </code> </code>
 +
 +  * vymyslel jsem opravu ve tvaru
  
 <code> <code>
Řádek 163: Řádek 167:
 </code> </code>
  
-  upravy mkdistr.sh... zakomentoval jsem jeste nejake kraivny ohledne buildu toho modulu do xpl+  * což pomohlo a Slava se se SASL serverem spojila 
 +  * nebylo to ale stabilníPokud jsem ve Slava na něco klikl, tak se to nějak rozpojilo 
 + 
 +===== Zprovoznění Sasl u letadel ===== 
 + 
 +  * měl jsem letadla, u kterých měl běžet sasl plugin, ale neběžel 
 +  * zjistil jsem, že tam někdy chybí 64 bit verze nebo verze pro Linux 
 +  * dále jsem zjistil, že ldd na lin.xpl má někdy problémy najít knihovny a tak se modul nezavede 
 +  * důvod přeskočení pluginu by to mělo vypsat do x-plane Log.txt  
 + 
 +===== Kompilace SASL ===== 
 + 
 +  * odstraněno zakomentování buildu xap (kompilace Slava) 
 +  * přidáno x-plane SDK 
 +  * kompilace proběhla v pohodě, ale x-plane při pokusu načíst letadlo spadne 
 <code> <code>
---- mkdistr.sh (revision 224) +SASL: Starting... 
-+++ mkdistr.sh (working copy)+X-Plane scriptable avionics library plugin v2.0.3 
 +Loaded: /opt/X-Plane 10/Aircraft/General Aviation/Carenado C152II v3 (muj sasl)/plugins/sasl/64/lin.xpl (1-sim.sasl).
  
-+# build alsound +SASL: Path to panel: /opt/X-Plane 10/Aircraft/General Aviation/Carenado C152II v3 (muj sasl)/avionics.lua 
-+cd alsound +SASL: Loading avionics..
-+make clean +--=={This application has crashed because of the plugin: SASL}==--
-+make +
-+if [ $? != 0 ] ; then +
-+    echo "Can't build alsound!" +
-+    exit -1 +
-+fi +
-+cd ..+
 </code> </code>
  
-===== Testování slava-Sasl =====+  * do terminálu vypisuje
  
-build mam hotov.. +<code> 
-proc to nekomunikuje???+Got allocator: 0x41e1c010 
 +Must use luaL_newstate() for 64 bit target 
 +Got Lua: (nil) 
 +error creating Lua virtual machine 
 +Neúspěšně ukončen (SIGABRT) 
 +</code>
  
-saas2.0.zip je navod, co se posila v packetech.. je tam vlastne popis celeho komunikacnicho protokolu +  * je to prý způsobeno nepovolenou custom alokaci knihovně LuaJIT na 64 bit systémech ([[https://gist.github.com/nddrylliog/8722197|info zde]]) 
-(ten zip mas aircrafts u toho hangaru pc12)+  * diskuze o problému například [[http://forums.x-plane.org/index.php?showtopic=83054&page=3#entry890673|zde]] 
 +  * řešením je nejspíš použití toho [https://gist.github.com/nddrylliog/8722197|patche]] a následně přilinkování do lin.xpl staticky (to je i důvod, proč je carenado lin.xpl 2x větší než můj build) 
 +  * já jsem problém zkoušel vyřešit takto:
  
-vlastten tady +<code> 
-less /opt/X-Plane\ 10/Aircraft/General\ Aviation/Eclipse\ 550-v1-5/plugins/sasl/netprops.txt+vim xap/xplua.cpp 
 +lua = lua_newstate(lj_alloc_f, ud); 
 ++ lua = luaL_newstate(); 
 +</code>
  
-kdyz poslu NP1 na eclipsetak on nereaguje +  * funguje to, ale nevím jestli je to stabilní :) spíš bych měl zkusit to statické slinkování 
-kdyz poslu NP2, tak on odpovi NP1+16B ... podle zdrojaku co mam, by mel ale odepsat NP2 :)+===== Historie =====
  
-takze to vypada, ze tam je nejaka jina verze :) ale jaka?+==== Původní vize autora ====
  
-u toho eclipse se pise neco o verzi 2.0.0... z svn mam cosi jako 2.0.3 :)+http://forums.x-plane.org/index.php?showtopic=38827
  
-vzal jsem sasl plugin z eclipse a hodil to do TU letounu... no funguje to ted na 64bit +Everybody who tried to make own aircraft model discovered that real avionics often can't be simulated by default X-Plane gaugesGeneric gauges was great step to avionics simulation but it lacks most important thingability to specify custom logic. For example it is not possible to simulate Boeing FMC with generics and it is not possible to make Tu-16 autopilot AP-5 (I believe it is weirdest autopilot in the worldby using default features.
-teoreticky, kdyz si udelam vlastni build sasl, tak by to pak mohlo frcet :) no ne?+
  
-jinak.. ten sasl plugin by nemel vesmes delat tak nejak nic.. vsechno by melo byt v custom cocpit!!+Some day I decided to solve this problemActually there was a lot of more problems those days because of generics doesn't existed yetMy goal was to make technology which will allow:
  
 +  - Simulate virtually any avionics
 +  - Avionics should work in 3D cockpit, 2D panels and 2D popup panels
 +  - Avionics should work over network (internet) on remote computers to allow creation of complex training devices
 +  - Avionics development should to be easy and fast
  
-===== Zprovoznění Sasl u letadel =====+After few years of development I've finished with SASL toolkit. While it is in active development phase it is already can do everything from list above.
  
-  * je tam 64 bit verze? +SASL approach to avionics can be described as "components and scripting"Everything in SASL world consist of 'components'. For example, typical simple gauge consists of 2 components: background texture and needle which can rotate depending on value of variable. Often X-Plane variable is not enough and one can write any function which can describe needle rotation. For example one can add jitter to ADF needle to make it more realistic. Complex gauges can use other gauges as their subcomponents. Components haven'to be visual: one can make some logic as component. For example such component can add few more failures (may be useful for training) or entire autopilot.
-  * ldd na lin.xpl - not found knihovny?? //tohle většinou způsobilo nezobrazení pluginu v menu +
-  * zkoumáním log.txt +
-  * typicky tam je problém s velikosti písmen v názvu souboru // tohle plugin zobrazilo v plugin info, ale nebyla tma položka v menu+
  
-<code> +Developing new avionics is relative fastFirst of all easiest way is to find completed required gaugeWhile number of aircrafts increasing more and more gauges sees lightIf you are no lucky you have to create your own oneIt is fast because you haven'recompile your project and wait for X-Plane startup after every changeJust edit gauge description text file, press F8 key and it will be loaded instantlyProperly designed gauge can be copied to another aircraft or launched over network on another computer.
-SASL INFO: including    soundInit.lua +
-SASL ERROR: Can'find sound    sounds/INBEE.wav +
-SASL ERROR: Can't find sound    sounds/INBEE.wav +
-SASL ERROR: Can't find sound    sounds/BEE.wav +
-SASL ERROR: Can'find sound    sounds/BEE.wav +
-SASL ERROR: Can't find sound    sounds/xrpm4R.wav +
-SASL ERROR: Can't find sound    sounds/xrpm4R.wav +
-</code>+
  
-===== TODO =====+SASL is open source project and can be used in any simulator, not just X-Plane. For now it is employed in following X-Plane models:
  
-  * zmapuj, jake verze sasl jsou v jekych letadlech :) -- verze z xpl checksum souboru +  - Tu-104B (http://code.google.com/p/sasl/): SASL usage example and playground 
-  * co se stane, když dáš všude tu nejnovější verzi?? :) +  IL-14 (http://www.store.x-plane.su/): complex payware aircraft by Felis. Has lot of custom logic and failures 
-  * proč spadne xplkdyž dám stop serveru u sasl, když jsem připojen slava klientem? +  - Yak-40 (http://code.google.com/p/yk40/): open source work-in-progresswill be another SASL demonstrator 
-  * co zkompilovat sasl 2.0.3 a dát ho do caranado letadel?? bude to pořád padat v xpl? + 
-  * co ten fork sasl?? nebude to lepší? -- nepadat? +SASL source codes and snapshot builds available here: http://code.google.com/p/sasl
-  * udělat si vlastní panel s pár přístroji... cesna style :v milmi2 je hodně custom component, ale můžu i ukrást jen obrázky přístroju prostě z cesna letadla.. vytváření přístrojů by lo být lehké + 
-  * ve v35 je nejaky xpscrollwell plugin :) nehodil by se i do jiných letadel? +You can download Tu-104 example aircraft (just unpack it to your X-Plane directory; everything required is inside of archive; no additional installation steps required). Also you can download stand-alone avionics application (slava) which allows to run gauges over network. Generic soviet stile navigator panel included in slava archiveIn order to run it you have to open Tu-104 (or other sasl enabled aircraft) in X-Plane, specify network password in plugins menu and start serverNext you have to edit slava.bat (or slava.sh depending on your OSend set the same password and X-Plane computer IP addressRun slava.bat (slava.sh) after that and you'll see navigator panel working over network. 
-  http://forums.x-plane.org/index.php?showtopic=59622 + 
-  * http://forums.x-plane.org/index.php?showtopic=65052&page=9#entry739052 sasl 2.0 zip +For now I'going to stop adding new features for a while and write documentation for avionics developers. I'm highly very interested in your thoughts about future of this project. Don't hesitate to ask any questions.  
-  * http://forums.x-plane.org/index.php?showtopic=68571 encrypted sasl + 
-  * home/djbuldog/tmp/slava-0.8.0 .. tady mas testovaci buuild +==== Změna GPL na proprietární ==== 
-===== links =====+ 
 +http://forums.x-plane.org/index.php?showtopic=90977 
 + 
 +Hi guys 
 +  
 +People have asked me to give a short explanation to what is going on with sasl, so here it isSASL has two types of users: regular users (designers that make planes with sasl) and contributes (people who compile sasl and add functionality). SASL also has two versions: open and commercial (with key protection and/or code scrambling) 
 +  
 +As you all know, for the last few years sasl has been stagnating due to lack of development and contribution from 3rd party programmers. About a year ago we have taken over commercial sasl and with it its main free branch. In order to add functionality to the commercial version we much add the same functionality to the open one, otherwise designers won't be able to develop their planes.  
 +  
 +In the past SASL was GPL, which meant that you were free to compile your own version but had to make your code open source as wellThere were only five such contributorsIf you have compiled your version without making your code open source, oh well.... What has changed now is that it is a copyrighted plugin however, its copyright is very open. As regular users you are still free to use the open sasl binaries for whatever projects you like, all that we ask is for you to place the copyright notice in your product to promote our work on sasl, We also urge you to use the commercial sasl for your commercial products, it is safer for your code as it can't be copied by others without permission, it helps keep your product off torrent sites by providing key protection and your small (actually very small) contribution to the project helps us fund future development of sasl. 
 +  
 +If you would like to be a contributer to the code, you can find the sources of SASL on gitHub https://github.com/temk/sasl-2.x. If you add code we will review it and if it doesn't conflict with anything we are doing we will accept it and move it to the commercial version also. The code will remain open as it is now. For more info on this please read the licence agreement in the repo. 
 +  
 +SASL 3.0 is being developed in parallel with 2.x updates which you seeIt is mostly a refactoring project where we will move to fully C++ object oriented code. We also plan many additions and new functionality including the ability to integrate C++ code right into sasl script. If you have suggestions, requests or comments on this please most them on this forum. We will try to accommodate you. 
 + 
 +===== TODO =====
  
-  * [[http://forums.x-plane.org/index.php?showtopic=65052&page=1|sasl 2.0 oficiální build]]+  * co zkompilovat sasl 2.0.3 a dát ho do Caranado letadel??  
 +    * bude Slava fungovat bez zaseknutí? 
 +    * a letadlo bez problémů (zvuk motoru, menu, pilot, ..)? 
 +  * a kruci.. s tím starým mým buildem je to ok, ale s tím novým to padá ihned :/
  
-  * https://github.com/temk/sasl-2.x +  * udělat si vlastní panel s pár přístroji...  
-    * docela zive vlakno :D +    * například pro cesnu 152, přístroje se dají vytahat z textur 
-  * http://forums.x-plane.org/index.php?showtopic=90977 +  * zkusit namergovat (zkompilovat) Slave se zdrojaky 2.4 a používat tuhle novou verzi :) 
-    * informaci o licenci+  * zapřemýšlet, zda není jednoduší se na Slava vykašlat a udělat si vlastní dílo (nebo jiný projekt) 
 +    * nevýhoda SASL je v tom, že každý letadlo může mít jinou verzi 
 +    * některá letadla mohou používat tu DRM nebo šifrování a tam bych to tou free verzi popsul
xpl_sasl.1450213588.txt.gz · Poslední úprava: (upraveno mimo DokuWiki)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki