Function Broadcast-Network Programming-Project Codes, Study Guides, Projects, Research of Network Programming

This code is written in Matlab and compiled there to get results. This code is part of project in Network Programming course. It was submitted to supervisor and course instructor Prof. Tausiq Dasgupta at Babasaheb Bhimrao Ambedkar University. It includes: Function, Broadcast, Network, Programming, Master, device, Status, Name, Nodes, Broad

Typology: Study Guides, Projects, Research

2011/2012

Uploaded on 07/31/2012

dhanush
dhanush 🇮🇳

4

(3)

36 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
function broad = broadcast(num,nodes)
if num == 1
status = 'There are no devices connected to the Master device';
x = imread('2.JPG');
broad(1) = struct('simu', x,'stat',status);
end
if num == 2
status = ['Master device is sending data to ' nodes(2).Device_Name];
x = imread('5.JPG');
broad(1) = struct('simu', x,'stat',status);
end
if num == 3
status = ['Master device is sending data to ' nodes(2).Device_Name ',
' nodes(3).Device_Name];
x = imread('58.JPG');
broad(1) = struct('simu', x,'stat',status);
end
if num == 4
status = ['Master device is sending data to ' nodes(2).Device_Name ',
' nodes(3).Device_Name ', ' nodes(4).Device_Name];
x = imread('57.JPG');
broad(1) = struct('simu', x,'stat',status);
end
if num == 5
status = ['Master device is sending data to ' nodes(2).Device_Name ',
' nodes(3).Device_Name ', ' nodes(4).Device_Name ', '
nodes(5).Device_Name];
x = imread('56.JPG');
broad(1) = struct('simu', x,'stat',status);
end
if num == 6
status = ['Master device is sending data to ' nodes(2).Device_Name ',
' nodes(3).Device_Name ', ' nodes(4).Device_Name ', '
nodes(5).Device_Name ', ' nodes(6).Device_Name];
x = imread('55.JPG');
broad(1) = struct('simu', x,'stat',status);
end
if num == 7
status = ['Master device is sending data to ' nodes(2).Device_Name ',
' nodes(3).Device_Name ', ' nodes(4).Device_Name ', '
nodes(5).Device_Name ', ' nodes(6).Device_Name ', '
nodes(7).Device_Name];
x = imread('54.JPG');
broad(1) = struct('simu', x,'stat',status);
end
if num == 8
docsity.com
pf2

Partial preview of the text

Download Function Broadcast-Network Programming-Project Codes and more Study Guides, Projects, Research Network Programming in PDF only on Docsity!

function broad = broadcast(num,nodes)

if num == 1 status = 'There are no devices connected to the Master device'; x = imread('2.JPG'); broad(1) = struct('simu', x,'stat',status); end

if num == 2 status = ['Master device is sending data to ' nodes(2).Device_Name]; x = imread('5.JPG'); broad(1) = struct('simu', x,'stat',status); end

if num == 3 status = ['Master device is sending data to ' nodes(2).Device_Name ', ' nodes(3).Device_Name]; x = imread('58.JPG'); broad(1) = struct('simu', x,'stat',status); end

if num == 4 status = ['Master device is sending data to ' nodes(2).Device_Name ', ' nodes(3).Device_Name ', ' nodes(4).Device_Name]; x = imread('57.JPG'); broad(1) = struct('simu', x,'stat',status); end

if num == 5 status = ['Master device is sending data to ' nodes(2).Device_Name ', ' nodes(3).Device_Name ', ' nodes(4).Device_Name ', ' nodes(5).Device_Name]; x = imread('56.JPG'); broad(1) = struct('simu', x,'stat',status); end

if num == 6 status = ['Master device is sending data to ' nodes(2).Device_Name ', ' nodes(3).Device_Name ', ' nodes(4).Device_Name ', ' nodes(5).Device_Name ', ' nodes(6).Device_Name]; x = imread('55.JPG'); broad(1) = struct('simu', x,'stat',status); end

if num == 7 status = ['Master device is sending data to ' nodes(2).Device_Name ', ' nodes(3).Device_Name ', ' nodes(4).Device_Name ', ' nodes(5).Device_Name ', ' nodes(6).Device_Name ', ' nodes(7).Device_Name]; x = imread('54.JPG'); broad(1) = struct('simu', x,'stat',status); end

if num == 8

docsity.com

status = ['Master device is sending data to ' nodes(2).Device_Name ', ' nodes(3).Device_Name ', ' nodes(4).Device_Name ', ' nodes(5).Device_Name ', ' nodes(6).Device_Name ', ' nodes(7).Device_Name ', ' nodes(8).Device_Name]; x = imread('53.JPG'); broad(1) = struct('simu', x,'stat',status); end

docsity.com