<< NL_I_PMAddConnections NL_I: Internet NL_I_PacketAck >>

NARVAL >> NL_I: Internet > NL_I_PMDeletePackets

NL_I_PMDeletePackets

Delete a list of packets from a packet manager.

Calling Sequence

[R] = NL_I_PMDeletePackets(R,P)

Arguments

R :

Packet manager.

P :

Vector of packets.

Description

NL_I_PMDeletePackets deletes the list of packets with indexes included into the vector P from the packet manager R.

Examples

n=100;//network size
[nd,nf]=NL_F_RandIntNiNj(n);//generation of connection extreme nodes  
bs=15;//constant buffer size
network=NL_I_NetworkMatrixInit(n,bs);//initialization of the reception network matrix 
networks=NL_I_NetworkMatrixInit(n,bs);//initialization of the emission network matrix
tpmax=n*bs;//maximal quantity of packets simultaneously supported by each network matrix 
rp=NL_I_PacketManagerInit(tpmax);//initialization of the packet manager
cpt=1;//connection type: TCP
cpmax=6;//quantity of connection packets
[rp,ps,npn]=NL_I_PMAddConnections(rp,nd,nf,cpt,cpmax);//packet manager update with connection packets
rp(1:cpmax,:)//initial state of the packet manager
p=[1 2 4]//packets that will be removed
[rp]=NL_I_PMDeletePackets(rp,p);//application of NL_I_PMDeletePackets
rp(1:cpmax,:)//new state of the packet manager

Report an issue
<< NL_I_PMAddConnections NL_I: Internet NL_I_PacketAck >>