jongough / testplugin_pi

Pluing to test JSON and ODAPI
GNU General Public License v3.0
3 stars 9 forks source link

PIM manager Correct the variables and API calls #354

Closed rgleason closed 1 year ago

rgleason commented 1 year ago

https://github.com/OpenCPN/OpenCPN/issues/3473

Leamas wants certain return codes in all TP plugins or PIM manager does not work right.

This change should be added to the do-something script and to the template.

Generally we have

Gernerally, for TP plugins, we have:

in [plugin]_pi.cpp

int aisradar_pi::GetAPIVersionMajor() {    return OCPN_API_VERSION_MAJOR; }
int aisradar_pi::GetAPIVersionMinor() {    return OCPN_API_VERSION_MINOR; }
int aisradar_pi::GetPlugInVersionMajor() {  return PLUGIN_VERSION_MAJOR; }
int aisradar_pi::GetPlugInVersionMinor() {  return PLUGIN_VERSION_MINOR;}
int aisradar_pi::GetPlugInVersionPatch() {   return PLUGIN_VERSION_PATCH;}
int aisradar_pi::GetPlugInVersionPost() {   return PLUGIN_VERSION_TWEAK;}

in [plugin]_pi.h

    int GetAPIVersionMajor();
    int GetAPIVersionMinor();
    int GetPlugInVersionMajor();
    int GetPlugInVersionMinor();
    int GetPlugInVersionPatch();
    int GetPlugInVersionPost();
    wxBitmap *GetPlugInBitmap();
    wxString GetCommonName();
    wxString GetShortDescription();
    wxString GetLongDescription();
    wxBitmap m_panelBitmap;

I could have missed one plugin.

Leamas wants

int GetPlugInVersionPatch() { return ...; }
int GetPlugInVersionPost() { return ...; }
const char *GetPlugInVersionPre() { return ...; }
const char *GetPlugInVersionBuild() { return ...; }
rgleason commented 1 year ago

We need better details for this change before we can do anything. I wonder if it can be done with the pi-do-something.sh script. I don't think so because the changes are in each plugins src and [piname]]_pi.cpp and [piname]_pi.h and the form varies somewhat. So it is going to have to be done by hand. I will not be able to make these changes until the end of December.

rgleason commented 1 year ago

Dave and Alec determined that api 117 as we haveit will work with a few exceptions. Dave has offered to handle those issues.

I guess this can be closed now.