Changeset 18463 for trunk/FACT++/src


Ignore:
Timestamp:
03/24/16 14:42:26 (9 years ago)
Author:
tbretz
Message:
Added SET_ALL_CHANNELS_DAC command.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/biasctrl.cc

    r18149 r18463  
    16681668    }
    16691669
     1670    // SET_ALL_CHANNELS_DAC
     1671    int SetAllChannelsDac(const EventImp &evt)
     1672    {
     1673        if (!CheckEventSize(evt.GetSize(), "SetAllChannelsDac", 2*416))
     1674            return false;
     1675
     1676        const uint16_t *ptr = evt.Ptr<uint16_t>();
     1677
     1678        fBias.RampAllChannelsDac(vector<uint16_t>(ptr, ptr+416));
     1679
     1680        return T::GetCurrentState();
     1681    }
     1682
    16701683    // SET_CHANNEL_DAC_VALUE
    16711684    int SetChannelDac(const EventImp &evt)
     
    20502063            ("Set a new target value for all channels in DAC counts. Starts ramping if necessary. (This command is not realized with the GLOBAL SET command.)"
    20512064             "|voltage[dac]:Global target voltage in DAC counts.");
     2065        T::AddEvent("SET_ALL_CHANNELS_DAC", "S:416")(State::kConnected)(State::kVoltageOff)(State::kVoltageOn)(State::kNotReferenced)(State::kOverCurrent)(State::kRamping)
     2066            (bind(&StateMachineBias::SetAllChannelsDac, this, placeholders::_1))
     2067            ("Set a new target value for all channels in DAC counts. Starts ramping if necessary."
     2068             "|voltage[dac]:Global target voltage in DAC counts for all channels");
    20522069
    20532070
Note: See TracChangeset for help on using the changeset viewer.