Documentation
¶
Index ¶
- func ArrayOfE[T any](klass func(arg Arg) (*T, error), fixedLength int, prototype any) func(Args, KWArgs) (ElementKlass, error)
- func ArrayOfEs[T any](klass func(args Args) (*T, error), fixedLength int, prototype any) func(Args, KWArgs) (ElementKlass, error)
- func ListOfE[T any](b func(arg Arg) (*T, error)) func(Args) (*T, error)
- func SequenceOfE[T any](klass func(arg Arg) (*T, error)) func(Args, KWArgs) (ElementKlass, error)
- func SequenceOfEs[T any](klass func(args Args) (*T, error)) func(Args, KWArgs) (ElementKlass, error)
- func V2E[T any](b func(arg Arg) (*T, error)) func(Args, KWArgs) (ElementKlass, error)
- func Vs2E[T any](b func(args Args) (*T, error)) func(Args, KWArgs) (ElementKlass, error)
- func WithAnyContract(contract AnyContract) func(*Any)
- func WithChoiceExtension(contract ChoiceContractRequirement) GenericApplier[*Choice]
- func WithElementContext(context int) GenericApplier[*_Element]
- func WithElementOptional(optional bool) GenericApplier[*_Element]
- func WithSequenceExtension(contract SequenceContractRequirement) GenericApplier[*Sequence]
- type Any
- type AnyAtomic
- type AnyContract
- type Array
- type Choice
- type ChoiceContract
- type ChoiceContractRequirement
- type Element
- type ElementKlass
- type IsAnyAtomic
- type List
- type Sequence
- type SequenceContract
- type SequenceContractRequirement
- type SequenceOfAny
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayOfEs ¶
func ArrayOfEs[T any](klass func(args Args) (*T, error), fixedLength int, prototype any) func(Args, KWArgs) (ElementKlass, error)
TODO: finish // convert to kwArgs and check wtf we are doing here...
func SequenceOfE ¶
func SequenceOfE[T any](klass func(arg Arg) (*T, error)) func(Args, KWArgs) (ElementKlass, error)
func SequenceOfEs ¶
func SequenceOfEs[T any](klass func(args Args) (*T, error)) func(Args, KWArgs) (ElementKlass, error)
func V2E ¶
func V2E[T any](b func(arg Arg) (*T, error)) func(Args, KWArgs) (ElementKlass, error)
V2E accepts a function which takes an Arg and maps it to a ElementKlass
func Vs2E ¶
func Vs2E[T any](b func(args Args) (*T, error)) func(Args, KWArgs) (ElementKlass, error)
Vs2E accepts a function which takes an Args and maps it to a ElementKlass
func WithAnyContract ¶
func WithAnyContract(contract AnyContract) func(*Any)
func WithChoiceExtension ¶
func WithChoiceExtension(contract ChoiceContractRequirement) GenericApplier[*Choice]
func WithElementContext ¶
func WithElementContext(context int) GenericApplier[*_Element]
func WithElementOptional ¶
func WithElementOptional(optional bool) GenericApplier[*_Element]
func WithSequenceExtension ¶
func WithSequenceExtension(contract SequenceContractRequirement) GenericApplier[*Sequence]
Types ¶
type AnyAtomic ¶
type AnyAtomic struct {
// contains filtered or unexported fields
}
TODO: finish me
func NewAnyAtomic ¶
type AnyContract ¶
type Choice ¶
type Choice struct {
// contains filtered or unexported fields
}
func (*Choice) GetChoiceElements ¶
type ChoiceContract ¶
type ChoiceContract interface {
GetChoiceElements() []Element
}
ChoiceContract provides a set of functions which can be overwritten by a sub struct
type ChoiceContractRequirement ¶
type ChoiceContractRequirement interface { ChoiceContract // SetChoice callback is needed as we work in the constructor already with the finished object // TODO: maybe we need to return as init again as it might not be finished constructing.... SetChoice(s *Choice) }
ChoiceContractRequirement is needed when one want to extend using ChoiceContract
type Element ¶
type Element interface { fmt.Formatter GetName() string GetKlass() func(Args, KWArgs) (ElementKlass, error) GetContext() *int IsOptional() bool Encode(tagList Arg) error }
func NewElement ¶
func NewElement(name string, klass func(Args, KWArgs) (ElementKlass, error), options ...Option) Element
type ElementKlass ¶
type ElementKlass interface { Encode(Arg) error GetAppTag() readWriteModel.BACnetDataType }
type IsAnyAtomic ¶
type IsAnyAtomic interface {
// contains filtered or unexported methods
}
type Sequence ¶
type Sequence struct {
// contains filtered or unexported fields
}
func NewSequence ¶
NewSequence Create a sequence element, optionally providing attribute/property values.
func (*Sequence) GetSequenceElements ¶
type SequenceContract ¶
type SequenceContract interface {
GetSequenceElements() []Element
}
SequenceContract provides a set of functions which can be overwritten by a sub struct
type SequenceContractRequirement ¶
type SequenceContractRequirement interface { SequenceContract // SetSequence callback is needed as we work in the constructor already with the finished object // TODO: maybe we need to return as init again as it might not be finished constructing.... SetSequence(s *Sequence) }
SequenceContractRequirement is needed when one want to extend using SequenceContract