- The following code sample illustrates how to build a structure containing PCS information, prior to sending it:
void build_facility_with_pcs(char *buffer, int *len)
{
struct acu_facility *p_data;
/* for simplicity lets use a string, we could also have used non-printable
characters here and use memcpy instead of strcpy */
char pcs_string[] = "pcs_string";
p_data = (struct acu_facility *)buffer;
memset(p_data, OFF, ISDN_BUFFER_DATA_LGTH);
Acu_facility_code = ACU_FAC_PCS_USER_ONLY;
Acu_facility_action = ACU_RQ_ACTIVATE;
Acu_facility_pcs_user_protocol = ACUPCS_USER_TRANSGROUP;
strcpy(Acu_facility_a_pcs_user,pcs_string);
Acu_facility_pcs_user_size = strlen(pcs_string);
*len = Acu_facility_total_size;
return;
}