This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
proiecte:wireless-mac [2014/01/31 00:27] adrian.ciobanu [Rulare si rezultate] |
proiecte:wireless-mac [2014/02/07 10:47] (current) codrin.ciubotariu [Rulare si rezultate] |
||
|---|---|---|---|
| Line 34: | Line 34: | ||
| == Testul 1 == | == Testul 1 == | ||
| Topologia contine doua noduri | Topologia contine doua noduri | ||
| - | |||
| Node Time Event | Node Time Event | ||
| Line 40: | Line 39: | ||
| | | ||
| | | ||
| + | |||
| + | |||
| + | == Testul 2 == | ||
| + | Topologia contine sase noduri | ||
| + | |||
| + | Node Time Event | ||
| + | ------------------------------------------------------------------------------ | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | In continuare vom descrie un frame de mai sus. Vom lua ca referinta frame-ul nr 4 (00.00.00.00.7A.07.0D.FF.01.00.01.4D.C8): | ||
| + | * 7A.07 (2 octeti) - lungimea frame-ului; | ||
| + | * 0D (1 octet) - Magic payload, numarul 13; | ||
| + | * FF (1 octet) - Adresa destinatie (MAC) a frame-ului; FF reprezinta adresa broadcast; | ||
| + | * 01 (1 octet) - Adresa sursa (MAC) a frame-ului; | ||
| + | * 00 (1 octet) - tipul pachetului encapsulat. Acesta este un pachet numit " | ||
| + | * 01 (1 octet) - Numarul de hopuri pe care il are nodul sursa pana la nodul base station; Informatie specifica pachetului DISCOVERY | ||
| + | * 4D.C8 (2 octeti) - CRC; | ||
| + | |||
| + | ===== Informatii aditionale ===== | ||
| + | == Anexa 1 - structuri de date == | ||
| + | * tipurile de mesaje si structurile lor | ||
| + | < | ||
| + | typedef enum { | ||
| + | DISCOVERY = 0, | ||
| + | RTS, | ||
| + | CTS, | ||
| + | NORMAL | ||
| + | }packet_type; | ||
| + | |||
| + | typedef struct { | ||
| + | uint8_t hop_nr; /* number of hops from the sender | ||
| + | of the packet to node 0 */ | ||
| + | }discovery_packet; | ||
| + | |||
| + | typedef struct { | ||
| + | uint8_t request; // must be 1 - request; | ||
| + | }rts_packet; | ||
| + | |||
| + | typedef struct { | ||
| + | uint8_t response; // 1 - ack; 0 - nack | ||
| + | }cts_packet; | ||
| + | |||
| + | typedef struct { | ||
| + | uint8_t val; | ||
| + | }normal_packet; | ||
| + | </ | ||
| + | |||
| + | * componenta unui mesaj | ||
| + | < | ||
| + | typedef struct { | ||
| + | uint8_t destination_node; | ||
| + | uint8_t source_node; | ||
| + | packet_type type; /* type of the next packet */ | ||
| + | //uint8_t data_size; /* nr of bytes for data */ | ||
| + | void * data; /* pointer to data_size bytes of data */ | ||
| + | }Frame_t; | ||
| + | </ | ||
| + | |||
| + | * tabela de rutare pentru fiecare nod (directia catre nodul 0) | ||
| + | < | ||
| + | typedef struct { | ||
| + | int next_hop; | ||
| + | int hop_count; | ||
| + | }route_table; | ||
| + | </ | ||
| ===== Bibliografie ===== | ===== Bibliografie ===== | ||
| * [1] http:// | * [1] http:// | ||
| * [2] http:// | * [2] http:// | ||
| + | |||