Commit bc6d6bc0 authored by flechsig's avatar flechsig
Browse files

add variable averages

parent 1b1cb283
......@@ -379,6 +379,24 @@ record(ai, "$(P)$(R)Width_RBV")
field(SCAN, "I/O Intr")
}
record(ao, "$(P)$(R)Averages")
{
field(DTYP, "asynInt32")
field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))XGI_AVERAGES")
field(PREC, "0")
field(PINI, "YES")
}
record(ai, "$(P)$(R)Averages_RBV")
{
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))XGI_AVERAGES")
field(PREC, "0")
field(SCAN, "I/O Intr")
}
record(bo, "$(P)$(R)Logscale")
{
field(DTYP, "asynInt32")
......
......@@ -20,4 +20,5 @@ $(P)$(R)Center
$(P)$(R)Width
$(P)$(R)Logscale
$(P)$(R)OutputPhase
$(P)$(R)Averages
file "NDPluginBase_settings.req", P=$(P), R=$(R)
......@@ -8,7 +8,7 @@ display {
x=60
y=235
width=469
height=159
height=191
}
clr=14
bclr=4
......@@ -101,231 +101,262 @@ text {
chan="$(P)$(R)Width"
}
}
composite {
rectangle {
object {
x=4
y=6
width=459
height=150
}
"composite name"=""
children {
rectangle {
object {
x=4
y=6
width=459
height=150
}
"basic attribute" {
clr=14
fill="outline"
}
}
text {
object {
x=10
y=24
width=200
height=20
}
"basic attribute" {
clr=14
}
textix="Minor Mode"
}
text {
object {
x=10
y=49
width=200
height=20
}
"basic attribute" {
clr=14
}
textix="OutputPhase"
}
text {
object {
x=10
y=74
width=200
height=20
}
"basic attribute" {
clr=14
}
textix="Logscale"
}
text {
object {
x=10
y=99
width=200
height=20
}
"basic attribute" {
clr=14
}
textix="Center"
}
text {
object {
x=10
y=124
width=200
height=20
}
"basic attribute" {
clr=14
}
textix="Width"
}
menu {
object {
x=215
y=24
width=102
height=20
}
control {
chan="$(P)$(R)Minor"
clr=14
bclr=51
}
}
menu {
object {
x=215
y=49
width=102
height=20
}
control {
chan="$(P)$(R)OutputPhase"
clr=14
bclr=51
}
}
"choice button" {
object {
x=215
y=74
width=100
height=20
}
control {
chan="$(P)$(R)Logscale"
clr=14
bclr=51
}
stacking="column"
}
"text entry" {
object {
x=215
y=99
width=100
height=20
}
control {
chan="$(P)$(R)Center"
clr=14
bclr=51
}
limits {
}
}
"text entry" {
object {
x=215
y=124
width=100
height=20
}
control {
chan="$(P)$(R)Width"
clr=14
bclr=51
}
limits {
}
}
"text update" {
object {
x=322
y=24
width=110
height=20
}
monitor {
chan="$(P)$(R)Minor_RBV"
clr=14
bclr=5
}
limits {
}
}
"text update" {
object {
x=322
y=49
width=110
height=20
}
monitor {
chan="$(P)$(R)OutputPhase_RBV"
clr=14
bclr=5
}
limits {
}
}
"text update" {
object {
x=320
y=74
width=110
height=20
}
monitor {
chan="$(P)$(R)Logscale_RBV"
clr=14
bclr=5
}
limits {
}
}
"text update" {
object {
x=320
y=99
width=110
height=20
}
monitor {
chan="$(P)$(R)Center_RBV"
clr=14
bclr=5
}
limits {
}
}
"text update" {
object {
x=320
y=124
width=110
height=20
}
monitor {
chan="$(P)$(R)Width_RBV"
clr=14
bclr=5
}
limits {
}
}
height=180
}
"basic attribute" {
clr=14
fill="outline"
}
}
text {
object {
x=8
y=24
width=200
height=20
}
"basic attribute" {
clr=14
}
textix="Minor Mode"
}
text {
object {
x=8
y=49
width=200
height=20
}
"basic attribute" {
clr=14
}
textix="OutputPhase"
}
text {
object {
x=8
y=74
width=200
height=20
}
"basic attribute" {
clr=14
}
textix="Logscale"
}
text {
object {
x=8
y=99
width=200
height=20
}
"basic attribute" {
clr=14
}
textix="Center"
}
text {
object {
x=8
y=123
width=200
height=20
}
"basic attribute" {
clr=14
}
textix="Width"
}
menu {
object {
x=213
y=24
width=101
height=20
}
control {
chan="$(P)$(R)Minor"
clr=14
bclr=51
}
}
menu {
object {
x=213
y=49
width=101
height=20
}
control {
chan="$(P)$(R)OutputPhase"
clr=14
bclr=51
}
}
"choice button" {
object {
x=213
y=74
width=101
height=20
}
control {
chan="$(P)$(R)Logscale"
clr=14
bclr=51
}
stacking="column"
}
"text entry" {
object {
x=213
y=99
width=101
height=20
}
control {
chan="$(P)$(R)Center"
clr=14
bclr=51
}
limits {
}
}
"text entry" {
object {
x=213
y=124
width=101
height=20
}
control {
chan="$(P)$(R)Width"
clr=14
bclr=51
}
limits {
}
}
"text update" {
object {
x=318
y=24
width=110
height=20
}
monitor {
chan="$(P)$(R)Minor_RBV"
clr=14
bclr=5
}
limits {
}
}
"text update" {
object {
x=318
y=49
width=110
height=20
}
monitor {
chan="$(P)$(R)OutputPhase_RBV"
clr=14
bclr=5
}
limits {
}
}
"text update" {
object {
x=318
y=74
width=110
height=20
}
monitor {
chan="$(P)$(R)Logscale_RBV"
clr=14
bclr=5
}
limits {
}
}
"text update" {
object {
x=318
y=99
width=110
height=20
}
monitor {
chan="$(P)$(R)Center_RBV"
clr=14
bclr=5
}
limits {
}
}
"text update" {
object {
x=318
y=124
width=110
height=20
}
monitor {
chan="$(P)$(R)Width_RBV"
clr=14
bclr=5
}
limits {
}
}
text {
object {
x=8
y=150
width=200
height=20
}
"basic attribute" {
clr=14
}
textix="Averages"
}
"text entry" {
object {
x=213
y=151
width=101
height=20
}
control {
chan="$(P)$(R)Averages"
clr=14
bclr=51
}
limits {
}
}
"text update" {
object {
x=318
y=151
width=110
height=20
}
monitor {
chan="$(P)$(R)Averages_RBV"
clr=14
bclr=5
}
limits {
}
}
// Time-stamp: <20 Feb 19 14:52:43 flechsig>
// Time-stamp: <20 Feb 19 16:28:02 flechsig>
/*
* NDPluginXGI.cpp
*
......@@ -53,6 +53,7 @@ static const char *driverName="NDPluginXGI";
#define XGIPluginWidthString "XGI_WIDTH" /* (asynInt32, r/w) FFT filter width */
#define XGIPluginLogscaleString "XGI_LOGSCALE" /* (asynInt32, r/w) logscale */
#define XGIPluginOutPhaseString "XGI_OUTPHASE" /* (asynInt32, r/w) phase output */
#define XGIPluginAveragesString "XGI_AVERAGES" /* (asynInt32, r/w) averages */
/** Base class for XGI analysis plugin. */
class NDPluginXGI : public NDPluginDriver {
......@@ -102,6 +103,7 @@ private:
int XGIPluginWidth;
int XGIPluginLogscale;
int XGIPluginOutPhase;
int XGIPluginAverages;
// UF end
int XGIPluginROC;
#define LAST_NDPLUGIN_XGI_PARAM XGIPluginROC
......@@ -164,6 +166,7 @@ void NDPluginXGI::processCallbacks(NDArray *pArray)
getIntegerParam(XGIPluginWidth, &this->XGIconfig.width);
getIntegerParam(XGIPluginLogscale, &this->XGIconfig.logscale);
getIntegerParam(XGIPluginOutPhase, &this->XGIconfig.outphase);
getIntegerParam(XGIPluginAverages, &this->XGIconfig.averages);
/* Release the lock; this is computationally intensive and does not access any shared data */
this->unlock();
......@@ -460,6 +463,7 @@ NDPluginXGI::NDPluginXGI(const char *portName, int queueSize, int blockingCallba
createParam(XGIPluginWidthString, asynParamInt32, &XGIPluginWidth);
createParam(XGIPluginLogscaleString, asynParamInt32, &XGIPluginLogscale);
createParam(XGIPluginOutPhaseString, asynParamInt32, &XGIPluginOutPhase);
createParam(XGIPluginAveragesString, asynParamInt32, &XGIPluginAverages);
/* Set the plugin type string */
setStringParam(NDPluginDriverPluginType, driverName);
......
// File : /afs/psi.ch/user/f/flechsig/git/WFI/src/algorithms.cpp
// Date : <11 Feb 19 10:02:46 flechsig>
// Time-stamp: <20 Feb 19 12:32:03 flechsig>
// Time-stamp: <20 Feb 19 16:32:43 flechsig>
// Author : Flechsig Uwe, uwe.flechsig&#64;psi.&#99;&#104;
#include <iostream>
......@@ -963,6 +963,7 @@ void ReadConfig(struct ConfigStruct *cs)
cs->mytestdouble= 2.1;
cs->outphase= 0;
cs->logscale= 0;
cs->averages= 1;
if (!is_file_exist(CONFIGFILENAME))
{
......
/* File : /afs/psi.ch/user/f/flechsig/git/WFI/src/algorithms.h */
/* Date : <11 Feb 19 10:03:58 flechsig> */
/* Time-stamp: <13 Feb 19 14:12:56 flechsig> */
/* Time-stamp: <20 Feb 19 16:33:36 flechsig> */
/* Author : Flechsig Uwe, uwe.flechsig&#64;psi.&#99;&#104; */
#ifndef ALGORITMS_H
......@@ -20,6 +20,7 @@
// configuration structure type
// to pass parameters by file
struct ConfigStruct {
int averages;
int center;
int direction;
int logscale;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment