←  [EN] Third-Party Development

Forums

»

E2 architecture overview ?

alex22's Photo alex22 1 Nov 2012

Hello,

Sorry if I'm missing the obvious, but after scanning the wiki I'm not aware of a document describing Enigma2's architecture.
Is there one somewhere ?

For example, I gather that enigma2 itself is a C++ binary, but python is involved here and there (eg plugins). Any details ?

Also, if there's a plan for evolution, I'm interested too; for one I'd love to see non-critical plugins "crash alone" in their child processes, instead of the existing "green screen" where E2 itself is recycled, splitting and losing dozens of seconds on all current recordings.

Note this is not gratuitous criticism; I am genuinely willing to contribute (as an embedded C developer)
Thanks in advance,

-Alex
Quote

hemertje's Photo hemertje 1 Nov 2012

the only documentation available is the sourcecode
so setup an OpenPLi buildenvironment and start reading the code
Quote

Persian Prince's Photo Persian Prince 1 Nov 2012

you can read the codes here : http://openpli.git.s...fs/heads/master

;)
Quote

mirakels's Photo mirakels 1 Nov 2012

just committed a basic setup to generate doxygen documentation. It can generate class relationship graphs that may be useful to start understanding enigam2...
Quote

Sjaaky's Photo Sjaaky 1 Nov 2012

And there was some documentation effort by the original authors. Although outdated it might prove some use: http://openpli.git.s...dda5ba0;hb=HEAD
Quote

alex22's Photo alex22 2 Nov 2012

Thank you. Now I see that plugins are SWIGged calls into Python, not separate processes.
Wouldn't it be cool if a crash in a plugin was confined to it (I hate to spoil 3 simultaneous recordings) ?
Edited by alex22, 2 November 2012 - 00:13.
Quote

MiLo's Photo MiLo 2 Nov 2012

Wouldn't it be cool if a crash in a plugin was confined to it (I hate to spoil 3 simultaneous recordings)?


That is actually unrelated to running in separate processes.

It is in fact quite easy to place a "catch" routine that will just kick out the guilty plugin and continue as if nothing happened. The major drawback is that the plugin may have messed up other things in subtle ways, even if the plugin were running in another process, thus screwing up all three your recordings without you noticing.
That is why I still prefer the current behaviour, restarting enigma at least ensures that you'll have a stable situation in about half a minute. And "crashing" is a choice of the author of the plugin. It's the plugin author who decides what to do when an error occurs. If the plugin author decides to just do nothing, then the end result will be a greenscreen, because Enigma2 cannot autmatically determine the severity of the error, i.e. if it was just a silly typo in a skin, or that the plugin has made the box run out of memory or some other resource, or caused memory corruption.
Quote

alex22's Photo alex22 2 Nov 2012

OK, makes sense. From this I understand that there are no separate "API classes" for different kinds of plugins.
For example, when the EPG Alert plugin crashes while typing a poor search string, *I* know that nothing critical is compromised, but E2 doesn't ;)

So I guess I'll have to manually add a "catch" inside the plugin's code itself.. sigh.
(take-home lesson: don't play with new plugins while recording)

-Alex
Quote