Documentation
¶
Index ¶
- Constants
- Variables
- 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 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 Step2(fn AlgoFunction2, param1, param2, negate int) []int
- func Step3(fn AlgoFunction3, param1, param2, param3, negate int) []int
- type AlgoFunction0
- type AlgoFunction1
- type AlgoFunction2
- type AlgoFunction3
- type Algorithm
- type ConfigFunc
- type ConfigFunc0
- type ConfigFunc1
- 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 WPCNICSubsystemID = "E810-XXV-4T"
WPCNICSubsystemID is the subsystem ID for Intel WPC NICs
Variables ¶
var GlobalConfig = configObject{}
Functions ¶
func GetAllGraphVertices ¶
func IsPTPWrapper ¶
Checks that an if an interface receives ptp frames
func IsWPCNicWrapper ¶
IsWpcNicWrapper is the wrapper for IsWpcNic
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 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 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 ConfigFunc2 ¶
Signature for algorithm functions with 2 params