EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: unable to obtain context information about the PV
From: Thomas Schösser <[email protected]>
To: [email protected]
Date: Tue, 31 Mar 2015 17:34:35 +0200
Hi All.

For me it's unable to obtain context information about the PV in c++ before a new value is received

Attached:
Please see the record, sourcecode and output below.

Problem:
getDisplayLimitLower() returns 0, while it should return -10.
If I put pv->getDisplayLimitLower() in the (slot-)method it returns the right value.

Question:
How to obtain the DRVH, DRVL, and PREC during setup? Where can I get documentation, how to do this right? Any tutorial available?
How to deal with this problem?


record:
    record(ao, "testdevice1:outCur") {
    field(PREC, "3")
    field(EGU, "A")
    field(DRVH, "10")
    field(DRVL, "-10")
    field(HOPR, "10")
    field(LOPR, "-10")
    }


code:
    Generator::Generator()
    {
        test();
        sendSignal( "2" );
    }

    void Generator::test()
    {
        pv = new QEString( "testdevice1:outCur", this, new QEStringFormatting, 0, new UserMessage );
        pv->subscribe();
        QObject::connect( pv, SIGNAL( stringChanged( const QString&, QCaAlarmInfo&, QCaDateTime&, const unsigned int & ) ), this, SLOT( slotPvStringChanged( const QString& ) ) );
        QObject::connect( this, SIGNAL( signalWritePv( const QString& ) ), pv, SLOT( writeString( const QString& ) ) );
        std::cerr << "LOPR=" << pv->getDisplayLimitLower() << std::endl;
        std::cerr << "HOPR=" << pv->getDisplayLimitUpper() << std::endl;
        std::cerr << "PREC=" << pv->getPrecision() << std::endl;
    }

    void Generator::slotPvStringChanged( const QString& value )
    {
        // here pv->getDisplayLimitLower() returns -10
        std::cerr << "getting " << value.toStdString() << std::endl;
    }

    void Generator::sendSignal( const QString& value )
    {
        emit signalWritePv( value );
    }


output:
    LOPR=0
    HOPR=0
    PREC=0
    getting -3.140 A
    getting -3.140 A


Best regards
Thomas Schösser

-- 

Dipl. Phys.
Thomas Schösser

Raum 110
Institut für Kernphysik
TU Darmstadt
Schloßgartenstraße 9
64289 Darmstadt

Tel.: +49 6151 16 76955

Navigate by Date:
Prev: Re: IOC implementation by JAVA/Python Jameson Graef Rollins
Next: Re: support for DTM-151? Rod Nussbaumer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: building base-3.15.1: perl -typemap Andrew Johnson
Next: EPICSv4 and pvAccess to an IOC Emmanuel Mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024