Пример #1
0
void ObjectDataOStream::enableCommit( const uint128_t& version,
                                      const Nodes& receivers )
{
    _version = version;
    _setupConnections( receivers );
    _enable();
}
Пример #2
0
OCommand::OCommand( const Connections& receivers, const uint32_t cmd,
                    const uint32_t type )
    : DataOStream()
    , _impl( new detail::OCommand( 0, 0 ))
{
    _setupConnections( receivers );
    _init( cmd, type );
}
Пример #3
0
void ObjectInstanceDataOStream::sendInstanceData( const Nodes& receivers )
{
    _command = CMD_NODE_OBJECT_INSTANCE;
    _nodeID = 0;
    _instanceID = EQ_INSTANCE_NONE;
    _setupConnections( receivers );
    _resend();
    _clearConnections();
}
Пример #4
0
OCommand::OCommand( const OCommand& rhs )
    : DataOStream()
    , _impl( new detail::OCommand( *rhs._impl ))
{
    _setupConnections( rhs.getConnections( ));
    getBuffer().swap( const_cast< OCommand& >( rhs ).getBuffer( ));

    // disable send of rhs
    const_cast< OCommand& >( rhs )._setupConnections( Connections( ));
    const_cast< OCommand& >( rhs ).disable();
}
Пример #5
0
void ObjectInstanceDataOStream::push( const Nodes& receivers,
                                      const uint128_t& objectID,
                                      const uint128_t& groupID,
                                      const uint128_t& typeID )
{
    _command = CMD_NODE_OBJECT_INSTANCE_PUSH;
    _nodeID = 0;
    _instanceID = EQ_INSTANCE_NONE;
    _setupConnections( receivers );

    _resend();
    OCommand( getConnections(), CMD_NODE_OBJECT_PUSH )
        << objectID << groupID << typeID;

    _clearConnections();
}
Пример #6
0
void ObjectInstanceDataOStream::pushMap( const Nodes& receivers,
                                         const uint128_t& objectID,
                                         const uint128_t& groupID,
                                         const uint128_t& typeID,
                                         const uint128_t& version,
                                         const uint32_t instanceID,
                                         const Object::ChangeType changeType )
{
    _command = CMD_NODE_OBJECT_INSTANCE_PUSH;
    _nodeID = 0;
    _instanceID = EQ_INSTANCE_NONE;
    _setupConnections( receivers );

    _resend();
    OCommand( getConnections(), CMD_NODE_OBJECT_PUSH_MAP )
        << objectID << groupID << typeID << version << instanceID << changeType;

    _clearConnections();
}
/**
 * Constructor for MovePatientForm
 *
 * @param title The Window Title
 * @param displayBedType True if it should have the Patient's bed type, False otherwise
 * @param moveTo String of where the patient is moved to (Bed or Facility)
 * @param parent the parent widget (optional)
 */
MovePatientForm::MovePatientForm(QString title, bool displayBedType, QString moveTo, bool displayAddRemove, QWidget *parent) :
    QWidget(parent), _displayBedType(displayBedType),
    _displayAddRemove(displayAddRemove), _moveToLabel(moveTo)
{
    setWindowTitle(title);

    int width = 575;
    int height = 300;

    // For now make these NULL
    _addPatientButton = 0;
    _removePatientButton = 0;

    setGeometry(Convenience::getCenterForSize(width, height));
    setFixedSize(width, height);

    _setupLayout();
    _setupConnections();
}
Пример #8
0
/**
 * @details Constructs a LofarBeam object.
 */
LofarBeam::LofarBeam( Lofar* lofar )
    : State(true), _lofar(lofar), _localUpdate(false)
{
    // construct parameters
    //_streams.reset(new MultiRangeParameter<unsigned int>(
   //                        "streams(beamlets)", 
    //                       "the output channels to map the subbands to. Max of 64 per beam is allowed") );
    //_streams.setRange( Range<unsigned int>(0,247) );

    _array.reset(new SelectionParameter<RCU::Array>(
                           "Antenna Array",
                           "Defines the Antenna array to use in this beam" ) );

    QList<QString> arrayDesc;  arrayDesc << "Low Band" 
                                         << "High Band";

    QList<RCU::Array> arrayValues;  arrayValues << RCU::LB << RCU::HB;
    _array->setAllowableValues( arrayDesc, arrayValues);


    _filter.reset( new SelectionParameter<RCU_Filter>(
                       "RCU Filter", 
                       "The filter to apply to the RCU chain") );

    _ids.reset( new MultiRangeParameter<unsigned int>(
                       "rcu id", 
                       "The ids of all rcu's to be included in the beam") );

    _frequency.reset( new SingleParameter<float>(
                       "frequency",
                       "The frequency range to observe" ) );

    _bandwidth.reset( new SingleParameter<float>(
                       "bandwidth",
                       "The width of the frequecy band to observe"
                       " relative to the start frequency" ) );

    _subbands.reset( new MultiRangeParameter<unsigned int>(
                       "subbands", 
                       "The subband identifiers associated with the frequen") );

    _directionType.reset( new SelectionParameter<QString>( 
                       "direction", "The type "
                       "of direction input. "
                       "SKYSCAN will scan the sky with a L x M grid in "
                       "the (l,m) plane") );
    _directionType->setAllowableValues( _direction.types(), _direction.types() );
    _directionType->set(_direction.types()[0]);

    _directionX.reset( new SingleParameter<float>("x", 
                   "The longitude in degrees for direction specification" ) );
    _directionX->setRange( Range<float>(-180,180) );
    _directionY.reset( new SingleParameter<float>("y", 
                   "The latitude in degrees for direction specification" ) );
    _directionY->setRange( Range<float>(-90.0,90.0) );
     updateDirection();

    // set default values (pre-connection)
    _frequency->set(0.0);
    _bandwidth->set(0.0);
    _setupConnections();

    // set default values
    _array->set(RCU::LB);
    refreshFilter();
    _filter->set(RCU_Filter());
    _ids->set( _lofar->rcuIds( _array->value()) );
    _subbands->set( _lofar->subbandRanges() );
    _subbands->setAllowableValues( _lofar->subbandRanges() );
    _directionX->set(0.0);
    _directionY->set(0.0);
    refreshFrequency();
    refreshRCU();

    // set up the RCU group
    ParameterGroup g("RCU Selection");
    g.addParameter( _array );
    g.addParameter( _filter );
    g.addParameter( _ids );

    // set up the frequency group
    ParameterGroup f("Frequency");
    f.addParameter( _frequency );
    f.addParameter( _bandwidth );
    f.addParameter( _subbands );

    // set up the direction group
    ParameterGroup d("Direction");
    d.addParameter( _directionType );
    d.addParameter( _directionX );
    d.addParameter( _directionY );

    appendGroup( g );
    appendGroup( f );
    appendGroup( d );
}