BIAZI.ENG.BR
SZSPTP ez430-RF2480
1.0
ZigBee Sensor Network with synchronized time and time-stamped measurements.
<<
Programming
Electronics
Contact
License/Rights
>>
Main Page
Related Pages
Modules
Classes
Files
License
File List
File Members
ptp.h
Go to the documentation of this file.
1
/*
2
* ptp.h
3
*
4
* Date: 19/06/2014
5
* Author: Fernando Biazi Nascimento
6
* Copyright © 2014 Fernando Biazi Nascimento. All rights reserved.
7
*
8
* License of use and copy on file license.txt
9
*
10
*/
11
21
#ifndef PTP_H
22
#define PTP_H
23
24
/*
25
* ======== Includes ========
26
*/
27
28
#include <xdc/std.h>
29
#include "
ptp_types.h
"
30
#include "
ptp_clock.h
"
31
32
/*
33
* ======== Doxygen ========
34
*/
41
/*
42
* ======== Constants ========
43
*/
44
45
/*
46
* ======== Macros ========
47
*/
48
49
/*
50
* ======== Types ========
51
*/
52
53
/*
54
* ======== Global Variables ========
55
*/
56
57
extern
ptp_clock
ptpClock;
58
extern
ptp_uinteger64
ptp_meanPathDelay[
PTP_NUMBERPORTS
];
59
extern
PTP_foreignMasterDS
ptp_foreignMaster[
PTP_NUMBERPORTS
][1];
60
61
extern
ptp_integer64
ptp_lastAdjust;
62
extern
ptp_uinteger64
ptp_meanDelayAtLastAdjust;
63
extern
PTP_TimeStamp
ptp_lastAdjustTime;
64
65
/*
66
* ======== Global Functions ========
67
*/
68
69
void
ptp_init
();
70
void
ptp_initEnd
();
71
UInt16
ptp_process
();
72
UInt16
ptp_processPDelayReq
();
73
74
void
ptp_rcvmessage
(
ptp_octet
*pBuf,
ptp_uinteger8
portNumber,
75
ptp_uinteger16
size);
76
77
void
ptp_setNetTime
(
PTP_TimeStamp
*time,
ptp_uinteger8
clockClass,
78
ptp_clockAccuracy
clockAccuracy,
ptp_timeSource
timeSource);
79
void
ptp_setTickTime
(
ptp_uinteger32
*newTickSize);
80
void
ptp_adjNetTime
(
ptp_integer64
*timeAdjust);
81
86
#endif
/* PTP_H */
PTP_foreignMasterDS
Definition:
ptp_datasets.h:197
ptp_clock
PTP clock structure.
Definition:
ptp_clock.h:65
ptp_process
UInt16 ptp_process()
PTP process.
Definition:
ptp.c:145
ptp_uinteger64
unsigned long long ptp_uinteger64
Definition:
ptp_types.h:125
ptp_init
void ptp_init()
PTP initialization.
Definition:
ptp.c:95
ptp_initEnd
void ptp_initEnd()
PTP initialization completion.
Definition:
ptp.c:128
ptp_integer64
long long ptp_integer64
Definition:
ptp_types.h:120
ptp_uinteger32
unsigned long ptp_uinteger32
Definition:
ptp_types.h:110
ptp_timeSource
ptp_timeSource
Definition:
ptp_types.h:244
ptp_processPDelayReq
UInt16 ptp_processPDelayReq()
Process PDelayReq.
Definition:
ptp.c:241
PTP_TimeStamp
Definition:
ptp_types.h:343
PTP_NUMBERPORTS
#define PTP_NUMBERPORTS
Definition:
ptp_cfg.h:100
ptp_uinteger8
unsigned char ptp_uinteger8
Definition:
ptp_types.h:90
ptp_clockAccuracy
ptp_clockAccuracy
Definition:
ptp_types.h:170
ptp_adjNetTime
void ptp_adjNetTime(ptp_integer64 *timeAdjust)
Adjust net time.
Definition:
ptp.c:363
ptp_setNetTime
void ptp_setNetTime(PTP_TimeStamp *time, ptp_uinteger8 clockClass, ptp_clockAccuracy clockAccuracy, ptp_timeSource timeSource)
Set net time.
Definition:
ptp.c:328
ptp_octet
char ptp_octet
Definition:
ptp_types.h:137
ptp_rcvmessage
void ptp_rcvmessage(ptp_octet *pBuf, ptp_uinteger8 portNumber, ptp_uinteger16 size)
Receive message.
Definition:
ptp.c:257
ptp_setTickTime
void ptp_setTickTime(ptp_uinteger32 *newTickSize)
Set tick time.
Definition:
ptp.c:349
ptp_types.h
PTP data types specifications.
ptp_clock.h
PTP clock object for synchronization.
ptp_uinteger16
unsigned short ptp_uinteger16
Definition:
ptp_types.h:100
Local:
Root
/
UPM
/
Master Tesis
/
SZS, PTP and Program
/
ptp.h