ir

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	SenderSide    PortAddr                 `json:"sender_side,omitempty"`
	ReceiverSides []ReceiverConnectionSide `json:"receiver_sides,omitempty"`
}

Connection represents connections between ports.

type FuncCall

type FuncCall struct {
	Ref string `json:"ref,omitempty"`
	IO  FuncIO `json:"io,omitempty"`
	Msg *Msg   `json:"msg,omitempty"`
}

FuncCall represents a function within the program.

type FuncIO

type FuncIO struct {
	In  []PortAddr `json:"in,omitempty"`  // Must be ordered by path -> port -> idx
	Out []PortAddr `json:"out,omitempty"` // Must be ordered by path -> port -> idx
}

FuncIO represents the input/output ports of a function.

type Msg

type Msg struct {
	Type  MsgType        `json:"-"`
	Bool  bool           `json:"bool,omitempty"`
	Int   int64          `json:"int,omitempty"`
	Float float64        `json:"float,omitempty"`
	Str   string         `json:"str,omitempty"`
	List  []Msg          `json:"list,omitempty"`
	Map   map[string]Msg `json:"map,omitempty"`
}

Msg represents a message.

type MsgType

type MsgType int32

MsgType is an enumeration of message types.

const (
	MsgTypeUnspecified MsgType = 0
	MsgTypeBool        MsgType = 1
	MsgTypeInt         MsgType = 2
	MsgTypeFloat       MsgType = 3
	MsgTypeString      MsgType = 4
	MsgTypeList        MsgType = 5
	MsgTypeMap         MsgType = 6
)

type PortAddr

type PortAddr struct {
	Path string `json:"path,omitempty"`
	Port string `json:"port,omitempty"`
	Idx  uint32 `json:"index,omitempty"`
}

PortAddr represents the address of a port.

type PortInfo

type PortInfo struct {
	PortAddr PortAddr `json:"port_addr,omitempty"`
	BufSize  uint32   `json:"buf_size,omitempty"`
}

PortInfo contains information about each port.

type Program

type Program struct {
	Ports       []PortInfo   `json:"ports,omitempty"`
	Connections []Connection `json:"connections,omitempty"`
	Funcs       []FuncCall   `json:"funcs,omitempty"`
}

Program represents the main structure containing ports, connections, and funcs.

type ReceiverConnectionSide

type ReceiverConnectionSide struct {
	PortAddr PortAddr `json:"port_addr,omitempty"`
}

ReceiverConnectionSide represents the receiver side of a connection.

Jump to

Keyboard shortcuts

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