

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This is project report. It was submitted as part of project in Network Programming course to supervisor and course instructor was Prof. Tausiq Dasgupta at Babasaheb Bhimrao Ambedkar University. It includes: Bluetooth, PAN, Implementation, Functions, Network, Programming, Rejected, GUI, Image, Argument
Typology: Study Guides, Projects, Research
1 / 2
This page cannot be seen from the preview
Don't miss anything!


25 | P a g e
A number of functions are used in this code, apart from the built in GUI functions, bellow is a brief description of these functions.
This function chooses the appropriate image from the image library to display in the simulation pane. The input argument num shows the number of current nodes and the respective image is returned in rej.simu and the status ‘Active devices in PAN’ is returned in rej.stat , since rej is a structure with fields simu and stat.
This function loads a queue of images from the image library to show in the simulation panel after a random delay to show the data sent to each slave according to its time slot. The variable im is a structure array with fields simu and stat. The size of im varies with num. The node variable is passed to the function to send the name information to update the status window.
The above function is used to update the broadcast image and the status bar according to the number of nodes present in the network. The structure array node is passed to this function to get the list of the names, the Master node sends data to. The returned variable broad has one entry with fields simu and stat.
For sending data to a selected user, the above function is used. It gets the variables num and node to get the names and number of nodes in the network. The third input argument set_val is used to indicate which client is selected. This is required to load the proper image and status. It also has the fields simu and stat.
This function is used to represent the terminating figure sequence according to the number of nodes in the network. set_val is again passed to indicate which device is being terminated. The variable clone is actually a copy of the structure node just to save the device info after it is terminated from the network to update the status.
26 | P a g e
t is again a structure with fields simu and stat. This contains the image to represent when the device is being terminated. t2 is just an image file to show how many nodes are active in the network, after the device is terminated.
This function generates a random number of bytes, that are assumed to be transferred using the buffers to read and write data. This function also generates a certain delay according to the number of bytes.
The above function randomly generates a 4 digit key to be represented as the key displayed by the master device.