Versions in this module Expand all Collapse all v0 v0.0.1 May 20, 2022 Changes in this version + const CommandCodeAccessRightAcquire + const CommandCodeAccessRightForcedAcquire + const CommandCodeAccessRightRelease + const CommandCodeCPUUnitDataRead + const CommandCodeCPUUnitStatusRead + const CommandCodeClockRead + const CommandCodeClockWrite + const CommandCodeConnectionDataRead + const CommandCodeConvertToCompoWayFCommand + const CommandCodeConvertToModbusASCIICommand + const CommandCodeConvertToModbusRTUCommand + const CommandCodeCycleTimeRead + const CommandCodeDirectoryCreateDelete + const CommandCodeErrorClear + const CommandCodeErrorLogClear + const CommandCodeErrorLogRead + const CommandCodeFINSWriteAccessLogRead + const CommandCodeFINSWriteAccessLogWrite + const CommandCodeFileCopy + const CommandCodeFileDelete + const CommandCodeFileMemoryFormat + const CommandCodeFileNameChange + const CommandCodeFileNameRead + const CommandCodeForcedSetReset + const CommandCodeForcedSetResetCancel + const CommandCodeMemoryAreaFileTransfer + const CommandCodeMemoryAreaFill + const CommandCodeMemoryAreaRead + const CommandCodeMemoryAreaTransfer + const CommandCodeMemoryAreaWrite + const CommandCodeMemoryCassetteTransfer + const CommandCodeMessageReadClear + const CommandCodeMultipleMemoryAreaRead + const CommandCodeParameterAreaClear + const CommandCodeParameterAreaFileTransfer + const CommandCodeParameterAreaRead + const CommandCodeParameterAreaWrite + const CommandCodeProgramAreaClear + const CommandCodeProgramAreaFileTransfer + const CommandCodeProgramAreaRead + const CommandCodeProgramAreaWrite + const CommandCodeRun + const CommandCodeSingleFileRead + const CommandCodeSingleFileWrite + const CommandCodeStop + const DEFAULT_RESPONSE_TIMEOUT + const DM_AREA_SIZE + const EndCodeAbortServiceAborted + const EndCodeAccessSizeError + const EndCodeAccessWriteErrorNoAccessRight + const EndCodeAddressRangeError + const EndCodeAddressRangeExceeded + const EndCodeAreaClassificationMissing + const EndCodeCPUUnitError + const EndCodeCannotStartStopTableMissing + const EndCodeCommandErrorErrorWillNotClear + const EndCodeCommandErrorIncorrectPassword + const EndCodeCommandErrorNecessaryItemsNotSet + const EndCodeCommandErrorNoExecutionRight + const EndCodeCommandErrorNoProtection + const EndCodeCommandErrorNumberAlreadyDefined + const EndCodeCommandErrorProtected + const EndCodeCommandErrorServiceAlreadyExecuting + const EndCodeCommandErrorServiceStopped + const EndCodeCommandErrorSettingsNotComplete + const EndCodeCommandFormatError + const EndCodeCommandTooLong + const EndCodeCommandTooShort + const EndCodeCommunicationsControllerError + const EndCodeControllerError + const EndCodeDestinationAddressSettingError + const EndCodeDestinationNodeBusy + const EndCodeDestinationNodeNotInNetwork + const EndCodeDuplicateDataAccess + const EndCodeElementsDataDontMatch + const EndCodeHeaderError + const EndCodeLocalNodeNotInNetwork + const EndCodeNoRoutingTables + const EndCodeNoSuchDeviceClockMissing + const EndCodeNoSuchDeviceFileDeviceMissing + const EndCodeNoSuchDeviceMemoryMissing + const EndCodeNodeAddressRangeDuplication + const EndCodeNodeAddressRangeError + const EndCodeNormalCompletion + const EndCodeNotExecutableInCurrentModeNotPossibleDuringExecution + const EndCodeNotExecutableInCurrentModeNotPossibleWhileRunning + const EndCodeNotExecutableInCurrentModeSpecifiedNodeNotPollingNode + const EndCodeNotExecutableInCurrentModeStepCannotBeExecuted + const EndCodeNotExecutableInCurrentModeWrongPLCModeInDebug + const EndCodeNotExecutableInCurrentModeWrongPLCModeInMonitor + const EndCodeNotExecutableInCurrentModeWrongPLCModeInProgram + const EndCodeNotExecutableInCurrentModeWrongPLCModeInRun + const EndCodeNotSupportedByModelVersion + const EndCodeParameterError + const EndCodeProgramMissing + const EndCodeReadNotPossibleDataMismatch + const EndCodeReadNotPossibleDataMissing + const EndCodeReadNotPossibleFileMissing + const EndCodeReadNotPossibleProgramMissing + const EndCodeReadNotPossibleProtected + const EndCodeReadNotPossibleTableMissing + const EndCodeRelationalError + const EndCodeResponseTimeout + const EndCodeResponseTooBig + const EndCodeRetriesFailed + const EndCodeRoutingTableError + const EndCodeServiceInterrupted + const EndCodeThirdNodeMissing + const EndCodeTokenTimeout + const EndCodeTooManyRelays + const EndCodeTooManySendFrames + const EndCodeUndefinedCommand + const EndCodeUnitErrorCPUBusError + const EndCodeUnitErrorCPUBusUnitError + const EndCodeUnitErrorIOBusError + const EndCodeUnitErrorIODuplication + const EndCodeUnitErrorIOError + const EndCodeUnitErrorMemoryError + const EndCodeUnitErrorMemoryStatusError + const EndCodeUnitErrorSYSMACBUS2Error + const EndCodeUnitErrorSYSMACBusNumberDuplication + const EndCodeUnitErrorSYSMACBusTerminatorMissing + const EndCodeUnitErrorTooManyIOPoints + const EndCodeUnitMissing + const EndCodeUnitNumberError + const EndCodeWriteNotPossibleCannotChange + const EndCodeWriteNotPossibleCannotRegister + const EndCodeWriteNotPossibleFileMissing + const EndCodeWriteNotPossibleFileNameAlreadyExists + const EndCodeWriteNotPossibleProgramMissing + const EndCodeWriteNotPossibleProtected + const EndCodeWriteNotPossibleReadOnly + const MemoryAreaARBit + const MemoryAreaARWord + const MemoryAreaCIOBit + const MemoryAreaCIOWord + const MemoryAreaClockPulsesConditionFlagsBit + const MemoryAreaDMBit + const MemoryAreaDMWord + const MemoryAreaDataRegisterPV + const MemoryAreaHRBit + const MemoryAreaHRWord + const MemoryAreaIndexRegisterPV + const MemoryAreaTaskBit + const MemoryAreaTaskStatus + const MemoryAreaTimerCounterCompletionFlag + const MemoryAreaTimerCounterPV + const MemoryAreaWRBit + const MemoryAreaWRWord + const MessageTypeCommand + const MessageTypeResponse + type Address struct + func NewAddress(ip string, port int, network, node, unit byte) Address + type BCDBadDigitError struct + func (e BCDBadDigitError) Error() string + type BCDOverflowError struct + func (e BCDOverflowError) Error() string + type Client struct + func NewClient(localAddr, plcAddr Address) (*Client, error) + func (c *Client) Close() + func (c *Client) ReadBits(memoryArea byte, address uint16, bitOffset byte, readCount uint16) ([]bool, error) + func (c *Client) ReadBytes(memoryArea byte, address uint16, readCount uint16) ([]byte, error) + func (c *Client) ReadClock() (*time.Time, error) + func (c *Client) ReadString(memoryArea byte, address uint16, readCount uint16) (string, error) + func (c *Client) ReadWords(memoryArea byte, address uint16, readCount uint16) ([]uint16, error) + func (c *Client) ResetBit(memoryArea byte, address uint16, bitOffset byte) error + func (c *Client) SetBit(memoryArea byte, address uint16, bitOffset byte) error + func (c *Client) SetByteOrder(o binary.ByteOrder) + func (c *Client) SetTimeoutMs(t uint) + func (c *Client) ToggleBit(memoryArea byte, address uint16, bitOffset byte) error + func (c *Client) WriteBits(memoryArea byte, address uint16, bitOffset byte, data []bool) error + func (c *Client) WriteBytes(memoryArea byte, address uint16, b []byte) error + func (c *Client) WriteString(memoryArea byte, address uint16, s string) error + func (c *Client) WriteWords(memoryArea byte, address uint16, data []uint16) error + type Header struct + type IncompatibleMemoryAreaError struct + func (e IncompatibleMemoryAreaError) Error() string + type ResponseTimeoutError struct + func (e ResponseTimeoutError) Error() string + type Server struct + func NewPLCSimulator(plcAddr Address) (*Server, error) + func (s *Server) Close()