| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
In some versions of python, the XML parser was unable to cope with
the XML identifier coming after the comment that contained the license
header.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous docs format, CC 1.0, is not recommended by GENIVI, and
the preferred one is CC-BY-SA 4.0.
Other license changes are:
* Add Creative Commons copyright headers to documentation.
* Add copyright headers to test code.
* Add copyright headers to dbus XML that belongs to the NSC.
* Update copyright headers to GENIVI's standard.
Notable exceptions are:
* dbus XML that is used to communicate with other services
(e.g. common/nsm-consumer-dbus.xml) has not had copyright statements
added, because the Node Startup Controller does not own that interface.
|
| | |
|
| |
|
|
| |
Adds some information about the data it contains.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
We use the "consumer" property of the ShutdownClient class to store a
proxy in the NSC code and a skeleton in the NSM dummy code. When
releasing the consumer in shutdown_client_finalize(), we may therefor
not cast to a ShutdownConsumerSkeleton unconditionally; otherwise
the NSM dummy will segfault when releasing ShutdownClient objects.
|
| |
|
|
|
|
|
|
|
| |
Adds unregistration to the following services:
* legacy app handler
* shutdown client
* node startup controller
* nsm dummy lifecycle control
* nsm dummy consumer
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
These are difficult to spot but shouldn't have caused any problems
so far because we never use the affected macros in our code.
|
| |
|
|
|
|
|
| |
The order in which make processes the source files can be random. So
sometimes it will pick the -dbus.c file before the -dbus.h file. This
commit makes sure that we have a rule to build both in the Makefile.am
instead of just having a rule for the -dbus.h file.
|
| | |
|
| |
|
|
|
|
|
| |
Set the node state from the TargetStartupMonitor when certain targets
have been started (focussed, unfocussed, lazy).
Also, add a NSMNodeState enum type to nsm-enum-types.{c,h}.
|
| |
|
|
|
|
| |
This makes more sense because enums are not supposed to be combined
using bitwise operators. Flags, however, exist exactly for this
purpose.
|
| |
|
|
|
|
|
|
| |
Whenever a shutdown client (now identified only by the bus name and
object path instead of bus name, object path and shutdown mode) is
registered a second or third time, we simply update the shutdown mode
by combining the old and new one with a bitwise OR. The shutdown
timeout is also replaced with the new one.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Use the new ShutdownClient class to bundle information about registered
shutdown clients and their units, modes and timeouts.
Do not remove shutdown clients from the registered clients list after
shutting them down. Instead, wait for a separate unregister request.
Shut clients down mode by mode when receiving SIGINT. Start with clients
registered for fast, then continue with clients registered for normal.
Improve logging output a little bit.
|
| |
|
|
|
|
| |
Objects of this class store the bus name, the object path, the shutdown
mode, the shutdown timeout and a ShutdownConsumer proxy or skeleton for
a shutdown consumer.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The new legacy-app-helper binary translates the shutdown mode strings
into NSMShutdownType enum values and passes them on to the legacy app
handler D-Bus service. Thus, this commit also updates the
org.genivi.BootManager1.LegacyAppHandler interface to use an int for the
shutdown mode.
This commit furthermore drops the old command-line handling code in
the boot manager and reworks the legacy-app-handler tests a little
bit.
|
| |
|
|
| |
Define enums for shutdown mode, error and status code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Change all instances of conti to contiautomotive in bus names, object
paths and interfaces.
Change shutdown consumers' interface to
com.contiautomotive.NodeStateManager.LifeCycleConsumer and replace the
Shutdown() method with a LifecycleRequest() method which takes arguments
"Request", "RequestId" and returns "ErrorCode".
In addition, this commit removes the ShutdownConsumerService object and
handles all shutdown consumers directly in the legacy app handler.
|
| |
|
|
|
|
|
|
|
| |
The Node State Manager (NSM) dummy has all the interfaces relevant
to the Boot Manager, and can be instructed to shut down all its
shutdown consumers when a SIGINT signal is sent.
The Legacy App Handler will connect to the NSM dummy and register
shutdown consumers to it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following changes were made:
- Restructure the D-Bus interfaces:
-- The old boot manager interface is removed, we are no longer
interested in being a remote controller of systemd.
-- The LUC Handler has been rewritten and renamed to
org.genivi.BootManager1.BootManager. It has the following
methods:
--- BeginLUCRegistration() initializes the LUC registration
sequence at shutdown.
--- RegisterWithLUC(a{ias}) registers one or more apps with
different LUC types.
--- FinishLUCRegistration() finishes the LUC registration
sequence and atomically replaces the previous LUC.
-- The legacy application handler has been renamed to
org.genivi.BootManager1.LegacyAppHandler. This interface
is not for external use. It is meant only for the command-
line interface to communicate with the boot manager.
-- The LastUserContext property has been removed.
- The last user context is now stored in a file rather than with
GSettings. This was requested after the Gothenburg F2F, but is
included because it is easier to make the change now than modify
GSettings only to remove it later.
- All services run as part of the same process (i.e. boot-manager).
- All services run on the system bus. Because of this, the boot
manager's command-line interface is handled differently, as the
previous implementation, using GApplication, does not work on the
system bus. The command-line interface now works by making a D-Bus
call to the boot manager service, instead of using GApplication's
remote command-line functionality.
- The LUC Handler tests have been renamed to the boot manager
tests, and are changed in line with the new interface methods.
Note: The legacy app handler tests have not yet been modified to work
with these changes.
|
| |
|
|
|
|
|
|
|
|
| |
On receiving a --register command line, or a call to the Register()
method, the legacy app handler will create a shutdown consumer object
(although it will not register it with the NSM yet). When something
(e.g. the NSM) tells the shutdown consumer to shut down, it emits the
signal "shutdown-requested", which the Legacy App Handler listens for.
The Legacy App Handler responds to the "shutdown-requested" signal by
calling the boot manager's Stop() method.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Shutdown Consumers are D-Bus objects that exist for every application
that does not have a Shutdown() method, and are registered with the Node
State Manager (NSM).
When the NSM shuts down, it calls Shutdown() to all Shutdown Consumers
in reverse order to their registration. For legacy applications, a
Shutdown Consumer is created and registered with the NSM.
When the Shutdown Consumer is told to shut down, it shuts down the
legacy application by signalling the Boot Manager.
|
| |
|
|
|
|
| |
Reference to individual components of the 'common' directory in
components' respective makefiles are replaced with reference to the
convenience library 'libcommon.la'
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This commit implements the "handle-deregister" signal handler of the
LUCHandler interface skeleton. It essentially copies the current last
user context and drops all the apps that are part of the Deregister()
call. It then updates the org.genivi.LUCHandler1:LastUserContext
property.
The deregistration algorithm makes sure that LUC types for which no apps
are registered anymore are dropped from the LUC entirely.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit implements the "handle-register" signal handler of the
LUCHandler interface skeleton by merging the current LUC and the
newly registered LUC types/apps and updating the
org.genivi.LUCHandler1:LastUserContext property.
It makes sure that the order in which LUC types are added to the final
GVariant as dictionary keys is always the same (alphabetical order).
This makes testing easier as D-Bus and GVariant both preserve the order
of dictionary keys (unlike with a GHashTable).
This commit also introduces common/glib-extensions.{c,h} where we can
dump functions that extend GLib in simple ways. The first helper
function is g_variant_string_array_has_string() which we use to check if
a string is included in a string array GVariant.
|
| | |
|
|
|
WatchdogClient is a new class that takes a timeout and asks systemd to
update its watchdog timeout in regular intervals using sd_notify().
|