Beispiel #1
0
/*************************************          MAIN         *************************************************************/
int main(int argc, char *argv[])
{
    int domainId = 0; //por el momento solo hay un dominio
    int sample_count = 0; /* infinite loop */
    if (argc >= 2) { //podemos cambiar este alterando la veces del ciclo for para pruebas i.e # ./publisher 100
        sample_count = atoi(argv[2]);
    }
    return publisher_main(domainId, sample_count);
}
int main(int argc, char *argv[]) {
    int domainId = 0;
    int sample_count = 0; /* infinite loop */

    if (argc >= 2) {
        domainId = atoi(argv[1]);
    }
    if (argc >= 3) {
        sample_count = atoi(argv[2]);
    }
    
    /* Uncomment this to turn on additional logging
    NDDS_Config_Logger_set_verbosity_by_category(
        NDDS_Config_Logger_get_instance(),
        NDDS_CONFIG_LOG_CATEGORY_API, 
        NDDS_CONFIG_LOG_VERBOSITY_STATUS_ALL);
    */
        
    return publisher_main(domainId, sample_count);
}