<< NARVAL_I_ConManagerNodes NARVAL NARVAL_I_DisplayNetwork >>

NARVAL >> NARVAL > NARVAL_I_DeletePackets

NARVAL_I_DeletePackets

Delete packets from the packet manager.

Calling Sequence

[rp]=NARVAL_I_DeletePackets(rp,p)

Parameters

rp :

packet manager.

p :

vector of packets.

Description

NARVAL_I_DeletePackets deletes packets with indexes included into the vector p from the packet manager rp.

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]=AddVector2Network(ps(ip),networks,rp);//emission network matrix update with connection packets
end
rp(1:cpmax,:)//initial state of the packet manager
p=[1 2 4];//packets that will be removed
[rp]=NARVAL_I_DeletePackets(rp,p);//application of NARVAL_I_DeletePackets
rp(1:cpmax,:)//new state of the packet manager

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_I_ConManagerNodes NARVAL NARVAL_I_DisplayNetwork >>