Ejemplo n.º 1
0
void DbPv::getField(GetFieldRequester::shared_pointer const &requester,
        string const &subField)
{
    if(recordField) {
        requester->getDone(Status::Ok,recordField);
        return;
    }
    Status status(Status::STATUSTYPE_ERROR,"client asked for illegal V3 field");
    requester->getDone(status,FieldConstPtr());
}
Ejemplo n.º 2
0
void ChannelBase::getField(GetFieldRequester::shared_pointer const &requester,
        String const &subField)
{
    Status status(Status::STATUSTYPE_ERROR,
        String("client asked for illegal field"));
    requester->getDone(status,FieldConstPtr());
}
Ejemplo n.º 3
0
void CAChannel::getField(GetFieldRequester::shared_pointer const & requester,
                         std::string const & subField)
{
    Field::const_shared_pointer field =
                subField.empty() ?
                std::tr1::static_pointer_cast<const Field>(structure) :
                structure->getField(subField);

    if (field)
    {
        EXCEPTION_GUARD(requester->getDone(Status::Ok, field));
    }
    else
    {
        Status errorStatus(Status::STATUSTYPE_ERROR, "field '" + subField + "' not found");
        EXCEPTION_GUARD(requester->getDone(errorStatus, FieldConstPtr()));
    }
}
Ejemplo n.º 4
0
void ChannelLocal::getField(GetFieldRequester::shared_pointer const &requester,
        string const &subField)
{
    if(subField.size()<1) {
        StructureConstPtr structure =
            pvRecord->getPVRecordStructure()->getPVStructure()->getStructure();
        requester->getDone(Status::Ok,structure);
        return;
    } 
    PVFieldPtr pvField = 
        pvRecord->getPVRecordStructure()->getPVStructure()->getSubField(subField);
    if(pvField) {
        requester->getDone(Status::Ok,pvField->getField());
        return;
    }
    Status status(Status::STATUSTYPE_ERROR,
        "client asked for illegal field");
    requester->getDone(status,FieldConstPtr());
}