clarify relation of Job, JobTicket and channel number

This commit is contained in:
Fischlurch 2012-02-18 00:49:53 +01:00
parent 875342fa40
commit db68577b4a
7 changed files with 34 additions and 10 deletions

View file

@ -35,7 +35,7 @@ namespace engine {
/** */
JobTicket&
Dispatcher::accessJobTicket (FrameCoord const& frameID, mobject::ModelPort const& port)
Dispatcher::accessJobTicket (FrameCoord const& frameID)
{
UNIMPLEMENTED ("figure out and create the actual JobTicket, for the current segment and the given port");
}

View file

@ -26,7 +26,6 @@
#include "proc/common.hpp"
//#include "proc/state.hpp"
#include "proc/mobject/model-port.hpp"
#include "proc/engine/time-anchor.hpp"
#include "proc/engine/frame-coord.hpp"
#include "proc/engine/job-ticket.hpp"
@ -58,7 +57,7 @@ namespace engine {
virtual FrameCoord locateFrameNext (uint frameCountOffset) =0;
JobTicket& accessJobTicket (FrameCoord const&, mobject::ModelPort const&);
JobTicket& accessJobTicket (FrameCoord const&);
};

View file

@ -26,6 +26,7 @@
#include "proc/common.hpp"
//#include "proc/state.hpp"
#include "proc/mobject/model-port.hpp"
#include "lib/time/timevalue.hpp"
#include "lib/time/timequant.hpp"
@ -34,6 +35,7 @@
namespace proc {
namespace engine {
using mobject::ModelPort;
//using lib::time::TimeSpan;
using lib::time::Duration;
//using lib::time::FSecs;
@ -62,6 +64,10 @@ namespace engine {
Time absoluteNominalTime;
int64_t absoluteFrameNumber;
ModelPort modelPort;
uint channelNr;
FrameCoord()
{
UNIMPLEMENTED ("anything regarding the Node Invocation");

View file

@ -56,7 +56,9 @@ namespace engine {
* which figures out everything to be done for generating data from this node.
* To turn a JobTicket into an actual job, we need the additional information
* regarding the precise frame number (=nominal time) and the channel number
* to calculate (in case the actual feed is multichannel, which is the default).
* to calculate (in case the actual feed is multichannel, which is the default).
* This way, the JobTicket acts as <i>higher order function:</i> a function
* generating on invocation another, specific function (= the job).
*
* @todo 1/12 WIP-WIP-WIP defining the invocation sequence and render jobs
*/

View file

@ -117,8 +117,14 @@ namespace engine {
* Frame rendering task, represented as closure.
* This functor encodes all information necessary to actually
* trigger and invoke the rendering operation. It will be embedded
* into a job descriptor and then enqueued with the scheduler for
* invocation just in time.
* by reference into a job descriptor and then enqueued with the scheduler
* for invocation just in time. The job interface exposes everything necessary
* to plan, handle, schedule and abort jobs. The implementation refers to the
* concrete "execution plan" encoded into the corresponding engine::JobTicket.
* The latter is embedded into the storage for segment of the low-level model
* and thus is shared for all frames and channels within this part of the
* timeline. Thus, the lumiera_jobParameter struct contains the "moving parts"
* changing for each individual job.
*
* @todo 1/12 WIP-WIP-WIP defining the invocation sequence and render jobs
*/

View file

@ -26,6 +26,7 @@
#include "proc/common.hpp"
//#include "proc/state.hpp"
#include "proc/mobject/model-port.hpp"
#include "lib/time/timevalue.hpp"
#include "proc/play/timings.hpp"
@ -34,6 +35,7 @@
namespace proc {
namespace engine {
using mobject::ModelPort;
// using lib::time::TimeSpan;
// using lib::time::FSecs;
// using lib::time::Time;
@ -67,7 +69,7 @@ namespace engine {
// using default copy operations
static TimeAnchor
build (play::Timings timings, uint64_t startFrame, uint channel)
build (play::Timings timings, uint64_t startFrame, ModelPort modelPort, uint channel)
{
UNIMPLEMENTED ("representation of the Time Anchor closure");
}

View file

@ -119,7 +119,7 @@ namespace test {
/** @test perform the basic dispatch step
* and verify the generated frame coordinates
* and verify the generated frame coordinates
*/
void
verify_basicDispatch()
@ -130,17 +130,26 @@ namespace test {
uint startFrame(10);
uint channel(0);
TimeAnchor refPoint = TimeAnchor::build (timings, startFrame, channel);
TimeAnchor refPoint = TimeAnchor::build (timings, startFrame, modelPort, channel);
CHECK (refPoint == Time::ZERO + Duration(10, FrameRate::PAL));
FrameCoord coordinates = dispatcher.locateFrameNext (15);
CHECK (coordinates.absoluteNominalTime == Time(0,1));
CHECK (coordinates.absoluteFrameNumber == 25);
CHECK (coordinates.remainingRealTime() >= Time(FSecs(24,25)));
CHECK (coordinates.modelPort == modelPort);
CHECK (coordinates.channelNr == channel);
JobTicket& executionPlan = dispatcher.accessJobTicket (coordinates, modelPort);
JobTicket& executionPlan = dispatcher.accessJobTicket (coordinates);
CHECK (executionPlan.isValid());
#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #880
JobTicket::JobsPlanning jobs = executionPlan.createJobsFor (coordinates);
CHECK (!isnil (jobs));
Job headJob = *jobs;
CHECK (headJob.getNominalTime() == coordinates.absoluteNominalTime);
CHECK (0 < headJob.getInvocationInstanceID());
#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #880
}