<< NARVAL_I_EmptyPacketMan NARVAL NARVAL_I_MptcpIntra >>

NARVAL >> NARVAL > NARVAL_I_FirstBPacket

NARVAL_I_FirstBPacket

Extract the first packet of a node inside a network matrix and remove it from its buffer.

Calling Sequence

[nb,fp]=NARVAL_I_FirstBPacket(i,net)

Parameters

i :

node index.

net :

network matrix.

fp :

first packet of the node buffer.

nb :

new buffer.

Description

NARVAL_I_FirstBPacket extracts the first buffer packet fp of the node i inside the network matrix net. Its new buffer state nb consists of the remaining packets.

Examples

n=100;//network size
[nd,nf]=NARVAL_F_Random_i_j(n);//generation of connection extreme nodes  
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
cpt=1;//connection type: TCP
cpmax=6;//quantity of connection packets
[rp,ps,npn]=NARVAL_I_AddConnections(rp,nd,nf,cpt,cpmax);//packet manager update with connection packets
ip=[];
for k=1:length(npn)
    ip=ip($)+1:sum(npn(1:k));
    [networks,rp]=NARVAL_I_AddPackets2Net(ps(ip),networks,rp);//emission network matrix update with connection packets
end
networks(nd,:)//initial buffer state of the node nd
[nb,fp]=NARVAL_I_FirstBPacket(nd,networks);//application of NARVAL_I_FirstBPacket
fp
nb

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_I_EmptyPacketMan NARVAL NARVAL_I_MptcpIntra >>