edgexfoundry / edgexfoundry/device-modbus-go

Simulator broken

Open
#676 0 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
Go
Stars
120
Forks
105
PR merge metrics
No merged PRs in 30d

Description

# 🐞 Bug Report

### Affected Services [**REQUIRED**]

The issue is located in: simulator/main.go

### Is this a regression?

Kinda. The simulator lib is dependent on goborrow modbus and isn't cross compatble with grid-x one.

### Description and Minimal Reproduction [**REQUIRED**]

Just open the simulator main file in editor. language server will start complaining about missing sum file and then after `tidying` below error

## 🔥 Exception or Error

```
cannot use config (variable of type *"github.com/grid-x/serial".Config) as *"github.com/goburrow/serial".Config value in argument to device.ListenRTUcompiler[IncompatibleAssign](https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#IncompatibleAssign)
```
## 🌍 Your Environment
**Deployment Environment:** Vscode

**EdgeX Version [**REQUIRED**]: main branch v4

**Anything else relevant?**

Currently using `diagslave` but still registering this issue as something needs to be done here. `grid-x/modbus` doesn't have a corresponding simulator. So maybe, a seperate lib or adapt the code of `tbrandon/mbserver` to be compatible with new libs.

Contributor guide

Open the contributing guide

Research direction

Start with simulator/main.go and inspect its goburrow/serial and grid-x/serial dependencies. Reproduce the missing sum-file and incompatible Config errors in VSCode after tidying the module; done means the simulator has a decided compatible implementation and no longer reports the shown type error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.