Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

guirobot.c File Reference

Robot-Side application with GUI (simulator) 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 <gdk/gdk.h>
#include "../lib/libcomm.h"
#include "guicommon.h"

Functions

void gr_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 gr_da_expose_event (GtkWidget *widget, gpointer data)
 This function is called by gtk if the drawing area (da) needs to be redrawn. More...

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

 gr_block_call_do_test (int fd, int id, unsigned int type, char *buf, unsigned int size, int term)
 Function which is called from block_call() if a message/datablock has received. More...

 linemonitor_exception (char *server, int port, int type)
 Exception function for the linemonitor(), print exception code and its meaning on the screen and take further action if necessary. More...

 gr_block_call_term_test (int fd, int id)
 Function which ist called from block_call() if a the connection terminates: shut down system. More...

 gr_socket_accept_do (int fd, int id, char *pip, struct sockaddr_in their_addr, int term)
 Function which is called from socket_accept() if someone has connected. More...

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


Variables

GtkWidget * gr_application
GtkWidget * da_global
int robot_x = 50
int robot_y = 0
int soft_msec
int hard_msec
int wait_msec
int shut_down
int serverport


Detailed Description

Robot-Side application with GUI (simulator) to control the robot.


Function Documentation

gr_block_call_do_test (  int    fd,
int    id,
unsigned int    type,
char *    buf,
unsigned int    size,
int    term
) 
 

Function which is called from block_call() if a message/datablock has received.

See API of block_call().

gr_block_call_term_test (  int    fd,
int    id
) 
 

Function which ist called from block_call() if a the connection terminates: shut down system.

See block_call() API.

void gr_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 gr_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 gr_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.

gr_socket_accept_do (  int    fd,
int    id,
char *    pip,
struct sockaddr_in    their_addr,
int    term
) 
 

Function which is called from socket_accept() if someone has connected.

See socket_accept() API.

linemonitor_exception (  char *    server,
int    port,
int    type
) 
 

Exception function for the linemonitor(), print exception code and its meaning on the screen and take further action if necessary.

See API of linemonitor().

int main (  int    argc,
char *    argv[]
) 
 

test0001sockts: see test0001sockts.c.


Variable Documentation

GtkWidget* da_global
 

GtkWidget* gr_application
 

int hard_msec
 

int robot_x = 50
 

int robot_y = 0
 

int serverport
 

int shut_down
 

int soft_msec
 

int wait_msec
 


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