(Page 17 of 29 in this chapter) Version
typedef struct
{
DWORD localstream;
DWORD deviceid;
DWORD parameterid;
} SWI_LOCALSTREAM_ARGS;
void myPrintCarrierStatus(SWIHD swihd)
{
SWI_LOCALSTREAM_ARGS args;
struct carrier_status cs;
args.localstream = 0;
args.deviceid = MVIP95_T1_TRUNK_DEVICE;
args.parameterid = CARRIER_STATUS;
cs.trunk = 0;
swiGetLocalStreamInfo(swihd, &args, &cs, sizeof(cs));
printf("Event count: %d\n", cs.event_count);
printf("Device: %d\n", cs.device);
if (cs.red_alarm)
printf("** RED ALARM **\n");
if (cs.yellow_alarm)
printf("** YELLOW ALARM **\n");
if (cs.blue_alarm)
printf("** BLUE ALARM **\n");
switch (cs.sync)
{
case 0:
printf("Synchronized\n");
break;
case 1:
printf("Blue Alarm\n");
break;
case 2:
printf("Not Synchronized\n");
break;
case 3:
printf("Super frame not synchronized\n");
break;
}
}
(Page 17 of 29 in this chapter) Version