Skip navigation links
Neptus

Neptus Package

Overview

Developers Guide

View the unit tests Description

Workspace 
Package Description
pt.lsts.neptus.mc  
pt.lsts.neptus.mc.lauvconsole  
2D and 3D Renderer 
Package Description
pt.lsts.neptus.renderer2d  
pt.lsts.neptus.renderer2d.tiles  
pt.lsts.neptus.renderer3d  
Aplications Loaders 
Package Description
pt.lsts.neptus.loader  
pt.lsts.neptus.loader.helper  
I18n 
Package Description
pt.lsts.neptus.i18n  
Tests 
Package Description
pt.lsts.neptus.test  
Other Packages 
Package Description
pt.lsts.neptus  
pt.lsts.neptus.app.tiles  
pt.lsts.neptus.colormap  
pt.lsts.neptus.comm  
pt.lsts.neptus.comm.iridium  
pt.lsts.neptus.comm.manager  
pt.lsts.neptus.comm.manager.imc  
pt.lsts.neptus.comm.proxy  
pt.lsts.neptus.comm.ssh  
pt.lsts.neptus.comm.transports  
pt.lsts.neptus.comm.transports.tcp  
pt.lsts.neptus.comm.transports.udp  
pt.lsts.neptus.console  
pt.lsts.neptus.console.actions  
pt.lsts.neptus.console.events  
pt.lsts.neptus.console.notifications  
pt.lsts.neptus.console.plugins  
pt.lsts.neptus.console.plugins.airos  
pt.lsts.neptus.console.plugins.base  
pt.lsts.neptus.console.plugins.containers  
pt.lsts.neptus.console.plugins.containers.propeditor  
pt.lsts.neptus.console.plugins.kml  
pt.lsts.neptus.console.plugins.planning  
pt.lsts.neptus.console.plugins.planning.edit  
pt.lsts.neptus.console.plugins.planning.overview  
pt.lsts.neptus.console.plugins.planning.plandb  
pt.lsts.neptus.console.plugins.propertiesproviders  
pt.lsts.neptus.controllers  
pt.lsts.neptus.data  
pt.lsts.neptus.doc  
pt.lsts.neptus.events  
pt.lsts.neptus.fileeditor  
pt.lsts.neptus.ftp  
pt.lsts.neptus.graph  
pt.lsts.neptus.graph.edit  
pt.lsts.neptus.messages  
pt.lsts.neptus.mme.wms  
pt.lsts.neptus.mp  
pt.lsts.neptus.mp.actions  
pt.lsts.neptus.mp.element  
pt.lsts.neptus.mp.interactions  
pt.lsts.neptus.mp.maneuvers  
pt.lsts.neptus.mp.maneuvers.editors  
pt.lsts.neptus.mp.preview  
pt.lsts.neptus.mp.preview.controller  
pt.lsts.neptus.mp.preview.payloads  
pt.lsts.neptus.mp.templates  
pt.lsts.neptus.mystate  
pt.lsts.neptus.params  
pt.lsts.neptus.params.editor  
pt.lsts.neptus.params.editor.custom  
pt.lsts.neptus.params.renderer  
pt.lsts.neptus.planeditor  
pt.lsts.neptus.platform  
pt.lsts.neptus.systems.external  
pt.lsts.neptus.viewer3d  
pt.lsts.neptus.vtk.events  
pt.lsts.neptus.vtk.filters  
pt.lsts.neptus.vtk.io  
pt.lsts.neptus.vtk.mravisualizer  
pt.lsts.neptus.vtk.pointcloud  
pt.lsts.neptus.vtk.pointtypes  
pt.lsts.neptus.vtk.surface  
pt.lsts.neptus.vtk.utils  
pt.lsts.neptus.vtk.visualization  
pt.lsts.neptus.wizard  
pt.lsts.neptus.ws  

Overview

Developers Guide

View the unit tests here.

Overview

This software is provided using a dual license. One commercial and for that contact lsts@fe.up.pt, and another using "European Union Public Licence - EUPL v.1.1 Usage" (see here to check the license or check the included LICENSE.md file).

For more information check Neptus web site.

Developers Guide

Source Code Management

Neptus is hosted using Git. You should learn to use the Git client (or any other available front-end), studying the advantages and limitations of the system before compromising any part of the repository. A good Git guide is available at http://git-scm.com/ or https://help.github.com/.

Neptus' Git repository is accessible at https://github.com/LSTS/neptus/.

Take the following point into consideration:

  • Commit only the files that you have changed. Resist the temptation of committing an entire directory, hoping for the best to happen;
  • Commit changes with caution and conscience. Furthermore do not make any commits that you know will render the project in an uncompilable state;
  • Never keep files checked out for long periods;
  • Document every commit meaningfully;
  • Always update your working copy before starting work.
  • Don't just test it inside Eclipse, compile it using ant and test it.

