Equipment Flags: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 13: Line 13:
===EQ_PERIODIC ===
===EQ_PERIODIC ===
; Periodic Event [[#Equipment Flags|Equipment Type]]
; Periodic Event [[#Equipment Flags|Equipment Type]]
: In this equipment Type, no hardware requirement is necessary to @ref FE_tab_event_trigger "trigger" the readout function.  Instead, the @ref FE_tbl_ReadoutRoutine "readout routine" associated with this equipment is called periodically.The @ref  FE_tbl_Period "Period" field in the equipment declaration is used in this case to specify the time interval between calls to the readout function.  See @ref FE_other_event "example".
: In this equipment Type, no hardware requirement is necessary to @ref FE_tab_event_trigger "trigger" the readout function.  Instead, the [[Equipment List Parameters#Readout Routine|readout routine]] associated with this equipment is called periodically.The [[Equipment List Parameters#Period|Period]] field in the equipment declaration is used in this case to specify the time interval between calls to the readout function.


===EQ_POLLED===
===EQ_POLLED===
;Polling Event  [[#Equipment Flags|Equipment Type]]
;Polling Event  [[#Equipment Flags|Equipment Type]]
: In this equipment Type,  the name of the routine performing the @ref FE_tab_event_trigger "trigger" check function is  @ref FE_poll_event "poll_event()". This routine must be provided in the frontend.c by the user.      As polling consists of checking a variable for a TRUE condition, if the loop count is infinite and the condition never becomes TRUE, the frontend would not be able to respond to any network commands. Therefore the loop count is determined when the frontend starts for the first time so that it returns after a given time-out if no event is available.  This time-out is usually of the order of 500 milliseconds. <br> The EQ_POLLED equipment type is mainly used for data acquisition based on a hardware condition becoming TRUE, at which time the @ref FE_tbl_ReadoutRoutine "readout routine" associated with the equipment is called. See  @ref FE_poll_event "example".
: In this equipment Type,  the name of the routine performing the @ref FE_tab_event_trigger "trigger" check function is  @ref FE_poll_event "poll_event()". This routine must be provided in the frontend.c by the user.      As polling consists of checking a variable for a TRUE condition, if the loop count is infinite and the condition never becomes TRUE, the frontend would not be able to respond to any network commands. Therefore the loop count is determined when the frontend starts for the first time so that it returns after a given time-out if no event is available.  This time-out is usually of the order of 500 milliseconds. <br> The EQ_POLLED equipment type is mainly used for data acquisition based on a hardware condition becoming TRUE, at which time the [[Equipment List Parameters#Readout Routine|readout routine]] associated with the equipment is called. See  @ref FE_poll_event "example".





Revision as of 10:09, 1 November 2013

Links


Equipment Flags

The following equipment flags (of the form EQ_xxx) are supported in the Equipment Type field in the EQUIPMENT structure of a frontend. The selected flag determines the Equipment Type.

EQ_PERIODIC

Periodic Event Equipment Type
In this equipment Type, no hardware requirement is necessary to @ref FE_tab_event_trigger "trigger" the readout function. Instead, the readout routine associated with this equipment is called periodically.The Period field in the equipment declaration is used in this case to specify the time interval between calls to the readout function.

EQ_POLLED

Polling Event Equipment Type
In this equipment Type, the name of the routine performing the @ref FE_tab_event_trigger "trigger" check function is @ref FE_poll_event "poll_event()". This routine must be provided in the frontend.c by the user. As polling consists of checking a variable for a TRUE condition, if the loop count is infinite and the condition never becomes TRUE, the frontend would not be able to respond to any network commands. Therefore the loop count is determined when the frontend starts for the first time so that it returns after a given time-out if no event is available. This time-out is usually of the order of 500 milliseconds.
The EQ_POLLED equipment type is mainly used for data acquisition based on a hardware condition becoming TRUE, at which time the readout routine associated with the equipment is called. See @ref FE_poll_event "example".


EQ_INTERRUPT

Interrupt Event Equipment Type
This flag is similar to the EQ_POLLED mode, except a hardware interrupt is used to trigger the event rather than a polling loop. Instead of passing a pointer to the polling routine, in EQ_INTERRUPT mode a pointer to the interrupt configuration routine is passed to the system. Midas requires complete configuration and control of the interrupt source. This is provided by an interrupt configuration routine called @ref FE_interrupt_event "interrupt_configure()" that must be provided in the frontend code by the user. When a valid interrupt is received, the readout routine associated with the equipment is called.See @ref FE_interrupt_event "example".


EQ_MULTITHREAD

Multithread Event Readout Equipment Type
This flag implements the multi-threading capability within the frontend code. The polling isperformed within a separate thread and uses the@ref rbfunctionc "Midas Ring Buffer Functions" (rb_xxx) for inter-thread communication.EQ_MULTITHREAD is similar to @ref FE_tbl_EqPolled "EQ_POLLED" mode, except for the polling function which in the case of EQ_MULTITHREAD resides in a separate thread. This new type has been added to take advantage of the multi-core processor to free up CPU for tasks other than polling.


EQ_SLOW

Slow Control Event Equipment Type
This flag declares the equipment as a Slow Control Equipment. This will enable the call to the idle function part of the class driver. This flag also causes event data to be sent automatically to the /equipment/variables/ ODB tree.


EQ_MANUAL_TRIG

Manual triggered event Equipment Type
This flag enables the equipment to be @ref FE_Manual_trig_mode "triggered" by a remote procedure call (RPC). If EQ_MANUAL_TRIGGER is selected, the web interface will provide an extra button to trigger the equipment. The event may also be triggered by a client via RPC. @ref FE_manual_trigger "See example."


EQ_EB

Event Builder event Equipment Type
This flag identifies the equipment as a fragment event and should be ORed with EQ_POLLED in order to be identified by the Event Builder.


EQ_FRAGMENTED

Fragmented Event Equipment Type
Flag enabled large events (beyond the Midas configuration limit) to be handled by the system (see WARNING below). This flag required that a valid max_event_size_frag variable was defined in the user Frontend code. The max_event_size variable was used as fragment size in this case. This option was meant to be used in experiments where the event rate was not an issue but the size of the data needed to be extremely large. @ref FE_fragmented_event "See example."


WARNING
  • This flag is obsolescent (not maintained). It was added for small memory cpus (e.g VxWorks PPC) to send very large events (beyond the Midas configuration limit) back to the host computer.
  • With modern large-memory cpus (e.g. VMIC), instead of using this flag, the buffer sizes should be increased to accommodate a large event (see Event Buffer).
  • The fragmented event mechanism is not to be confused with "event fragments" used by the Event Builder.