cms-gem-daq-project / xhal

XHAL interface library
0 stars 10 forks source link

[feature request] To librpcman.so a function for confCalPulse #118

Closed bdorney closed 4 years ago

bdorney commented 5 years ago

Brief summary of issue

Counterpart too:

https://github.com/cms-gem-daq-project/ctp7_modules/issues/129

But should target legacyPreBoost branch of this repo (xhal).

Types of issue

Expected Behavior

Add following to:

https://github.com/cms-gem-daq-project/xhal/blob/legacyPreBoost/xhalcore/src/common/rpc_manager/calibration_routines.cc

And corresponding header file under xhalcore/include/...

DLLEXPORT uint32_t confCalPulse(uint32_t ohN, uint32_t mask, uint32_t ch, bool toggleOn, bool currentPulse, uint32_t calScaleFactor){
    req = wisc::RPCMsg("calibration_routines.confCalPulse");

    req.set_word("ohN", ohN);
    req.set_word("ch", ch);
    req.set_word("mask", mask);
    req.set_word("toggleOn",toggleOne);
    req.set_word("currentPulse", currentPulse);
    req.set_word("calScaleFactor", calScaleFactor);

    wisc::RPCSvc* rpc_loc = getRPCptr();

    try {
        rsp = rpc_loc->call_method(req);
    }
    STANDARD_CATCH;

    if (rsp.get_key_exists("error")) {
        printf("Caught an error: %s\n", (rsp.get_string("error")).c_str());
        return 1;
    }

    return 0;
} //End confCalPulse()

Current Behavior

No method exists.

Context (for feature requests)

See https://github.com/cms-gem-daq-project/ctp7_modules/issues/129

lpetre-ulb commented 4 years ago

Implemented in #120.