Пример #1
0
static void
idl_typedefOpenClose(
    idl_scope scope,
    const char *name,
    idl_typeDef defSpec,
    void *userData)
{
    c_char spaces[20];
    idl_tmplExp te;
    OS_UNUSED_ARG(userData);

    OS_UNUSED_ARG(userData);

    if (((idl_typeSpecType(idl_typeDefRefered(defSpec)) == idl_tstruct) ||
         (idl_typeSpecType(idl_typeDefRefered(defSpec)) == idl_tunion)) &&
         (idl_streamsResolve(idl_streamsDefDefGet(), scope, name))) {
        /* keylist defined for this typedef of struct or union */
        te = idl_tmplExpNew(idlpp_macroSet);
        idl_macroSetAdd(idlpp_macroSet,
            idl_macroNew("namescope", idl_cxxId(idl_scopeElementName(idl_scopeCur(scope)))));
        idl_macroSetAdd(idlpp_macroSet, idl_macroNew("typename", idl_cxxId(name)));
        snprintf(spaces, sizeof(spaces), "%d", idlpp_indent_level*4);
        idl_macroSetAdd(idlpp_macroSet, idl_macroNew("spaces", spaces));
        idlpp_inStream = idl_streamInNew(idlpp_template, idlpp_macroAttrib);
        idl_tmplExpProcessTmpl(te, idlpp_inStream, idl_fileCur());
        idl_streamInFree(idlpp_inStream);
        idl_tmplExpFree(te);
    }
}
Пример #2
0
static idl_action
idl_unionOpen(
    idl_scope scope,
    const char *name,
    idl_typeUnion unionSpec,
    void *userData)
{
    c_char spaces[20];
    idl_tmplExp te;

    OS_UNUSED_ARG(unionSpec);
    OS_UNUSED_ARG(userData);

    /* QAC EXPECT 3416; No side effects here */
    if (idl_streamsResolve(idl_streamsDefDefGet(), scope, name)) {
    /* keylist defined for this union */
        te = idl_tmplExpNew(idlpp_macroSet);
        idl_macroSetAdd(idlpp_macroSet,
            idl_macroNew("namescope", idl_cxxId(idl_scopeElementName(idl_scopeCur(scope)))));
        idl_macroSetAdd(idlpp_macroSet, idl_macroNew("typename", idl_cxxId(name)));
        idl_macroSetAdd(idlpp_macroSet, idl_macroNew("scopedtypename", idl_scopeStack(scope, "::", name)));
        snprintf(spaces, sizeof(spaces), "%d", idlpp_indent_level*4);
        idl_macroSetAdd(idlpp_macroSet, idl_macroNew("spaces", spaces));
        idlpp_inStream = idl_streamInNew(idlpp_template, idlpp_macroAttrib);
        idl_tmplExpProcessTmpl(te, idlpp_inStream, idl_fileCur());
        idl_streamInFree(idlpp_inStream);
        idl_tmplExpFree(te);
    }
    return idl_abort;
}
Пример #3
0
static c_ulong
cmx_participantDetach(
    u_observable o,
    c_ulong event,
    c_voidp usrData)
{
    v_serviceStateKind kind;
    u_serviceManager manager;

    OS_UNUSED_ARG(o);
    OS_UNUSED_ARG(event);
    OS_UNUSED_ARG(usrData);

    if ((event & V_EVENT_SERVICESTATE_CHANGED) == V_EVENT_SERVICESTATE_CHANGED) {
        if(cmx_isInitialized() == TRUE){
            manager = (u_serviceManager)usrData;

            if(manager != NULL){
                kind = u_serviceManagerGetServiceStateKind(manager, V_SPLICED_NAME);

                if ((kind != STATE_INITIALISING) && (kind != STATE_OPERATIONAL)) {
                    cmx_internalDetach();
                    u_objectFree(manager);
                    manager = NULL;
                }
            }
        }
    }
    return event;
}
Пример #4
0
static void
dummy_callback(
    v_public p,
    c_voidp arg)
{
    OS_UNUSED_ARG(p);
    OS_UNUSED_ARG(arg);
}
Пример #5
0
int dds_init (
    int argc,
    char ** argv)
{
    OS_UNUSED_ARG(argc);
    OS_UNUSED_ARG(argv);
    return 0;
}
Пример #6
0
unsigned char
DDS::OpenSplice::ReadCondition::test_sample_states (
    c_object o,
    c_voidp args)
{
    OS_UNUSED_ARG(o);
    OS_UNUSED_ARG(args);
    return true; /* state evaluation is now in the kernel. */
}
Пример #7
0
static int
os_threadStopCallback(
    os_threadId id,
    void *arg)
{
    OS_UNUSED_ARG(id);
    OS_UNUSED_ARG(arg);
    return 0;
}
Пример #8
0
void
c_mmUnbind(
    c_mm mm,
    const c_char *name)
{
    assert(0);
    OS_UNUSED_ARG(mm);
    OS_UNUSED_ARG(name);
}
Пример #9
0
static idl_action
idl_moduleOpen (
    idl_scope scope,
    const char *name,
    void *userData)
{
    c_ulong streamsIndex, streamsCount;
    idl_action result;
    OS_UNUSED_ARG(userData);

    OS_UNUSED_ARG(userData);

    /* Test whether the module contains a component within the pragma streams.
     * If it does not, then the module should not be generated since it will
     * contain no items (which is itself illegal idl syntax).
     *
     * Note that we are comparing against only the streams existing within this idl
     * file (idl_idlScopeStreamsList).  We do not use the result of idl_keyDefDefGet()
     * since this is a list of streams resulting from the preprocessed idl (which
     *  will include streams from other idl files that this may include).
     */
    result = idl_abort;
    streamsCount = os_iterLength(idl_idlScopeStreamsList);
    if (streamsCount != 0) {
        idl_scope moduleScope;
        idl_scopeElement newElement;

        /* the idl_scope parameter to this function does not yet include the scoping
         * for this module itself, so create a duplicate and add this scoping to it,
         * before testing whether this module contains one of the streams in this file.
         */
        moduleScope = idl_scopeDup(scope);
        newElement = idl_scopeElementNew(name, idl_tModule);
        idl_scopePush(moduleScope, newElement);

        /* Loop through the list of keys applying to this idl file and test whether
         * this particular module contains one of these keys.  If it does, generate
         * code for the module.
         */
        for (streamsIndex = 0; (streamsIndex < streamsCount) && (result == idl_abort); streamsIndex++) {
            idl_scope streamsScope = os_iterObject(idl_idlScopeStreamsList, streamsIndex);
            if (idl_scopeSub(moduleScope, streamsScope)) {
                /* Scopes match */
                result = idl_explore;
            }
        }
    }

    if (result == idl_explore) {
        idl_printIndent(idlpp_indent_level);
        idl_fileOutPrintf(idl_fileCur(), "module %s {\n", idl_cxxId(name));
        idl_fileOutPrintf(idl_fileCur(), "\n");
        idlpp_indent_level++;
    }
    return result;
}
Пример #10
0
os_result
os_mmfResize(
    os_mmfHandle mmfHandle,
    os_uint32 new_size)
{
    OS_UNUSED_ARG (mmfHandle);
    OS_UNUSED_ARG (new_size);
    OS_REPORT(OS_INFO, "os_mmfResize", 0, "NOT IMPLEMENTED");
    return os_resultUnavailable;
}
Пример #11
0
os_mmfHandle
os_mmfCreateHandle (
    const char *filename,
    const os_mmfAttr *mmfAttr)
{
    OS_UNUSED_ARG (filename);
    OS_UNUSED_ARG (mmfAttr);
    OS_REPORT(OS_INFO, "os_mmfCreateHandle", 0, "NOT IMPLEMENTED");
    return NULL;
}
Пример #12
0
void
DDS::OpenSplice::DataReaderView::nlReq_notify_listener (
    DDS::OpenSplice::Entity *sourceEntity,
    DDS::ULong               triggerMask,
    void                    *eventData)
{
    OS_UNUSED_ARG(sourceEntity);
    OS_UNUSED_ARG(triggerMask);
    OS_UNUSED_ARG(eventData);
}
Пример #13
0
os_signalHandlerExceptionHandle
os_signalHandlerRegisterCheckExceptionCallback(
    os_signalHandlerExceptionCallback callback,
    void * arg)
{
    OS_UNUSED_ARG(callback);
    OS_UNUSED_ARG(arg);

    return os_signalHandlerExceptionHandleNil;
}
Пример #14
0
os_result
os_mmfCreate(
    os_mmfHandle mmfHandle,
    os_address size)
{
    OS_UNUSED_ARG (mmfHandle);
    OS_UNUSED_ARG (size);
    OS_REPORT(OS_INFO, "os_mmfCreate", 0, "NOT IMPLEMENTED");
    return os_resultUnavailable;
}
Пример #15
0
static idl_action
idl_moduleOpen(
    idl_scope scope,
    const char *name,
    void *userData)
{
    OS_UNUSED_ARG(scope);
    OS_UNUSED_ARG(name);
    OS_UNUSED_ARG(userData);

    return idl_explore;
}
Пример #16
0
static void
idl_moduleClose(
    void *userData)
{
    OS_UNUSED_ARG(userData);

    /* this is only executed if idl_moduleOpen returns 'idl_explore' */
    OS_UNUSED_ARG(userData);
    idlpp_indent_level--;
    idl_printIndent(idlpp_indent_level);
    idl_fileOutPrintf(idl_fileCur(), "};\n");
    idl_fileOutPrintf(idl_fileCur(), "\n");
}
Пример #17
0
static idl_action
idl_moduleOpen(
    idl_scope scope,
    const char *name,
    void *userData)
{
    OS_UNUSED_ARG(scope);
    OS_UNUSED_ARG(userData);

    idl_printIndent(idlpp_indent_level);
    idl_fileOutPrintf(idl_fileCur(), "namespace %s {\n", idl_cxxId(name));
    idl_fileOutPrintf(idl_fileCur(), "\n");
    idlpp_indent_level++;
    return idl_explore;
}
Пример #18
0
v_writeResult
v_deliveryServiceEntryWrite(
    v_deliveryServiceEntry _this,
    v_message message,
    v_instance *instancePtr)
{
    v_deliveryInfoTemplate ackMsg;
    v_writeResult result = V_WRITE_REJECTED;
    v_reader reader;

    OS_UNUSED_ARG(instancePtr);
    assert(C_TYPECHECK(_this,v_deliveryServiceEntry));
    assert(message != NULL);

    /* Only write if the message is not produced by an incompatible writer. */
    reader = v_entryReader(_this);
    OSPL_LOCK(reader);

    /* Filter-out all QoS-incompatible messages. */
    if (!v_messageQos_isReaderCompatible(message->qos,reader)) {
        OSPL_UNLOCK(reader);
        return V_WRITE_SUCCESS;
    }

    /* If Alive then claim instance and trigger with sample event. */
    ackMsg = (v_deliveryInfoTemplate)message;
    result = v_deliveryServiceWrite(v_deliveryService(reader),ackMsg);

    OSPL_UNLOCK(reader);

    return result;
}
Пример #19
0
void
v_topicAdapterNotify(
    v_topicAdapter adapter,
    v_event event,
    c_voidp userData)
{
    C_STRUCT(v_event) e;
    c_bool forward = TRUE;

    OS_UNUSED_ARG(userData);
    assert(adapter != NULL);
    assert(C_TYPECHECK(adapter,v_topicAdapter));
    assert(event != NULL);

    switch (event->kind) {
    case V_EVENT_ALL_DATA_DISPOSED:
        v_statusNotifyAllDataDisposed(v_entity(adapter)->status);
    break;
    case V_EVENT_INCONSISTENT_TOPIC:
        v_statusNotifyInconsistentTopic(v_entity(adapter)->status);
    break;
    default:
        forward = FALSE;
    break;
    }
    if (forward) {
        e.kind = event->kind;
        e.source = v_observable(adapter);
        e.data = NULL;
        (void)v_entityNotifyListener(v_entity(adapter), &e);
    }
}
Пример #20
0
void
d_objectFree(
    d_object object,
    d_kind kind)
{
    os_uint32 refCount;

    OS_UNUSED_ARG(kind);
    assert(d_objectIsValid(object, kind) == TRUE);

    if(object){
       assert(object->confidence == D_CONFIDENCE);
       assert(object->kind == kind);
       assert(object->refCount >= 1);

       refCount = pa_decrement(&(object->refCount));

       if(refCount == 0){
           if(object->deinit){
               object->deinit(object);
           }
           object->confidence = D_CONFIDENCE_NULL;
           object->kind = D_BAD_TYPE;
           os_free(object);
           assert(doSub(kind));
       }
#if CHECK_REF
       if (kind == CHECK_REF_TYPE) {
           UT_TRACE("\n\n============ Free(%p): %d -> %d =============\n",
                   (void*)object, refCount+1, refCount);
       }
#endif
    }
}
Пример #21
0
c_char*
cmx_participantDomainId(
    const c_char* participant)
{
    cmx_entity ce;
    u_participant up;
    c_char* result;
    u_domainId_t did;
    int written;

    ce = cmx_entityClaim(participant);

    if (ce == NULL) {
        did = U_DOMAIN_ID_INVALID;
    } else {
        up = u_participant(ce->uentity);
        did = u_participantGetDomainId(up);
        cmx_entityRelease(ce);
    }
    /* worst-case DOMAIN_ID_ANY: 2147483647  */
    result = os_malloc(sizeof(char) * 10 + 1);
    written = os_sprintf(result, "%d", did);
    assert(written > 0 && written <= 11);
    OS_UNUSED_ARG(written);

    return result;
}
Пример #22
0
os_signalHandlerExceptionHandle
os_signalHandlerRegisterExceptionCallback(
    os_signalHandlerExceptionCallback callback,
    os_signalHandlerAllocThreadContextCallback cbAllocThreadContext,
    os_signalHandlerGetThreadContextCallback cbGetThreadContext,
    os_signalHandlerFreeThreadContextCallback cbFreeThreadContext,
    void * arg)
{
    OS_UNUSED_ARG(callback);
    OS_UNUSED_ARG(cbAllocThreadContext);
    OS_UNUSED_ARG(cbGetThreadContext);
    OS_UNUSED_ARG(cbFreeThreadContext);
    OS_UNUSED_ARG(arg);

    return os_signalHandlerExceptionHandleNil;
}
Пример #23
0
os_boolean
os_mmfFileExist (
        os_mmfHandle mmfHandle)
{
    OS_UNUSED_ARG (mmfHandle);
    OS_REPORT(OS_INFO, "os_mmfFileExist", 0, "NOT IMPLEMENTED");
    return OS_FALSE;
}
Пример #24
0
static void
idl_fileClose(
    void *userData)
{
    OS_UNUSED_ARG(userData);

    idl_fileOutPrintf(idl_fileCur(), "#endif\n");
}
Пример #25
0
void
os_mmfDestroyHandle (
    os_mmfHandle mmfHandle)
{
    OS_UNUSED_ARG (mmfHandle);
    OS_REPORT(OS_INFO, "os_mmfDestroyHandle", 0, "NOT IMPLEMENTED");
    return;
}
Пример #26
0
/*
 * Class:     org_opensplice_dds_dcps_ObjectImpl
 * Method:    jniUObjectFree
 * Signature: (J)I
 */
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniUObjectFree)(
    JNIEnv *env,
    jobject jobject,
    jlong uObject)
{
    u_result uResult;
    int retcode;

    OS_UNUSED_ARG(env);
    OS_UNUSED_ARG(jobject);

    uResult = u_objectFree_s(SAJ_VOIDP(uObject));
    retcode = saj_retcode_from_user_result(uResult);

    return retcode;
}
Пример #27
0
const char *
os_mmfFilename (
        os_mmfHandle mmfHandle)
{
    OS_UNUSED_ARG (mmfHandle);
    OS_REPORT(OS_INFO, "os_mmfFilename", 0, "NOT IMPLEMENTED");
    return NULL;
}
Пример #28
0
os_result
os_mmfSync(
    os_mmfHandle mmfHandle)
{
    OS_UNUSED_ARG (mmfHandle);
    OS_REPORT(OS_INFO, "os_mmfSync", 0, "NOT IMPLEMENTED");
    return os_resultUnavailable;
}
Пример #29
0
void *
os_mmfAddress (
        os_mmfHandle mmfHandle)
{
    OS_UNUSED_ARG (mmfHandle);
    OS_REPORT(OS_INFO, "os_mmfAddress", 0, "NOT IMPLEMENTED");
    return NULL;
}
Пример #30
0
os_size_t
os_mmfSize (
        os_mmfHandle mmfHandle)
{
    OS_UNUSED_ARG (mmfHandle);
    OS_REPORT(OS_INFO, "os_mmfSize", 0, "NOT IMPLEMENTED");
    return 0;
}