alejoseb / Modbus-STM32-HAL-FreeRTOS

Modbus TCP and RTU, Master and Slave for STM32 using Cube HAL and FreeRTOS
GNU Lesser General Public License v2.1
539 stars 183 forks source link

modbusHandler_t ModbusH; #46

Closed elhamsut closed 2 years ago

elhamsut commented 2 years ago

Can not instantiate an object from modbusHandler_t ?

alejoseb commented 2 years ago

This library is pure C code not C++.

elhamsut commented 2 years ago

How can I fix this issue?

On Sat, Jan 8, 2022, 7:09 PM Alejandro Mera @.***> wrote:

This library is pure C code not C++.

— Reply to this email directly, view it on GitHub https://github.com/alejoseb/Modbus-STM32-HAL-FreeRTOS/issues/46#issuecomment-1008029697, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILLEA3PMP52FKNBS4FRY3LUVBLB7ANCNFSM5LQOQOEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

alejoseb commented 2 years ago

There are plenty of options, you can look online how to use c from c++. Ultimately, you can write a class using the modbus structure and methods provided in this library. That will require considerable refactoring, which is beyond the scope of this library.