The method SubscribeEventsListener allows you to subscribe your implementation to the targets handler. This has the effect that every time one of the events contained in the interface IF_TargetsHandlerEventsListener occurs, the targets handler calls the related method by passing a specific set of information.
Using the method SubscribeEventsListener is optional. It has no effect on the basic functions of the targets handler.
For further information, refer to the library interface IF_TargetsHandlerEventsListener that contains a list of methods that are linked to events that occur during operation of the targets handler (for example, a new target is added to the list, a target is removed).
Input |
Data type |
Description |
---|---|---|
i_ifTargetsHandlerEventsListener |
IF_TargetsHandlerEventsListener |
An interface containing a list of methods related to events occurring during a regular use of a targets handler function block. |
Output |
Data type |
Description |
---|---|---|
q_etDiag |
General library-independent statement on the diagnostic. A value unequal to GD.ET_Diag.Ok corresponds to a diagnostic message. |
|
q_etDiagExt |
ET_DiagExt |
POU-specific output on the diagnostic. q_etDiag = ET_Diag.Ok -> Status message q_etDiag <> ET_Diag.Ok -> Diagnostic message |
q_sMsg |
STRING[80] |
Event-triggered message that gives more detailed information on the diagnostic state. |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
Ok |
Ok |
0 |
Ok |
ExecutionAborted |
AlreadyConfigured |
100 |
The function block is already configured. |
ExecutionAborted |
MaxNumberOfEventsListenersExceeded |
107 |
The number of subscribed events listener is greater than the maximum allowed. |
InputParameterInvalid |
InterfaceInvalid |
122 |
A provided interface is invalid. |
Enumeration name: |
AlreadyConfigured |
Enumeration value: |
100 |
Description: |
The function block is already configured. |
Issue |
Cause |
Solution |
---|---|---|
The event listener has not been subscribed. |
It was not possible to subscribe an event listener because the function block has already been configured. |
Ensure that the method SubscribeEventsListener method is called before a successful call of the Configuration method. |
Enumeration name: |
InterfaceInvalid |
Enumeration value: |
122 |
Description: |
A provided interface is invalid. |
Issue |
Cause |
Solution |
---|---|---|
The event listener has not been subscribed. |
i_ifTargetsHandlerEventsListener contains a null interface. |
Provide a valid implementation of the interface IF_TargetsHandlerEventsListener. |
Enumeration name: |
MaxNumberOfEventsListenersExceeded |
Enumeration value: |
107 |
Description: |
The number of subscribed events listener is greater than the maximum allowed. |
Issue |
Cause |
Solution |
---|---|---|
The event listener has not been subscribed. |
The targets handler already contains the maximum allowed number of event listeners. |
Ensure that a maximum of Gc_uiMaxNumberOfEventsListeners event listeners is subscribed. |