question

fantail avatar image
fantail asked

How or which task starts and stops services?

example ( GX menus )

settings>services MQTT switch sets Dbus value

who watchs this dbus value and starts or stops this service.


I current have tasks that are loaded on booting and managed by the SVC daemonservice

which stop fine by disabling svc -d but have not found how the svc -u command is being set when the dbus service flag is again enabled.


please do not say svc ( daemonservice as this only monitors and maintains tasks if they stop )


are services like MQTT always in memory and just put into a blocking or sleep mode when service is disabled?

Venus GX - VGX
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
jeroen avatar image
jeroen answered ·

The gui controls optional services at the moment.

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

fantail avatar image fantail commented ·

the GUI only changes the option flags in dbus.

it does not start or stop tasks - it only set the flags for these tasks.

0 Likes 0 ·
jeroen avatar image jeroen ♦ fantail commented ·

yes the qml part changes the setting, the cpp side will start / stop it.

0 Likes 0 ·
fantail avatar image
fantail answered ·

when the cpp prog has stopped itself there is no way to restart this task.


there has to be a task somewhere that is monitoring the settings flags and enabling the daemonservice to restart the selected tasks


1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

jeroen avatar image jeroen ♦ commented ·

the cpp code in the gui does that..

0 Likes 0 ·
fantail avatar image
fantail answered ·

Sorry but a task can only stop itself. It can not restart itself when it is not in memory

so what is the name of the task that is checking these flags and reloading these services???

3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

jeroen avatar image jeroen ♦ commented ·

For the fourth time, it is the cpp code in the gui which handles this, /opt/victronenergy/gui/gui. That process is never stopped. It starts the processes again when the setting is enabled.

0 Likes 0 ·
fantail avatar image fantail jeroen ♦ commented ·

found that - but its complied code. doesn't look like it uses a data any data files.

Is the gui.cpp source code available ( released ??)

I have looked for it on github. but it could be under another name.

we seem to have been talking about different things GUI.qml and my tasks are xyz.cpp - so sorry for not being clear.


0 Likes 0 ·
fantail avatar image fantail fantail commented ·

does this GUI.cpp also handle the alarm notifications as well??

0 Likes 0 ·