cpngo

package
v0.0.0-...-54d7777 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InputArc

type InputArc struct {
	ID     string `json:"id"`
	Expr   string `json:"expr"`
	FromID string `json:"from_id"`
	ToID   string `json:"to_id"`
}

type Net

type Net struct {
	Places      []Place      `json:"places"`
	Transitions []Transition `json:"transitions"`
	InputArcs   []InputArc   `json:"input_arcs"`
	OutputArcs  []OutputArc  `json:"output_arcs"`
	Tokens      []Token      `json:"tokens"`
}

type OutputArc

type OutputArc struct {
	ID     string `json:"id"`
	Expr   string `json:"expr"`
	FromID string `json:"from_id"`
	ToID   string `json:"to_id"`
}

type Place

type Place struct {
	ID string `json:"id"`
}

type Runner

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

func NewRunner

func NewRunner(n *Net) (*Runner, error)

func (*Runner) Enabled

func (r *Runner) Enabled() []*Transition

func (*Runner) Fire

func (r *Runner) Fire(id string) error

func (*Runner) FireAny

func (r *Runner) FireAny() error

func (*Runner) InputArcs

func (r *Runner) InputArcs() []InputArc

func (*Runner) Net

func (r *Runner) Net() Net

func (*Runner) OutputArcs

func (r *Runner) OutputArcs() []OutputArc

func (*Runner) Places

func (r *Runner) Places() []Place

func (*Runner) Tokens

func (r *Runner) Tokens() []Token

func (*Runner) Transitions

func (r *Runner) Transitions() []Transition

type Token

type Token struct {
	ID      string `json:"id"`
	PlaceID string `json:"place_id"`
	Color   any    `json:"color"`
}

type Transition

type Transition struct {
	ID string `json:"id"`
}

Jump to

Keyboard shortcuts

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