
DCN Next Generation Open Interface Release 2.4 Intercom
en | 274
Bosch Communications Systems | 2007 February | SRS_ICINF | Du110902
APPENDIX C. EXAMPLES
In the example 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 IC_C_SET_LINKS shall be referenced as function as:
IC_Set_Links (&tLinks);
Appendix C.1 Intercom without update notifications
This example shows the steps to be taken for controlling the IC application.
In this example, we will setup a link between some units. We will assume an operator has been
assigned.
WORD wError;
IC_T_LINKINFO_LIST tLinks;
/*
* Set up a bi-directional link between units 3 and 7 and a
* one-way link from unit 2 to unit 5.
*/
tLinks[0].wSourceId = 3; /* from unit 3 */
tLinks[0].wDestId = 7; /* to unit 7 */
tLinks[1].wSourceId = 7; /* from unit 7 */
tLinks[1].wDestId = 3; /* to unit 3 */
tLinks[2].wSourceId = 2;
tLinks[2].wDestId = 5;
/* End of list. */
tLinks[3].wSourceId = IC_C_UNASSIGNED_UNIT;
tLinks[3].wDestId = IC_C_UNASSIGNED_UNIT;
wError = IC_Set_links(&tLinks);
switch(wError)
{
case IC_E_NOERROR:
/* links are set */
break;
case IC_C_WRONG_PARAMETER:
/* do error handeling */
break;
default:
/* report error */
break;
}
When the handset of unit 3 is picked up, a call is made to unit 7. If unit 7 picks up the handset the
call will be established (and vice versa). When unit 5 picks up its handset, the operator will be
called, and not unit 2. On the other hand, when unit 2 starts a call, the call will be made to unit 5.
Kommentare zu diesen Handbüchern