k3

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

Package k3 provides convenience functions for supporting k3 toolchain. k3 is the predecessor of the ntt project.

Index

Constants

This section is empty.

Variables

View Source
var DefaultEnv = map[string]string{
	"CXX":        "g++",
	"CC":         "gcc",
	"ASN1C":      "asn1",
	"ASN1CFLAGS": "-reservedWords ffs -c -charIntegers -listingFile -messageFormat emacs -noDefines -valuerefs -debug -root -soed",
	"ASN2TTCN":   "asn1tottcn3",
}

DefaultEnv is the default environment for k3-based test suites.

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound is returned when k3 or part of k3 is not found.

Functions

func CLibDirs

func CLibDirs() []string

func Compiler

func Compiler() string

Compiler returns the path to the TTCN-3 compiler. Compiler will return "mtc" if no compiler is found.

func Includes

func Includes() []string

Includes returns a list of TTCN-3 include directories required by the k3 compiler.

func NewASN1Codec

func NewASN1Codec(vars map[string]string, name string, encoding string, srcs ...string) []*proc.Cmd

NewASN1Codec returns the commands required to compile ASN.1 files.

func NewPlugin

func NewPlugin(vars map[string]string, name string, srcs ...string) []*proc.Cmd

NewPlugin returns the commands for building a k3 plugin.

func NewT3XF

func NewT3XF(vars map[string]string, t3xf string, srcs []string, imports ...string) []*proc.Cmd

NewT3XF returns the commands for building a T3XF.

func OssInfo

func OssInfo() string

OssInfo returns the path to the ossinfo file.

func Plugins

func Plugins() []string

Plugins returns a list of k3 plugins.

func Runtime

func Runtime() string

Runtime returns the path to the TTCN-3 runtime. Runtime will return "k3r" if no runtime is found.

Types

type Instance

type Instance struct {
	Root string

	Compiler  string
	Runtime   string
	Plugins   []string
	Includes  []string
	CLibDirs  []string
	CIncludes []string

	OssInfo string
	// contains filtered or unexported fields
}

func Find

func Find() Instance

type TTCN3Library

type TTCN3Library struct {
	// contains filtered or unexported fields
}

func NewTTCN3Library

func NewTTCN3Library(vars map[string]string, name string, srcs ...string) []*TTCN3Library

NewTTCN3Library returns the commands for building a TTCN-3 library.

func (*TTCN3Library) Inputs

func (l *TTCN3Library) Inputs() []string

func (*TTCN3Library) Outputs

func (l *TTCN3Library) Outputs() []string

func (*TTCN3Library) Run

func (l *TTCN3Library) Run() error

func (*TTCN3Library) String

func (l *TTCN3Library) String() string

Jump to

Keyboard shortcuts

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