?? zl5011xcet.h
字號:
{
zl5011xBooleanE clockRecoveryEnable;
zl5011xBooleanE clockRecoveryInterruptEnable;
zl5011xCetAdaptiveFreqE adaptiveServiceFreq;
zl5011xCetStatusNotificationE clockStatusMode;
zl5011xBooleanE clockStatusHoldoverOnly;
zl5011xBooleanE diffModeTxEnable;
zl5011xBooleanE diffModeRxEnable;
Uint16T diffRxPortNum;
zl5011xBooleanE queueManageEnable;
Uint32T queueManagePeriodMs;
} zl5011xCetInitS;
zlStatusE zl5011xCetInitStructInit(zl5011xParamsS *zl5011xParams,
zl5011xCetInitS *par);
zlStatusE zl5011xCetInit(zl5011xParamsS *zl5011xParams,
zl5011xCetInitS *par);
/********************************/
typedef struct
{
Uint32T unused;
} zl5011xCetDeleteS;
zlStatusE zl5011xCetDelete(zl5011xParamsS *zl5011xParams,
zl5011xCetDeleteS *par);
zlStatusE zl5011xCetDeleteStructInit(zl5011xParamsS *zl5011xParams,
zl5011xCetDeleteS *par);
/********************************/
typedef struct
{
Uint8T stream;
zl5011xCetModeE recoveryMode;
zl5011xCetNetworkTypeE netType;
/* the payload sizes can be specified using either of the following variables. */
Uint32T bitsPerPacket;
Uint32T bytesPerPacket;
Uint32T framesPerPacket;
Uint32T ppmLimit;
zl5011xCetOscillatorTypeE oscillatorType;
/* parameters for the adaptive mode of clock recovery */
zl5011xWanRtpIncrementTypeE rtpIncrementMode;
/* when the following variable is set to ZL5011X_TRUE then the timestamp field
(if present) in the received packet will not be used */
zl5011xBooleanE enhancedNoTimestamp;
/* if the timestamp is present in the received packet, but is not being used
then this variable should be set to the increment step for each packet.
Note : that the timestamp field can be ignored during the packet classification
process, in which case the timestamp should be left as 0 */
Uint32T timestampIncrement;
/* parameters for the in band differential mode of clock recovery */
Uint32T inBandDiffRemoteFreqHz;
/* parameters for the out of band differential mode of clock recovery */
/* the IP destination address is diffTxIpDest[3].[2].[1].[0] */
Uint8T diffTxIpDest[4];
Uint16T diffTxPortNum;
Uint8T diffRemoteStreamNum;
zl5011xParamsS *diffRemoteZl5011xParams;
/* how often should the data packet be sent - 1 for every interrupt,
2 for every other and so on. */
Uint16T diffPacketRate;
/* for adaptive mode, the hardware filtering is automatically selected to
give the required time response. However, depending on the packet delays
it may be beneficial to apply the maximum hardware filtering */
zl5011xBooleanE forceMaxAverage;
/* setting allows late packets to be ignored for the clock recovery calculation */
zl5011xBooleanE ignoreLatePackets;
/* if the following variable is set to ZL5011X_FALSE then stream frequency
will be initialise to 0ppm upon starting clock recovery. Set to ZL5011X_TRUE
to start clock recovery from the current clock offset */
zl5011xBooleanE resumeLock;
/* for internal use ONLY */
Uint32T enhancedLimitsScalePercent;
/* Setting the following to ZL5011X_FALSE prevents the zl5011xCetSetMode function
from locking the device prior to access. In this case the locking must be
done at the callers level */
zl5011xBooleanE deviceOsExclusion;
} zl5011xCetSetModeS;
zlStatusE zl5011xCetSetModeStructInit(zl5011xParamsS *zl5011xParams,
zl5011xCetSetModeS *par);
zlStatusE zl5011xCetSetMode(zl5011xParamsS *zl5011xParams,
zl5011xCetSetModeS *par);
/********************************/
typedef struct
{
Uint8T stream;
zl5011xCetNetworkTypeE netType;
/* the payload sizes can be specified using either of the following variables. */
Uint32T bitsPerPacket;
Uint32T bytesPerPacket;
Uint32T framesPerPacket;
/* if the timestamp is present in the received packet, but is not being used
then this variable should be set to the increment step for each packet.
Note : that the timestamp field can be ignored during the packet classification
process, in which case the timestamp should be left as 0 */
Uint32T timestampIncrement;
} zl5011xCetModeReconfigS;
zlStatusE zl5011xCetModeReconfigStructInit(zl5011xParamsS *zl5011xParams,
zl5011xCetModeReconfigS *par);
zlStatusE zl5011xCetModeReconfig(zl5011xParamsS *zl5011xParams,
zl5011xCetModeReconfigS *par);
/********************************/
typedef struct
{
Uint32T context;
zl5011xCetQueueModeE mode;
Uint32T resetPktDepth;
} zl5011xCetQueueSetModeS;
zlStatusE zl5011xCetQueueSetModeStructInit(zl5011xParamsS *zl5011xParams,
zl5011xCetQueueSetModeS *par);
zlStatusE zl5011xCetQueueSetMode(zl5011xParamsS *zl5011xParams,
zl5011xCetQueueSetModeS *par);
/********************************/
typedef struct
{
Uint8T stream;
zl5011xBooleanE enable;
} zl5011xCetSetClockModS;
zlStatusE zl5011xCetSetClockModStructInit(zl5011xParamsS *zl5011xParams,
zl5011xCetSetClockModS *par);
zlStatusE zl5011xCetSetClockMod(zl5011xParamsS *zl5011xParams,
zl5011xCetSetClockModS *par);
/********************************/
typedef struct
{
/* set a clock management period of 0ms to disable */
Uint32T clockManagePeriodMs;
Uint32T maxOffsetPpm;
} zl5011xCetConfigClockModS;
zlStatusE zl5011xCetConfigClockModStructInit(zl5011xParamsS *zl5011xParams,
zl5011xCetConfigClockModS *par);
zlStatusE zl5011xCetConfigClockMod(zl5011xParamsS *zl5011xParams,
zl5011xCetConfigClockModS *par);
/********************************/
typedef struct
{
Uint8T stream;
zl5011xCetModeE mode;
zl5011xCetStatusE cetStatus;
Uint8T clockQuality;
} zl5011xCetGetStatusS;
zlStatusE zl5011xCetGetStatusStructInit(zl5011xParamsS *zl5011xParams, zl5011xCetGetStatusS *par);
zlStatusE zl5011xCetGetStatus(zl5011xParamsS *zl5011xParams, zl5011xCetGetStatusS *par);
/********************************/
typedef struct
{
Uint8T stream;
zl5011xBooleanE enable;
Uint32T delayMs[ZL5011X_CET_STATISTICS_NUM_BINS - 1];
} zl5011xCetSetStatisticsS;
zlStatusE zl5011xCetSetStatisticsStructInit(zl5011xParamsS *zl5011xParams, zl5011xCetSetStatisticsS *par);
zlStatusE zl5011xCetSetStatistics(zl5011xParamsS *zl5011xParams, zl5011xCetSetStatisticsS *par);
/********************************/
typedef struct
{
zl5011xBooleanE reset;
Uint32T delayRange;
Uint32T maxDelayRange;
Uint32T delayCountBins[ZL5011X_CET_STATISTICS_NUM_BINS];
Uint32T rejectedCount;
} zl5011xCetStatisticsS;
typedef struct
{
Uint8T stream;
zl5011xCetStatisticsS stats;
} zl5011xCetGetStatisticsS;
zlStatusE zl5011xCetGetStatisticsStructInit(zl5011xParamsS *zl5011xParams, zl5011xCetGetStatisticsS *par);
zlStatusE zl5011xCetGetStatistics(zl5011xParamsS *zl5011xParams, zl5011xCetGetStatisticsS *par);
/********************************/
typedef struct
{
Uint8T stream;
/* packet Tx statistics and flag to indicate if valid */
zl5011xBooleanE txValid;
Uint32T txPacketCount;
/* packet Rx statistics and flag to indicate if valid */
zl5011xBooleanE rxValid;
Uint32T rxPacketCount;
Uint32T rxLostPacketCount;
Uint32T rxSequenceNumber;
Uint32T rxFirstSequenceNumber;
} zl5011xCetGetPacketStatsS;
zlStatusE zl5011xCetGetPacketStatsStructInit(zl5011xParamsS *zl5011xParams, zl5011xCetGetPacketStatsS *par);
zlStatusE zl5011xCetGetPacketStats(zl5011xParamsS *zl5011xParams, zl5011xCetGetPacketStatsS *par);
/********************************/
typedef struct
{
zl5011xParamsS *zl5011xParams;
Uint8T stream;
/* notification type */
zl5011xCetStatusNotificationE statusType;
/* notification value - validity depends on type of status message */
zl5011xCetStatusE cetStatus;
Uint8T remoteFlags;
} zl5011xCetStatusMsgS;
typedef struct
{
Sint32T timeout;
zl5011xCetStatusMsgS msg;
} zl5011xCetReceiveStatusMsgS;
zlStatusE zl5011xCetReceiveStatusMsgStructInit(zl5011xCetReceiveStatusMsgS *par);
zlStatusE zl5011xCetReceiveStatusMsg(zl5011xCetReceiveStatusMsgS *par);
/***************** FUNCTION DECLARATIONS **********************************/
zlStatusE zl5011xGetCet(zl5011xBooleanE waitForever);
zlStatusE zl5011xReleaseCet(void);
/* function to handle reporting changes in the flags from the Master clock source */
zlStatusE zl5011xCetStatusFlagHandler(zl5011xParamsS *zl5011xParams, Uint32T stream, Uint32T flags);
zlStatusE zl5011xCetStatusStateHandler(zl5011xParamsS *zl5011xParams, Uint32T stream, zl5011xCetStatusE state);
/* function to return extended highest sequence number */
zlStatusE zl5011xCetHighestSeqNum(zl5011xParamsS *zl5011xParams, Uint32T streamNumber, Uint32T *seqNumber);
/* Accessor functions for internal adaptive Cet parameters */
zlStatusE zl5011xCetGetHoldoverLimit(zl5011xCetNetworkTypeE networkType, Uint32T *pHoldoverLimit);
zlStatusE zl5011xCetSetHoldoverLimit(zl5011xCetNetworkTypeE networkType, Uint32T holdoverLimit);
zlStatusE zl5011xCetAdjustPpmLimit(zl5011xParamsS *zl5011xParams, Uint8T stream, Uint32T ppmLimit);
void zl5011xCetEnhCtrlDataCollection(zl5011xBooleanE forceTaskUse, Uint32T intFreqHz);
/* debug function - prints clock recovery status */
zlStatusE zl5011xDebugCetStatus(zl5011xParamsS *zl5011xParams);
#ifdef __cplusplus
}
#endif
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -