func NewReject(invID, problemType int, problemCode uint8, param []byte) *Component {
	c := &Component{
		Type: NewContextSpecificConstructorTag(Invoke),
		InvokeID: &IE{
			Tag:    NewUniversalPrimitiveTag(2),
			Length: 1,
			Value:  []byte{uint8(invID)},
		},
		ProblemCode: &IE{
			Tag:    NewContextSpecificPrimitiveTag(problemType),
			Length: 1,
			Value:  []byte{problemCode},
		},
	}
	if param != nil {
		if err := c.setParameterFromBytes(param); err != nil {
			logf("failed to build Parameter: %v", err)
		}
	}
	c.SetLength()
	return c
}
NewReject returns a new single Reject Component.
package tcap
import (
	"fmt"
	"io"
)
const (
	Invoke int = iota + 1
	ReturnResultLast
	ReturnError
	Reject
	_
	_
	ReturnResultNotLast
)
const (
	GeneralProblem int = iota
	InvokeProblem
	ReturnResultProblem
	ReturnErrorProblem
)
const (
	UnrecognizedComponent uint8 = iota
	MistypedComponent
	BadlyStructuredComponent
)
const (
	InvokeProblemDuplicateInvokeID uint8 = iota
	InvokeProblemUnrecognizedOperation
	InvokeProblemMistypedParameter
	InvokeProblemResourceLimitation
	InvokeProblemInitiatingRelease
	InvokeProblemUnrecognizedLinkedID
	InvokeProblemLinkedResponseUnexpected
	InvokeProblemUnexpectedLinkedOperation
)
const (
	ResultProblemUnrecognizedInvokeID uint8 = iota
	ResultProblemReturnResultUnexpected
	ResultProblemMistypedParameter
)
const (
	ErrorProblemUnrecognizedInvokeID uint8 = iota
	ErrorProblemReturnErrorUnexpected
	ErrorProblemUnrecognizedError
	ErrorProblemUnexpectedError
	ErrorProblemMistypedParameter
)
type Components struct {
	Tag       Tag
	Length    uint8
	Component []*Component
}
type Component struct {
	Type          Tag
	Length        uint8
	InvokeID      *IE
	LinkedID      *IE
	ResultRetres  *IE
	SequenceTag   *IE
	OperationCode *IE
	ErrorCode     *IE
	ProblemCode   *IE
	Parameter     *IE
}
func NewComponents(comps ...*Component) *Components {
	c := &Components{
		Tag:       NewApplicationWideConstructorTag(12),
		Component: comps,
	}
	c.SetLength()
	return c
}
func NewInvoke(invID, lkID, opCode int, isLocal bool, param []byte) *Component {
	c := &Component{
		Type: NewContextSpecificConstructorTag(Invoke),
		InvokeID: &IE{
			Tag:    NewUniversalPrimitiveTag(2),
			Length: 1,
			Value:  []byte{uint8(invID)},
		},
		OperationCode: NewOperationCode(opCode, isLocal),
	}
	if lkID > 0 {
		c.LinkedID = &IE{
			Tag:    NewContextSpecificPrimitiveTag(0),
			Length: 1,
			Value:  []byte{uint8(lkID)},
		}
	}
	if param != nil {
		if err := c.setParameterFromBytes(param); err != nil {
			logf("failed to build Parameter: %v", err)
		}
	}
	c.SetLength()
	return c
}
func NewReturnResult(invID, opCode int, isLocal, isLast bool, param []byte) *Component {
	tag := ReturnResultNotLast
	if isLast {
		tag = ReturnResultLast
	}
	c := &Component{
		Type: NewContextSpecificConstructorTag(tag),
		ResultRetres: &IE{
			Tag: NewUniversalConstructorTag(0x10),
		},
		InvokeID: &IE{
			Tag:    NewUniversalPrimitiveTag(2),
			Length: 1,
			Value:  []byte{uint8(invID)},
		},
		OperationCode: NewOperationCode(opCode, isLocal),
	}
	if param != nil {
		if err := c.setParameterFromBytes(param); err != nil {
			logf("failed to build Parameter: %v", err)
		}
	}
	c.SetLength()
	return c
}
func NewReturnError(invID, errCode int, isLocal bool, param []byte) *Component {
	c := &Component{
		Type: NewContextSpecificConstructorTag(ReturnError),
		InvokeID: &IE{
			Tag:    NewUniversalPrimitiveTag(2),
			Length: 1,
			Value:  []byte{uint8(invID)},
		},
		ErrorCode: NewErrorCode(errCode, isLocal),
	}
	if param != nil {
		if err := c.setParameterFromBytes(param); err != nil {
			logf("failed to build Parameter: %v", err)
		}
	}
	c.SetLength()
	return c
}