Java Code

The language of choice for writing code and documentation is English and you should not use other languages. The prefer encoding to use is UTF-8.

Do not use "underhanded names" (ones that begin with an underscore). Also the use of underscore is must only be used for constants.

Class and enum names should be nouns, in mixed case with the first letter of each internal word capitalized (in case of enums they should end with the word "Enum", e.g., "StatusEnum"). Try to keep your class names simple and descriptive. Use whole words. Avoid acronyms and abbreviations, unless the abbreviation is much more widely used than the long form, such as UDP or TCP. (e.g. UDPSocket or UdpSocket).

Methods names should be verbs, in mixed case with the first letter lowercase and the first letter of each internal word capitalized. (e.g. dumpRegisters).

Variable names should be short yet meaningful, in mixed case with the first letter lowercase and the first letter of each internal word capitalized. In the case of constants All characters should be uppercase with underscores separating words (e.g. ICON_START). The choice of a variable name should be mnemonic, that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary "throwaway" variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.

Each source file must start with the following preamble (by using Eclipse this will be added for you). The blank line after the comment box should be the package declaration.

  
    /*
     * Copyright (c) 2004-2020 Universidade do Porto - Faculdade de Engenharia
     * Laboratório de Sistemas e Tecnologia Subaquática (LSTS)
     * All rights reserved.
     * Rua Dr. Roberto Frias s/n, sala I203, 4200-465 Porto, Portugal
     *
     * This file is part of Neptus, Command and Control Framework.
     *
     * Commercial Licence Usage
     * Licencees holding valid commercial Neptus licences may use this file
     * in accordance with the commercial licence agreement provided with the
     * Software or, alternatively, in accordance with the terms contained in a
     * written agreement between you and Universidade do Porto. For licensing
     * terms, conditions, and further information contact lsts@fe.up.pt.
     *
     * European Union Public Licence - EUPL v.1.1 Usage
     * Alternatively, this file may be used under the terms of the EUPL,
     * Version 1.1 only (the "Licence"), appearing in the file LICENCE.md
     * included in the packaging of this file. You may not use this work
     * except in compliance with the Licence. Unless required by applicable
     * law or agreed to in writing, software distributed under the Licence is
     * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF
     * ANY KIND, either express or implied. See the Licence for the specific
     * language governing permissions and limitations at
     * https://www.lsts.pt/neptus/licence.
     *
     * For more information please see <http://www.lsts.pt/neptus>.
     * 
     * Author: Paulo Dias
     * 2010/05/19
     */
    package pt.lsts.neptus.util;
    
  

You must document the class with author tag and with one author per line and an optional sentence describing his/her work in the file

In terms of methods order, the constructors must be the first ones, and a main if existence must be the last method.

The declaration of variables must be on top just before the constructors. If you have final variables (constants) these should be put on top of the other ones, and if they are static they should precede the others.

It is encourage if you use images for icons, to declare them as static final.

Formatting Source Code

Eclipse project has the Neptus Code Style and you can format your code by Ctrl+Shift+F on your class code.

You must use Neptus Code Style which is based on the Java Conventions for code formating with the following exceptions/enforcements.

Indentation should be spaces only with a tab size of 4 spaces.

Single line if statement (use it only if the next statement is onle line lenght):

  if (if-condition)
    if-line;
  else if (else-if-condition)
    else-if-line;
  else
    else-line;
  

Multiline if statement:

  if (condition) {
    if-block;      
  }
  else {
    else-block;
  }
  

Single line while statement (use it only if the next statement is onle line lenght):

  while (condition)
    while-line;
  

Multiline while statement:

  while (condition) {
    while-block;      
  }
  

Single line for statement (use it only if the next statement is onle line lenght):

  for (initialization; stop-condition; increment)
    for-line;      
  

Multiline for statement:

  for (initialization; stop-condition; increment) {
    for-block;      
  }
  

Single and multiline line do while statement:

  do {
    do-while-line;
  } while (condition);
  

Try/catch statement:

  try {
    try-block;
  }
  catch (variable) {
    catch-block;
  }
  finally {
    finally-block;
  }
  

Switch statement:

  switch (variable) {
    case A:
        a-statement;
        break;
    case B:
        b-statement;
        break;
    default:
        default-statement;
        break;
  }
  

Build Instructions

Required Software:

Optional Software:

  • xgettext - used to re-generate I18n translation files.
  • NSIS - used to generate Windows installers.

Instructions

Neptus uses Apache Ant as its building system.

Check the targets for ant:

ant -p

Default command to use to prepare the necessary files to run Neptus:

ant

FEUP-LSTS

Copyright © 2004-2020 FEUP-LSTS and Neptus developers. All Rights Reserved.