arduino-libraries / ArduinoModbus

252 stars 120 forks source link

added methods to configure modbus server to existing data stuctures #52

Closed ASolchen closed 2 years ago

ASolchen commented 3 years ago

With memory being tight on most micro controllers, I felt like I shouldn't have to allocate memory for modbus to use, but instead point the server at existing data structures. If the structures are not of the same type, the user can cast it as such.

github-actions[bot] commented 3 years ago

Memory usage change @ f53379ab577d793f9a9923aaef3543795d84bf8b

Board flash % RAM for global variables %
arduino:avr:leonardo 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:avr:nano 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed:envie_m7 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed:nano33ble 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table Board|examples/RTU/ModbusRTUClientKitchenSink
flash|%|examples/RTU/ModbusRTUClientKitchenSink
RAM for global variables|%|examples/RTU/ModbusRTUClientToggle
flash|%|examples/RTU/ModbusRTUClientToggle
RAM for global variables|%|examples/RTU/ModbusRTUServerKitchenSink
flash|%|examples/RTU/ModbusRTUServerKitchenSink
RAM for global variables|%|examples/RTU/ModbusRTUServerLED
flash|%|examples/RTU/ModbusRTUServerLED
RAM for global variables|%|examples/RTU/ModbusRTUTemperatureSensor
flash|%|examples/RTU/ModbusRTUTemperatureSensor
RAM for global variables|% -|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|- arduino:avr:leonardo|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0 arduino:avr:nano|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0 arduino:mbed:envie_m7|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0 arduino:mbed:nano33ble|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0
Click for full report CSV ``` Board,examples/RTU/ModbusRTUClientKitchenSink
flash,%,examples/RTU/ModbusRTUClientKitchenSink
RAM for global variables,%,examples/RTU/ModbusRTUClientToggle
flash,%,examples/RTU/ModbusRTUClientToggle
RAM for global variables,%,examples/RTU/ModbusRTUServerKitchenSink
flash,%,examples/RTU/ModbusRTUServerKitchenSink
RAM for global variables,%,examples/RTU/ModbusRTUServerLED
flash,%,examples/RTU/ModbusRTUServerLED
RAM for global variables,%,examples/RTU/ModbusRTUTemperatureSensor
flash,%,examples/RTU/ModbusRTUTemperatureSensor
RAM for global variables,% arduino:avr:leonardo,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0 arduino:avr:nano,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0 arduino:mbed:envie_m7,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0 arduino:mbed:nano33ble,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0 ```
CLAassistant commented 3 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

nsted commented 3 years ago

Thanks for this PR. I've been using it and loving it.

ASolchen commented 3 years ago

Thanks for the feedback. Happy to help!

On Wed, Jun 2, 2021, 08:46 Nicholas Stedman @.***> wrote:

Thanks for this PR. I've been using it and loving it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/arduino-libraries/ArduinoModbus/pull/52#issuecomment-853041418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3JUNSEDZ2WJIBFAKR6JXLTQYYZPANCNFSM42AZ7OCQ .

ASolchen commented 3 years ago

I've tried signing the CLA several times. It still shows "not signed yet."

per1234 commented 3 years ago

It still shows "not signed yet."

Hi @ASolchen. Thanks so much for your pull request. The problem with the CLA is that the commit is by @testtechsolutions, not by your @ASolchen user. The email address of the user signing the CLA must match to that of the author of the commit.

per1234 commented 2 years ago

Closing in favor of https://github.com/arduino-libraries/ArduinoModbus/pull/73, which is this proposal but with the CLA fixed. Thanks @ASolchen!