]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/traceframework.git/blobdiff - consumer.h
Merge pull request #3 in PROCESSOR-SDK/traceframework from CATREQ-2702 to master
[keystone-rtos/traceframework.git] / consumer.h
old mode 100755 (executable)
new mode 100644 (file)
index d67717c..ba6e1c6
@@ -47,23 +47,6 @@ extern "C" {
 /* CPPI include files */
 #include <ti/instrumentation/traceframework/trace_contract.h>
 
-/** @addtogroup TRACEFRAMEWORK_SYMBOL
-@{
-*/
-
-/**
- * @brief   Consumer Instance Buffer Requirements 
- */
-#define TF_CONSUMER_INST_SIZE        sizeof (tf_consInst_t)
-/**
- * @brief   Consumer Instance Buffer Alignment Requirements 
- */
-#define TF_CONSUMER_INST_ALIGN       128
-
-/**
-@}
-*/
-
 /** @addtogroup TRACEFRAMEWORK_ENUM
 @{
 */
@@ -166,36 +149,6 @@ typedef struct consNotify
   } notifyScheme;
 } tf_consNotify_t;
 
-/**
- * @brief Structure with uia transport consumer instance 
- */
-typedef struct  consInst
-{
-  uint32_t                  magicId;
-  /**< magic ID of the consumer */
-  uint32_t                  myslot;
-  /**< consumers slot in the contract memory layout */
-  tf_consAppSendRespStatus_e   (*sendFxn)(uint32_t param, uint8_t* buf, uint32_t length);
-  /**< send function, which sends the buffer to the application */
-  tf_consLogBufInfo_t          buf_info;
-  /**< consumer's buffer information structure */
-  tf_contract_HANDLE           contract_handle;
-  /**< contract handle for the consumer */
-  uint32_t                  param;
-  /**< parameter value used by the application */
-  uint32_t                  consumer_state;
-  /**< Each call to sendFxn() sets the flag to Busy, each tf_consAck() 
-     sets it back to Free. tf_consProcess will just return without calling 
-     notifyData if the consumer state is Busy */
-  uint32_t                  consumer_retry_count;
-  /**< consumer retry count */ 
-  uint32_t                  streamFlag;
-  /**< indicates what consumers have configured producer for (ring buffer streaming or not) */
-  uint32_t                  trigFlag;
-  /**< trigger consuming producer buffers when it is in frozen state */ 
-  
-} tf_consInst_t;
-
 /**
  * @brief Structure with consumer NetCp config 
  */
@@ -309,7 +262,7 @@ extern tf_consStatus_e tf_consDestroy(tf_consumer_HANDLE cHandle);
  *
  * =============================================================================
  */
-extern tf_consumer_HANDLE tf_consCreate(tf_consConfig_t   config);
+extern tf_consumer_HANDLE tf_consCreate(tf_consConfig_t   *config);
 
 /**
  * ============================================================================
@@ -372,6 +325,21 @@ extern tf_consStatus_e tf_alignConsumer2FrozenProd(tf_consumer_HANDLE cHandle);
 @}
 */
 
+/* Below defines are added for backwards compatibility */
+#define        CONS_APP_SEND_OK_WAIT_ACK      TF_CONSUMER_APP_SEND_OK_WAIT_ACK
+#define        CONS_APP_SEND_OK_NO_WAIT_ACK   TF_CONSUMER_APP_SEND_OK_NO_WAIT_ACK
+#define        CONS_APP_SEND_NOK_RETRY        TF_CONSUMER_APP_SEND_NOK_RETRY
+#define        CONSUMER_NO_AVAILABLE_CONTRACT TF_CONSUMER_NO_AVAILABLE_CONTRACT
+#define        CONSUMER_INVALID_ARGUMENTS     TF_CONSUMER_INVALID_ARGUMENTS
+#define        CONSUMER_SUCCESS               TF_CONSUMER_SUCCESS
+#define CONSUMER_FAIL                  TF_CONSUMER_FAIL
+#define        CONSUMER_WAIT_ACK              TF_CONSUMER_WAIT_ACK
+#define        CONSUMER_ACK_RECIVED           TF_CONSUMER_ACK_RECIVED
+#define        CONSUMER_NOTHING_TO_CONSUME    TF_CONSUMER_NOTHING_TO_CONSUME 
+#define        NOTIFY_VIA_REGMASK             TF_CONSUMER_NOTIFY_VIA_REGMASK   
+#define        NOTIFY_VIA_LOCCBK              TF_CONSUMER_NOTIFY_VIA_LOCCBK
+#define        NOTIFY_NONE                    TF_CONSUMER_NOTIFY_NONE
+
 #ifdef __cplusplus
 }
 #endif