ProducerConsumer send event

For an overview of the ProducerConsumer please see: ProducerConsumer: overview.

Overview

The function of the send event method in the ProducerConsumer is to send an event message from a producer to a consumer and consists of the following operations:
  • Map the producer's element and link number to the consumer's element and link number
  • Update the slot state within the event overlay to record that an event has been sent
  • Send the event message to the consumer

Processing sequence

The sending of an event by the ProducerConsumer task is depicted in the following sequence diagram:

mtf-core-prodcons-sendevent.png

The send event consists of the following steps:
  • Convert the specified link number from absolute to relative
  • Call MapProducerToConsumer() to use the IConnectionMapping class for the active connection to map the producer element and link number to the consumer element and link number
  • Call EventSent() on the ProducerConsumerElement to update the slot state within the overlay to record that an event has been sent on the specified element and link
  • Create the EventMsg message object containing the consumer element and link numbers, the produced event object and the ID of the producer slot that the event originated from (this is used later to release the correct event)
  • Call TaskManager.QueueMessage() to send the event message to the consumer

Last edited Sep 29, 2012 at 10:36 AM by jaorme, version 6

Comments

No comments yet.