Skip to Content
CTech Digital
  • Home
  • Odoo services
  • AI services
  • Contact us
  • 0
  • Nederlands (BE) English (UK) Français
CTech Digital
  • 0
    • Home
    • Odoo services
    • AI services
    • Contact us
  • Nederlands (BE) English (UK) Français

18/6/25

  • All Blogs
  • Daily blog
  • 18/6/25
  • 18 June 2025 by
    CTech Metrology, Luc Wens

    Nice and sunny again....

    Parsing commandline parameters

    Have decided, after positive advise of the Gemini colleague, to use JSON for parameter passing between UI and engine at one side, and engine and proxies as well.

    Added files are commandLineParameters.h and cpp and are in Library/utility

    Engine

    Overview of parameters (cfr )

    Name

    Type

    Default

    Comment

    tcpport

    int

    40000


    hide

    bool

    true


    configurationfile

    string

    ""


    testuuid

    int64

    0


    loadMemory

    bool

    false


    projectname

    string

    ""


    projectuuid

    int64


    0


    numcycles

    int

    30



    Proxies

    For proxies we only have the TCP port number and if the console should be shown or not.


    Show/Hide/Quit

    The proxies are already configured to respond to these messges


        driver->Subscribe(*TCPServer.GetMessageResponder(), TAG_COMMAND_QUIT,
                          [&bContinueLoop](const CTrack::Message &) -> CTrack::Reply
                          {
                              bContinueLoop = false;
                              return nullptr;
                          });

        driver->Subscribe(*TCPServer.GetMessageResponder(), TAG_COMMAND_SHOW,
                          [&bContinueLoop](const CTrack::Message &) -> CTrack::Reply
                          {
                              SetConsoleVisible(true);
                              return nullptr;
                          });

        driver->Subscribe(*TCPServer.GetMessageResponder(), TAG_COMMAND_HIDE,
                          [&bContinueLoop](const CTrack::Message &) -> CTrack::Reply
                          {
                              SetConsoleVisible(false);
                              return nullptr;
                          });

    Template and Vicon are up to date, Leica.LMF needs updating

    In order to subscribe in the same way in the engine, we need a subscriber derived object. On the UI and the engine this is StateManager.

    I need to have a consistent naming convention for the console visible, everything should be hide/hidden centric: ShowConsole , IsConsoleVisible etc .... 


    The command line parameters were chopped up at the receiving side. This was solved by adding a static CommandLineParameters::generateCommandLineArgument which adds the necessary extra quoting.


    Regarding the showing/hiding of a console, this remains a true nightmare. What I would like: if I hide it it dissappears from the desktop and the taskbar, if I show it, it comes back on desktop and taskbar and shows all previous text. 

    Apparantly not possible by Microschoft standards, so we need to destroy the console, ok, we loose the text, and create a new console for showing.


    in Daily blog
    # CTrack
    17/6/25
    Showing / Hiding sub programs: I hate fucking microsoft
    Copyright © CTech
    Nederlands (BE) | English (UK) | Français
    Powered by Odoo - The #1 Open Source eCommerce