Commit 13966f1c authored by Aurelio Colosimo's avatar Aurelio Colosimo

Defined Data Sets

parent c6b0180a
...@@ -44,7 +44,12 @@ typedef struct { ...@@ -44,7 +44,12 @@ typedef struct {
UInteger32 nanosecondsField; UInteger32 nanosecondsField;
} Timestamp; } Timestamp;
typedef Octet ClockIdentity[CLOCK_IDENTITY_LENGTH]; typedef struct {
Integer32 seconds;
Integer32 nanoseconds;
} TimeInternal;
typedef Octet *ClockIdentity; /*FIXME: allocate CLOCK_IDENTITY_LENGTH = 8 */
typedef struct { typedef struct {
ClockIdentity clockIdentity; ClockIdentity clockIdentity;
...@@ -166,4 +171,72 @@ typedef struct { ...@@ -166,4 +171,72 @@ typedef struct {
char* tlv; char* tlv;
} MsgManagement; } MsgManagement;
/* Default Data Set */
typedef struct {
/* Static */
Boolean twoStepFlag;
ClockIdentity clockIdentity;
UInteger16 numberPorts;
/* Dynamic */
ClockQuality clockQuality;
/* Configurable */
UInteger8 priority1;
UInteger8 priority2;
UInteger8 domainNumber;
Boolean slaveOnly;
} DSDefault;
/* Current Data Set */
typedef struct {
/* Dynamic */
UInteger16 stepsRemoved;
TimeInternal offsetFromMaster;
TimeInternal meanPathDelay;
} DSCurrent;
/* Parent Data Set */
typedef struct {
/* Dynamic */
PortIdentity parentPortIdentity;
Boolean parentStats;
UInteger16 observedParentOffsetScaledLogVariance;
Integer32 observedParentClockPhaseChangeRate;
ClockIdentity grandmasterIdentity;
ClockQuality grandmasterClockQuality;
UInteger8 grandmasterPriority1;
UInteger8 grandmasterPriority2;
} DSParent;
/* Port Data set */
typedef struct {
/* Static */
PortIdentity portIdentity;
/* Dynamic */
Enumeration8 portState;
Integer8 logMinDelayReqInterval;
TimeInternal peerMeanPathDelay;
/* Configurable */
Integer8 logAnnounceInterval;
UInteger8 announceReceiptTimeout;
Integer8 logSyncInterval;
Enumeration8 delayMechanism;
Integer8 logMinPdelayReqInterval;
UInteger4 versionNumber;
} DSPort;
/* Time Properties Data Set */
typedef struct {
/* Dynamic */
Integer16 currentUtcOffset;
Boolean currentUtcOffsetValid;
Boolean leap59;
Boolean leap61;
Boolean timeTraceable;
Boolean frequencyTraceable;
Boolean ptpTimescale;
Enumeration8 timeSource;
} DSTimeProperties;
#endif /*IEEE_1588_TYPES_H_*/ #endif /*IEEE_1588_TYPES_H_*/
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#include <stdint.h> #include <stdint.h>
#include <stdarg.h> #include <stdarg.h>
#include <arch/arch.h> /* ntohs and so on */ #include <arch/arch.h> /* ntohs and so on */
#include <pproto/ieee1588_types.h>
/* /*
* This is the struct handling runtime options. Default values can be * This is the struct handling runtime options. Default values can be
...@@ -61,6 +63,13 @@ struct pp_instance { ...@@ -61,6 +63,13 @@ struct pp_instance {
struct pp_channel ch; struct pp_channel ch;
struct pp_runtime_opts *rt_opts; struct pp_runtime_opts *rt_opts;
struct pp_clock *ppc; struct pp_clock *ppc;
/* Data sets */
DSDefault *defaultDS;
DSCurrent *currentDS;
DSParent *parentDS;
DSPort *portDS;
DSTimeProperties *timePropertiesDS;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment