Conversation
so log facilities can now differenciate the origin of a message
|
We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient... |
|
any way to get the license agreement without google docs? For me, google docs is blocked on company policy. |
|
I think @stephane could export a PDF version of the Google form which you can then fill, sign and send back via email... On the other hand, does your company policy disallows you to sign this form with a personal/private browser/internet connection? |
| ## Synopsis | ||
|
|
||
| ```c | ||
| void modbus_set_error_user_data(modbus_t *ctx, void* out_user_data); |
There was a problem hiding this comment.
Are these really void* or should they explicitly be FILE * pointers? The names and the examples and the descriptions don't really line up well here.
There was a problem hiding this comment.
this is form the original PR. This also was the "usual" way to pass arbitrary data for callback when I last did "C", so I didn't change it.
|
|
||
| ## Example | ||
|
|
||
| ```c++ |
There was a problem hiding this comment.
As a C library, I think a plain boring C example is more suitable. C++ as well, sure, ifyou think it's important, but I don't think the only example should be c++
There was a problem hiding this comment.
It's copy/paste from my application code. Don't have a C example at hand.
| ## Synopsis | ||
|
|
||
| ```c | ||
| typedef int (*modbus_stream_handler_t)(void *user, const char *format, va_list ap); |
There was a problem hiding this comment.
this needs to document the return type, at least. Again, void *user vs FILE * is... muddy here. I know you want void * user for when you have a custom handler, and FILE* magically working when you just set the "user data" without registering a custom handler, but this is... very unclear to people not well versed in these things.
There was a problem hiding this comment.
uses printf return type / values. I don't know how to document the void pointer stuff properly, this is a concept you have to understand in order to not make errors...
| MODBUS_API int modbus_trace(modbus_t *ctx, const char* format, ...); | ||
| MODBUS_API int modbus_vtrace(modbus_t *ctx, const char* format, va_list ap); | ||
| MODBUS_API int modbus_trace_error(modbus_t *ctx, const char* format, ...); | ||
| MODBUS_API int modbus_vtrace_error(modbus_t *ctx, const char* format, va_list ap); |
There was a problem hiding this comment.
Are these last 4 really part of the api?
There was a problem hiding this comment.
those are form the original PR. I have no idea where else to put them / how to make them private. There is no harm if you call them.
|
We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient... |
fa74890 to
acacb7d
Compare
|
We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient... |
fixes double-free crash in unit-test server/client
|
We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient... |
|
I've had a look at the license agreement.
|
this updates PR #371 to the current stack version and adds the ability to set callback and file output per libmodbus instance (ctx)