]> rtime.felk.cvut.cz Git - arc.git/blobdiff - include/Com_Types.h
Added an example of CAN communication for the TMS570LS31x HDK
[arc.git] / include / Com_Types.h
index 71fff03d2a368a0d48c6c2b802a70f925d1bb1e5..f606032db3d8a7c1949355dd96e3834fac0cc034 100644 (file)
@@ -33,7 +33,7 @@
 typedef uint8 Com_PduGroupIdType;\r
 typedef uint16 Com_SignalIdType;\r
 typedef uint8 Com_SignalGroupIdType;\r
-\r
+typedef uint16 Com_BitPositionType;\r
 typedef enum {\r
        IMMEDIATE,\r
        DEFERRED\r
@@ -50,6 +50,7 @@ typedef enum {
        UINT16,\r
        UINT32,\r
        UINT8_N,\r
+       UINT8_DYN,\r
        SINT8,\r
        SINT16,\r
        SINT32\r
@@ -149,7 +150,7 @@ typedef struct {
        /** Starting position (bit) of the signal within the IPDU.\r
         * Range 0 to 63.\r
         */\r
-       const uint8 ComBitPosition;\r
+       const Com_BitPositionType ComBitPosition;\r
 \r
        /** The size of the signal in bits.\r
         * Range 0 to 64.\r
@@ -203,9 +204,9 @@ typedef struct {
 typedef struct {\r
 \r
        /** Starting position (bit) of the signal within the IPDU.\r
-        * Range 0 to 63.\r
+        * Range 0 to 2031.\r
         */\r
-       const uint8 ComBitPosition;\r
+       const Com_BitPositionType ComBitPosition;\r
 \r
        /** The size of the signal in bits.\r
         * Range 0 to 63.\r
@@ -249,13 +250,14 @@ typedef struct {
        /** Timeout notification function. */\r
        void (*ComTimeoutNotification) (void);\r
 \r
+       /** Defines if a write access to this signal can trigger the transmission of the corresponding I-PDU. */\r
        const ComTransferProperty_type ComTransferProperty;\r
 \r
        /** The bit position in the PDU for this signal's update bit.\r
-        * Range 0 to 63.\r
+        * Range 0 to 2031.\r
         * Only applicable if an update bit is used. NULL otherwise.\r
         */\r
-       const uint8 ComUpdateBitPosition;\r
+       const Com_BitPositionType ComUpdateBitPosition;\r
 \r
        /** Marks if this signal uses an update bit.\r
         * Should be set to one if an update bit is used.\r
@@ -278,7 +280,7 @@ typedef struct {
        const ComGroupSignal_type * const *ComGroupSignal;\r
 \r
 \r
-       //void *Com_Arc_ShadowBuffer;\r
+       const void *Com_Arc_ShadowBuffer;\r
        //void *Com_Arc_IPduDataPtr;\r
 \r
        /* Pointer to the data storage of this signals IPDU.\r
@@ -289,8 +291,11 @@ typedef struct {
        /* IPDU id of the IPDU that this signal belongs to.\r
         * This is initialized by Com_Init() and should not be configured.\r
         */\r
-\r
-       //const uint8 ComIPduHandleId;\r
+       /** The numerical value used as the ID of this I-PDU.\r
+        * TheComIPduHandleId is required by the API calls to receive I-PDUs from the PduR (ComIP-duDirection: Receive).\r
+        * For Tx-I-PDUs (ComIPduDirection: Send) this handle Id is used by the PduR to confirm the transmission of the ComIPdu\r
+        */\r
+       const uint16 ComIPduHandleId;\r
        //const uint8 ComSignalUpdated;\r
 \r
        /* Callback function used when an invalid signal is received.\r
@@ -395,11 +400,17 @@ typedef struct {
        /** Container of transmission related parameters. */\r
        const ComTxIPdu_type ComTxIPdu;\r
 \r
+       /** Reference to the actual pdu data storage */\r
+       void *const ComIPduDataPtr;\r
+       void *const ComIPduDeferredDataPtr;\r
+\r
        /** References to all signals and signal groups contained in this IPDU.\r
         * It probably makes little sense not to define at least one signal or signal group for each IPDU.\r
         */\r
        const ComSignal_type * const *ComIPduSignalRef;\r
 \r
+       const ComSignal_type * const ComIPduDynSignalRef;\r
+\r
        /*\r
         * The following two variables are used to control the per I-PDU based Rx/Tx-deadline monitoring.\r
         */\r