Documentation ¶
Overview ¶
parameter package provides a way to define and manage the parameters of lab devices and their simulated behavior
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrValNotFound = errors.New("value is not found") ErrValNotAllowed = errors.New("value outside opts - ignoring set") ErrWrongStringVal = errors.New("could not convert paramTypeString to string") ErrUnknownParamType = errors.New("unknown parameter type") ErrWrongIntVal = errors.New("received param type that cannot be converted to int") ErrWrongFloatVal = errors.New("received param type that cannot be converted to float") ErrWrongBoolVal = errors.New("received param type that cannot be converted to bool") ErrWrongTypeVal = errors.New("received value with invalid type") ErrUnhandledTypeVal = errors.New("unhandled type") )
Functions ¶
This section is empty.
Types ¶
type ConcreteParameter ¶
type ConcreteParameter[T paramType] struct { Parameter // contains filtered or unexported fields }
ConcreteParameter[T paramType] hold the actual concrete value for each parameter created with New constructor.
func (*ConcreteParameter[T]) Opts ¶
func (p *ConcreteParameter[T]) Opts() []string
Return allowed values if available
func (*ConcreteParameter[T]) SetValue ¶
func (p *ConcreteParameter[T]) SetValue(val any) error
Value setter
func (*ConcreteParameter[T]) String ¶
func (p *ConcreteParameter[T]) String() string
To String representation
Click to show internal directories.
Click to hide internal directories.