VCI Configuration Mapper (CM)

Sonja Vrcic

CM source code is located in widar/mccc/vciMapper. Directory vciMapper contains java code and files build.xml and build.properties.

In addition, CM needs the following widar code:
  • widar/util
  • widar/gui/widget
  • widar/mccc/logging

CM uses JAXB generated code for the following schemata:
  • widar/schema/vci/
  • widar/schema/internal/component.xsd
  • widar/schema/cmStatus
  • widar/schema/cbe
  • widar/schema/xAlerts.xsd

To build vciMapper.jar

One has to check out directories:
  • widar/util
  • widar/gui/widget
  • widar/schema
  • widar/mccc

Compile widar libraries:

  • >cd ~/widar/util
  • >ant package
  • >cd ~/widar/gui/widget
  • >ant package

Generate java code from XML schemata:

  • >cd ~/widar/schema/vci
  • >ant genJaxb
  • >cd ~/widar/schema/internal
  • >ant component
  • >cd ~/widar/schema/cmStatus
  • >ant genJaxb
  • >cd ~/widar/schema/cbe
  • >ant genJaxb
  • >cd ~/widar/schema
  • >ant xAlerts

Compile MCCC logging code:

  • >cd ~/widar/mccc/logging
  • >ant package

And finally,

Compile and build VCI Configuration Mapper:

  • >cd ~/widar/mccc/vciMapper
  • >ant package

To Deploy new version to MCCC server

  1. Build vciMapper.jar and copy vciMapper.jar to MCCC server in directory /opt/services/mccc using command
    • >ant -Duser=nraoUserName deployApp (Note: This replaces the previous version.)
  2. Log into MCCC server
  3. Create a copy of the newly deployed vciMapper.jar and put it into directory /opt/services/mccc/old.
    Old versions are stored under name: vciMapper.jar.year-month-date.
    (e.g. >cp vciMapper.jar old/vciMapper.jar.2010-08-12)
  4. Update file vciMapper.ReleaseNotes.txt (describe changes).

To stop currently running CM

  • > sudo /etc/init.d/widar-vciMapper stop
Note: The "sudo" command can only be run by authorized users as established in the file
/etc/sudoers (see your local sysadmin) or by the root user.

To start the CM and to load the default configuration file

From /opt/services/mccc (where vciMapper.jar is located):
  • > sudo /etc/init.d/widar-vciMapper start
This command will both start the Configuration Mapper and load the configuration file
named stations8racks.xml.

To start CM and load a configuration file other than the default

From the directory containing the XML configuration file to be loaded (e.g. <filename>.xml), enter:
  • > sudo /etc/init.d/widar-vciMapper start <filename>.xm

This command will both start the Configuration Mapper & load the configuration file named <filename>.xml

To check on the version of the CM that is running

Go to the web page at:

http://mccc.evla.nrao.edu:8081/vciMapper

In the center of the page, below the heading that reads "VCI Configuration Mapper" there will be a release date and time. It will be of the form " Release: 2011-02-15 22:38 UT ". This release date & time stamp gives the date and time (in UT) at which the curently running version of the Configuration Mapper was built. The date & timestamp are constructed automatically during the build process and can be used to confirm that the version of the Configuration Mapper that is running is the desired version.

To revert to an older version of the CM

  1. Select the desired version (if needed, check vciMapper.ReleaseNotes.txt)
  2. Replace vciMapper.jar in /opt/services/mccc with the selected version,
    for example, from /opt/services/mccc enter:
    > cp old/vciMapper.jar.2010-08-12 vciMapper.jar
  3. Stop the CM
    > sudo /etc/init.d/widar-vciMapper stop
  4. Start the new version of the CM
    > sudo /etc/init.d/widar-vciMapper start

CM as GUI (stand-alone application used for testing)

CM can also run on any other machine, in which case it is usually started with GUI interface. SVN directory widar/mccc/vciMapper contains a run file which can be used to start CM on the local machine. It contains command:
  • > java -cp ~/widar/jars/vciMapper.jar ca.nrc.widar.vciMapper.VciConfigMapper -gui

I use this for testing. This can be useful for testing of software that communicates with CM. In fact, CM as GUI is available via the following web-page:

Click on the link: VCI CM GUI (As far as I know nobody uses it.)

Note: In order to configure CBE and/or WIDAR hardware CM must be running on a machine which can reach WIDAR boards and CBE master. If not sure, ping one of the boards (e.g. s001-t-0), if the board is reachable, CM running on the local machine IS able to re-configure the correlator (and must be used with caution). From Penticton, we have to use the “fully decorated" version of the board address (s001-t-0.evla.nrao.edu).

To deploy new version of CM as GUI:

  1. In directory ~/widar/mccc/vciMapper enter:
     >ant -Duser=nraoUserName deployRelease
  2. Log into NRAO server (replace my user name with yours):
     > ssh svrcic@login.aoc.nrao.edu
  3. Change directory:
     >cd /home/asg/www/widar/jws-apps
  4. Copy vciMapper.jar to the directory old, add current date to the file name, e.g.
     >cp vciMapper.jar old/vciMapper.jar.2009-01-12
  5. Point your browser to http://www.aoc.nrao.edu/asg/widar/
  6. Click on link "VCI CM GUI" and verify that the new version is launched as expected.

