\r
#include "ComStack_Types.h"\r
\r
+typedef enum {\r
+ ARC_PDUR_UP_MODULES = 0,\r
+ ARC_PDUR_COM,\r
+ ARC_PDUR_DCM,\r
+\r
+ ARC_PDUR_LOIF_MODULES,\r
+ ARC_PDUR_CANIF,\r
+ ARC_PDUR_LINIF,\r
+ ARC_PDUR_SOADIF,\r
+\r
+ ARC_PDUR_LOTP_MODULES,\r
+ ARC_PDUR_CANTP,\r
+ ARC_PDUR_LINTP,\r
+ ARC_PDUR_SOADTP,\r
+ ARC_PDUR_SOAD,\r
+\r
+ ARC_PDUR_END_OF_MODULES\r
+\r
+} ARC_PduR_ModuleType;\r
+\r
/** PduR_StateType defines the states of which the PDU router can be in */\r
typedef enum {\r
PDUR_UNINIT, /**< PDU Router is not initialized. */\r
PDUR_DIRECT /**< Data provision type. */\r
} PduR_DataProvisionType;\r
\r
-\r
-\r
-\r
-/* ################ NEW DEFINITIONS ################### */\r
+/*\r
typedef struct {\r
- Std_ReturnType (*TargetIndicationFctPtr)(PduIdType pduId, const uint8* data); /**< Pointer to target function in layer above PDU router. */\r
- Std_ReturnType (*TargetTransmitFctPtr)(PduIdType pduId, const PduInfoType* pduInfo); /**< Pointer to target function below PDU router. */\r
-\r
-\r
- void (*TargetConfirmationFctPtr)(PduIdType pduId);\r
-\r
- /**\r
- * Target function for trigger transmit requests from the interface modules, e.g. Com_TriggerTransmit. Only\r
- * needed if gateway mode is not used, that is, if .DataProvision is set to PDUR_NO_PROVISION.\r
- */\r
- Std_ReturnType (*TargetTriggerTransmitFctPtr)(PduIdType pduId, uint8* data);\r
-\r
\r
- Std_ReturnType (*TargetGatewayFctPtr)(PduIdType pduId, const PduInfoType* pduInfo);\r
-\r
-} PduR_FctPtrType;\r
-\r
-typedef struct {\r
- /*\r
- * Not part of autosar standard. Added by ArcCore.\r
- */\r
uint16 BufferId;\r
PduR_DataProvisionType BufferType;\r
//uint8 SduLength;\r
// uint8 TxIdx; // This is the same as First, hence left out.\r
uint8 *Buffer;\r
\r
- /**\r
- * Depth of buffer\r
- */\r
+\r
uint8 Depth;\r
\r
- /**\r
- * Length of buffer\r
- */\r
uint8 Length;\r
\r
} PduRTxBuffer_type;\r
+*/\r
+typedef uint8 *PduRTxBuffer_type;\r
\r
-typedef struct {\r
- /**\r
- * The maximum numbers of Tx buffers.\r
- */\r
- uint16 PduRMaxTxBufferNumber; // ???\r
-\r
- PduRTxBuffer_type PduRTxBuffer[];\r
-} PduRTxBufferTable_type;\r
+typedef enum {\r
+ PDUR_BUFFER_FREE = 0,\r
+ PDUR_BUFFER_RX_BUSY,\r
+ PDUR_BUFFER_TX_READY,\r
+ PDUR_BUFFER_TX_BUSY\r
+} PduRTpBufferStatus_type;\r
\r
typedef struct {\r
- /**\r
- * PDU identifier assigned by the PDU router.\r
- */\r
- uint16 SrcPduId;\r
-\r
- /**\r
- * Reference to unique PDU identifier.\r
- */\r
- // SrcPduRef\r
-\r
-} PduRSrcPdu_type;\r
+ PduInfoType *pduInfoPtr;\r
+ PduRTpBufferStatus_type status;\r
+} PduRTpBufferInfo_type;\r
\r
typedef struct {\r
\r
/**\r
* Data provision mode for this PDU.\r
*/\r
- PduR_DataProvisionType DataProvision;\r
+ const PduR_DataProvisionType DataProvision;\r
\r
/**\r
* Reference to unique PDU identifier which shall\r
* be used by the PDU router instead of the source identifier.\r
*/\r
- //DestPduRef\r
- // For the moment replaced by this\r
- uint16 DestPduId;\r
+ const uint16 DestPduId;\r
\r
/**\r
* Reference to the assigned Tx buffer.\r
*\r
* Comment: Only required for non-TP gateway PDUs.\r
*/\r
- PduRTxBuffer_type *TxBufferRef;\r
+ PduRTxBuffer_type * const TxBufferRef;\r
+\r
+ const ARC_PduR_ModuleType DestModule;\r
\r
} PduRDestPdu_type;\r
\r
} PduRDefaultValue_type;\r
\r
typedef struct {\r
- /**\r
- * Not part of standard\r
- */\r
- PduR_FctPtrType FctPtrs;\r
- uint8 PduR_Arc_EOL;\r
- uint8 PduR_GatewayMode;\r
-\r
/**\r
* Length of PDU data.\r
*\r
* Comment: Only required if a TX buffer is configured.\r
*/\r
- uint8 SduLength;\r
+ const uint8 SduLength;\r
\r
/**\r
* Chunk size for routing on the fly.\r
PduRDefaultValue_type PduRDefaultValue;\r
\r
/**\r
- * Specifies the source of the PDU to be routed.\r
+ * Specifies the source ID of the PDU to be routed.\r
*/\r
- PduRSrcPdu_type PduRSrcPdu;\r
+ const uint16 SrcPduId;\r
\r
/**\r
- * Specifies the destination(s) of the PDU to be routed.\r
- *\r
- * Comment: Multicast (many destinations) is not supported in this implementation.\r
- */\r
- PduRDestPdu_type PduRDestPdu;\r
-\r
-} PduRRoutingPath_type;\r
-\r
-typedef struct {\r
- /*\r
- * Non-standards\r
+ * Specifies the source module for this route.
*/\r
- uint16 NRoutingPaths;\r
+ const ARC_PduR_ModuleType SrcModule;\r
\r
/**\r
- * References to the routing paths defined for this configuration.\r
+ * Specifies the destination(s) of the PDU to be routed.\r
*/\r
- PduRRoutingPath_type PduRRoutingPath[];\r
-\r
-} PduRRoutingTable_type;\r
+ const PduRDestPdu_type * const *PduRDestPdus;\r
\r
+} PduRRoutingPath_type;\r
\r
typedef struct {\r
/**\r
*/\r
uint8 PduRConfigurationId;\r
\r
- /**\r
- * The routing table of this PDU router configuration.\r
- */\r
- PduRRoutingTable_type *PduRRoutingTable;\r
-\r
+ uint8 NRoutingPaths;\r
\r
/**\r
- * The buffers used for TP gateway operation.\r
- *\r
- * Comment: Not implemented in this version.\r
+ * The routing table of this PDU router configuration.\r
*/\r
- //PduRTpBufferTable_type PduRTpBufferTable;\r
+ const PduRRoutingPath_type * const*RoutingPaths;\r
\r
- /**\r
- * The buffers used for non-TP gateway operation.\r
- */\r
- PduRTxBufferTable_type *PduRTxBufferTable;\r
+ PduRTpBufferInfo_type *TpBuffers;\r
+ PduRTpBufferInfo_type **TpRouteBuffers;\r
\r
} PduR_PBConfigType;\r
\r