gem

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package gem provides functions for creating GEM (Generic Equipment Model) messages according to the SEMI E30 standard.

This package offers a convenient way to generate SECS-II messages for various GEM message types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func S9F1

func S9F1() secs2.SECS2Message

S9F1 creates an S9F1 (Unrecognized Device ID) message.

SEMI E30 Description: This message is sent when an unrecognized Device ID is received in a message.

func S9F11

func S9F11() secs2.SECS2Message

S9F11 creates an S9F11 (Data Too Long) message.

SEMI E30 Description: This message is sent when the length of the data in a message exceeds the maximum message length that the equipment can process.

func S9F13

func S9F13() secs2.SECS2Message

S9F13 creates an S9F13 (Conversation Timeout) message.

SEMI E30 Description: This message is sent when the host fails to respond to a message within the timeout period.

func S9F3

func S9F3() secs2.SECS2Message

S9F3 creates an S9F3 (Unrecognized Stream Type) message.

SEMI E30 Description: This message is sent when an unrecognized Stream Type is received in a message.

func S9F5

func S9F5() secs2.SECS2Message

S9F5 creates an S9F5 (Unrecognized Function Type) message.

SEMI E30 Description: This message is sent when an unrecognized Function Type is received in a message.

func S9F7

func S9F7() secs2.SECS2Message

S9F7 creates an S9F7 (Illegal Data) message.

SEMI E30 Description: This message is sent when the data is illegal for the Function Type.

func S9F9

func S9F9() secs2.SECS2Message

S9F9 creates an S9F9 (Transaction Timeout) message.

SEMI E30 Description: This message is sent when the equipment fails to process a message from the host within the timeout period.

Types

type Message added in v1.2.0

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

Message represents a message conforming to the SEMI E30 standard, also known as the GEM (Generic Equipment Model) standard. It implements the secs2.SECS2Message interface.

Message encapsulates the core components of a GEM message:

  • s: The stream number, identifying the message category.
  • f: The function number, specifying the specific function within the stream.
  • w: The wait bit (W-bit), indicating whether a reply is expected from the receiver.
  • item: The SECS-II data item carried by the message, containing the actual data payload.

func NewMessage added in v1.1.1

func NewMessage(s uint8, f uint8, w bool, item secs2.Item) *Message

NewMessage creates a new Message with the specified stream code (s), function code (f), wait bit (w), and SECS-II data item (item).

The wait bit (w) should be set to true if a reply is expected from the receiver, and false otherwise.

func (*Message) FunctionCode added in v1.2.0

func (msg *Message) FunctionCode() uint8

FunctionCode returns the function code for the SECS-II message.

func (*Message) Item added in v1.2.0

func (msg *Message) Item() secs2.Item

Item returns the SECS-II data item.

func (*Message) StreamCode added in v1.2.0

func (msg *Message) StreamCode() uint8

StreamCode returns the stream code for the SECS-II message.

func (*Message) WaitBit added in v1.2.0

func (msg *Message) WaitBit() bool

WaitBit() returns the boolean representation of W-Bit for the SECS-II message.

Jump to

Keyboard shortcuts

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