Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

guiserver.c File Reference

Server/User-Side Application with GUI to control the robot. More...

#include <time.h>
#include <math.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include <glib.h>
#include <unistd.h>
#include <signal.h>
#include "../lib/libcomm.h"
#include "guicommon.h"

Functions

void gs_delete_event (GtkWidget *widget, gpointer data)
 This function will be called be gtk when the window gets a closing command, it makes sure that the interface is down and the program is finished. More...

void gs_da_expose_event (GtkWidget *widget, gpointer data)
 This function is called by gtk if the drawing area (da) needs to be redrawn. More...

void gs_button_press_event (GtkWidget *widget, gpointer data)
 This function is called if a button is pressed. More...

 linemonitor_exception (char *server, int port, int type)
 Exception function for linemonitor_server(), print exception code and meaning on the screen and initiate appropriate actions if necessary. More...

 thread_wait_for_linemonitor ()
 Start the linemonitor_server() -- waiting for a connection in a background-thread. More...

int main (int argc, char *argv[])
 test0001sockts: see test0001sockts.c. More...


Variables

GtkWidget * gs_application
int robot_x = 50
int robot_y = 0
ROBOT_POSITION robot_position
int serverport
int sock
int soft_msec
int hard_msec
int wait_msec
int ems_fd


Detailed Description

Server/User-Side Application with GUI to control the robot.


Function Documentation

void gs_button_press_event GtkWidget *    widget,
gpointer    data
 

This function is called if a button is pressed.

Parameters:
widget  (GtkWidget *) pointer to affected object (button).
event  (GdkEventMotion *) pointer to structure which describes the event.

void gs_da_expose_event GtkWidget *    widget,
gpointer    data
 

This function is called by gtk if the drawing area (da) needs to be redrawn.

For example if it becomes visible.

Parameters:
widget  (GtkWidget *) pointer to affected object (in this case the drawing area).
data  (gpointer) pointer to additional data from gtk.

void gs_delete_event GtkWidget *    widget,
gpointer    data
 

This function will be called be gtk when the window gets a closing command, it makes sure that the interface is down and the program is finished.

Parameters:
widget  (GtkWidget *) pointer to affected object (for example: window).
data  (gpointer) pointer to additional data from gtk.

linemonitor_exception char *    server,
int    port,
int    type
 

Exception function for linemonitor_server(), print exception code and meaning on the screen and initiate appropriate actions if necessary.

See linemonitor_server() API.

int main int    argc,
char *    argv[]
 

test0001sockts: see test0001sockts.c.

thread_wait_for_linemonitor  
 

Start the linemonitor_server() -- waiting for a connection in a background-thread.

This has to be a thread because otherwise the system would block. It would wait for a connection while it is supposed to connect itself.


Variable Documentation

int ems_fd
 

GtkWidget* gs_application
 

int hard_msec
 

struct ROBOT_POSITION robot_position
 

int robot_x = 50
 

int robot_y = 0
 

int serverport
 

int sock
 

int soft_msec
 

int wait_msec
 


Generated on Mon Apr 25 10:53:25 2005 for Hofmeier_FYP:libcomm by doxygen1.2.15