21.05.2015 Views

Estimación de marcas en redes RFID - Posgrado en Ciencias y ...

Estimación de marcas en redes RFID - Posgrado en Ciencias y ...

Estimación de marcas en redes RFID - Posgrado en Ciencias y ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

APÉNDICE A. CÓDIGO CSMA P -PERSISTENTE 46<br />

prob =0; %P r o b a b i l i d a d <strong>de</strong> transmisión<br />

atime =0; %Promedio <strong>de</strong> tiempo por r e p e t i c i ó n<br />

%% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %<br />

%P o s i b l e s comandos u t i l i z a d o s durante e l proceso <strong>de</strong> i d e n t i f i c a c i ó n<br />

%% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %<br />

commandRequest=’ r e q u e s t ’ ;<br />

commandResponse=’ response ’ ;<br />

%% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %<br />

%Número <strong>de</strong> b y t e s intercambiados e n t r e e l l e c t o r y l a s <strong>marcas</strong><br />

%% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %<br />

bytesRea<strong>de</strong>rtoTag =0; %Lector a <strong>marcas</strong><br />

bytesTagtoRea<strong>de</strong>r =0; %Marcas a l l e c t o r<br />

bytesRea<strong>de</strong>rtoTagCI =0; %Lector a <strong>marcas</strong> por CI<br />

bytesTagtoRea<strong>de</strong>rCI =0; %Marcas a l l e c t o r por CI<br />

%% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %<br />

%Calculamos e l numero <strong>de</strong> b y t e s para un comando <strong>de</strong> r e c o l e c c i ó n <strong>de</strong><br />

%datos . En e s t e paso se i n i c i a e l proceso <strong>de</strong> i d e n t i f i c a c i ó n .<br />

%% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %<br />

[ bytesRea<strong>de</strong>rtoTagCI , bytesTagtoRea<strong>de</strong>rCI ]=<strong>RFID</strong>calcData ( commandRequest , 0 ) ;<br />

bytesRea<strong>de</strong>rtoTag=bytesRea<strong>de</strong>rtoTag+bytesRea<strong>de</strong>rtoTagCI ;<br />

bytesTagtoRea<strong>de</strong>r=bytesTagtoRea<strong>de</strong>r+bytesTagtoRea<strong>de</strong>rCI ;<br />

%% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %<br />

%El proceso <strong>de</strong> i d e n t i f i c a c i ó n termina cuando se t i e n e n 2 CI v a c í o s<br />

%% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %<br />

while (sum( numberEmpty==z e r o s ( s i z e ( numberEmpty))) < NTimeranura | | nEmpty

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!