# Interface-Buffer

The main class of the generated interface is called “Interface-Buffer”. This class is responsible to handle the data, actions and events from both sides and provide them to the other side.

The Interface-Buffer class contains the following methods:

#### Init

Initializes the Interface-Buffer.

<table border="1" id="bkmrk-property-name-descri-21" style="border-collapse: collapse; width: 97.284%;"><colgroup><col style="width: 25.413%;"></col><col style="width: 16.5149%;"></col><col style="width: 58.0722%;"></col></colgroup><tbody><tr><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Argument Name**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Type**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Description**</span></td></tr><tr><td>**dataModel** </td><td>DataModel</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">The generated Data-Model. Used to initialize data-values of the Interface-Buffer</span></td></tr><tr><td>**defaultActionQueueSize**</td><td>FeatStd::UInt32</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Size of the Action-Queue in bytes. The action queue is used to store actions for later execution. By pre-initializing it with a proper size, costly runtime memory allocations can be avoided.</span></td></tr><tr><td>**defaultEventQueueSize**</td><td>FeatStd::UInt32</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Size of the Event-Queue in bytes. The event queue is used to store event for later handling. By pre-initializing it with a proper size, costly runtime memory allocations can be avoided.</span></td></tr></tbody></table>

#### SetDataValue

Sets data values of the Interface-Buffer. This method is intended to be called by the external system to send data to the CGI application.

<table border="1" id="bkmrk-argument-name-type-d" style="border-collapse: collapse; width: 97.4074%;"><colgroup><col style="width: 21.8274%;"></col><col style="width: 25.7617%;"></col><col style="width: 52.4108%;"></col></colgroup><tbody><tr><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Argument Name**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Type**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Description**</span></td></tr><tr><td>**interfaceId** </td><td>InputInterfaceId::Enum</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Id of the interface to set the value.</span></td></tr><tr><td>**data**</td><td>void\*</td><td>Pointer to the data to be set.</td></tr><tr><td>**dataSize**</td><td>FeatStd::UInt32</td><td>Size of the data to be shared in bytes.

This value will be ignored for static sized data unless INTERFACE\_DEBUG\_SIZECHECK\_ENABLED is defined.

</td></tr></tbody></table>

**Result:** True if setting the data-value is successful. False otherwise.

#### GetDataValue

Gets data values of the Interface-Buffer. This method is intended to be called by the external system to send data to the CGI application.

<table border="1" id="bkmrk-argument-name-type-d-1" style="border-collapse: collapse; width: 97.284%;"><colgroup><col style="width: 21.9822%;"></col><col style="width: 25.5384%;"></col><col style="width: 52.4794%;"></col></colgroup><tbody><tr><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Argument Name**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Type**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Description**</span></td></tr><tr><td>**interfaceId** </td><td>OutputInterfaceId::Enum</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Id of the interface to get the value.</span></td></tr><tr><td>**target**</td><td>void\*</td><td>Pointer where the value should be written.</td></tr><tr><td>**maxTargetSize**</td><td>FeatStd::UInt32</td><td>Maximum size of in bytes that the ‘target’ can store.

This value will be ignored for static sized data unless INTERFACE\_DEBUG\_SIZECHECK\_ENABLED is defined.

</td></tr><tr><td>**dataSize**</td><td>FeatStd::UInt32\*</td><td>Actual size of the data to be written.

</td></tr></tbody></table>

**Result:** True if getting the data-value is successful. False otherwise. If the return value is false and the dataSize &gt; maxTargetSize the cause for the failure was that not enough memory was available to store the output value.

#### TriggerAction

Triggers the specified action.

<table border="1" id="bkmrk-argument-name-type-d-2" style="border-collapse: collapse; width: 97.284%;"><colgroup><col style="width: 24.0398%;"></col><col style="width: 29.5875%;"></col><col style="width: 46.3727%;"></col></colgroup><tbody><tr><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Argument Name**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Type**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Description**</span></td></tr><tr><td>**interfaceId** </td><td>InputInterfaceId::Enum</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Id of the action to trigger.</span></td></tr><tr><td>**data**</td><td>void\*</td><td>Pointer to data needed for the action.</td></tr><tr><td>**dataSize**</td><td>FeatStd::UInt32</td><td>Actual size of the data to be written.

This value will be ignored for static sized data unless INTERFACE\_DEBUG\_SIZECHECK\_ENABLED is defined.

</td></tr></tbody></table>

**Result:** True if getting action was successfully triggered. False otherwise.

#### SwapActionQueue

Swaps the action queue.

#### ProcessEvents

Gets events of the Interface-Buffer. This method is intended to be called by the external system to send data to the CGI application.

<table border="1" id="bkmrk-argument-name-type-d-3" style="border-collapse: collapse; width: 97.5309%;"><colgroup><col style="width: 21.7997%;"></col><col style="width: 22.3107%;"></col><col style="width: 55.8895%;"></col></colgroup><tbody><tr><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Argument Name**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Type**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Description**</span></td></tr><tr><td>**eventHandler** </td><td>Internal::EventHandler\*</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Pointer to the Event-Handler object. This will be called for every event in the queue.</span></td></tr><tr><td>**maxCount**</td><td>FeatStd::Int32</td><td>Maximum count of events to handle. Use ‘-1’ for unlimited amount.</td></tr></tbody></table>

The Event-Callback function must have the following arguments:

