Documentation
¶
Overview ¶
* Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
Index ¶
- func GetAttributesSubset(attributes me.AttributeValueMap, attrDefs me.AttributeDefinitionMap, ...) (me.AttributeValueMap, uint16, uint16, uint16)
- func ReverseInt(vals []int) []int
- func ReverseUint(vals []uint) []uint
- func ShuffleInt(vals []int) []int
- func ShuffleStrings(vals []string) []string
- func ShuffleUint(vals []uint) []uint
- type DscpPBitMapping
- type Error
- type ErrorCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAttributesSubset ¶
func GetAttributesSubset(attributes me.AttributeValueMap, attrDefs me.AttributeDefinitionMap, requestedMask uint16, allowedMask uint16) (me.AttributeValueMap, uint16, uint16, uint16)
GetAttributesSubset gets the subset of attribute values that go with the supplied attribute mask
func ReverseInt ¶
ReverseInt takes an array of ints on input and reverses the items
func ReverseUint ¶
ReverseUint takes an array of uints on input and reverses the items
func ShuffleInt ¶
ShuffleInt takes an array of ints on input and randomizes it
func ShuffleStrings ¶
ShuffleStrings takes an array of strings on input and randomizes it
func ShuffleUint ¶
ShuffleUint takes an array of unsigned ints on input and randomizes it
Types ¶
type DscpPBitMapping ¶
type DscpPBitMapping struct {
// contains filtered or unexported fields
}
DscpPBitMapping organizes an array of 64 3-bit fields as a binary string. The leftmost 3-char in the string represent the bits for file #63.
func NewDscpPBitMapping ¶
func NewDscpPBitMapping(bits []uint8) (DscpPBitMapping, error)
NewDscpPBitMapping creates a DSCP PBit mapping structure from an array of 64 3-bit values.
func (*DscpPBitMapping) GetPBits ¶
func (d *DscpPBitMapping) GetPBits(dscp uint8) (uint8, bool)
GetPBits gets the 3-bit PBit value for the corresponding DSCP value
func (*DscpPBitMapping) Serialize ¶
func (d *DscpPBitMapping) Serialize() []uint8
Serialize returns the DSCP PBit Mapping as an array of octets ready for insertion into a frame for transmission
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is the struct representing internal errors. This implements the error interface
func NewErrorStruct ¶
NewErrorStruct uses message and code to create an *Error struct. The *Error struct implements the 'error' interface, so it should be able to be used wherever 'error' is expected.