Documentation
¶
Overview ¶
Package s7 implements the Siemens S7 protocol driver for CoreC. Supports S7-200, S7-300, S7-400, S7-1200, and S7-1500 PLCs.
Index ¶
- func NewS7Driver(config core.DriverConfig) (core.Driver, error)
- type S7Driver
- func (d *S7Driver) Capabilities() core.DriverCapabilities
- func (d *S7Driver) Init(ctx context.Context, config core.DriverConfig) error
- func (d *S7Driver) Name() string
- func (d *S7Driver) Read(ctx context.Context, tags []string) ([]core.TagValue, error)
- func (d *S7Driver) Restart(ctx context.Context, config core.DriverConfig) error
- func (d *S7Driver) Start(ctx context.Context) error
- func (d *S7Driver) Status() core.DriverStatus
- func (d *S7Driver) Stop() error
- func (d *S7Driver) Subscribe(ctx context.Context, tags []string) (<-chan core.DataPoint, error)
- func (d *S7Driver) Type() string
- func (d *S7Driver) Write(ctx context.Context, commands []core.WriteCommand) ([]core.WriteResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewS7Driver ¶
func NewS7Driver(config core.DriverConfig) (core.Driver, error)
NewS7Driver creates a new S7 driver from configuration.
Types ¶
type S7Driver ¶
type S7Driver struct {
// contains filtered or unexported fields
}
S7Driver implements core.Driver for Siemens S7 PLC communication.
func (*S7Driver) Capabilities ¶
func (d *S7Driver) Capabilities() core.DriverCapabilities
func (*S7Driver) Status ¶
func (d *S7Driver) Status() core.DriverStatus
func (*S7Driver) Write ¶
func (d *S7Driver) Write(ctx context.Context, commands []core.WriteCommand) ([]core.WriteResult, error)