Cluster Mechanism

Description of the MultiCam surface cluster mechanism

Surface states

To implement the cluster mechanism, MultiCam uses the state of the surface, which is available through the MultiCam parameter SurfaceState.

Any instantiated surface is necessarily in one of the five following states:

Surface State Description
FREE The surface is unconditionally able to receive image data from the grabber.
FILLING The surface is presently receiving or ready to receive image data from the grabber.
FILLED The surface has finished receiving image data from the grabber, and thus is ready for processing.
PROCESSING The surface is being processed by the host processor.
RESERVED The surface is removed from the standard state transition mechanism.

The state of the surface is unique in the sense that, at a given instant, a surface belonging to several clusters is perceived in a consistent state by all associated channels.

Surface state transitions

Table 1. State transitions table
State origin State destination Initiator Occurrence and applicability
Not applicable FREE User application On creation of a new surface.
FREE FILLING MultiCam Driver On Start Acquisition Sequence and End of Transfer Phase events:
  • When MaxFillingSurfaces = MAXIMUM: applies to all (up to 512) FREE surfaces in the cluster
  • Otherwise applies to only one FREE surface
FILLING FILLED MultiCam Driver On End of Transfer Phase event:
  • When MaxFillingSurfaces = MAXIMUM: applies to all (up to 512) FILLING surfaces in the cluster that have finished receiving image data from the grabber, and thus are ready for processing
  • Otherwise applies to the unique FILLING surface
FILLED PROCESSING User application or

Operating System

Applies to the oldest FILLED surface (if any) when the cluster contains no more PROCESSING surface and
  • on Execution of the McGetSignalInfo function or
  • on release (exit) of the McWaitSignal(SurfaceProcessing) function or
  • on entry of the "Surface Processing" callback function.
PROCESSING FREE User application or

Operating System

Applies to the unique PROCESSING surface (if any) when:
  • setting the parameter MC_SurfaceState to the value MC_SurfaceState_FREE or
  • automatically when exiting the "Surface Processing" callback function.
FILLED

RESERVED

FREE User application Applies to any FILLED or RESERVED surface when setting the parameter MC_SurfaceState to the value MC_SurfaceState_FREE.
FILLED

PROCESSING

RESERVED User application Applies to any FILLED or PROCESSING surface when setting the parameter MC_SurfaceState to the value MC_SurfaceState_RESERVED.
FILLED FREE MultiCam Driver Applies to the oldest FILLED surface (if any) when the cluster contains no more FREE surfaces

The following drawing shows a simplified state transition diagram applying to any surface in the cluster:

Figure: Surface state diagram

For a cluster having a total of N registered surfaces:
  • 0 up to N surfaces can be in the FREE state
  • 0 up to N (limited to 512) surfaces can be in the FILLING state when the parameter MaxFillingSurfaces = MAXIMUM
  • 0 or 1 surface can be in the FILLING state when the parameter MaxFillingSurfaces = MINIMUM
  • 0 up to N surfaces can be in the FILLED state
  • 0 or 1 surface can be in the PROCESSING state
  • 0 to (N-2) surfaces can be in the RESERVED state
Note: There is at most one surface in the PROCESSING state per cluster!
Note: At least 2 surfaces should be left outside the RESERVED state to maintain a minimal operability of the cluster mechanism.