17.06.2013 Views

pvbrowser manual - Flussi liberi informatici

pvbrowser manual - Flussi liberi informatici

pvbrowser manual - Flussi liberi informatici

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.1. STRUTURA DI UN PVSERVER 23<br />

{<br />

if(p == NULL || id == 0 || d == NULL || x < -1000 || y < -1000) return -1;<br />

return 0;<br />

}<br />

static int slotMouseReleasedEvent(PARAM *p, int id, DATA *d, float x, float y)<br />

{<br />

if(p == NULL || id == 0 || d == NULL || x < -1000 || y < -1000) return -1;<br />

return 0;<br />

}<br />

static int slotMouseOverEvent(PARAM *p, int id, DATA *d, int enter)<br />

{<br />

if(p == NULL || id == 0 || d == NULL || enter < -1000) return -1;<br />

return 0;<br />

}<br />

static int slotUserEvent(PARAM *p, int id, DATA *d, const char *text)<br />

{<br />

if(p == NULL || id == 0 || d == NULL || text == NULL) return -1;<br />

return 0;<br />

}<br />

5.1.5 Header file<br />

Il file di intestazione pvapp.h è incluso in ogni maschera . In questo file si possono definire alcune cose utili. La<br />

variabile trace può attivare/disattivare la funzione printf() di output del pvserver. Durante la fase di sviluppo<br />

questi messaggi di output sono utili, bisogna quindi lasciare attiva la funzione di trace. Se si usa la modalità<br />

inetd bisogna invece disabilitare questa funzione perché questi messaggi verrebbero inviati al client <strong>pvbrowser</strong>,<br />

invece di essere stampati a schermo nella shell, e questo potrebbe disturbarne il funzionamento.<br />

file di intestazione pvapp.h che è incluso in tutte le maschere<br />

//***************************************************************************<br />

// pvapp.h - description<br />

// -------------------<br />

// begin : Mi Nov 8 11:58:45 2006<br />

// generated by : pvdevelop (C) 2000-2006 by Lehrig Software Engineering<br />

// email : lehrig@t-online.de<br />

//***************************************************************************<br />

#ifndef _PVAPP_H_<br />

#define _PVAPP_H_<br />

#include "processviewserver.h"<br />

#include "rleventlogserver.h"<br />

#include "rltime.h"<br />

#include "rlcutil.h"<br />

#include "rlsvganimator.h"<br />

#include <br />

static int trace = 1;<br />

#ifdef unix<br />

#define LOGFILE "/var/log/pvbchat.log"<br />

#else<br />

#define LOGFILE NULL<br />

#endif<br />

#define ESC_KEY 16777216<br />

#define PI 3.141592f<br />

// todo: comment me out<br />

//#include "rlmodbusclient.h"<br />

//#include "rlsiemenstcpclient.h"

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!