Example #1
0
u_result
u_readerGetMatchedPublications (
    u_reader _this,
    v_statusAction action,
    c_voidp arg)
{
    v_dataReader reader;
    v_spliced spliced;
    v_kernel kernel;
    u_result result;
    c_iter participants;
    v_participant participant;

    result = U_RESULT_PRECONDITION_NOT_MET;
    if (_this != NULL) {
        result = u_entityReadClaim(u_entity(_this), (v_entity*)(&reader));

        if ((result == U_RESULT_OK) && (reader != NULL)) {
            kernel = v_objectKernel(reader);

            participants = v_resolveParticipants(kernel, V_SPLICED_NAME);
            assert(c_iterLength(participants) == 1);
            participant = v_participant(c_iterTakeFirst(participants));
            spliced = v_spliced(participant);
            c_free(participant);
            c_iterFree(participants);

            result = u_resultFromKernel(
                         v_splicedGetMatchedPublications(spliced, v_dataReader(reader), action, arg));
            u_entityRelease(u_entity(_this));
        }
    }
    return result;
}
Example #2
0
u_result
u_readerGetDeadlineMissedStatus(
    u_reader _this,
    c_bool reset,
    v_statusAction action,
    c_voidp arg)
{
    v_reader reader;
    u_result result;

    result = U_RESULT_PRECONDITION_NOT_MET;
    if (_this != NULL) {
        result = u_entityReadClaim(u_entity(_this), (v_entity*)(&reader));
        if (result == U_RESULT_OK){
            result = u_resultFromKernel(
                         v_readerGetDeadlineMissedStatus(reader,
                                                         reset,
                                                         (v_statusAction)action,
                                                         arg));
            u_entityRelease(u_entity(_this));
        }  else {
            OS_REPORT(OS_ERROR, "u_readerDeadlineMissedStatus", 0,
                      "Illegal handle detected");
        }
    }
    return result;
}
Example #3
0
u_result
u_topicDisposeAllData (u_topic _this)
{
    v_topic topic;
    u_result result;
    v_result r;

    result = u_entityWriteClaim(u_entity(_this), (v_entity*)(&topic));
    if (result == U_RESULT_OK) {
        assert(topic);
        r = v_topicDisposeAllData(topic);
        u_entityRelease(u_entity(_this));
        result = u_resultFromKernel(r);
    }
    return result;
}
Example #4
0
u_result
u_topicSetQos (
    const u_topic _this,
    const u_topicQos qos)
{
    u_result result;
    v_topic vTopic;

    assert(_this);
    assert(qos);

    result = u_topicReadClaim(_this, &vTopic, C_MM_RESERVATION_HIGH);
    if (result == U_RESULT_OK) {
        result = u_resultFromKernel(v_topicSetQos(vTopic, qos));
        u_topicRelease(_this, C_MM_RESERVATION_HIGH);
    }
    return result;
}
Example #5
0
u_result
u_topicDisposeAllData (
    const u_topic _this)
{
    v_topic topic;
    u_result result;
    v_result r;

    assert(_this);

    result = u_topicReadClaim(_this, &topic, C_MM_RESERVATION_LOW);
    if (result == U_RESULT_OK) {
        assert(topic);
        r = v_topicDisposeAllData(topic);
        u_topicRelease(_this, C_MM_RESERVATION_LOW);
        result = u_resultFromKernel(r);
    }
    return result;
}
Example #6
0
u_result
u_topicGetAllDataDisposedStatus (
    u_topic _this,
    c_bool reset,
    v_statusAction action,
    c_voidp arg)
{
    v_topic topic;
    u_result result;
    v_result r;

    result = u_entityReadClaim(u_entity(_this), (v_entity*)(&topic));
    if (result == U_RESULT_OK) {
        assert(topic);
        r = v_topicGetAllDataDisposedStatus(topic,reset,action,arg);
        u_entityRelease(u_entity(_this));
        result = u_resultFromKernel(r);
    }
    return result;
}
Example #7
0
u_result
u_topicGetAllDataDisposedStatus (
    const u_topic _this,
    u_bool reset,
    u_statusAction action,
    void *arg)
{
    v_topic topic;
    u_result result;
    v_result r;

    assert(_this);
    assert(action);

    result = u_topicReadClaim(_this, &topic,C_MM_RESERVATION_ZERO);
    if (result == U_RESULT_OK) {
        assert(topic);
        r = v_topicGetAllDataDisposedStatus(topic,reset,action,arg);
        u_topicRelease(_this, C_MM_RESERVATION_ZERO);
        result = u_resultFromKernel(r);
    }
    return result;
}