To revert to older version of CM GUI

  1. Log into the NRAO server
  2. Go to the web directory: /home/asg/www/widar/jws-apps
  3. Replace vciMapper.jar with one of the versions stored in the subdirectory old

VCI Client (CM M&C GUI)

VCI Client source code is in SVN: ~/widar/gui/vciClient.

Directory ~/widar/gui/vciClient contains java code and files build.xml and build.properties.

In addition, VCI Client needs the following code:
  • widar/util
  • widar/gui/widget
  • widar/mccc/logging

CM uses JAXB generated code for the following schemata:
  • widar/schema/vci/

To build vciClient.jar

One has to check out directories:
  • widar/schema
  • widar/util
  • widar/gui/widget
  • widar/gui/vciClient
  • widar/mccc/logging

To compile widar libraries:

  • >cd ~/widar/util
  • >ant package
  • >cd ~/widar/gui/widget
  • >ant package

To generate java code from XML schemata:

  • >cd ~/widar/schema/vci
  • >ant genJaxb

Compile MCCC logging code:

  • >cd ~/widar/mccc/logging
  • >ant package

And finally,

Compile and build VCI Client:

  • >cd ~/widar/gui/vciClient
  • >ant package

To deploy a new version of VCI Client GUI:

  1. In directory ~/widar/gui/vciClient enter:
     >ant -Duser=nraoUserName deployRelease
  2. Log into NRAO server (replace my user name with yours):
     > ssh svrcic@login.aoc.nrao.edu
  3. Change directory:
     >cd /home/asg/www/widar/jws-apps
  4. Copy vciClient.jar to the directory old, add current date to the file name, e.g.
     >cp vciClient.jar old/vciClient.jar.2009.01.12
  5. Point your browser to http://www.aoc.nrao.edu/asg/widar/
  6. Click on link "VCI CM M&C GUI" and verify that the new version is launched as expected.

To revert to older version of CM M&C GUI (vciClient)

  1. Log into the NRAO server
  2. Go to the web directory: /home/asg/www/widar/jws-apps
  3. Replace vciClient.jar with one of the versions in the subdirectory old.

VCI Schema - Validation, Updates

VCI Schema Validation

User can enable/disable VCI schema validation. If VCI schema validation is enabled, received VCI messages are verified against
the XML schema posted on the NRAO WIDAR server:

http://www.aoc.nrao.edu/asg/widar/schemata/vci/vciRequest.xsd

http://www.aoc.nrao.edu/asg/widar/schemata/vci/vciResponse.xsd

VCI Schema Updates

If a CM deployment includes a schema update, then, when deploying the new version of the CM, the developer must:

Commit the new version of the XML schema to SVN (widar/schema/vci)

Generate JAXB classes and jar using the commands:
>cd ~/widar/schema/vci (in the users workspace)
>ant genJaxb

Copy the vci *.xsd files to the URL:
http://www.aoc.nrao.edu/asg/widar/schemata/vci

List of files:
[vrcics@widar8 vci]$ ls -l *.xsd
-rwxrwxr-x 1 vrcics vrcics 11415 May 24 2010 vciCommon.xsd
-rwxrwxr-x 1 vrcics vrcics 2985 Mar 18 2010 vciLog.xsd
-rwxrwxr-x 1 vrcics vrcics 37040 Feb 9 17:58 vciRequest.xsd
-rwxrwxr-x 1 vrcics vrcics 8946 Jul 28 2010 vciResponse.xsd
-rwxrwxr-x 1 vrcics vrcics 5365 Nov 17 2008 vciStbDelayModel.xsd
The (Linux) commands used are:
> cd ~/widar/schema/vci  (in the users workspace)
> zip vci.zip  *.xsd
> scp vci.zip  userName@login.aoc.nrao.edu:/home/asg/www/widar/schemata/vci/vci.zip 
Log into NRAO server:
> ssh userName@login.aoc.nrao.edu  (if necessary) 
> cd /home/asg/www/widar/schemata/vci
Unzip the files. 

Note, for the current (2/2011) directory structure for the project, the URL

http://www.aoc.nrao.edu/asg/widar/schemata/vci

maps onto
/home/asg/www/widar/schemata/vci



If file ~/widar/schema/widarCommon.xsd was updated, copy that file to the URL
http://www.aoc.nrao.edu/asg/widar/schemata
> cd ~/widar/schema
> scp widarCommon.xsd userName@login.aoc.nrao.edu:/home/asg/www/widar/schemata/widarCommon.xsd

Optional: Using XmlSpy or other XML tool, generate schema documentation in HTML format and post it on the same server to the URL:
http://www.aoc.nrao.edu/asg/widar/schemata/vci/doc/
which maps onto:
/home/asg/www/widar/schemata/vci/doc

For the doc files generated using XmlSpy I have created the directory xmlSpyDocs (only in my environment). I use XmlSpy to generate
documentation in HTML format, create zip file, copy it on the server, log into the server and unzip the file.

-- JosephMcMullin - 16 Aug 2010
Topic revision: r5 - 2011-05-11, BillSahr
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback