
DCN Next Generation Open Interface Release 2.4 Config Install and Database
en | 75
Bosch Communications Systems | 2007 February | SRS_SCSIINF | Du010934
APPENDIX C. EXAMPLES
In the examples below the remote functions and update notifications, that are defined in this
document as constant values for the wFnId parameter of the message (see [SRS_INF]), are
presented as functions described in a ‘C’ syntax. The parameter structures of these functions
are according the input, output or notify structures described in the appropriate section.
For every function is assumed that the function will create his structure, transport the
parameters to the CCU and waits for the result information coming from the CCU.
For both the remote functions as the update notifications the same names are used as their
identifier, but without the constant mark “C” and using mixed case names. So, e.g. remote
function SC_C_CONNECT_UNIT shall be referenced as function as:
SC_Connect_Unit (SC_T_UNIT_DATA tUnitData);
C.1. Assigning seats using global installation
This example shows how the remote controller can assign his seats to the unit-numbers
present in the conference hall.
Assumed is that the conference hall has a number of seats numbered starting with 1. For this
proposed installation one person must walk through the conference hall and press one of the
soft-keys on the units in order of the seats (starting with seat 1). On each unit a soft-key is
only pressed once.
For this seat assignment the global installation mode of the CCU will be used. therefore we
start with activating that mode.
error = SI_Start_Install (SI_C_GLOBAL_INSTALL_MODE);
if (error != SI_E_NOERROR)
{
/* do error handling */
}
After this function the CCU is in global installation mode, all displays are off and no
applications are running.
We now initialize the current seat and unit-number, assuming seatnumbers are chosen to be
purely numeric:
wCurrentSeatNumber = 1;
The system is now ready to accept the key-presses on the units in order of the seats. When a
soft-key is pressed the CCU sends a notification. During the processing of that function we
select the unit where the key is pressed, and assign the current seat number to the provided
unit number.
This result in the following function:
void SI_Register_Unit (SI_T_UNIT_STRUCT *tUnitStruct)
{
/* First turn off the previous selected unit */
/* ........ */
error = SI_Select_Unit (tUnitStruct->wUnitId, TRUE);
if (error != SI_E_NOERROR)
{
/* do error handling */
}
/* assign the current seat to the unit */
MyAssignSeat (wCurrentSeatNumber, tUnitStruct->wUnitId);
/* Increment to the next seat */
wCurrentSeatNumber = wCurrentSeatNumber + 1;
/* and save the unitId to turn off during the assignment of the next seat
*/
/* ........ */
}
Commenti su questo manuale