Ejemplo n.º 1
0
void AJ_Initialize(void)
{
    if (!initialized) {
        AJ_GUID localGuid;
        initialized = TRUE;
        AJ_NVRAM_Init();

        AJ_GetLocalGUID(&localGuid);
    }
}
Ejemplo n.º 2
0
int AJ_Main(void)
{
    AJ_Status status = AJ_ERR_INVALID;

    AJ_NVRAM_Init();

    AJ_Printf("\nAllJoyn Release: %s\n\n", AJ_GetVersion());

    /*
     * The very first thing the test application does is to follow the trail of
     * breadcrumbs, if available.
     */
    status = FollowTrailOfBreadcrumbs();
    if (AJ_OK == status) {
        AJ_Printf("PASS: Successfully read the known message from NVRAM and "
                  "it is as expected. Done with the test.\n");

        return status;
    } else {
        AJ_Printf("INFO: No old remnants of a previous test run found.\n");
    }

    /*
     * The very last thing the test application does is to create the trail of
     * breadcrumbs, to be compared upon start.
     */
    status = CreateTrailOfBreadcrumbs();
    if (AJ_OK == status) {
        AJ_Printf("INFO: Successfully wrote the known message to NVRAM.\n");

        AJ_Reboot(); /* Reboot the target, if available */
    } else {
        AJ_Printf("ERROR: CreateTrailOfBreadcrumbs failed: %s (code: %u)\n", AJ_StatusText(status), status);
    }

    AJ_Printf("INFO: Completed running the test. Exiting...\n");

    return status;
}
Ejemplo n.º 3
0
void AJ_Initialize(void)
{
    AJ_GUID localGuid;
    if (!initialized) {
        initialized = TRUE;
        AJ_NVRAM_Init();
        /*
         * This will seed the random number generator
         */
        AJ_RandBytes(NULL, 0);
        /*
         * This will initialize credentials if needed
         */
        AJ_GetLocalGUID(&localGuid);

        /*
         * Clear the Routing Node black list
         */
        AJ_InitRoutingNodeBlacklist();

        AJ_InitRoutingNodeResponselist();
    }
}