eebus-go icon indicating copy to clipboard operation
eebus-go copied to clipboard

Implement JSON RPC2 interface

Open DerAndereAndi opened this issue 1 year ago • 2 comments

The task is to coordinate development of JSON RPC2 implementation in https://github.com/enbility/eebus-go/pull/129

These items have been agreed upon:

  • [ ] Define Interface API
  • [ ] The EEBUS service should not start automatically, instead the option to start & stop should be used
  • [ ] Allow only one TCP connection at a time
  • [ ] Monitor active TCP connection and automatically call api.ServiceInterface.Shutdown() on disconnect
  • [ ] Add JSON parsing support for api.DeviceRemoteInterface and api.EntityRemoteInterface nested in structs (e. g. api.UseCaseBaseInterface.RemoteEntitiesScenarios()
  • [ ] ...

Please add your suggestions in comments and lets discuss them.

DerAndereAndi avatar Oct 28 '24 17:10 DerAndereAndi

Some suggestions:

  • Remove service autostart
  • Allow only one TCP connection at a time
  • Monitor active TCP connection and automatically call api.ServiceInterface.Shutdown() on disconnect
  • Always return all return parameters
  • Add JSON parsing support for api.DeviceRemoteInterface and api.EntityRemoteInterface nested in structs (e. g. api.UseCaseBaseInterface.RemoteEntitiesScenarios()

I've created https://github.com/enbility/eebus-go/pull/131 to clean up the return parameters a bit

sthelen-enqs avatar Oct 29 '24 15:10 sthelen-enqs