Main Page   File List   File Members  

SlipMootooth_GBI_Test_wht_c_nt.c File Reference

This is the source file of GBI-Test documented. It doesn't contains much because this is a very small program. More...

#include "white_interface.h"

Functions

char * strcpy (char *to, const char *from)
 C library function to copy a string from one location to another location, also used in GBI.

int vccPrintPdxDebugInfo (const char *format,...)
 VCC function to print messages.

void poin_entry_Init ()
void poin_entry_Run ()

Variables

int connected = 0
 Set to unconnected. More...

char string_to_GBI [20]
 Buffer to store string from game device. More...

char string_from_GBI [20]
 Buffer to store string from GBI. More...


Detailed Description

This is the source file of GBI-Test documented. It doesn't contains much because this is a very small program.


Function Documentation

void poin_entry_Init  
 

The most important and only task of this function is to send a Trigger via the Start_Run port of GBI-Test to the Start_Run port of GBI in order to start the first execution of GBI's poin_entry_Run() function which would begin the connection process by sending a connection request.

void poin_entry_Run  
 

This function is executed whenever an input has entered into the GBI-Test via its input ports. It can be divided into three sections :

1. if(Set_Enabled())
When a trigger has entered the Set port, that indicate the connection has been established and the connected flag would be set to 1. However, since the connected flag is no longer in use, this Set port and this connectional check are obsolete.
2. if(Input_Enabled())
The Input port of GBI-Test only receives strings from GBI. If one has entered GBI-Test, two operations would be performed. First the input string would be copied into the "string_from_GBI" buffer then this string would be sent to the upper layer (game device) immediately via the NET_Out port of GBI-Test.
3. if(NET_In_Enabled())
The NET_In port of GBI-Test only receives strings from the upper layer (game device). If one has entered GBI-Test, also two operations would be performed. First the input string would be copied into the "string_to_GBI" buffer then this string would be sent GBI immediately via the Ouput port of GBI-Test.
Ideally the if(connected) conditional should be right after the check of the Input port of GBI-Test. But this has now been sadly removed.


Variable Documentation

int connected = 0
 

Set to unconnected.

This variable is set to false (=0) initially. When the connection is established between Master and Slave, both GBI would send a trigger value equal to 1 (Set_Post(1) to GBI-Test. When the Set port of GBI-Test is enabled with this value it would set the connected flag to 1. This variable is a flag because it is used to check whether the devices are connected or not when a string has entered GBI-Test from the upper layer via the NET_In port. If connected = 1, then this string would be copied into a buffer. This mechanism is needed to prevent a string from entering Bluetooth before a connection. However, probably due to VCC, the conditional that check this flag has been removed to give way to a successful execution of the integrated Bluetooth module (TwinToothTest).

char string_from_GBI[20]
 

Buffer to store string from GBI.

This buffer is the same as "string_to_GBI" except that it stores the string from GBI (or the other game device) before this string is sent to the upper layer.

char string_to_GBI[20]
 

Buffer to store string from game device.

When a string has entered GBI-Test from a game device, this string would be copied into this 20 bytes size buffer. As the name suggests, the string would be sent to the GBI immediatly after it is copied into this buffer.


Generated on Sun May 19 19:05:21 2002 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002