Hello,
I am currently implementing Tcl bindings to the UVSOCK library. This will allow UV to be scripted in Tcl. (German note to Keil personell: Ich war auf Ihrem Stand auf der Embedded World und hatte z.B. einige Vorschlaege fuer CMSIS. Vielleicht erinnern Sie sich.)
I've noticed some things that could stand improvement in the UVSOCK documentation.
UVSC_Init() fails with General Failure if passed UVSC_MIN_AUTO_PORT and UVSC_MAX_AUTO_PORT. It succeeds if passed the values 5101 and 5110, as in the UVSC_Tester application. You may want to document this; it took me some time to figure this out.
The REGENUM struct is not documented in the HTML, only in the source file; this is probably because of incorrect Doxygen comments.
Sincerly,
Konrad Schwarz
Despite documentation to the contrary (*), UVSC_OpenConnection()'s uvRunmode parameter is not ignored when uVision is not being auto-started. It seems it is range checked in any case. An out of range value for uvRunmode results in a General Failure error.
(*) quoting from the manual: uvRunmode Indicates the mode uVision should be started in when auto-started. If uVision is not being auto-started this parameter is ignored
You might want to add "... this parameter is ignored, except that it is range checked".
It seems as if GEN_SET_OPTIONS can be successful only if uv has loaded a project.
This is different from the documentation, which says GET_SET_OPITIONS may only be called once per connection.
The SSTR field nLen is documented as the length of the string including NULL terminator.
However, the array pFiles filled by PRJ_ENUM_FILES, the nLen member of each SSTR is set to the length of the string without the NULL terminator.
Just as the problem with PRJ_ENUM_FILES, when returning a SSTR, the nLen field does not count the NUL string terminator.