Files
FireBee_Setup/tools/vision/ldv/doc/descrip.htm
2022-11-25 03:00:01 +01:00

524 lines
22 KiB
HTML

<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Documentation VISION (LDV) : Description</title>
</head>
<body background="images/conc2.gif" bgcolor="#FFFFFF">
<div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" width="17%"><a href="notions.htm"><img
src="images/cprev.jpg" alt="Chapitre précédent"
border="0" hspace="2" width="46" height="26"></a><a
href="index.htm"><img src="images/csom.jpg"
alt="Retour au sommaire" border="0" hspace="2" width="26"
height="26"></a><a href="defines.htm"><img
src="images/csuiv.jpg" alt="Chapitre suivant" border="0"
hspace="2" width="43" height="26"></a></td>
<td align="center" valign="top" rowspan="2" width="8%"><p
align="center"><img src="images/icoprinc.gif" width="59"
height="71"></p>
</td>
<td width="33%"><p align="center"><font color="#0000FF"
size="5"><strong>Documentation </strong><em><strong>VISION
(LDV)</strong></em></font></p>
</td>
<td align="center" valign="top" rowspan="2" width="8%"><p
align="center"><img src="images/icointro.gif" width="59"
height="71"></p>
</td>
<td valign="top" width="17%"><p align="left">Dernière
mise à jour : <!--webbot bot="Timestamp" startspan
s-type="EDITED" s-format="%d/%m/%y" -->06/05/01<!--webbot
bot="Timestamp" i-checksum="12424" endspan --></p>
</td>
</tr>
<tr>
<td width="17%"><p align="center"><a
href="..\..\download/dvldv.zip">Télécharger la doc</a></p>
</td>
<td width="33%"><p align="center"><font size="4"><strong>3.
D E S C R I P T I O N</strong></font></p>
</td>
<td align="center" width="17%">&nbsp; <!--webbot
bot="HTMLMarkup" startspan --><A HREF="http://www.estat.com/getstats?serial=1390118421">
<IMG SRC="http://perso.estat.com/cgi-bin/perso/1390118421?page=DocVisionLDV"
BORDER=0></A>
<!--webbot
bot="HTMLMarkup" endspan --></td>
</tr>
</table>
</center></div>
<hr>
<p>Pour résumer, voici ce qui se passe entre <em><strong>VISION</strong></em>
et un LDV :</p>
<p>0. Init (fait une seule fois au premier appel de l'utilisateur
mettant en oeuvre les LDV). <em><strong>VISION</strong></em>
charge la fonction <a href="#capacités">GetLDVCapabilities</a>
de chaque LDV, appelle la fonction et mémorise les capacités de
chaque LDV afin de limiter les futurs accès disque, puis
décharge chaque LDV</p>
<p>1. <em><strong>VISION</strong></em> charge le LDV</p>
<p>2. Si spécifiée, <em><strong>VISION</strong></em> appelle la
fonction GetParams</p>
<p>3. <em><strong>VISION</strong></em> appelle la fonction PreRun</p>
<p>4. <em><strong>VISION</strong></em> appelle la fonction Run
(ou Preview)</p>
<p>5. <em><strong>VISION</strong></em> décharge le LDV</p>
<p>&nbsp;</p>
<p><a name="capacités"></a><font size="4"><strong>3.1 Capacités
du LDV</strong></font></p>
<div align="center"><center>
<table border="2" width="100%">
<tr>
<td width="15%"><strong>Prototype</strong></td>
<td width="85%"><a href="struct.htm#LDV_INFOS">LDV_INFOS</a>
* cdecl GetLDVCapabilities(<a href="vapi/struct.htm#VAPI">VAPI</a>
*vapi)</td>
</tr>
<tr>
<td width="15%"><strong>Paramètres</strong></td>
<td width="85%"><strong>[IN] </strong>vapi : pointeur sur
l'interface <a href="vapi/index.htm#Présentation">VAPI</a>
fournie par <em><strong>VISION</strong></em>. Ce pointeur
doit être mémorisé pour un usage futur.</td>
</tr>
<tr>
<td width="15%"><strong>Retour</strong></td>
<td width="85%">Un pointeur sur la structure <a
href="struct.htm#LDV_INFOS">LDV_INFOS</a> stockée dans
le LDV (le squelette déclare la variable LdvInfos de
type <a href="struct.htm#LDV_INFOS">LDV_INFOS</a>)</td>
</tr>
<tr>
<td width="15%"><strong>Responsabilités</strong></td>
<td width="85%">Cette fonction est entièrement ecrie
dans le squelette, le travail à faire réside dans le
remplissage de la structure de type <a
href="struct.htm#LDV_INFOS">LDV_INFOS</a> du squelette
LDV.</td>
</tr>
</table>
</center></div>
<p>&nbsp;</p>
<p><a name="prerun"></a><font size="4"><strong>3.2 Fonction
PreRun</strong></font></p>
<div align="center"><center>
<table border="2" width="100%">
<tr>
<td width="15%"><strong>Prototype</strong></td>
<td width="85%"><a href="defines.htm#LDV_STATUS">LDV_STATUS</a>
cdecl PreRun(<a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
*in, <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
*params, <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
*out)</td>
</tr>
<tr>
<td width="15%"><strong>Paramètres</strong></td>
<td width="85%"><strong>[IN]</strong> in : pointeur sur
la structure <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
décrivant l'image de <em><strong>VISION<br>
</strong></em><strong>[IN / OUT]</strong> params :
pointeur sur une structure <a
href="struct.htm#LDV_PARAMS">LDV_PARAMS</a> indiquant la
zone à modifier</td>
</tr>
<tr>
<td width="15%"><strong>Retour</strong></td>
<td width="85%"><a href="defines.htm#ELDV">Un code de
succès ou d'erreur</a></td>
</tr>
<tr>
<td width="15%"><strong>Responsabilités</strong></td>
<td width="85%">Doit signaler à <em><strong>VISION</strong></em>
la mémoire à allouer et la partie à sauvegarder pour
la fonction UNDO :<ol>
<li>Si le LDV en a besoin (<a href="defines.htm#LDVF">LDVF_OPINPLACE</a>
non défini dans la structure <a
href="struct.htm#LDV_CAPS">LDV_CAPS</a>),
out-&gt;Raster.fd_w et out-&gt;Raster.fd_h
doivent contenir la taille de l'image à allouer
pour la destination. C'est cette image qui sera
ensuite affichée par <em><strong>VISION</strong></em>
dans la fenêtre associée.</li>
<li>Au besoin, indiquer dans les champs x1, x2, y1 et
y2 de la structure <a
href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>, la
zone à sauvegarde dans le buffer UNDO de l'image
afin de pouvoir revenir en arrière. Avant
l'appel, <em><strong>VISION</strong></em>
positionne ces champs en fonction de la
sélection de l'utilisateur (bloc ou image
entière)</li>
</ol>
<p>Par défaut :</p>
<ol>
<li><em><strong>VISION</strong></em> n'allouera
aucune mémoire pour le LDV et supposera que la
transformation se fera &quot;sur place&quot;</li>
<li><em><strong>VISION</strong></em> sauvegardera
dans le buffer UNDO la partie précisée par
champs x1, x2, y1 et y2 de la structure <a
href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
(image entière ou sélection si un bloc est
sélectionné)</li>
</ol>
</td>
</tr>
</table>
</center></div>
<p>&nbsp;</p>
<p><a name="run"></a><font size="4"><strong>3.3 Fonction Run</strong></font></p>
<div align="center"><center>
<table border="2" width="100%">
<tr>
<td width="15%"><strong>Prototype</strong></td>
<td width="85%"><a href="defines.htm#LDV_STATUS">LDV_STATUS</a>
cdecl Run(<a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
*in, <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
*params, <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
*out)</td>
</tr>
<tr>
<td width="15%"><strong>Paramètres</strong></td>
<td width="85%"><strong>[IN]</strong> in : pointeur sur
la structure <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
décrivant l'image source de <em><strong>VISION<br>
</strong></em><strong>[IN]</strong> params : pointeur sur
une structure <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
indiquant la zone à modifier<br>
<strong>[OUT]</strong> out : pointeur sur l'image
destination, allouée par <em><strong>VISION</strong></em>
grâce à un appel précédent à PreRun</td>
</tr>
<tr>
<td width="15%"><strong>Retour</strong></td>
<td width="85%"><a href="defines.htm#ELDV">Un code de
succès ou d'erreur</a></td>
</tr>
<tr>
<td width="15%"><strong>Responsabilités / Remarques</strong></td>
<td width="85%">Doit effectuer l'opération prévue pour
le LDV.<br>
<em><strong>VISION</strong></em> choisit automatiquement
le format le plus adapté en essayant de minimiser la
mémoire et en tenant compte du ou des formats gérés
par le LDV (sachant que le plus économe est <a
href="defines.htm#LDVF">LDVF_SPECFORMAT</a>)<br>
Le LDV peut modifier une autre zone que celle donnée
dans les champs x1, y1, x2 et y2 de params à condition
de l'avoir signalé auparavant par la fonction PreRun<br>
Ne <strong><u>JAMAIS</u></strong> allouer dans le LDV de
la mémoire à destination de <em><strong>VISION</strong></em>,
car celle-ci sera libérée dès que <em><strong>VISION</strong></em>
déchargera le LDV (même si vous ne le faites pas
explicitement, le compilateur ou le système s'en
chargera).Par contre, rien ne vous interdit d'allouer de
la mémoire à usage interne pour effectuer cette
fonction, n'oubliez pas de la libérer !<br>
Depuis la version 1.02 de <a
href="vapi/index.htm#Présentation">VAPI</a>, on peut
maintenant annuler le traitement en cours depuis
l'interface utilisateur (il suffit de fermer la fenêtre
de progression ou d'appuyer sur Control-C), pour cela :<br>
* Ajouter <a href="defines.htm#LDVF">LDVF_SUPPORTCANCEL</a>
dans le champ Flags de la structure <a
href="struct.htm#LDV_CAPS">LDV_CAPS</a> présente dans la
variable LdvInfos du LDV<br>
* Tester la valeur renvoyée par la fonction <a
href="vapi/pr.htm#PrSetProgEx">PrSetProgEx</a>, si elle
est non nulle, l'annulation est demandée<br>
* Sortir du traitement du LDV (ne pas oublier de libérer
l'éventuelle mémoire allouée en interne)<br>
* Sortir de la fonction Run en renvoyant <a
href="defines.htm#ELDV">ELDV_CANCELLED</a><br>
Notes :<br>
Dès que la fonction <a href="vapi/pr.htm#PrSetProgEx">PrSetProgEx</a>
a retourné une valeur non nulle, la fenêtre de
progression est détruite, la demande d'annulation n'est
donc pas seulement une demande mais une obligation !<br>
Ne vous souciez pas de la libération de l'image
destination ou de restaurer l'image source, <em><strong>VISION</strong></em>
gère cela au travers du Undo.</td>
</tr>
</table>
</center></div>
<p>&nbsp;</p>
<p><a name="preview"></a><font size="4"><strong>3.4 Fonction
Preview</strong></font></p>
<div align="center"><center>
<table border="2" width="100%">
<tr>
<td width="15%"><strong>Prototype</strong></td>
<td width="85%"><a href="defines.htm#LDV_STATUS">LDV_STATUS</a>
cdecl Preview(<a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
*in, <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
*params, <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
*out)</td>
</tr>
<tr>
<td width="15%"><strong>Paramètres</strong></td>
<td width="85%">Identiques à ceux de la fonction <a
href="#run">Run</a></td>
</tr>
<tr>
<td width="15%"><strong>Retour</strong></td>
<td width="85%"><a href="defines.htm#ELDV">Un code de
succès ou d'erreur</a></td>
</tr>
<tr>
<td width="15%"><strong>Responsabilités / Remarques</strong></td>
<td width="85%">Cette fonction est identique à la
fonction <a href="#run">Run</a>, sauf qu'elle opère sur
des images plus petites (112 x 112 en moyenne). Si la
fonction <a href="#run">Run</a> est suffisamment rapide
pour afficher le résultat en moins de 1 seconde, la
fonction Preview devrait simplement l'appeler. Dans le
cas contraire, on peut se permettre certaines
approximations ou pré-calculs pour revenir en deça de
la seconde.</td>
</tr>
</table>
</center></div>
<p>&nbsp;</p>
<p><a name="getparams"></a><font size="4"><strong>3.5 Fonction
GetParams</strong></font></p>
<div align="center"><center>
<table border="2" width="100%">
<tr>
<td width="15%"><strong>Prototype</strong></td>
<td width="85%"><a href="defines.htm#LDV_STATUS">LDV_STATUS</a>
cdecl GetParams(<a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
*img, <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
*params, char *path)</td>
</tr>
<tr>
<td width="15%"><strong>Paramètres</strong></td>
<td width="85%"><strong>[IN]</strong> img : pointeur sur
la structure <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
décrivant l'image source de <em><strong>VISION<br>
</strong></em><strong>[IN]</strong> params : pointeur sur
une structure <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
indiquant la zone à modifier<br>
<strong>[IN]</strong> path: chemin de chargement du LDV</td>
</tr>
<tr>
<td width="15%"><strong>Retour</strong></td>
<td width="85%"><a href="defines.htm#ELDV">ELDV_NOERROR</a>
ou <a href="defines.htm#ELDV">ELDV_CANCELLED</a></td>
</tr>
<tr>
<td width="15%"><strong>Responsabilités / Remarques</strong></td>
<td width="85%">Cette fonction est <strong><u>optionnelle</u></strong>.
Si votre LDV l'exporte, <em><strong>VISION</strong></em>
l'appellera en lieu et place de sa fonction interne de
saisie des paramètres.<br>
Si <a href="defines.htm#ELDV">ELDV_NOERROR</a> est
renvoyé, <em><strong>VISION</strong></em> appellera
ensuite la fonction <a href="#run">Run</a><br>
Si <a href="defines.htm#ELDV">ELDV_CANCELLED</a> est
renvoyé, la saisie est annulée (comme si vous aviez
annulé la saisie au travers du formulaire standard
proposé par <em><strong>VISION</strong></em>).<br>
Le paramètre params devient transparent pour <em><strong>VISION</strong></em>,
il sera renvoyé sans changement lors de l'appel à la
fonction <a href="#run">Run</a>. Votre LDV peut s'en
servir pour stocker ses paramètres ou peut choisir de
les mémoriser en interne.<br>
path permet de récupérer le fichier INI associé pour
la description multi-langue des paramètres. Vous pouvez
au choix utiliser un fichier INI (ou tout autre, c'est
maintenant vous qui êtes maître). Si vous voulez gérer
la description multi-langues, n'oubliez pas de scruter
les répertoires de langues à partir de path.</td>
</tr>
</table>
</center></div>
<p>&nbsp;</p>
<p><a name="fichier ini"></a><font size="4"><strong>3.6 Le
fichier INI associé</strong></font></p>
<p><font size="3">Le fichier INI associé à un LDV a deux buts:</font></p>
<ol>
<li><font size="3">Rassembler toutes les informations
relatives à la langue comme son nom et sa description</font></li>
<li><font size="3">Définir le paramétrage du LDV</font></li>
</ol>
<p>&nbsp;</p>
<p><a name="langues"></a><font size="4"><strong>3.6.1
Informations sur la langue</strong></font></p>
<p><font size="3">Les LDV sont multi-langues, c'est à dire que
si vous avez défini une langue dans les préférences, <em><strong>VISION</strong></em>
est capable d'exploiter cette information également pour les
LDV, si l'information est disponible. Dans le répertoire LDV de <em><strong>VISION</strong></em>,
on trouve les .LDV ainsi que les .INI associés. Par exemple, le
fichier INVERT.INI est associé au fichier INVERT.LDV.Dans ce
dossier LDV, doivent figurer les .INI les plus standards, c'est
à dire en langue anglaise. Si par exemple, vous avez défini la
langue &quot;Français&quot; dans les préférences de <em><strong>VISION</strong></em>,
il suffit de créer le sous-répertoire &quot;Français&quot;
dans le dossier LDV, et d'y inclure le fichier INVERT.INI traduit
en français pour que <em><strong>VISION</strong></em> aille le
chercher à la place de son équivalent directement sous le
répertoire LDV.</font></p>
<p><font size="3">Dans la section [Informations], <em><strong>VISION</strong></em>
attend les clés suivantes:</font></p>
<div align="center"><center>
<table border="2" width="100%">
<tr>
<td align="center" width="15%"><strong>Nom de la clé</strong></td>
<td align="center" width="10%"><strong>Taille</strong></td>
<td align="center" width="75%"><strong>Description</strong></td>
</tr>
<tr>
<td align="center" width="15%"><font size="3">ShortName</font></td>
<td align="center" width="10%">15 caractères max.</td>
<td width="75%">Nom court du module apparaissant dans la
liste des modules à sélectionner</td>
</tr>
<tr>
<td align="center" width="15%"><font size="3">LongName</font></td>
<td align="center" width="10%">31 caractères max.</td>
<td width="75%">Nom apparaissant lorsque on demande des
détails sur ce LDV</td>
</tr>
<tr>
<td align="center" width="15%"><font size="3">Description</font></td>
<td align="center" width="10%">79 caractères max.</td>
<td width="75%">Description complète du module sur 3
lignes</td>
</tr>
</table>
</center></div>
<p>&nbsp;</p>
<p><a name="parametrage"></a><font size="4"><strong>3.6.2
Paramétrage du LDV</strong></font></p>
<p><font size="3"><em><strong>VISION</strong></em> permet la
saisie de jusqu'à 4 paramètres pour un LDV. Ces paramètres
sont saisis à l'aide d'ascenseurs GEM apparaissant ou non
suivant le nombre de paramètres que le LDV accepte en entrée.<br>
Pour que <em><strong>VISION</strong></em> accepte d'afficher un
paramètre,une section nommée [ParameterN] (1 &lt;= N &lt;= 4)
doit être créee avec les clés suivantes:</font></p>
<div align="center"><center>
<table border="2" width="100%">
<tr>
<td align="center" width="15%"><strong>Nom de la clé</strong></td>
<td align="center" width="85%"><strong>Description</strong></td>
</tr>
<tr>
<td align="center" width="15%"><font size="3">Name</font></td>
<td width="85%">Nom de ce paramètre (15 caractères
max.). Si le nom est absent, ce paramètre n'apparaitra
pas</td>
</tr>
<tr>
<td align="center" width="15%"><font size="3">Type</font></td>
<td width="85%">1 : entier 16 bits (-32768 --&gt; +32767)<br>
2 : float (non géré actuellement)</td>
</tr>
<tr>
<td align="center" width="15%"><font size="3">MinValue</font></td>
<td width="85%">Valeur minimale admissible pour ce
paramètre</td>
</tr>
<tr>
<td align="center">DefautValue</td>
<td>Valeur par défaut présenté avec l'interface de <em><strong>VISION</strong></em></td>
</tr>
<tr>
<td align="center">MaxValue</td>
<td>Valeur maximale admissible pour ce paramètre</td>
</tr>
</table>
</center></div>
<p>Si cela ne peut convenir au LDV que vous développez, vous
pouvez spécifier une fonction de saisie spécifique avec la
fonction <a href="#getparams">GetParams</a>.</p>
<hr>
<div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" width="17%"><a href="notions.htm"><img
src="images/cprev.jpg" alt="Chapitre précédent"
border="0" hspace="2" width="46" height="26"></a><a
href="index.htm"><img src="images/csom.jpg"
alt="Retour au sommaire" border="0" hspace="2" width="26"
height="26"></a><a href="defines.htm"><img
src="images/csuiv.jpg" alt="Chapitre suivant" border="0"
hspace="2" width="43" height="26"></a></td>
<td align="center" valign="top" rowspan="2" width="8%"><p
align="center"><img src="images/icoprinc.gif" width="59"
height="71"></p>
</td>
<td width="33%"><p align="center"><font color="#0000FF"
size="5"><strong>Documentation </strong><em><strong>VISION
(LDV)</strong></em></font></p>
</td>
<td align="center" valign="top" rowspan="2" width="8%"><p
align="center"><img src="images/icointro.gif" width="59"
height="71"></p>
</td>
<td valign="top" width="17%"><p align="left">Dernière
mise à jour : <!--webbot bot="Timestamp" startspan
s-type="EDITED" s-format="%d/%m/%y" -->06/05/01<!--webbot
bot="Timestamp" i-checksum="12424" endspan --></p>
</td>
</tr>
<tr>
<td width="17%"><p align="center"><a
href="..\..\download/dvldv.zip">Télécharger la doc</a></p>
</td>
<td width="33%"><p align="center"><font size="4"><strong>3.
D E S C R I P T I O N</strong></font></p>
</td>
<td valign="top" width="17%">&nbsp; </td>
</tr>
</table>
</center></div>
</body>
</html>