Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

HowToNamePackages

Álvaro Carrera edited this page Jun 18, 2013 · 1 revision

#summary How to name the packages of a module #labels Phase-Implementation

= Introduction =

In Shanks project, the following package name convention is used. es.upm.dit.gsi.shanks.shanks-core is the main project of shanks that contains core funcionalities for the simulation. This project contains the following packages.

  • es.upm.dit.gsi.shanks is the project main package and the group id for maven projects. It contains !ShanksSimulation class and 2D and 3D GUI classes for simulation graphical representation. Its subpackages are the followings:
    • agent package contains all clases related to [ShanksAgentArchitecture Shanks Agents]. It contains the following subpackages.
      • action package contains classes related to [ActionsArchitecture agent actions].
      • capabilities package contains classes related to [ShanksAgentArchitecture#Shanks_Agents_Capabilities agents capabilities].
      • exception package, obviously, contains possible exceptions thrown by agents.
      • portrayal package contains default 2D and 3D portrayal for any agent.
    • model package contains all clases related to simulation scenario, simulated events and simulated devices. It contains the following packages:
      • scenario package contains [ScenarioArchitecture scenario (and complex scenario)] and portrayal and exceptions for scenarios.
      • element package contains [NetworkElementArchitecture network element (device or link)] classes and their exceptions and default portrayals.
      • eventpackage contains abstract classes for any [EventArchitecture type of event]

Finally, any module for Shanks must follow the same convention. So, developers must write any class that extends a shanks-core class in the same package adding the name of the module.

For example, Router.java extends Device.java. Then, it should be at es.upm.dit.gsi.shanks.model.ftth.element.device.Router. Notice that ftth classes should be after model because all you develop for a new module should be a subpackage of model.

Clone this wiki locally