void processData(const data& packet) { // First, let's run the data through the analyzer to determine // the priority it should be running at. int priority = _analyzer->analyzePriority(data); // Get the Current object, and set the priority CORBA::Object_var object = _orb->resolve_initial_references("RTCurrent"); RTCORBA::Current_var current = RTCORBA::Current::_narrow(object); current->the_priority(priority); // Send the data off to the router sensorRouter->routeData(data); }
Example 1: Modifying a thread's priority before sending it.