void issueFollowup(TimeInternal *time, PtpClock *ptpClock) { TimeRepresentation preciseOriginTimestamp; ++ptpClock->last_general_event_sequence_number; fromInternalTime(time, &preciseOriginTimestamp, ptpClock->halfEpoch); msgPackFollowUp(ptpClock->msgObuf, ptpClock->last_sync_event_sequence_number, &preciseOriginTimestamp, ptpClock); if(!netSendGeneral(ptpClock->msgObuf, FOLLOW_UP_PACKET_LENGTH, ptpClock)) toState(PTP_FAULTY, ptpClock); else DBGV("sent followup message\n"); }
/*Pack and send on general multicast ip adress a FollowUp message*/ void issueFollowup(TimeInternal *time,RunTimeOpts *rtOpts,PtpClock *ptpClock) { Timestamp preciseOriginTimestamp; fromInternalTime(time,&preciseOriginTimestamp); msgPackFollowUp(ptpClock->msgObuf,&preciseOriginTimestamp,ptpClock); if (!netSendGeneral(ptpClock->msgObuf,FOLLOW_UP_LENGTH, &ptpClock->netPath, 0)) { toState(PTP_FAULTY,rtOpts,ptpClock); DBGV("FollowUp message can't be sent -> FAULTY state \n"); } else { DBGV("FollowUp MSG sent ! \n"); } }
/*Pack and send on general multicast ip adress a FollowUp message*/ static void issueFollowup(PtpClock *ptpClock, const TimeInternal *time) { Timestamp preciseOriginTimestamp; fromInternalTime(time, &preciseOriginTimestamp); msgPackFollowUp(ptpClock, ptpClock->msgObuf, &preciseOriginTimestamp); if (!netSendGeneral(&ptpClock->netPath, ptpClock->msgObuf, FOLLOW_UP_LENGTH)) { ERROR("issueFollowup: can't sent\n"); toState(ptpClock, PTP_FAULTY); } else { DBGV("issueFollowup\n"); } }