Files
ch.psi.fda/Readme.md
2016-03-16 15:09:26 +01:00

3.4 KiB

Overview

This package holds the core functionality of FDA.

Usage

use -Djava.util.logging.config.file=logging.properties` to configure logging

Server

The FDA server is started as follows:

./bin/server -h
usage: fda
 -h         Help
 -p <arg>   Server port (default: 8080)
 -s <arg>   Server address (default: localhost)

Start new scan:

curl -X PUT -d @scan1d.xml -H 'Content-Type:application/xml' http://localhost:8080/fda/scan

Viewer

./bin/viewer -h
usage: viewer
 -h         Help
 -p <arg>   Server port (default: 10000)
 -s <arg>   Server address (default: localhost)

Development

When checking out the project from the repository there is the target/generated-sources/xjc folder missing. After checking out the project execute mvn compile to create the folder and the required classes.

To build project use mvn clean install.

To upload the latest version to the central artifact repository use mvn clean deploy. Create Zip file via mvn clean compile assembly:assembly

To use the FDA libary in an other project (like the GUI project) use:

<dependency>
    <groupId>ch.psi</groupId>
    <artifactId>fda</artifactId>
    <version>x.x.x</version>
</dependency>

REST

FDA offers a rest service to execute scans. There are 3 distinct service for fda scan, fdaq and cdump.

FDA Service

Submit scan

PUT fda/{trackingId}
Content-Type: application/xml
<configuration>
...
</configuration>

204 - Success

Stop/cancel scan

DELETE fda/{trackingId}

204 - Success

Stop all scans

DELETE fda

204 - Success

Check if scan is running

GET fda/{trackingId}/running

200 - true/false

Wait for scan done (blocks until scan is done)

GET fda/{trackingId}/done

204 - Success

Notes

Upgrade FDA 1.x to 2.x

In existing fda.properties file the following property need to be added: ch.psi.fda.aq.data.dir=../data

Upgrade FDA 2.6.1

There are 2 new properties for crlogic:

ch.psi.fda.aq.crlogic.ioc=X05LA-VME-ES2
ch.psi.fda.aq.crlogic.prefix=X05LA-ES2-CRL

FDAQ

Overview

This software is used to readout the FDAQ box developed at X10SA. On The FDAQ box there are 2 socket servers, one for retrieving the data and one for resetting the socket server for data retrieval.

The fdaq code provides exactly 2 functionalities. It can query on the data socket for data (need to specifying how many data point to read), and it can send a reset request on the reset channel.

Usage

To acquire data into a file use:

java -jar ch.psi.fda.fdaq-<version>.jar <file>

You can terminate the acquisition with CTRL+C. If you submit 2 consequtive CTRL+C the program will terminate immediately (and data might be lost);

This will take the default connections settings:

  • Hostname: mchip015.psi.ch
  • Port: 2233
  • Kill Port: 2234
  • Number Of Elements: Integer.MAX_VALUE/2

If you need to specify different settings create a property files with following content:

ch.psi.fda.fdaq.hostname=myhost
ch.psi.fda.fdaq.port=1234
ch.psi.fda.fdaq.killPort=4321

Use -Dch.psi.fda.fdaq.config.file=<file> to use this property file as base configuration.

Development

A standalone jar can be build via mvn clean compile assembly:single.

To upload the latest version to the artifact repository use mvn clean compile deploy.

Notes

Trigger port is Trigger In 1. For testing apply a 1kHz signal.