Documentation ¶
Index ¶
- Constants
- func ClearOutputs(blk Block)
- type Block
- type Constraint
- type ConstraintType
- type FloatParam
- type Input
- type Inputs
- type IntParam
- type Output
- type Outputs
- type Param
- type ParamVals
- type Params
- type Recorder
- type TypedConstraint
- func NewGreater[T goconstraints.Ordered](val T) *TypedConstraint[T]
- func NewGreaterEqual[T goconstraints.Ordered](val T) *TypedConstraint[T]
- func NewLess[T goconstraints.Ordered](val T) *TypedConstraint[T]
- func NewLessEqual[T goconstraints.Ordered](val T) *TypedConstraint[T]
- func NewNone[T goconstraints.Ordered]() *TypedConstraint[T]
- func NewOneOf[T goconstraints.Ordered](vals []T) *TypedConstraint[T]
- func NewRangeExcl[T goconstraints.Ordered](start, end T) *TypedConstraint[T]
- func NewRangeIncl[T goconstraints.Ordered](start, end T) *TypedConstraint[T]
- type TypedInput
- func (in *TypedInput[T]) Connect(o Output) error
- func (in *TypedInput[T]) GetType() string
- func (in *TypedInput[T]) GetValue() T
- func (in *TypedInput[T]) IsAsynchronous() bool
- func (in *TypedInput[T]) IsConnected() bool
- func (in *TypedInput[T]) IsOptional() bool
- func (in *TypedInput[T]) IsValueSet() bool
- type TypedInputAsync
- func (in *TypedInputAsync[T]) Connect(o Output) error
- func (in *TypedInputAsync[T]) GetTime() time.Time
- func (in *TypedInputAsync[T]) GetType() string
- func (in *TypedInputAsync[T]) GetValue() T
- func (in *TypedInputAsync[T]) IsAsynchronous() bool
- func (in *TypedInputAsync[T]) IsConnected() bool
- func (in *TypedInputAsync[T]) IsOptional() bool
- func (in *TypedInputAsync[T]) IsValueSet() bool
- type TypedOutput
- func (out *TypedOutput[T]) ClearValue()
- func (out *TypedOutput[T]) Connect(i Input) error
- func (out *TypedOutput[T]) DisconnectAll()
- func (out *TypedOutput[T]) GetConnected() []Input
- func (out *TypedOutput[T]) GetType() string
- func (out *TypedOutput[T]) GetValue() T
- func (out *TypedOutput[T]) IsAsynchronous() bool
- func (out *TypedOutput[T]) IsConnected() bool
- func (out *TypedOutput[T]) IsValueSet() bool
- func (out *TypedOutput[T]) SetIfConnected(calcVal func() T)
- func (out *TypedOutput[T]) SetValue(val T)
- type TypedOutputAsync
- func (out *TypedOutputAsync[T]) ClearValue()
- func (out *TypedOutputAsync[T]) Connect(i Input) error
- func (out *TypedOutputAsync[T]) DisconnectAll()
- func (out *TypedOutputAsync[T]) GetConnected() []Input
- func (out *TypedOutputAsync[T]) GetType() string
- func (out *TypedOutputAsync[T]) GetValue() T
- func (out *TypedOutputAsync[T]) IsAsynchronous() bool
- func (out *TypedOutputAsync[T]) IsConnected() bool
- func (out *TypedOutputAsync[T]) IsValueSet() bool
- func (out *TypedOutputAsync[T]) SetIfConnected(t time.Time, calcVal func() T)
- func (out *TypedOutputAsync[T]) SetTimeValue(t time.Time, val T)
Constants ¶
View Source
const ( None ConstraintType = iota Less LessEqual Greater GreaterEqual RangeIncl RangeExcl OneOf StrNone = "none" StrLess = "less" StrLessEqual = "lessEqal" StrGreater = "greater" StrGreaterEqual = "greaterEqual" StrRangeIncl = "rangeIncl" StrRangeExcl = "rangeExcl" StrOneOf = "oneOf" )
View Source
const ( NameIn = "in" NameK = "k" NameLength = "length" NameOut = "out" NamePeriod = "period" NameTrend = "trend" )
View Source
const (
SchemaPeriod = `{
"type": "integer",
"minimum": 1,
"maximum": 1000,
}`
)
View Source
const (
TypeFloat64 = "float64"
)
Variables ¶
This section is empty.
Functions ¶
func ClearOutputs ¶
func ClearOutputs(blk Block)
Types ¶
type Constraint ¶
type Constraint interface { GetType() ConstraintType GetLimits() []any }
type ConstraintType ¶
type ConstraintType int
func (ConstraintType) String ¶
func (t ConstraintType) String() string
type FloatParam ¶
type FloatParam struct {
// contains filtered or unexported fields
}
func NewFloatParam ¶
func NewFloatParam(defaultVal float64, constr *TypedConstraint[float64]) *FloatParam
func (FloatParam) GetConstraint ¶
func (p FloatParam) GetConstraint() Constraint
func (FloatParam) GetCurrentVal ¶
func (p FloatParam) GetCurrentVal() any
func (FloatParam) GetDefaultVal ¶
func (p FloatParam) GetDefaultVal() any
func (FloatParam) GetValueType ¶
func (p FloatParam) GetValueType() string
func (FloatParam) SetCurrentVal ¶
type IntParam ¶
type IntParam struct {
// contains filtered or unexported fields
}
func NewIntParam ¶
func NewIntParam(defaultVal int, constr *TypedConstraint[int]) *IntParam
func (IntParam) GetConstraint ¶
func (p IntParam) GetConstraint() Constraint
func (IntParam) GetCurrentVal ¶
func (p IntParam) GetCurrentVal() any
func (IntParam) GetDefaultVal ¶
func (p IntParam) GetDefaultVal() any
func (IntParam) GetValueType ¶
func (p IntParam) GetValueType() string
func (*IntParam) SetCurrentVal ¶
type Params ¶
func (Params) GetNonDefaultValues ¶
func (Params) GetSortedNames ¶
func (Params) SetValuesOrDefault ¶
type TypedConstraint ¶
type TypedConstraint[T goconstraints.Ordered] struct { Type ConstraintType Limits []T }
func NewGreater ¶
func NewGreater[T goconstraints.Ordered](val T) *TypedConstraint[T]
func NewGreaterEqual ¶
func NewGreaterEqual[T goconstraints.Ordered](val T) *TypedConstraint[T]
func NewLess ¶
func NewLess[T goconstraints.Ordered](val T) *TypedConstraint[T]
func NewLessEqual ¶
func NewLessEqual[T goconstraints.Ordered](val T) *TypedConstraint[T]
func NewNone ¶
func NewNone[T goconstraints.Ordered]() *TypedConstraint[T]
func NewOneOf ¶
func NewOneOf[T goconstraints.Ordered](vals []T) *TypedConstraint[T]
func NewRangeExcl ¶
func NewRangeExcl[T goconstraints.Ordered](start, end T) *TypedConstraint[T]
func NewRangeIncl ¶
func NewRangeIncl[T goconstraints.Ordered](start, end T) *TypedConstraint[T]
func (*TypedConstraint[T]) CheckVal ¶
func (c *TypedConstraint[T]) CheckVal(val T) error
func (*TypedConstraint[T]) GetLimits ¶
func (c *TypedConstraint[T]) GetLimits() []any
func (*TypedConstraint[T]) GetType ¶
func (c *TypedConstraint[T]) GetType() ConstraintType
type TypedInput ¶
type TypedInput[T any] struct { Type string Optional bool // contains filtered or unexported fields }
func NewTypedInput ¶
func NewTypedInput[T any]() *TypedInput[T]
func NewTypedInputOptional ¶
func NewTypedInputOptional[T any]() *TypedInput[T]
func (*TypedInput[T]) Connect ¶
func (in *TypedInput[T]) Connect(o Output) error
func (*TypedInput[T]) GetType ¶
func (in *TypedInput[T]) GetType() string
func (*TypedInput[T]) GetValue ¶
func (in *TypedInput[T]) GetValue() T
func (*TypedInput[T]) IsAsynchronous ¶
func (in *TypedInput[T]) IsAsynchronous() bool
func (*TypedInput[T]) IsConnected ¶
func (in *TypedInput[T]) IsConnected() bool
func (*TypedInput[T]) IsOptional ¶
func (in *TypedInput[T]) IsOptional() bool
func (*TypedInput[T]) IsValueSet ¶
func (in *TypedInput[T]) IsValueSet() bool
type TypedInputAsync ¶
type TypedInputAsync[T any] struct { Type string Optional bool // contains filtered or unexported fields }
func NewTypedInputAsync ¶
func NewTypedInputAsync[T any]() *TypedInputAsync[T]
func NewTypedInputAsyncOptional ¶
func NewTypedInputAsyncOptional[T any]() *TypedInputAsync[T]
func (*TypedInputAsync[T]) Connect ¶
func (in *TypedInputAsync[T]) Connect(o Output) error
func (*TypedInputAsync[T]) GetTime ¶
func (in *TypedInputAsync[T]) GetTime() time.Time
func (*TypedInputAsync[T]) GetType ¶
func (in *TypedInputAsync[T]) GetType() string
func (*TypedInputAsync[T]) GetValue ¶
func (in *TypedInputAsync[T]) GetValue() T
func (*TypedInputAsync[T]) IsAsynchronous ¶
func (in *TypedInputAsync[T]) IsAsynchronous() bool
func (*TypedInputAsync[T]) IsConnected ¶
func (in *TypedInputAsync[T]) IsConnected() bool
func (*TypedInputAsync[T]) IsOptional ¶
func (in *TypedInputAsync[T]) IsOptional() bool
func (*TypedInputAsync[T]) IsValueSet ¶
func (in *TypedInputAsync[T]) IsValueSet() bool
type TypedOutput ¶
type TypedOutput[T any] struct { Type string Ins []*TypedInput[T] // contains filtered or unexported fields }
func NewTypedOutput ¶
func NewTypedOutput[T any]() *TypedOutput[T]
func (*TypedOutput[T]) ClearValue ¶
func (out *TypedOutput[T]) ClearValue()
func (*TypedOutput[T]) Connect ¶
func (out *TypedOutput[T]) Connect(i Input) error
func (*TypedOutput[T]) DisconnectAll ¶
func (out *TypedOutput[T]) DisconnectAll()
func (*TypedOutput[T]) GetConnected ¶
func (out *TypedOutput[T]) GetConnected() []Input
func (*TypedOutput[T]) GetType ¶
func (out *TypedOutput[T]) GetType() string
func (*TypedOutput[T]) GetValue ¶
func (out *TypedOutput[T]) GetValue() T
func (*TypedOutput[T]) IsAsynchronous ¶
func (out *TypedOutput[T]) IsAsynchronous() bool
func (*TypedOutput[T]) IsConnected ¶
func (out *TypedOutput[T]) IsConnected() bool
func (*TypedOutput[T]) IsValueSet ¶
func (out *TypedOutput[T]) IsValueSet() bool
func (*TypedOutput[T]) SetIfConnected ¶
func (out *TypedOutput[T]) SetIfConnected(calcVal func() T)
func (*TypedOutput[T]) SetValue ¶
func (out *TypedOutput[T]) SetValue(val T)
type TypedOutputAsync ¶
type TypedOutputAsync[T any] struct { Type string Ins []*TypedInputAsync[T] // contains filtered or unexported fields }
func NewTypedOutputAsync ¶
func NewTypedOutputAsync[T any]() *TypedOutputAsync[T]
func (*TypedOutputAsync[T]) ClearValue ¶
func (out *TypedOutputAsync[T]) ClearValue()
func (*TypedOutputAsync[T]) Connect ¶
func (out *TypedOutputAsync[T]) Connect(i Input) error
func (*TypedOutputAsync[T]) DisconnectAll ¶
func (out *TypedOutputAsync[T]) DisconnectAll()
func (*TypedOutputAsync[T]) GetConnected ¶
func (out *TypedOutputAsync[T]) GetConnected() []Input
func (*TypedOutputAsync[T]) GetType ¶
func (out *TypedOutputAsync[T]) GetType() string
func (*TypedOutputAsync[T]) GetValue ¶
func (out *TypedOutputAsync[T]) GetValue() T
func (*TypedOutputAsync[T]) IsAsynchronous ¶
func (out *TypedOutputAsync[T]) IsAsynchronous() bool
func (*TypedOutputAsync[T]) IsConnected ¶
func (out *TypedOutputAsync[T]) IsConnected() bool
func (*TypedOutputAsync[T]) IsValueSet ¶
func (out *TypedOutputAsync[T]) IsValueSet() bool
func (*TypedOutputAsync[T]) SetIfConnected ¶
func (out *TypedOutputAsync[T]) SetIfConnected(t time.Time, calcVal func() T)
func (*TypedOutputAsync[T]) SetTimeValue ¶
func (out *TypedOutputAsync[T]) SetTimeValue(t time.Time, val T)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_blocks is a generated GoMock package.
|
Package mock_blocks is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.