]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/rm-lld.git/blobdiff - include/rm_pvt.h
commit prior to modifying transaction tracking and storing
[keystone-rtos/rm-lld.git] / include / rm_pvt.h
index 190bf41ca1636a1d0667f7bf258a3e1a855c746f..996a5ef006a1da92b1a36eae3a82ecfb5ee94344 100644 (file)
@@ -151,6 +151,12 @@ typedef struct {
 typedef struct {
     /** The transaction ID for the transaction awaiting a response */
     uint32_t transactionId;
+    /** The originating transaction ID.  Maps a transaction created in 
+     *  response to a request received.  */
+    uint32_t originatingTransactionId;
+    /** The transport handle that the transaction was received on.  Used 
+     *  to provide a RM response to the right requesting RM instance */
+    Rm_TransportHandle transportHandle;
     /** The callback function associated with the transaction ID.  Will
      *  be called when a response is received matching the transaction ID. */
     void *transactionCallback;
@@ -181,26 +187,26 @@ typedef enum {
     Rm_command_UNMAP_NAME = Rm_service_RESOURCE_UNMAP_NAME,
     /** Get the status of the specified resource */
     Rm_command_RESOURCE_STATUS = Rm_service_RESOURCE_STATUS,
+    /** Resource response - Response applies to all above resource commands */
+    Rm_command_RESOURCE_RESPONSE,
     /** Policy request */
     Rm_command_POLICY_REQUEST,
     /** Policy response */
     Rm_command_POLICY_RESPONSE
 } Rm_Command;
 
-
-/* REMOVE BELOW??? */
 /**
- * @brief RM transaction states.  The transaction state describes what processes have
- *        been executed on the transaction thus far
+ * @brief RM transaction details values.  Details values provide more fine-grained
+ *        information regarding a transaction request or response
  */
 typedef enum {
-    /** Transaction is being processed */
-    Rm_transactionState_PROCESSING = 0,
+    /** No details provided for transaction */
+    Rm_transactionDetials_NONE = 0,
     /** Transaction has been approved */
-    Rm_transactionState_APPROVED = 1,
+    Rm_transactionDetails_RESOURCE_APPROVED = 1,
     /** Transaction has been denied */
-    Rm_transactionState_DENIED = 2    
-} Rm_TransactionState;
+    Rm_transactionDetails_RESOURCE_DENIED = 2    
+} Rm_TransactionDetails;
 
 /**
  * @brief RM protocol packet resource information
@@ -225,13 +231,19 @@ typedef struct {
  */
 typedef struct {
     /** Transaction type */
-    Rm_Command transCommand;
-    /** Packet ID of packet that transaction originated from.  This field will be
-     *  NULL if transaction originated from a component */
-    uint32_t transPktId;
+    Rm_Command command;
+    /** ID of transaction.  Maps to the RM protocol packet ID when forwarding
+     *  RM requests or received RM responses. */
+    uint32_t pktId;
     /** Transaction's associated callback function is the transaction originated
      *  from a registered component */
-    void *transCallback;
+    void *callback;
+    /** Transaction details.  Provides detailed request/response codes such as
+     *  resource denial reasons */
+    uint32_t details;
+    /** Transport the transaction was received on.  Stored in order to provide
+     *  responses to received RM packets */
+    Rm_TransportHandle receivedTransport;
     /** Transaction details */
     union {
         /** If the command has to do with resources these fields
@@ -259,24 +271,19 @@ typedef struct {
  *        between RM instances.
  */
 typedef struct {
-    /** Packet ID - Used to synchronize sent command packets with any valid
+    /** Packet ID - Used to synchronize sent command packets with
      *              response commands. */
     uint32_t rmPktId;
-    /** Response Packet ID - If protocol packet is sent as response to a 
-     *                       received packet the response packet ID field will
-     *                       contain the pktID value of the request packet
-     *                       received */
-    uint32_t rmRespPktId;
+    /** Command issued from source RM instance */
+    uint32_t rmCmd;    
     /** RM Instance Name - Name of RM instance that is issuing the command.       
      *                     The instance name will be used to validate the 
      *                     command against the instance name data stored in
      *                     the RM policy data */
     char rmInstName[RM_INST_NAME_MAX_CHARS];
-    /** Command issued from source RM instance */
-    uint32_t rmCmd;
-    /** Response code provides requesting RM instance with information about
-     *  the result of any requests made */
-    uint32_t rmRespCode;
+    /** Details field provides more information about RM request/response transactions
+     *  such as whether a transaction has been approved or denied */
+    uint32_t rmDetails;
     /** Union separating resource information from policy information */
     union {
         /** If the command has to do with one or more resources these fields