Documentation ¶
Index ¶
- Constants
- Variables
- type DependingStates
- type DpllConfig
- func (d *DpllConfig) CmdInit()
- func (d *DpllConfig) CmdRun(stdToSocket bool)
- func (d *DpllConfig) CmdStop()
- func (d *DpllConfig) DependsOn() []event.EventSource
- func (d *DpllConfig) ExitCh() chan struct{}
- func (d *DpllConfig) FrequencyStatus() int64
- func (d *DpllConfig) InSpec() bool
- func (d *DpllConfig) MonitorDpll()
- func (d *DpllConfig) MonitorDpllMock()
- func (d *DpllConfig) MonitorDpllNetlink()
- func (d *DpllConfig) MonitorDpllSysfs()
- func (d *DpllConfig) MonitorProcess(processCfg config.ProcessConfig)
- func (d *DpllConfig) Name() string
- func (d *DpllConfig) PhaseOffset() int64
- func (d *DpllConfig) PhaseOffsetPin(pin *nl.DoPinGetReply) bool
- func (d *DpllConfig) PhaseStatus() int64
- func (d *DpllConfig) SetDependsOn(dependsOn []event.EventSource)
- func (d *DpllConfig) SetPhaseOffset(phaseOffset int64)
- func (d *DpllConfig) SetSourceLost(sourceLost bool)
- func (d *DpllConfig) Slope() float64
- func (d *DpllConfig) SourceLost() bool
- func (d *DpllConfig) State() event.PTPState
- func (d *DpllConfig) Stopped() bool
- func (d *DpllConfig) Timer() int64
- type DpllSubscriber
Constants ¶
const ( DPLL_UNKNOWN = -1 DPLL_INVALID = 0 DPLL_FREERUN = 1 DPLL_LOCKED = 2 DPLL_LOCKED_HO_ACQ = 3 DPLL_HOLDOVER = 4 LocalMaxHoldoverOffSet = 1500 //ns LocalHoldoverTimeout = 14400 //secs MaxInSpecOffset = 100 //ns LocalMaxHoldoverOffSetStr = "LocalMaxHoldoverOffSet" LocalHoldoverTimeoutStr = "LocalHoldoverTimeout" MaxInSpecOffsetStr = "MaxInSpecOffset" ClockIdStr = "clockId" FaultyPhaseOffset = 99999999999 )
const ( SYSFS dpllApiType = "sysfs" NETLINK dpllApiType = "netlink" MOCK dpllApiType = "mock" NONE dpllApiType = "none" )
Variables ¶
var MockDpllReplies chan *nl.DoDeviceGetReply
Functions ¶
This section is empty.
Types ¶
type DependingStates ¶
func (*DependingStates) GetCurrentState ¶
func (d *DependingStates) GetCurrentState() event.PTPState
GetCurrentState ... get current state
func (*DependingStates) UpdateState ¶
func (d *DependingStates) UpdateState(source event.EventSource)
type DpllConfig ¶
type DpllConfig struct { LocalMaxHoldoverOffSet uint64 LocalHoldoverTimeout uint64 MaxInSpecOffset uint64 sync.Mutex // contains filtered or unexported fields }
DpllConfig ... DPLL configuration
func NewDpll ¶
func NewDpll(clockId uint64, localMaxHoldoverOffSet, localHoldoverTimeout, maxInSpecOffset uint64, iface string, dependsOn []event.EventSource, apiType dpllApiType, phaseOffsetPinFilter map[string]map[string]string) *DpllConfig
NewDpll ... create new DPLL process
func (*DpllConfig) DependsOn ¶
func (d *DpllConfig) DependsOn() []event.EventSource
DependsOn ... depends on other events
func (*DpllConfig) FrequencyStatus ¶
func (d *DpllConfig) FrequencyStatus() int64
FrequencyStatus ... get frequency status
func (*DpllConfig) InSpec ¶
func (d *DpllConfig) InSpec() bool
func (*DpllConfig) MonitorDpll ¶
func (d *DpllConfig) MonitorDpll()
MonitorDpll monitors DPLL on the discovered API, if any
func (*DpllConfig) MonitorDpllMock ¶
func (d *DpllConfig) MonitorDpllMock()
func (*DpllConfig) MonitorDpllNetlink ¶
func (d *DpllConfig) MonitorDpllNetlink()
MonitorDpllNetlink monitors DPLL through netlink
func (*DpllConfig) MonitorDpllSysfs ¶
func (d *DpllConfig) MonitorDpllSysfs()
MonitorDpllSysfs ... monitor dpPPS_STATUSll events
func (*DpllConfig) MonitorProcess ¶
func (d *DpllConfig) MonitorProcess(processCfg config.ProcessConfig)
MonitorProcess is initiating monitoring of DPLL associated with a process
func (*DpllConfig) PhaseOffset ¶
func (d *DpllConfig) PhaseOffset() int64
PhaseOffset ... get phase offset
func (*DpllConfig) PhaseOffsetPin ¶
func (d *DpllConfig) PhaseOffsetPin(pin *nl.DoPinGetReply) bool
func (*DpllConfig) PhaseStatus ¶
func (d *DpllConfig) PhaseStatus() int64
PhaseStatus get phase status
func (*DpllConfig) SetDependsOn ¶
func (d *DpllConfig) SetDependsOn(dependsOn []event.EventSource)
SetDependsOn ... set depends on ..
func (*DpllConfig) SetPhaseOffset ¶
func (d *DpllConfig) SetPhaseOffset(phaseOffset int64)
SetPhaseOffset ... set phaseOffset Measured phase offset values are fractional with 3-digit decimal places and shall be divided by DPLL_PIN_PHASE_OFFSET_DIVIDER to get integer part The units are picoseconds. We further divide it by 1000 to report nanoseconds
func (*DpllConfig) SetSourceLost ¶
func (d *DpllConfig) SetSourceLost(sourceLost bool)
SetSourceLost ... set source status
func (*DpllConfig) Slope ¶
func (d *DpllConfig) Slope() float64
func (*DpllConfig) SourceLost ¶
func (d *DpllConfig) SourceLost() bool
SourceLost ... get source status
func (*DpllConfig) Timer ¶
func (d *DpllConfig) Timer() int64
type DpllSubscriber ¶
type DpllSubscriber struct {
// contains filtered or unexported fields
}
DpllSubscriber ... event subscriber
func (DpllSubscriber) ID ¶
func (s DpllSubscriber) ID() string
func (DpllSubscriber) Notify ¶
func (s DpllSubscriber) Notify(source event.EventSource, state event.PTPState)
Notify ... event notification
func (DpllSubscriber) Topic ¶
func (s DpllSubscriber) Topic() event.EventSource
Topic ... event topic