Lines Matching full:up
101 palisade_start, /* start up driver */
302 struct palisade_unit *up; in palisade_start() local
342 up = emalloc_zero(sizeof(*up)); in palisade_start()
344 up->type = CLK_TYPE(peer); in palisade_start()
345 switch (up->type) { in palisade_start()
391 free(up); in palisade_start()
406 free(up); in palisade_start()
413 pp->unitptr = up; in palisade_start()
422 up->leap_status = 0; in palisade_start()
423 up->unit = (short) unit; in palisade_start()
424 up->rpt_status = TSIP_PARSED_EMPTY; in palisade_start()
425 up->rpt_cnt = 0; in palisade_start()
427 if (up->type == CLK_THUNDERBOLT) in palisade_start()
429 if (up->type == CLK_ACUTIME) in palisade_start()
431 if (up->type == CLK_RESOLUTION) in palisade_start()
447 struct palisade_unit *up; in palisade_shutdown() local
450 up = pp->unitptr; in palisade_shutdown()
453 if (NULL != up) in palisade_shutdown()
454 free(up); in palisade_shutdown()
549 struct palisade_unit *up; in TSIP_decode() local
553 up = pp->unitptr; in TSIP_decode()
561 if ((up->type != CLK_THUNDERBOLT) && in TSIP_decode()
562 (up->type != CLK_ACUTIME ) && in TSIP_decode()
563 (up->type != CLK_RESOLUTION ) && in TSIP_decode()
564 (up->type != CLK_ACE ) && in TSIP_decode()
565 (up->type != CLK_COPERNICUS ) ) in TSIP_decode()
567 if ((up->rpt_buf[0] == (char) 0x41) || in TSIP_decode()
568 (up->rpt_buf[0] == (char) 0x46) || in TSIP_decode()
569 (up->rpt_buf[0] == (char) 0x54) || in TSIP_decode()
570 (up->rpt_buf[0] == (char) 0x4B) || in TSIP_decode()
571 (up->rpt_buf[0] == (char) 0x6D)) { in TSIP_decode()
585 if ((u_char) up->rpt_buf[0] == (u_char) 0x8f) { in TSIP_decode()
598 if (up->polled <= 0) in TSIP_decode()
601 if (up->rpt_cnt != LENCODE_8F0B) /* check length */ in TSIP_decode()
613 up->unit, lat,lon,alt); in TSIP_decode()
615 up->unit); in TSIP_decode()
653 up->unit, mb(0) & 0xff, event, pp->hour, pp->minute, in TSIP_decode()
660 if (up->leap_status) { in TSIP_decode()
661 up->leap_status = 0; in TSIP_decode()
671 if (up->rpt_cnt != LENCODE_NTP) /* check length */ in TSIP_decode()
674 up->leap_status = mb(19); in TSIP_decode()
676 if (up->polled <= 0) in TSIP_decode()
689 up->polled = -1; in TSIP_decode()
697 up->month = (mmday >> 5); /* Save for LEAP check */ in TSIP_decode()
699 if ( (up->leap_status & PALISADE_LEAP_PENDING) && in TSIP_decode()
701 (6 == up->month || 12 == up->month) ) { in TSIP_decode()
702 if (up->leap_status & PALISADE_UTC_TIME) in TSIP_decode()
707 else if (up->leap_status) in TSIP_decode()
719 up->polled = -1; in TSIP_decode()
733 up->unit, mb(0) & 0xff, event, pp->hour, pp->minute, in TSIP_decode()
741 if (up->polled <= 0) in TSIP_decode()
744 if (up->rpt_cnt != LENCODE_8FAC)/* check length */ in TSIP_decode()
755 up->unit, lat,lon,alt); in TSIP_decode()
756 printf("TSIP_decode: unit %d\n", up->unit); in TSIP_decode()
761 (6 == up->month || 12 == up->month) ) in TSIP_decode()
769 up->unit, mb(0) & 0xff, pp->leap); in TSIP_decode()
791 printf(" POWER-UP\n"); in TSIP_decode()
808 if (up->rpt_cnt != LENCODE_8FAB) /* check length */ in TSIP_decode()
811 if (up->polled <= 0) in TSIP_decode()
830 up->polled = -1; in TSIP_decode()
879 up->unit, mb(0) & 0xff, event, pp->hour, pp->minute, pp->second, in TSIP_decode()
891 else if (up->rpt_buf[0] == (u_char)0x42) { in TSIP_decode()
895 else if (up->rpt_buf[0] == (u_char)0x43) { in TSIP_decode()
899 else if ((up->rpt_buf[0] == PACKET_41) & (up->type == CLK_THUNDERBOLT)){ in TSIP_decode()
903 else if ((up->rpt_buf[0] == PACKET_41A) & (up->type == CLK_ACUTIME)) { in TSIP_decode()
913 else if ((up->rpt_buf[0] == PACKET_41) && in TSIP_decode()
914 ((up->type == CLK_ACE) || (up->type == CLK_COPERNICUS))) { in TSIP_decode()
916 if ((debug > 1) && (up->type == CLK_ACE)) in TSIP_decode()
918 if ((debug > 1) && (up->type == CLK_COPERNICUS)) in TSIP_decode()
921 if (up->rpt_cnt != LENCODE_41) { /* check length */ in TSIP_decode()
923 up->polled = -1; in TSIP_decode()
926 up->unit, up->rpt_buf[0] & 0xff, up->rpt_cnt); in TSIP_decode()
930 if (up->polled <= 0) in TSIP_decode()
940 up->polled = -1; in TSIP_decode()
965 up->unit, mb(0) & 0xff, event, pp->hour, pp->minute, pp->second, in TSIP_decode()
974 else if ((up->rpt_buf[0] == PACKET_46) & (up->type == CLK_ACUTIME)) { in TSIP_decode()
1009 up->polled = -1; in TSIP_decode()
1030 else if ((up->rpt_buf[0] == PACKET_46) && (up->type == CLK_COPERNICUS)) { in TSIP_decode()
1064 up->polled = -1; in TSIP_decode()
1078 else if (((up->rpt_buf[0] == (char) 0x4A) || in TSIP_decode()
1079 (up->rpt_buf[0] == (char) 0x4B) || in TSIP_decode()
1080 (up->rpt_buf[0] == (char) 0x56) || in TSIP_decode()
1081 (up->rpt_buf[0] == (char) 0x5F) || in TSIP_decode()
1082 (up->rpt_buf[0] == (char) 0x6D) || in TSIP_decode()
1083 (up->rpt_buf[0] == (char) 0x82) || in TSIP_decode()
1084 (up->rpt_buf[0] == (char) 0x84)) && in TSIP_decode()
1085 ((up->type == CLK_ACE) || (up->type == CLK_COPERNICUS))) { in TSIP_decode()
1087 if ((debug > 1) && (up->type == CLK_ACE)) in TSIP_decode()
1088 printf("TSIP_decode: Packet 0x%2x seen in ACE III mode\n", (up->rpt_buf[0] & 0XFF)); in TSIP_decode()
1089 if ((debug > 1) && (up->type == CLK_COPERNICUS)) in TSIP_decode()
1090 printf("TSIP_decode: Packet 0x%2x seen in Copernicus II mode\n", (up->rpt_buf[0] & 0XFF)); in TSIP_decode()
1095 else if (up->rpt_buf[0] == 0x54) in TSIP_decode()
1098 else if (up->rpt_buf[0] == PACKET_6D) { in TSIP_decode()
1119 up->polled = -1; in TSIP_decode()
1122 up->unit, up->rpt_buf[0] & 0xff, mb(0) & 0xff, in TSIP_decode()
1123 event, up->rpt_cnt); in TSIP_decode()
1137 struct palisade_unit *up; in palisade_receive() local
1144 up = pp->unitptr; in palisade_receive()
1148 if (up->polled <= 0) in palisade_receive()
1151 up->polled = 0; /* Poll reply received */ in palisade_receive()
1157 up->unit, pp->year, pp->day, pp->hour, pp->minute, in palisade_receive()
1178 up->unit); in palisade_receive()
1188 up->unit, prettydate(&pp->lastrec)); in palisade_receive()
1205 struct palisade_unit *up; in palisade_poll() local
1209 up = pp->unitptr; in palisade_poll()
1212 if (up->polled > 0) /* last reply never arrived or error */ in palisade_poll()
1215 up->polled = 2; /* synchronous packet + 1 event */ in palisade_poll()
1227 if(up->type == CLK_PRAECIS) { in palisade_poll()
1253 struct palisade_unit *up; in praecis_parse() local
1254 up = pp->unitptr; in praecis_parse()
1272 up->unit); in praecis_parse()
1309 struct palisade_unit *up; in palisade_io() local
1317 up = pp->unitptr; in palisade_io()
1319 if(up->type == CLK_PRAECIS) { in palisade_io()
1332 switch (up->rpt_status) { in palisade_io()
1340 up->rpt_status = TSIP_PARSED_EMPTY; in palisade_io()
1344 up->rpt_status = TSIP_PARSED_DATA; in palisade_io()
1346 up->rpt_buf[0] = *c; in palisade_io()
1353 up->rpt_status = TSIP_PARSED_DLE_2; in palisade_io()
1355 mb(up->rpt_cnt++) = *c; in palisade_io()
1360 up->rpt_status = TSIP_PARSED_DATA; in palisade_io()
1361 mb(up->rpt_cnt++) = in palisade_io()
1365 up->rpt_status = TSIP_PARSED_FULL; in palisade_io()
1368 up->rpt_status = TSIP_PARSED_DLE_1; in palisade_io()
1369 up->rpt_buf[0] = *c; in palisade_io()
1377 up->rpt_status = TSIP_PARSED_EMPTY; in palisade_io()
1379 up->rpt_status = TSIP_PARSED_DLE_1; in palisade_io()
1385 if (up->rpt_status == TSIP_PARSED_DLE_1) { in palisade_io()
1386 up->rpt_cnt = 0; in palisade_io()
1391 else if (up->rpt_status == TSIP_PARSED_EMPTY) in palisade_io()
1392 up->rpt_cnt = 0; in palisade_io()
1394 else if (up->rpt_cnt > BMAX) in palisade_io()
1395 up->rpt_status =TSIP_PARSED_EMPTY; in palisade_io()
1397 if (up->rpt_status == TSIP_PARSED_FULL) in palisade_io()
1416 struct palisade_unit *up; in HW_poll() local
1419 up = pp->unitptr; in HW_poll()
1421 if (up->type == CLK_ACE) { in HW_poll()
1433 up->unit)); in HW_poll()
1435 up->unit); in HW_poll()
1442 if (up->type == CLK_ACUTIME) in HW_poll()
1446 up->unit); in HW_poll()
1451 printf("Palisade HW_poll: unit %d: SET \n", up->unit); in HW_poll()
1455 up->unit); in HW_poll()
1461 } /* (up->type != CLK_ACE) */ in HW_poll()
1466 if (up->type != CLK_ACE) { in HW_poll()
1470 printf("Palisade HW_poll: unit %d: UNSET \n", up->unit); in HW_poll()
1474 up->unit); in HW_poll()