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