<< NARVAL_I_AddPackets2Net NARVAL NARVAL_I_BufferExtract >>

NARVAL >> NARVAL > NARVAL_I_BufferExchange

NARVAL_I_BufferExchange

Exchange the buffer of a node inside a network matrix in respect with its new content.

Calling Sequence

[net] = NARVAL_I_BufferExchange(i,bi,net)

Parameters

i :

node index.

bi :

new buffer.

net :

network matrix.

Description

NARVAL_I_BufferExchange exchanges the current buffer of the node i inside the network matrix net by its new content bi.

Examples

n=100;//network size
bs=15;//constant buffer size
network=NARVAL_I_EmptyBufferNet(n,bs);//initialization of the reception network matrix 
networks=NARVAL_I_EmptyBufferNet(n,bs);//initialization of the emission network matrix
tpmax=n*bs;//maximal quantity of packets simultaneously supported by each network matrix 
rp=NARVAL_I_EmptyPacketMan(tpmax);//initialization of the packet manager
[nd,nf]=NARVAL_F_Random_i_j(n);//generation of connection extreme nodes 
cs=6;//connection size
cpt=1;//connection type: TCP
[rp,ps,csn]=NARVAL_I_AddConnections(rp,nd,nf,cpt,cs);//connection packets generation inside the packet manager
rp(1:cs,:)//initial state of the packet manager
networks(nd,:)//initial buffer state of the node nd
[networks]=NARVAL_I_BufferExchange(nd,ps,networks);//application of NARVAL_I_BufferExchange
networks(nd,:)//new buffer state of the node nd

Authors

Foued Melakessou

Contact

Dr. Foued Melakessou

Research Associate

Interdisciplinary Centre for Security, Reliability and Trust

Room F106

University of Luxembourg

6, rue Coudenhove Kalergi

L-1359 Luxembourg-Kirchberg

E-mail: foued.melakessou@uni.lu

Tel: (+352) 46 66 44 5346

Home Page


<< NARVAL_I_AddPackets2Net NARVAL NARVAL_I_BufferExtract >>