SZSPTP ez430-RF2480 1.0

ZigBee Sensor Network with synchronized time and time-stamped measurements.
ptp.c File Reference

PTP implementation. More...

#include <msp430.h>
#include "ptp.h"
#include "ptp_util.h"
#include "ptp_messages.h"
#include "clock.h"
#include "uart.h"
+ Include dependency graph for ptp.c:

Go to the source code of this file.

Macros

#define PTP_FLAGRUNNING   0x01
 

Functions

void ptp_init ()
 PTP initialization. More...
 
void ptp_initEnd ()
 PTP initialization completion. More...
 
UInt16 ptp_process ()
 PTP process. More...
 
UInt16 ptp_processPDelayReq ()
 Process PDelayReq. More...
 
void ptp_rcvmessage (ptp_octet *pBuf, ptp_uinteger8 portNumber, ptp_uinteger16 size)
 Receive message. More...
 
void ptp_setNetTime (PTP_TimeStamp *time, ptp_uinteger8 clockClass, ptp_clockAccuracy clockAccuracy, ptp_timeSource timeSource)
 Set net time. More...
 
void ptp_setTickTime (ptp_uinteger32 *newTickSize)
 Set tick time. More...
 
void ptp_adjNetTime (ptp_integer64 *timeAdjust)
 Adjust net time. More...
 

Variables

ptp_clock ptpClock
 
ptp_uinteger64 ptp_meanPathDelay [PTP_NUMBERPORTS]
 
PTP_foreignMasterDS ptp_foreignMaster [PTP_NUMBERPORTS][1]
 
ptp_integer64 ptp_lastAdjust
 
ptp_uinteger64 ptp_meanDelayAtLastAdjust
 
PTP_TimeStamp ptp_lastAdjustTime
 
ptp_uinteger8 ptp_flags
 
ptp_uinteger8 ptp_tsTimeout
 

Detailed Description

PTP implementation.

Definition in file ptp.c.

Variable Documentation

ptp_uinteger8 ptp_flags

Flags to be used by PTP implementation

Definition at line 68 of file ptp.c.

Referenced by ptp_init(), ptp_process(), and ptp_setNetTime().

ptp_uinteger8 ptp_tsTimeout

Time source time out

Definition at line 72 of file ptp.c.

Referenced by ptp_adjNetTime(), ptp_init(), ptp_process(), and ptp_setNetTime().