<table border="1" id="bkmrk-argument-name-type-d-4" style="border-collapse: collapse; width: 86.9136%;"><colgroup><col style="width: 24.6088%;"></col><col style="width: 28.4398%;"></col><col style="width: 46.9514%;"></col></colgroup><tbody><tr><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Argument Name**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Type**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Description**</span></td></tr><tr><td>**interfaceId** </td><td>FeatStd::UInt32</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Id of the event</span></td></tr><tr><td>**data**</td><td>void\*</td><td>Pointer to the event data if available.</td></tr><tr><td>**dataSize**</td><td>FeatStd::UInt32</td><td>Size of the event data if available.</td></tr></tbody></table>

#### ProcessInputDataValues

Synchronizes the Interface-Buffer input data values with the applications Data-Model. This method is intended to be called by the CGI application.

<table border="1" id="bkmrk-argument-name-type-d-5" style="border-collapse: collapse; width: 86.9136%;"><colgroup><col style="width: 24.7511%;"></col><col style="width: 28.7237%;"></col><col style="width: 46.5252%;"></col></colgroup><tbody><tr><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Argument Name**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Type**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Description**</span></td></tr><tr><td>**dataModel** </td><td>DataModel\*</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">The generated Data-Model.</span></td></tr></tbody></table>

#### ProcessOutputDataValues

Synchronizes the Interface-Buffer output data values with the applications Data-Model. This method is intended to be called by the CGI application.

<table border="1" id="bkmrk-argument-name-type-d-6" style="border-collapse: collapse; width: 86.9136%;"><colgroup><col style="width: 24.4666%;"></col><col style="width: 29.0082%;"></col><col style="width: 46.5252%;"></col></colgroup><tbody><tr><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Argument Name**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Type**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Description**</span></td></tr><tr><td>**dataModel** </td><td>DataModel\*</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">The generated Data-Model.</span></td></tr></tbody></table>

#### ProcessActions

Executes all queued actions. This method is intended to be called by the CGI application.

<table border="1" id="bkmrk-argument-name-type-d-7" style="border-collapse: collapse; width: 86.9136%;"><colgroup><col style="width: 24.1821%;"></col><col style="width: 29.2927%;"></col><col style="width: 46.5252%;"></col></colgroup><tbody><tr><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Argument Name**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Type**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Description**</span></td></tr><tr><td>**actionContext** </td><td>Action::ActionContext</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Action-Context used to execute the action functions and basic actions (e.g. Message-Actions)</span></td></tr><tr><td>**sceneContext**</td><td>Scene::SceneContext</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Scene-Context used to execute the scene related actions (e.g. Scene-Interface or Scene-Table Interface)</span></td></tr><tr><td>**maxCount**</td><td>FeatStd::Int32</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Maximum count of actions to handle. Use ‘-1’ for unlimited amount.</span></td></tr></tbody></table>

#### TriggerGenericEvent

Raises a generic event. This method is intended to be called by the CGI application.

<table border="1" id="bkmrk-argument-name-type-d-8" style="border-collapse: collapse; width: 86.9136%;"><colgroup><col style="width: 24.4666%;"></col><col style="width: 28.8661%;"></col><col style="width: 46.6673%;"></col></colgroup><tbody><tr><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Argument Name**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Type**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Description**</span></td></tr><tr><td>**interfaceId** </td><td>OutputInterfaceId::Enum</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Id of the event to raise.</span></td></tr><tr><td>**data**</td><td>void\*</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Pointer to the data of the event if available.</span></td></tr><tr><td>**dataSize**</td><td>FeatStd::UInt32</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Size of the event data if available.</span></td></tr></tbody></table>

**Result:** True if an event was raised (considering additional conditions). False otherwise.

#### TriggerMessageEvent

Raises a message event. This method is intended to be called by the CGI application.

<table border="1" id="bkmrk-argument-name-type-d-9" style="border-collapse: collapse; width: 86.9136%;"><colgroup><col style="width: 24.4666%;"></col><col style="width: 29.0082%;"></col><col style="width: 46.5252%;"></col></colgroup><tbody><tr><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Argument Name**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Type**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Description**</span></td></tr><tr><td>**message** </td><td>Courier::Message\*</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Message to check if an event is to be raised.</span></td></tr></tbody></table>

**Result:** True if an event was raised (considering additional conditions). False otherwise.

#### TriggerFunctionCallEvents

Raises Function-Call events. This method is intended to be called by the CGI application.

<table border="1" id="bkmrk-argument-name-type-d-10" style="border-collapse: collapse; width: 86.9136%;"><colgroup><col style="width: 24.3243%;"></col><col style="width: 29.2925%;"></col><col style="width: 46.3832%;"></col></colgroup><tbody><tr><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Argument Name**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Type**</span></td><td class="align-center" style="background-color: rgb(230, 126, 35);"><span style="color: rgb(255, 255, 255);">**Description**</span></td></tr><tr><td>**actionContext** </td><td>Action::ActionContext\*</td><td><span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Action-Context used to call related Event-Functions.</span></td></tr></tbody></table>

**Result:** True if an event was raised (considering additional conditions). False otherwise.

#### SwapEventQueue

<span lang="EN-US" style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: 'Daytona',sans-serif; mso-fareast-font-family: 游明朝; mso-fareast-theme-font: minor-fareast; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: JA; mso-bidi-language: AR-SA;">Swaps the event queue.</span>

---