Esempio n. 1
0
void generateThen(){
	int pl=tempCode.size();
	if(DEBUG)printf("Generuje then w linii %d\n", pl);
	addCodeLine("JUMP");
	jumper();
	labeler();
}
Esempio n. 2
0
void generateDo(){
	int pl=tempCode.size();
	if(DEBUG)printf("Generuje else w linii %d\n", pl);
	addCodeLine("JUMP");
	jumper();
	labeler();
	fixWhileLabels();
}
Esempio n. 3
0
void generateElse(){
	int pl=tempCode.size();
	if(DEBUG)printf("Generuje else w linii %d\n", pl);
	labeler();
	
	//char temp[30];
	//sprintf(temp, "IKSDE %d", labelStack.size());
	//addCodeLine(temp);
	fixIfLabels();
}
Esempio n. 4
0
int main( int argc, char **argv )
{
    ros::init( argc, argv, "dubins_traffic_monitor" );
    ros::NodeHandle nh( "~" );

    std::string rndjson;
    while (!nh.getParam( "/dubins_traffic/rnd", rndjson )) {
        ROS_INFO( "dubins_traffic monitor: RND JSON string not present; will try again soon..." );
        sleep( 1 );
        if (!ros::ok())
            return 0;
    }
    RoadNetwork rnd( rndjson );

    std::string eagents_str;
    while (!nh.getParam( "/dubins_traffic/e_agents", eagents_str )) {
        ROS_INFO( "dubins_traffic monitor: e-agents list not present; will try again soon..." );
        sleep( 1 );
        if (!ros::ok())
            return 0;
    }
    std::vector<std::string> eagent_names;
    if (eagents_str.size() > 0) {
        size_t pos = 0, nextpos;
        while (true) {
            nextpos = eagents_str.find( ",", pos );
            if (nextpos == std::string::npos) {
                eagent_names.push_back( eagents_str.substr( pos ) );
                break;
            }
            eagent_names.push_back( eagents_str.substr( pos, nextpos-pos ) );
            pos = nextpos + 1;
        }

    }

    Labeler labeler( nh, rnd, eagent_names );
    ros::spin();

    return 0;
}
Esempio n. 5
0
void generateWhile(){
	int pl=tempCode.size();
	if(DEBUG)printf("Generuej while w linii %d\n", pl);	
	labeler();
}