command

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2015 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandName = "rmsgmkcsv"
)

Variables

View Source
var (
	ErrMaxLessThanMin = errors.New(
		"Flag 'max' degrees flag is less than flag 'min' degrees flag.")
	ErrStepLessThanZero = errors.New(
		"The 'step' degrees flag is less than zero.")
	ErrNoExec = errors.New(
		"No executable - see the example from running this command: '" +
			CommandName + " help create exec' (w/o the quotes)")
	ErrStepsLargerThanMaxInt32 = errors.New(
		"The number of steps is larger than 2147483647 ((2³¹)-1)")
	ErrMaxMinusMinIsNegative = errors.New(
		"Flag 'max' minus flag 'min' has a negative sign (is < 0).")
	ErrStepDivisionByZero = errors.New(
		"Flag 'step' must not be zero (0).")
)
View Source
var (
	RootCmd = &cobra.Command{
		Use: CommandName,
		Short: "rmsgmkcsv is a CLI tool that create decimal " +
			"bearings/azimuths to microprocessor H-bridge actuator integers.",
		Long: "rmsgmkcsv either creates predictable linear values, or calls " +
			"an external program/script interpreter to make one translation " +
			"from one decimal bearing/azimuth to one whole integer value, " +
			"and does that for a specified range of decimal degrees, with a " +
			"step degree.",
	}
)

Functions

This section is empty.

Types

type CreateFlags

type CreateFlags struct {
	Degrees      Degrees
	FileName     string
	TruncateFile bool
	MCU          CreateMCUFlags
}

type CreateMCUFlags

type CreateMCUFlags struct {
	Start int64
	Step  int64
}

type Data

type Data struct {
	File   *os.File
	Output io.Writer
	Writer *csv.Writer
}

type Degrees

type Degrees struct {
	Min  int64
	Max  int64
	Step int32
}

type Record

type Record struct {
	Degree   int64
	McuValue int64
}

func (*Record) Strings

func (r *Record) Strings() []string

type TopLevelCommands

type TopLevelCommands struct {
	Create CreateFlags
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL