Documentation ¶
Overview ¶
Package omron assists in deciphering omron communication protocol message.
This package is written by inspecting messages from the Chiltrix CX34.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface { // String returns a human readable explanation of the command. String() string // contains filtered or unexported methods }
Command is an interface implemented by all values of ParsedCommand.
type CommandFrame ¶
type CommandFrame struct { NodeNumber uint8 HeaderCode HeaderCode Text string Check uint8 ParsedCommand Command }
CommandFrame is described here: https://paginas.fe.up.pt/~pfs/recursos/plcs/omron/cqm1/sbc_manual/sec4.pdf 4-4-1
func ParseCommandFrame ¶
func ParseCommandFrame(line string) (*CommandFrame, error)
ParseCommandFrame returns a CommandFrame parsed from a line of text.
type DMAreaReadCommand ¶
type DMAreaReadCommand struct { // First word to read 0000-6655 BeginningWord uint16 // Number of words to read NumberOfWords uint16 }
func (*DMAreaReadCommand) String ¶
func (r *DMAreaReadCommand) String() string
type DMAreaReadResponse ¶
func (*DMAreaReadResponse) String ¶
func (r *DMAreaReadResponse) String() string
type DMAreaWriteCommand ¶
type DMAreaWriteCommand struct { // First word to read 0000-6655 BeginningWord uint16 // Words to write starting at BeginningWord. Data []uint16 }
func (*DMAreaWriteCommand) String ¶
func (r *DMAreaWriteCommand) String() string
type DMAreaWriteResponse ¶
func (*DMAreaWriteResponse) String ¶
func (r *DMAreaWriteResponse) String() string
type HeaderCode ¶
type HeaderCode string
HeaderCode is one of the codes from 4-4-3 of https://paginas.fe.up.pt/~pfs/recursos/plcs/omron/cqm1/sbc_manual/sec4.pdf. and https://assets.omron.eu/downloads/manual/en/w364_cqm1h_series_programming_manual_en.pdf.
const ( RD HeaderCode = "RD" // DM AREA READ WD HeaderCode = "WD" // DM AREA WRITE )
Valid header codes.
func (HeaderCode) Valid ¶
func (hc HeaderCode) Valid() bool