// Get returns the Frequency as Flatbuffer serialized bytes using the package's
// global profiler.
427998
func Get() (p []byte, err error) {
	stdMu.Lock()
	defer stdMu.Unlock()
	if std == nil {
		std, err = NewProfiler()
		if err != nil {
			return nil, err
		}
	}
	return std.Get()
}
201196
func (c *syncClient) Get(arg0 string) (result []byte, err Error) {
	arg0bytes := []byte(arg0)

	var resp Response
	resp, err = c.conn.ServiceRequest(&GET, [][]byte{arg0bytes})
	if err == nil {
		result = resp.GetBulkData()
	}
	return result, err

}
1280977
func (b Byte) Get() (byte, error) {
	if !b.Present() {
		var zero byte
		return zero, errors.New("value not present")
	}
	return *b.value, nil
}
772115
func (c *Client) Get() *bytes.Buffer {
	b := <-c.p.ch
	b.Reset()
	c.sent <- b
	return b
}
979511
func (prof *Profiler) Get() (procs *Processors, err error) {
	procs = New()
	err = prof.getCPUInfo(procs)
	if err != nil {
		return nil, err
	}
	// process the system cpu info
	err = prof.getSysFSCPU(procs)
	if err != nil {
		return nil, err
	}
	procs.CPUs = procs.Sockets * int32(procs.CoresPerSocket) * int32(procs.ThreadsPerCore)

	uname := syscall.Utsname{}
	err = syscall.Uname(&uname)
	if err != nil {
		return nil, err
	}
	// convert [65]int8 to []uint8 so othat we can use it as a string
	var arch []uint8
	for _, v := range uname.Machine {
		if v == 0x00 {
			break
		}
		arch = append(arch, uint8(v))
	}
	procs.Architecture = string(arch)

	// get numa information
	err = prof.getNodeInfo(procs)
	if err != nil {
		return nil, err
	}
	return procs, nil
}
494152
func (s *Duration) Get() time.Duration {
	return time.Duration(atomic.LoadInt64(&s.currentVal))
}
149148
func Get(format string) (Packager, error) {
	p, ok := packagers[format]
	if !ok {
		return nil, fmt.Errorf("no packager registered for the format %s", format)
	}
	return p, nil
}
535667
func (p *Pool) Get() *ByteBuffer {
	v := p.pool.Get()
	if v != nil {
		return v.(*ByteBuffer)
	}
	return &ByteBuffer{
		B: make([]byte, 0, atomic.LoadUint64(&p.defaultSize)),
	}
}
366727
func (c *Counter) Get() int {
	c.Lock()
	defer c.Unlock()
	return c.count
}
1024592
func (prof *Profiler) Get() (la LoadAvg, err error) {
	err = prof.Reset()
	if err != nil {
		return la, err
	}
	var (
		i, priorPos, pos, line, fieldNum int
		n                                uint64
		f                                float64
		v                                byte
	)
	la.Timestamp = time.Now().UTC().UnixNano()
	for {
		prof.Line, err = prof.ReadSlice('\n')
		if err != nil {
			if err == io.EOF {
				break
			}
			return la, &joe.ReadError{Err: err}
		}
		line++
		for {
			// space delimits the values
			for i, v = range prof.Line[pos:] {
				if v == 0x20 {
					priorPos, pos = pos, pos+i+1
					break
				}
			}
			fieldNum++
			if fieldNum <= 3 {
				f, err = strconv.ParseFloat(string(prof.Line[priorPos:pos-1]), 64)
				if err != nil {
					return la, &joe.ParseError{Info: fmt.Sprintf("line %d: field %d", line, fieldNum), Err: err}
				}
				if fieldNum == 1 {
					la.Minute = float32(f)
					continue
				}
				if fieldNum == 2 {
					la.Five = float32(f)
					continue
				}
				la.Fifteen = float32(f)
				continue
			}
			if fieldNum == 4 {
				// get the process information: separated by /
				for i, v = range prof.Line[priorPos:pos] {
					if v == '/' {
						break
					}
				}
				n, err = helpers.ParseUint(prof.Line[priorPos : priorPos+i])
				if err != nil {
					return la, &joe.ParseError{Info: fmt.Sprintf("line %d: field %d", line, fieldNum), Err: err}
				}
				la.Running = int32(n)
				n, err = helpers.ParseUint(prof.Line[priorPos+i+1 : pos-1])
				if err != nil {
					return la, &joe.ParseError{Info: fmt.Sprintf("line %d: field %d", line, fieldNum), Err: err}
				}
				la.Total = int32(n)
				continue
			}
			n, err = helpers.ParseUint(prof.Line[pos : len(prof.Line)-1])
			if err != nil {
				return la, err
			}
			la.PID = int32(n)
			break
		}
	}
	return la, nil
}
413844
func (prof *Profiler) Get() (*CPUs, error) {
	cpus := &CPUs{CPU: make([]CPU, prof.NumCPU)}
	var err error
	var pids []int32 // the physical ids encountered

	hasFreq := prof.hasCPUFreq()
	for x := 0; x < prof.NumCPU; x++ {
		var cpu CPU
		var found bool

		cpu.PhysicalPackageID, err = prof.physicalPackageID(x)
		if err != nil {
			return nil, err
		}
		// see if this is a new physical id; if so, add it to the inventory
		for _, v := range pids {
			if v == cpu.PhysicalPackageID {
				found = true
				break
			}
		}
		if !found {
			pids = append(pids, cpu.PhysicalPackageID)
		}
		cpu.CoreID, err = prof.coreID(x)
		if err != nil {
			return nil, err
		}
		err := prof.cache(x, &cpu)
		if err != nil {
			return nil, err
		}
		if hasFreq {
			cpu.MHzMin, err = prof.cpuMHzMin(x)
			if err != nil {
				return nil, err
			}
			cpu.MHzMax, err = prof.cpuMHzMax(x)
			if err != nil {
				return nil, err
			}
		}
		cpus.CPU[x] = cpu
	}
	cpus.Sockets = int32(len(pids))
	cpus.Possible, err = prof.Possible()
	if err != nil {
		return nil, err
	}

	cpus.Online, err = prof.Online()
	if err != nil {
		return nil, err
	}

	cpus.Offline, err = prof.Offline()
	if err != nil {
		return nil, err
	}

	cpus.Present, err = prof.Present()
	if err != nil {
		return nil, err
	}

	return cpus, nil
}
526850
func Get(region string) (frequencyPlan FrequencyPlan, err error) {
	if fp, ok := frequencyPlans[region]; ok {
		return fp, nil
	}
	switch region {
	case pb_lorawan.FrequencyPlan_EU_863_870.String():
		frequencyPlan.Band, err = lora.GetConfig(lora.EU_863_870, false, lorawan.DwellTimeNoLimit)
		// TTN frequency plan includes extra channels next to the default channels:
		frequencyPlan.UplinkChannels = []lora.Channel{
			lora.Channel{Frequency: 868100000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 868300000, DataRates: []int{0, 1, 2, 3, 4, 5, 6}}, // Also SF7BW250
			lora.Channel{Frequency: 868500000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 867100000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 867300000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 867500000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 867700000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 867900000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 868800000, DataRates: []int{7}}, // FSK 50kbps
		}
		frequencyPlan.DownlinkChannels = frequencyPlan.UplinkChannels
		frequencyPlan.CFList = &lorawan.CFList{867100000, 867300000, 867500000, 867700000, 867900000}
		frequencyPlan.ADR = &ADRConfig{MinDataRate: 0, MaxDataRate: 5, MinTXPower: 2, MaxTXPower: 14, StepTXPower: 3}
		frequencyPlan.RX2DataRate = viper.GetInt("eu-rx2-dr")
	case pb_lorawan.FrequencyPlan_US_902_928.String():
		frequencyPlan.Band, err = lora.GetConfig(lora.US_902_928, false, lorawan.DwellTime400ms)
		fsb := viper.GetInt("us-fsb") // If this is 1, enables 903.9-905.3/200 kHz, 904.6/500kHz channels, etc.
		for channel := 0; channel < 72; channel++ {
			if (channel < fsb*8 || channel >= (fsb+1)*8) && channel != fsb+64 {
				frequencyPlan.DisableUplinkChannel(channel)
			}
		}
		frequencyPlan.ADR = &ADRConfig{MinDataRate: 0, MaxDataRate: 3, MinTXPower: 10, MaxTXPower: 20, StepTXPower: 2}
	case pb_lorawan.FrequencyPlan_CN_779_787.String():
		frequencyPlan.Band, err = lora.GetConfig(lora.CN_779_787, false, lorawan.DwellTimeNoLimit)
	case pb_lorawan.FrequencyPlan_EU_433.String():
		frequencyPlan.Band, err = lora.GetConfig(lora.EU_433, false, lorawan.DwellTimeNoLimit)
	case pb_lorawan.FrequencyPlan_AU_915_928.String():
		frequencyPlan.Band, err = lora.GetConfig(lora.AU_915_928, false, lorawan.DwellTime400ms)
		fsb := viper.GetInt("au-fsb") // If this is 1, enables 916.8-918.2/200 kHz, 917.5/500kHz channels, etc.
		for channel := 0; channel < 72; channel++ {
			if (channel < fsb*8 || channel >= (fsb+1)*8) && channel != fsb+64 {
				frequencyPlan.DisableUplinkChannel(channel)
			}
		}
		frequencyPlan.ADR = &ADRConfig{MinDataRate: 0, MaxDataRate: 5, MinTXPower: 10, MaxTXPower: 20, StepTXPower: 2}
	case pb_lorawan.FrequencyPlan_CN_470_510.String():
		frequencyPlan.Band, err = lora.GetConfig(lora.CN_470_510, false, lorawan.DwellTimeNoLimit)
	case pb_lorawan.FrequencyPlan_AS_923.String():
		frequencyPlan.Band, err = lora.GetConfig(lora.AS_923, false, lorawan.DwellTime400ms)
		frequencyPlan.ADR = &ADRConfig{MinDataRate: 0, MaxDataRate: 5, MinTXPower: 2, MaxTXPower: 14, StepTXPower: 2}
	case pb_lorawan.FrequencyPlan_AS_920_923.String():
		frequencyPlan.Band, err = lora.GetConfig(lora.AS_923, false, lorawan.DwellTime400ms)
		frequencyPlan.UplinkChannels = []lora.Channel{
			lora.Channel{Frequency: 923200000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 923400000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 922200000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 922400000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 922600000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 922800000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 923000000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 922000000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 922100000, DataRates: []int{6}},
			lora.Channel{Frequency: 921800000, DataRates: []int{7}},
		}
		frequencyPlan.DownlinkChannels = frequencyPlan.UplinkChannels
		frequencyPlan.CFList = &lorawan.CFList{922200000, 922400000, 922600000, 922800000, 923000000}
		frequencyPlan.ADR = &ADRConfig{MinDataRate: 0, MaxDataRate: 5, MinTXPower: 2, MaxTXPower: 14, StepTXPower: 2}
	case pb_lorawan.FrequencyPlan_AS_923_925.String():
		frequencyPlan.Band, err = lora.GetConfig(lora.AS_923, false, lorawan.DwellTime400ms)
		frequencyPlan.UplinkChannels = []lora.Channel{
			lora.Channel{Frequency: 923200000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 923400000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 923600000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 923800000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 924000000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 924200000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 924400000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 924600000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 924500000, DataRates: []int{6}},
			lora.Channel{Frequency: 924800000, DataRates: []int{7}},
		}
		frequencyPlan.DownlinkChannels = frequencyPlan.UplinkChannels
		frequencyPlan.CFList = &lorawan.CFList{923600000, 923800000, 924000000, 924200000, 924400000}
		frequencyPlan.ADR = &ADRConfig{MinDataRate: 0, MaxDataRate: 5, MinTXPower: 2, MaxTXPower: 14, StepTXPower: 2}
	case pb_lorawan.FrequencyPlan_KR_920_923.String():
		frequencyPlan.Band, err = lora.GetConfig(lora.KR_920_923, false, lorawan.DwellTimeNoLimit)
		// TTN frequency plan includes extra channels next to the default channels:
		frequencyPlan.UplinkChannels = []lora.Channel{
			lora.Channel{Frequency: 922100000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 922300000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 922500000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 922700000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 922900000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 923100000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 923300000, DataRates: []int{0, 1, 2, 3, 4, 5}},
		}
		frequencyPlan.DownlinkChannels = frequencyPlan.UplinkChannels
		frequencyPlan.CFList = &lorawan.CFList{922700000, 922900000, 923100000, 923300000, 0}
		frequencyPlan.ADR = &ADRConfig{MinDataRate: 0, MaxDataRate: 5, MinTXPower: 2, MaxTXPower: 14, StepTXPower: 2}
	case pb_lorawan.FrequencyPlan_IN_865_867.String():
		frequencyPlan.Band, err = lora.GetConfig(lora.IN_865_867, false, lorawan.DwellTimeNoLimit)
	case pb_lorawan.FrequencyPlan_RU_864_870.String():
		frequencyPlan.Band, err = lora.GetConfig(lora.RU_864_870, false, lorawan.DwellTimeNoLimit)
		// Here channels from recommended list for Russia are set which are used by LoRaWAN networks in Russia
		// Recommended frequency plan includes extra channels next to the default channels:
		frequencyPlan.UplinkChannels = []lora.Channel{
			lora.Channel{Frequency: 868900000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 869100000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 864100000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 864300000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 864500000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 864700000, DataRates: []int{0, 1, 2, 3, 4, 5}},
			lora.Channel{Frequency: 864900000, DataRates: []int{0, 1, 2, 3, 4, 5}},
		}
		frequencyPlan.DownlinkChannels = frequencyPlan.UplinkChannels
		frequencyPlan.CFList = &lorawan.CFList{864100000, 864300000, 864500000, 864700000, 864900000}
		frequencyPlan.ADR = &ADRConfig{MinDataRate: 0, MaxDataRate: 5, MinTXPower: 2, MaxTXPower: 14, StepTXPower: 3}
	default:
		err = errors.NewErrInvalidArgument("Frequency Band", "unknown")
	}
	return
}
786727
func (f *fsClient) Get(sse encrypt.ServerSide) (io.ReadCloser, *probe.Error) {
	return f.get()
}
1335714
func (v String) Get(deflt string) string {
	if !v.Defined {
		return deflt
	}
	return v.V
}
1211350
func (s *StatsRecorder) Get(base int64) bgzf.Block {
	s.mu.Lock()
	s.stats.Gets++
	blk := s.Cache.Get(base)
	if blk == nil {
		s.stats.Misses++
	}
	s.mu.Unlock()
	return blk
}
1254973
func Get() (p []byte, err error) {
	var inf m.MemInfo
	err = inf.Get()
	if err != nil {
		return nil, err
	}
	return Serialize(&inf), nil
}
711643
func (s *Fake) Get(context.Context, types.Metric, time.Time, []interface{}) interface{} {
	return nil
}