Documentation
¶
Index ¶
- Constants
- Variables
- func ClockClassLessThan(ptpIf *exports.PtpIf, value int) bool
- func ClockClassLessThanInDomain(ptpIf *exports.PtpIf, clockClassThreshold, domain int) bool
- func ClockClassLessThanInDomainWrapper(config exports.L2Info, ifIdx, clockClassThreshold, domain int) bool
- func ClockClassLessThanWrapper(config exports.L2Info, ifIdx, value int) bool
- func GetAllGraphVertices(count int) (l []int)
- func IsPTP(config exports.L2Info, aInterface *exports.PtpIf) bool
- func IsPTPWrapper(config exports.L2Info, if1 int) bool
- func IsWPCNicWrapper(config exports.L2Info, if1 int) bool
- func IsWpcNic(ifaceName1 *exports.PtpIf) bool
- func NilWrapper() bool
- func PTPDomainEquals(ptpIf *exports.PtpIf, value int) bool
- func PTPDomainEqualsWrapper(config exports.L2Info, ifIdx, value int) bool
- func PermutationsWithConstraints(config exports.L2Info, algo [][][]int, l []int, s, e, n int, result bool, ...)
- func PrintSolution(config exports.L2Info, p []int)
- func SameLan2(config exports.L2Info, if1, if2 int, lans *[][]int) bool
- func SameLan2Wrapper(config exports.L2Info, if1, if2 int) bool
- func SameLan3(config exports.L2Info, if1, if2, if3 int, lans *[][]int) bool
- func SameLan3Wrapper(config exports.L2Info, if1, if2, if3 int) bool
- func SameNic(ifaceName1, ifaceName2 *exports.PtpIf) bool
- func SameNicWrapper(config exports.L2Info, if1, if2 int) bool
- func SameNode(if1, if2 *exports.PtpIf) bool
- func SameNodeWrapper(config exports.L2Info, if1, if2 int) bool
- func Step0(fn AlgoFunction0, negate int) []int
- func Step1(fn AlgoFunction1, param1, negate int) []int
- func Step1V(fn AlgoFunction1V, ifParam, valueParam, negate int) []int
- func Step1V2(fn AlgoFunction1V2, ifParam, valueParam1, valueParam2, negate int) []int
- func Step2(fn AlgoFunction2, param1, param2, negate int) []int
- func Step3(fn AlgoFunction3, param1, param2, param3, negate int) []int
- type AlgoFunction0
- type AlgoFunction1
- type AlgoFunction1V
- type AlgoFunction1V2
- type AlgoFunction2
- type AlgoFunction3
- type Algorithm
- type ConfigFunc
- type ConfigFunc0
- type ConfigFunc1
- type ConfigFunc1V
- type ConfigFunc1V2
- type ConfigFunc2
- type ConfigFunc3
Constants ¶
const ( Positive = 0 // Normal/positive test (e.g., SameNode returns true if nodes match) Negative = 1 // Negated test (e.g., SameNode with Negative returns true if nodes DON'T match) )
Negation constants for step functions Use these as the last element in the step definition array
const OneIfaceOneValue = 10
OneIfaceOneValue is the param type identifier for steps with 1 interface param and 1 literal value param. This is separate from the standard param count values (0-4) to distinguish mixed-parameter steps.
const OneIfaceTwoValues = 11
OneIfaceTwoValues is the param type identifier for steps with 1 interface param and 2 literal value params.
const WPCNICSubsystemID = "E810-XXV-4T"
WPCNICSubsystemID is the subsystem ID for Intel WPC NICs
Variables ¶
var GlobalConfig = configObject{}
Functions ¶
func ClockClassLessThan ¶ added in v0.0.21
ClockClassLessThan checks if any PTP Announce received on the interface has a clock class less than the given threshold value.
func ClockClassLessThanInDomain ¶ added in v0.0.21
ClockClassLessThanInDomain checks if any PTP Announce received on the interface has BOTH a domain number equal to the given domain AND a clock class less than the given threshold. Both conditions must be satisfied by the same announce message.
func ClockClassLessThanInDomainWrapper ¶ added in v0.0.21
func ClockClassLessThanInDomainWrapper(config exports.L2Info, ifIdx, clockClassThreshold, domain int) bool
ClockClassLessThanInDomainWrapper is the solver wrapper for ClockClassLessThanInDomain
func ClockClassLessThanWrapper ¶ added in v0.0.21
ClockClassLessThanWrapper is the solver wrapper for ClockClassLessThan
func GetAllGraphVertices ¶
func IsPTPWrapper ¶
Checks that an if an interface receives ptp frames
func IsWPCNicWrapper ¶
IsWpcNicWrapper is the wrapper for IsWpcNic
func PTPDomainEquals ¶ added in v0.0.21
PTPDomainEquals checks if any PTP Announce received on the interface has a domain number equal to the given value.
func PTPDomainEqualsWrapper ¶ added in v0.0.21
PTPDomainEqualsWrapper is the solver wrapper for PTPDomainEquals
func PermutationsWithConstraints ¶
func PermutationsWithConstraints(config exports.L2Info, algo [][][]int, l []int, s, e, n int, result bool, solutions *[][]int)
Recursive solver function. Creates a set of permutations and applies contraints at each step to reduce the solution graph and speed up execution
func SameLan2Wrapper ¶
wrapper for SameLan2
func SameLan3Wrapper ¶
algo wrapper for SameLan3
func SameNicWrapper ¶
wrapper for SameNic
func SameNodeWrapper ¶
algo Wrapper for SameNode
func Step0 ¶
func Step0(fn AlgoFunction0, negate int) []int
Step0 creates a step with 0 parameters negate: use Positive for normal test, Negative for inverted test
func Step1 ¶
func Step1(fn AlgoFunction1, param1, negate int) []int
Step1 creates a step with 1 parameter negate: use Positive for normal test, Negative for inverted test
func Step1V ¶ added in v0.0.21
func Step1V(fn AlgoFunction1V, ifParam, valueParam, negate int) []int
Step1V creates a step with 1 interface parameter and 1 literal value parameter. ifParam is an index into the problem variables (resolved to an interface index via permutations). valueParam is a literal value passed directly to the function (e.g., domain number or clock class threshold). negate: use Positive for normal test, Negative for inverted test
func Step1V2 ¶ added in v0.0.21
func Step1V2(fn AlgoFunction1V2, ifParam, valueParam1, valueParam2, negate int) []int
Step1V2 creates a step with 1 interface parameter and 2 literal value parameters. ifParam is an index into the problem variables (resolved to an interface index via permutations). valueParam1 and valueParam2 are literal values passed directly to the function. negate: use Positive for normal test, Negative for inverted test
func Step2 ¶
func Step2(fn AlgoFunction2, param1, param2, negate int) []int
Step2 creates a step with 2 parameters negate: use Positive for normal test, Negative for inverted test
func Step3 ¶
func Step3(fn AlgoFunction3, param1, param2, param3, negate int) []int
Step3 creates a step with 3 parameters negate: use Positive for normal test, Negative for inverted test
Types ¶
type AlgoFunction0 ¶
type AlgoFunction0 int
list of Algorithm functions with zero params
const ( // same node StepNil AlgoFunction0 = iota )
See applyStep
type AlgoFunction1 ¶
type AlgoFunction1 int
list of Algorithm function with 1 params
const ( // same node StepIsPTP AlgoFunction1 = iota StepIsWPCNic )
See applyStep
type AlgoFunction1V ¶ added in v0.0.21
type AlgoFunction1V int
list of Algorithm function with 1 interface param and 1 literal value param
const ( StepClockClassLessThan AlgoFunction1V = iota StepPTPDomainEquals )
See applyStep
type AlgoFunction1V2 ¶ added in v0.0.21
type AlgoFunction1V2 int
list of Algorithm function with 1 interface param and 2 literal value params
const (
StepClockClassLessThanInDomain AlgoFunction1V2 = iota
)
See applyStep
type AlgoFunction2 ¶
type AlgoFunction2 int
list of Algorithm function with 2 params
const ( StepSameLan2 AlgoFunction2 = iota StepSameNic StepSameNode )
See applyStep
type AlgoFunction3 ¶
type AlgoFunction3 int
list of Algorithm function with 3 params
const (
StepSameLan3 AlgoFunction3 = iota
)
See applyStep
type Algorithm ¶
type Algorithm struct {
// number of interfaces to solve
IfCount int
// Function to run algo
TestSolution ConfigFunc
}
type ConfigFunc1 ¶
Signature for algorithm functions with 1 params
type ConfigFunc1V ¶ added in v0.0.21
Signature for algorithm functions with 1 interface param and 1 literal value param
type ConfigFunc1V2 ¶ added in v0.0.21
Signature for algorithm functions with 1 interface param and 2 literal value params
type ConfigFunc2 ¶
Signature for algorithm functions with 2 params