Home
Categories
Dictionary
Download
Project Details
Changes Log
Who We Are
FAQ
License

Using the MapClient Plugin



This tutorial explains how to use the MapClient Plugin. As for the Client tutorial, we will use existing files in the "config" and "samples" directories of the J661 project binary release.

Configuration file

We will use the arincWindowJFX.properties properties File which is in the "config" directory:
      graphics=DefGraphics.xml
      ui=LookAndFeel.xml
      pictures=DefPictures.xml
      lf=JavaFX
      supplement=5
      warnForUndefAttrs=false
      serverInputPort=8080
      serverOutputPort=8081
      serverInputSize=50000
      serverOutputSize=200
      server.autoVisible=true
      logServerArea=true
      windowManager=windows
      server.windows=../sampleFiles/simpleWindowMapHorz.xml
      server.computeLayerSize=false
      server.superLayer=true
      server.menus=true
      server.uiCombo=true
      logMaximumLines=10
      maximumQueueSize=50
      extensions=jfxMaps.jar
.

As for the CLient tutorial, the major characteristics of this configuration are explained in the Server tutorial. Note that concerning the communication:
  • The default protocol is UDP
  • The input port for the client is the output port for the Server (8081)
  • The output port for the client is the input port for the Server (8080)

Start the Client

We will use the Client launcher exactly as for the Client tutorial:
      java -jar arincClient.jar


As the configuration file is not defined here, the Client will ask for it. Look for the arincWindowJFX.properties properties File which is in the "config" directory.
After setting the configuration file, the Client will ask for Additional Definition Files (SuperLayer). It is because the cockpit configuration defines a SuperLayer cockpit:
      windowManager=windows
      server.windows=../sampleFiles/simpleWindowMapHorz.xml
      server.superLayer=true
In this case the Client will ask for an additional SuperLayer Definition File to be able to change the cockpit configuration at runtime. As we won't use this capability in this tutorial (and keep a fixed cockpit configuration), we will just type cancel in the dialog box.

One window will appear:
clientWindow

Connect the Client

You can connect the client by clicking on the "Connect" button.

Start the associated Server

We will use the start the Server exactly as for the Client tutorial:
      java -jar jfxServer.jar
As the configuration file is not defined here, the Server will ask for it. Look for the arincWindowMapHorzJFX.properties properties File which is in the "config" directory. Two windows will appear:
The Server Display Window:
tutoservermap

The Server console Window:
tutoserverwindow
Note that the Server is automatically connected at start.

Go to the Maps tab in the Client window

Sending MapItems is performed in the Maps tab in the Client Window. We have the following content in this tab:
clientTutorialMapTab
The tab shows the list of A661_MAPHORZ_ITEMLIST widgets in the display configuration, and for each MapItemList widget the list of the associated MapItems. In this case we have only one MapItemList widget in the configuration, and the list of MapItems is initially empty[1]
Remember that the list of MapItems is only updated at runtime, so it is normal to have an empty list after the initialisation
.

Send a MapItems Buffer to the Server

We will add a SymbolGeneric, and a Line. To to that, we will:
  • Add a A661_SYMBOL_GENERIC MapItem
  • Add a A661_LINE_START MapItem
  • Add a A661_LINE_SEGMENT MapItem

Adding the SymbolGeneric MapItem

Click on the Add Item button, and change the value of the MapItem to A661_SYMBOL_GENERIC. Change the SymbolType from the 0 default value to 1.

Adding the LineStart and LineSegment MapItems

Click on the Add Item button, and change the value of the MapItem to A661_LINE_START. Then click on the Add Item button again, and change the value of the MapItem to A661_LINE_SEGMENT. For the last MapItem, change the following properties:
  • EndFlag to A661_TRUE
  • X to 0.5

Send a Buffer

We now have the following Client window:
clientTutorialMapTab2
Click on the Send button, we will see the following result:
clientTutorialServerMap

Notes

  1. ^ Remember that the list of MapItems is only updated at runtime, so it is normal to have an empty list after the initialisation

See also


Categories: client | maps | tutorials | user

Copyright 2016-2017 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v2 licence