Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandList ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func (*Controller) CallProcedure ¶
func (c *Controller) CallProcedure(apiver uint8, module moduletype, proc procedure, id uint8, arg []byte) error
func (*Controller) Exec ¶
func (c *Controller) Exec(proc *Process) error
func (*Controller) SetProcedures ¶
func (c *Controller) SetProcedures(apiver uint8, module moduletype, fn func(proc procedure, id uint8, arg []byte) error)
func (*Controller) VisitProcedures ¶
type ControllerConfig ¶
type ControllerConfig struct { // CRC is the CRC32 of the configuration packet, not including the CRC field (zeroed). CRC uint32 // Registers contains the static configuration of the process controller. Registers []Register // CommandLists contains available actions that may be performed // by the modules available to the process controller. CommandLists []CommandList // Sequences contains Sequences []Sequence // contains filtered or unexported fields }
ControllerConfig is the configuration of the process controller.
func (*ControllerConfig) AddCommand ¶
func (cfg *ControllerConfig) AddCommand(apiver uint8, module moduletype, cmd Command)
func (ControllerConfig) GetCommandList ¶
func (cfg ControllerConfig) GetCommandList(apiver uint8, module moduletype) *CommandList
GetCommandList returns the command list for the given API version and module type.
func (ControllerConfig) Reset ¶
func (cfg ControllerConfig) Reset()
type Process ¶
type Process struct { // CRC is the CRC32 of the process packet, not including the CRC field (zeroed). CRC uint32 Flags ProcessFlags Start maybetime // ConfigCRC is the CRC32 of the configuration stored in the process controller. Must match. ConfigCRC uint32 // Units defines the process actions to be performed. The first unit is the start of the process. Units []Unit // contains filtered or unexported fields }
Process is a complete definition of a process to be executed by the process controller.
type ProcessFlags ¶
type ProcessFlags uint64
type Rx ¶
type Rx struct {
// contains filtered or unexported fields
}
func (*Rx) Reset ¶
func (r *Rx) Reset(rd io.ReadCloser)
type Sequence ¶
type Sequence struct { // Name is the human readable name of the sequence. Name [8]byte // Commands lists the commands to be executed in the sequence, in order. Commands []SequenceCommand }
type SequenceCommand ¶
type SequenceCommand struct { // CommandIndex is the 0-based index of the Command in the CommandList. CommandIndex uint16 APIVersion uint8 // The identifier of the module to execute the command on. // For example, there may be several pumps in a process controller, each with a unique identifier. ModuleID uint8 // ModuleType is the type of the module to execute the command on. Together with // APIVersion they select the CommandList to use. ModuleType moduletype }
type Unit ¶
type Unit struct { Flags UnitFlags // Sequence is the index of this unit's sequence in the process controller's configuration. Sequence uint16 // Next is the index of the next Unit in the process. Next uint16 // Forks are the index of the forks to be started after running the unit. Forks []uint16 }
Unit represents a process control flow step in a Process. Actions of a Unit are represented as indices corresponding to the configuration of the process controller.
Click to show internal directories.
Click to hide internal directories.