<< NARVAL_I_BufferExchange NARVAL NARVAL_I_ConManagerNodes >>

NARVAL >> NARVAL > NARVAL_I_BufferExtract

NARVAL_I_BufferExtract

Extract the current buffer occupancy of a node inside a network matrix.

Calling Sequence

[bo,bi]=NARVAL_I_BufferExtract(i,net)

Parameters

i :

node index.

net :

network matrix.

bo :

buffer occupancy.

bi :

buffer of the node i.

Description

NARVAL_I_BufferExtract extracts the current buffer bi of the node i inside the network matrix net. The length of bi rates bo.

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

[bo,bi]=NARVAL_I_BufferExtract(nd,networks)//application of NARVAL_I_BufferExtract: initial buffer state of the node nd
[networks]=NARVAL_I_BufferExchange(nd,ps,networks);//add the connection packets inside the emission network matrix 
[bo,bi]=NARVAL_I_BufferExtract(nd,networks)//application of NARVAL_I_BufferExtract: new buffer state of the node nd

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_I_BufferExchange NARVAL NARVAL_I_ConManagerNodes >>