1 / 11

TDMA Emulator - logic

TDMA Emulator - logic. The implementation of the logic the emulator mainly based on five classes: Users Connections TDMAEmulator Sniffer/ Sender

candy
Télécharger la présentation

TDMA Emulator - logic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TDMA Emulator - logic The implementation of the logic the emulator mainly based on five classes: • Users • Connections • TDMAEmulator • Sniffer/ Sender • Use Jpcap: Java class package that allows Java applications to capture and/or send packets to the network. Jpcap is based on libpcap/winpcap and Raw Socket API. Therefore, Jpcap is supposed to work on any OS on which libpcap/winpcaphas been implemented

  2. TDMA Emulator – Mode of operation • Mode of operation 1: • The emulator enables connections to it, in order for users (clients/servers) to sign in/out • Activated by the user – the emulator listens to both networks traffic, the sniffer chooses the packets destined to the other network (by inspecting the IP address) and passes them along to the Emulator • The emulator queues them in its buffer • Mode of operation 2: • Emulator removes packets from the buffer in cyclic order, for each fetched packet it transmits it to the appropriate network (sniffer replaces the Ethernet layer according to IP layer) • Each process of fetching and sending users packets from the buffer is limited with configured time slot, whether the user use it (it has packets) or not the configured time slot must pass before proceeding to the next user in the buffer • Buffer size is constant and configurable, a user gets number of entries according to its priority

  3. Emulator components diagram

  4. Users • Manages the list of packets for each user. • The class holds user's information, statistics regarding packets sending and the a list of packets that are to be sent. • User is identified by IP address and the port that the packets are to be sent from.

  5. Connection • Responsible for accepting new members to the system or removing them. • Each user should register before using the system. • The connection listener can reject a connection if the user is already registered or there is no place for additional users. • The listener works till the stopListening function is invoked.

  6. TDMAEmulator • The managing class of the system. • It is responsible for creating connections, initiating sniffers, managing all the users and sending the packets to their destination.

  7. TDMAEmulator (cont.) • The class implement the TDMA algorithm by letting one user at a time to use the entire bandwidth for a defined amount of time. • Each user is given its time slot even if it doesn't have any information to send. • The class holds a queue of users, where for each user it holds a collection of the packets this user wants to send.

  8. Client/Server – Class diagram

  9. TDMAobject: • A basic object that all the projects inherits from it. • Connects/ disconnects from the emulator. HttpClient: • Every instance sends requests to one server. • Reads the data from the server. • Update the results array - the time elapsed from sending a request till all the file received by the client.

  10. Server: • A basic Server object that all the servers inherits from it. • Sends data to client. • The listenToclient method is pure virtual – each type of server implements it differently. HttpServer: • Multithreaded server that listens to client requests. • Sends the data according to the request. • Data is sent according to the servers prio. • (num of slots given by the emulator)

  11. Manager: • The manager initiates the system according to a configuration file. • It manages the client and servers and saves the results.

More Related