summaryrefslogtreecommitdiff
path: root/NodeStateAccess/model
diff options
context:
space:
mode:
Diffstat (limited to 'NodeStateAccess/model')
-rw-r--r--NodeStateAccess/model/org.genivi.NodeStateManager.Consumer.xml249
-rw-r--r--NodeStateAccess/model/org.genivi.NodeStateManager.LifecycleConsumer.xml41
-rw-r--r--NodeStateAccess/model/org.genivi.NodeStateManager.LifecycleControl.xml101
3 files changed, 391 insertions, 0 deletions
diff --git a/NodeStateAccess/model/org.genivi.NodeStateManager.Consumer.xml b/NodeStateAccess/model/org.genivi.NodeStateManager.Consumer.xml
new file mode 100644
index 0000000..dea85d0
--- /dev/null
+++ b/NodeStateAccess/model/org.genivi.NodeStateManager.Consumer.xml
@@ -0,0 +1,249 @@
+<!--
+*
+* Copyright (C) 2012 Continental Automotive Systems, Inc.
+*
+* Author: Jean-Pierre.Bogler@continental-corporation.com
+*
+* Describes the "Consumer" interface of the NodeStateManager
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*
+* Date Author Reason
+* 24.10.2012 Jean-Pierre Bogler Initial creation
+*
+-->
+
+<node>
+ <!--
+ org.genivi.NodeStateManager.Consumer:
+ @short_description: "Consumer" interface of the NodeStateManager.
+
+ This interface contains functions which are not safety critical and can be accessed by "every" client without further restrictions.
+ -->
+ <interface name="org.genivi.NodeStateManager.Consumer">
+ <!--
+ RestartReason: This property informs clients about the reason for the last restart. The values are based upon the enummeration NsmRestartReason_e. Note: The value is only set once at start-up.
+ -->
+ <property name="RestartReason" type="i" access="read"/>
+
+ <!--
+ ShutdownReason: This property informs clients about the reason for the last shutdown. The values are based upon the enummeration NsmShutdownReason_e. Note: The value is only set once at start-up.
+ -->
+ <property name="ShutdownReason" type="i" access="read"/>
+
+ <!--
+ WakeUpReason: This property informs clients about the recent reason for waking up the target. The values are based upon the enummeration NsmWakeUpReason_e. Note: The value is only set once at start-up.
+ -->
+ <property name="WakeUpReason" type="i" access="read"/>
+
+ <!--
+ BootMode: This property informs clients about the recent BootMode of the target. The values will be defined by a third party header, which has not been delivered yet. The description needs to be updated as soon as the header is available.
+ -->
+ <property name="BootMode" type="i" access="read"/>
+
+ <!--
+ NodeState:
+ @NodeState: Numeric value for the current NodeState, defined in NsmNodeState_e.
+
+ Clients can register for notifications when the NodeState is updated inside the NodeStateManager. This signal is sent to registered clients and will include the current NodeState as a parameter.
+ -->
+ <signal name="NodeState">
+ <arg name="NodeState" type="i"/>
+ </signal>
+
+ <!--
+ NodeApplicationMode:
+ @ApplicationModeId: Numeric value for the current ApplicationMode, defined in NsmAplicationMode_e.
+
+ Clients can register for notifications when the NodeApplicationMode is updated inside the NodeStateManager. This signal is sent to registered clients and will include the current NodeApplicationMode as a parameter.
+ -->
+ <signal name="NodeApplicationMode">
+ <arg name="ApplicationModeId" type="i"/>
+ </signal>
+
+ <!--
+ SessionStateChanged:
+ @SessionStateName: The SessionName will be based upon either the pre-defined platform SessionNames or using a newly added product defined session name.
+ @SeatID: This parameter will be based upon the enum NsmSeat_e.
+ @SessionState: This parameter will be based upon the NsmSessionState_e but it will not be bounded by the values in that enumeration. The listed values are the default values that are mandatory for platform sessions, but product sessions may have additional session states.
+
+ This signal is sent to registered clients when a particular session is state is changed. The client can register for notification about a specific session through the use of the SessionName, as a "match rule".
+ -->
+ <signal name="SessionStateChanged">
+ <arg name="SessionStateName" type="s"/>
+ <arg name="SeatID" type="i"/>
+ <arg name="SessionState" type="i"/>
+ </signal>
+
+ <!--
+ GetNodeState:
+ @NodeStateId: Will be based on the NsmNodeState_e.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to get the NodeState without the need of registration to the signal.
+ -->
+ <method name="GetNodeState">
+ <arg name="NodeStateId" direction="out" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ SetSessionState:
+ @SessionName: The SessionName will be based upon either the pre-defined platform SessionNames (see NSM content page) or using a newly added product defined session name.
+ @SessionOwner: This parameter defines the name of the application that is setting the state of the session. This must be the applications systemd unit filename.
+ @SeatID: This parameter will be based upon the enum NsmSeat_e
+ @SessionState: This parameter will be based upon the NsmSessionState_e but it will not be bounded by the values in that enumeration. The listed values are the default values that are mandatory for platform sessions, but product sessions may have additional SessionStates.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by applications to set the state of a session.
+ -->
+ <method name="SetSessionState">
+ <arg name="SessionName" direction="in" type="s"/>
+ <arg name="SessionOwner" direction="in" type="s"/>
+ <arg name="SeatID" direction="in" type="i"/>
+ <arg name="SessionState" direction="in" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ GetSessionState:
+ @SessionName: The SessionName will be based upon either the pre-defined platform session names (see NSM content page) or using a newly added product defined SessionName.
+ @SeatID: This parameter will be based upon the enum NsmSeat_e.
+ @SessionState: This parameter will be based upon the NsmSessionState_e but it will not be bounded by the values in that enumeration. The listed values are the default values that are mandatory for platform sessions, but product sessions may have additional SessionStates.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by applications to get the state of a session.
+ -->
+ <method name="GetSessionState">
+ <arg name="SessionName" direction="in" type="s"/>
+ <arg name="SeatID" direction="in" type="i"/>
+ <arg name="SessionState" direction="out" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ GetApplicationMode:
+ @ApplicationModeId: This parameter will be based upon the NsmNodeApplicationMode_e.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to get the application mode.
+ -->
+ <method name="GetApplicationMode">
+ <arg name="ApplicationModeId" direction="out" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ RegisterShutdownClient:
+ @BusName: Bus name of remote application.
+ @ObjName: Object name of remote object that provides the shutdown interface.
+ @ShutdownMode: Shutdown mode for which client wants to be informed (i.e normal, fast etc).
+ @TimeoutMs: Max. Timeout to wait for response from shutdown client in ms.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to register themselves as shutdown client. Any client that registers must provide a method in their D-Bus object called "LifecycleRequest". This method will take one parameter which is the RequestType (NSM_SHUTDOWNTYPE_NORMAL, NSM_SHUTDOWNTYPE_FAST). For an example of the required client interface please see the BootManager component who will be a client of the NSM.
+ -->
+ <method name="RegisterShutdownClient">
+ <arg name="BusName" direction="in" type="s"/>
+ <arg name="ObjName" direction="in" type="s"/>
+ <arg name="ShutdownMode" direction="in" type="u"/>
+ <arg name="TimeoutMs" direction="in" type="u"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ UnRegisterShutdownClient:
+ @BusName: Bus name of remote application.
+ @ObjName: Object name of remote object that provides the shutdown interface.
+ @ShutdownMode: Shutdown mode for which client wants to unregister (NSM_SHUTDOWNTYPE_NORMAL, NSM_SHUTDOWNTYPE_FAST).
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to unregister themselves as shutdown client.
+ -->
+ <method name="UnRegisterShutdownClient">
+ <arg name="BusName" direction="in" type="s"/>
+ <arg name="ObjName" direction="in" type="s"/>
+ <arg name="ShutdownMode" direction="in" type="u"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ RegisterSession:
+ @SessionName: The SessionName will be based upon either the pre-defined platform session names (see NSM content page) or using a newly added product defined SessionName.
+ @SessionOwner: This is the name of the application that is registering the new session (this must be the applications systemd unit filename).
+ @SeatID: This parameter will be based upon the enum NsmSeatId_e
+ @SessionState: This parameter will be based upon the NsmSessionState_e but it will not be bounded by the values in that enumeration. The listed values are the default values that are mandatory for platform sessions, but product sessions may have additional session states.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to register a new session whose state should be observed and distributed by the NSM.
+ -->
+ <method name="RegisterSession">
+ <arg name="SessionName" direction="in" type="s"/>
+ <arg name="SessionOwner" direction="in" type="s"/>
+ <arg name="SeatID" direction="in" type="i"/>
+ <arg name="SessionState" direction="in" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ UnRegisterSession:
+ @SessionName: The SessionName will be based upon either the pre-defined platform session names (see NSM content page) or using a newly added product defined SessionName.
+ @SessionOwner: This is the name of the application that originally registered the session. It will be validated that this value matches the stored value from the registration.
+ @SeatID: This parameter will be based upon the enum NsmSeat_e.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to remove a new session from the session list hosted by NSM.
+ -->
+ <method name="UnRegisterSession">
+ <arg name="SessionName" direction="in" type="s"/>
+ <arg name="SessionOwner" direction="in" type="s"/>
+ <arg name="SeatID" direction="in" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ GetAppHealthCount:
+ @Count: Return value passed to the caller. Number of applications that crashed or terminated accidentally.
+
+ The method returns the number of applications that crashed or terminated accidentally, within the current life cycle. It can be used to observe the system state.
+ -->
+ <method name="GetAppHealthCount">
+ <arg name="Count" direction="out" type="u"/>
+ </method>
+
+ <!--
+ GetInterfaceVersion:
+ @Version: Unsigned integer that represents the version number of the Node State Manager.
+
+ The method returns the version number of the Node State Manager. The number is organized in four bytes:
+
+ Version: VVV.RRR.PPP.BBB
+
+ <literallayout>
+ VVV => Version [1..255]
+ RRR => Release [0..255]
+ PPP => Patch [0..255]
+ BBB => Build [0..255]
+ </literallayout>
+ -->
+ <method name="GetInterfaceVersion">
+ <arg name="Version" direction="out" type="u"/>
+ </method>
+
+ <!--
+ LifecycleRequestComplete:
+ @RequestId: The request Id of the called life cycle client. The value has been passed when "LifecycleRequest" was called.
+ @Status: The result of the call to "LifecycleRequest". NsmErrorStatus_Ok: Request successfully processed. NsmErrorStatus_Error: An error occured while processing the "LifecycleRequest".
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The function has to be called by a "asynchrounous" lifecycle client, when he processed the "LifecycleRequest".
+ -->
+ <method name="LifecycleRequestComplete">
+ <arg name="RequestId" direction="in" type="u"/>
+ <arg name="Status" direction="in" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+ </interface>
+</node>
diff --git a/NodeStateAccess/model/org.genivi.NodeStateManager.LifecycleConsumer.xml b/NodeStateAccess/model/org.genivi.NodeStateManager.LifecycleConsumer.xml
new file mode 100644
index 0000000..4bc566f
--- /dev/null
+++ b/NodeStateAccess/model/org.genivi.NodeStateManager.LifecycleConsumer.xml
@@ -0,0 +1,41 @@
+<!--
+*
+* Copyright (C) 2012 Continental Automotive Systems, Inc.
+*
+* Author: Jean-Pierre.Bogler@continental-corporation.com
+*
+* Describes the "LifecycleConsumer" interface, applications can
+* implement to become a life cycle client of the NodeStateManager.
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*
+* Date Author Reason
+* 24.10.2012 Jean-Pierre Bogler Initial creation
+*
+-->
+
+<node>
+ <!--
+ org.genivi.NodeStateManager.LifeCycleConsumer:
+ @short_description: Interface of a life cycle client.
+
+ This interface contains functions, which need to be implemented by life cycle clients, to be able to receive life cycle requests.
+ -->
+ <interface name="org.genivi.NodeStateManager.LifeCycleConsumer">
+ <!--
+ LifecycleRequest:
+ @Request: The type of the life cycle request. Can be NSM_SHUTDOWNTYPE_RUNUP, NSM_SHUTDOWNTYPE_NORMAL or NSM_SHUTDOWNTYPE_FAST.
+ @RequestId: The Id of the client (current request). This Id needs to be passed to the NSM again via the interface "LifecycleRequestComplete", when the client has processed the "LifecycleRequest".
+ @ErrorCode: Client's return value, passed to the NodeStateManager. Based upon NsmErrorStatus_e. NsmErrorStatus_Ok: Request was successfully processed. NsmErrorStatus_ResponsePending: Processing of request started. LifecycleRequestComplete will be called to pass the status after completion. NsmErrorStatus_Error: An error occured, the request could not be processed.
+
+ The method has to be implemented by every life cycle client and is called by the NodeStateManager, when the node is shutting down (fast or normal) or an ongoing shutdown is cancelled (run up).
+ -->
+ <method name="LifecycleRequest">
+ <arg name="Request" direction="in" type="u"/>
+ <arg name="RequestId" direction="in" type="u"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+ </interface>
+</node>
diff --git a/NodeStateAccess/model/org.genivi.NodeStateManager.LifecycleControl.xml b/NodeStateAccess/model/org.genivi.NodeStateManager.LifecycleControl.xml
new file mode 100644
index 0000000..9e1ddd0
--- /dev/null
+++ b/NodeStateAccess/model/org.genivi.NodeStateManager.LifecycleControl.xml
@@ -0,0 +1,101 @@
+<!--
+*
+* Copyright (C) 2012 Continental Automotive Systems, Inc.
+*
+* Author: Jean-Pierre.Bogler@continental-corporation.com
+*
+* Describes the "LifecycleControl" interface of the NodeStateManager.
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*
+* Date Author Reason
+* 24.10.2012 Jean-Pierre Bogler Initial creation
+*
+-->
+
+<node>
+ <!--
+ org.genivi.NodeStateManager.LifecycleControl:
+ @short_description: "Control" interface of the NodeStateManager.
+
+ This interface contains functions, which have direct influence on the system state and therefore have to be handled with care. The interface can only be used by certain clients, which need to be configured in the D-Bus configuration.
+ -->
+ <interface name="org.genivi.NodeStateManager.LifecycleControl">
+ <!--
+ RequestNodeRestart:
+ @RestartReason: The passed value will be based upon the enum NsmRestartReason_e.
+ @RestartType: This is the type of restart that is required, i.e. during Coding process it is normal for a fast shutdown to be requested whereas other Diagnosis restart requests would be normal. Possible values are NSM_SHUTDOWNTYPE_FAST and NSM_SHUTDOWNTYPE_NORMAL.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to request a restart of the node.
+ -->
+ <method name="RequestNodeRestart">
+ <arg name="RestartReason" direction="in" type="i"/>
+ <arg name="RestartType" direction="in" type="u"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ SetApplicationMode:
+ @ApplicationModeId: This parameter will be based upon the NsmNodeApplicationMode_e.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to set the application mode.
+ -->
+ <method name="SetApplicationMode">
+ <arg name="ApplicationModeId" direction="in" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ SetNodeState:
+ @NodeStateId: The passed value will be based upon the enum NsmNodeState_e.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method is used by other applications to set the NodeState. When this method is called to change the current NodeState a signal will be sent to notify registered consumers of the new state.
+ -->
+ <method name="SetNodeState">
+ <arg name="NodeStateId" direction="in" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ SetBootMode:
+ @BootMode: New BootMode to be set. The values will be defined by a third party header, which has not been delivered yet. The description needs to be updated as soon as the header is available.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ The method has been introduced, because the property "BootMode" can only be read by other applications. Nevertheless there are some exceptions where the property should be set by a restricted set of applications which will be handled within this method.
+ -->
+ <method name="SetBootMode">
+ <arg name="BootMode" direction="in" type="i"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ SetAppHealthStatus:
+ @AppName: This parameter can be used to give the name of the application that has failed (this must be the applications systemd unit name).
+ @AppRunning: The AppState will be FALSE for failed and TRUE for running.
+ @ErrorCode: Return value passed to the caller, based upon NsmErrorStatus_e.
+
+ This method will be used by the Node Health Monitor to report to the NSM if an application has failed and if it is running again. Internally the NSM will use this information to keep a count of the number of failed applications within the current lifecycle. Additionally it will unset any sessions that the failing application may have had active. It will also be possible for the product node state machine to make a decision on what to do with this information, i.e. even reset the node or reset the node if too many applications have failed.
+ -->
+ <method name="SetAppHealthStatus">
+ <arg name="AppName" direction="in" type="s"/>
+ <arg name="AppRunning" direction="in" type="b"/>
+ <arg name="ErrorCode" direction="out" type="i"/>
+ </method>
+
+ <!--
+ CheckLucRequired:
+ @LucWanted: This will be a simple TRUE or FALSE to define whether the LUC is wanted in the current Lifecycle.
+
+ This method will be called exclusivley by the Boot Manager to find out whether the LUC Applications should be started in the current Lifecycle. This is required whilst in certain Node Application Modes (i.e. Transport, Factory) we do not want the LUC Applications started.
+ -->
+ <method name="CheckLucRequired">
+ <arg name="LucWanted" direction="out" type="b"/>
+ </method>
+
+ </interface>
+</node>