SZSPTP ez430-RF2480 1.0

ZigBee Sensor Network with synchronized time and time-stamped measurements.
ptp_clock.h
Go to the documentation of this file.
1 /*
2  * ptp_clock.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_CLOCK_H
22 #define PTP_CLOCK_H
23 
24 /*
25  * ======== Includes ========
26  */
27 
28 #include "ptp_types.h"
29 #include "ptp_cfg.h"
30 #include "ptp_const.h"
31 #include "ptp_datasets.h"
32 
33 /*
34  * ======== Doxygen ========
35  */
36 
47 /*
48  * ======== Constants ========
49  */
50 
51 /*
52  * ======== Macros ========
53  */
54 
55 /*
56  * ======== Types ========
57  */
58 
65 typedef struct ptp_clock {
66 
67 #if (PTP_CLOCK_TYPE == PTP_CLOCK_TYPE_BOUNDARY) || (PTP_CLOCK_TYPE == PTP_CLOCK_TYPE_ORDINARY)
68  PTP_defaultDS defaultDS;
69  PTP_currentDS currentDS;
70  PTP_parentDS parentDS;
71  PTP_timePropertiesDS timePropertiesDS;
72 #if PTP_CLOCK_TYPE == PTP_CLOCK_TYPE_BOUNDARY
73  PTP_portDS portDS[PTP_NUMBERPORTS]; // one per port
74 #else
75  PTP_portDS portDS[1]; // there is only one port on ordinary clocks.
76 #endif
77 #elif PTP_CLOCK_TYPE == PTP_CLOCK_TYPE_TRANSPARENT
78  PTP_transparentClockDefaultDS transparentClockDefaultDS;
79  PTP_transparentClockPortDS transparentClockPortDS[PTP_NUMBERPORTS]; // one per port
80 #endif
81 
82 } ptp_clock;
83 
84 /*
85  * ======== Global Variables ========
86  */
87 
88 /*
89  * ======== Global Functions ========
90  */
91 
93 
98 #endif /* PTP_CLOCK_H */
void ptp_clock_initialize()
PTP clock initialization.
Definition: ptp_clock.c:64
PTP clock structure.
Definition: ptp_clock.h:65
#define PTP_NUMBERPORTS
Definition: ptp_cfg.h:100
struct ptp_clock ptp_clock
PTP clock structure.
PTP constants that should not need to be modified.
PTP data types specifications.
PTP configuration values to compile.
PTP datasets.