41 lines
1.1 KiB
Go
41 lines
1.1 KiB
Go
package cnc
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
)
|
|
|
|
var (
|
|
ErrMachineNotReady = errors.New("机床未连接")
|
|
)
|
|
|
|
// Read is a stub — FOCAS not yet integrated.
|
|
func (m *Manager) Read(ctx context.Context, machineId int, address string) ([]byte, error) {
|
|
return nil, ErrMachineNotReady
|
|
}
|
|
|
|
// ReadBool is a stub — FOCAS not yet integrated.
|
|
func (m *Manager) ReadBool(ctx context.Context, machineId int, address string) (bool, error) {
|
|
return false, ErrMachineNotReady
|
|
}
|
|
|
|
// Write is a stub — FOCAS not yet integrated.
|
|
func (m *Manager) Write(ctx context.Context, machineId int, address string, v []byte) error {
|
|
return ErrMachineNotReady
|
|
}
|
|
|
|
// WriteBool is a stub — FOCAS not yet integrated.
|
|
func (m *Manager) WriteBool(ctx context.Context, machineId int, address string, v bool) error {
|
|
return ErrMachineNotReady
|
|
}
|
|
|
|
// RunProgram is a stub — FOCAS not yet integrated.
|
|
func (m *Manager) RunProgram(ctx context.Context, machineId int, programNo int) error {
|
|
return ErrMachineNotReady
|
|
}
|
|
|
|
// ReadProgramList is a stub — FOCAS not yet integrated.
|
|
func (m *Manager) ReadProgramList(ctx context.Context, machineId int) ([]string, error) {
|
|
return nil, ErrMachineNotReady
|
|
}
|