]> rtime.felk.cvut.cz Git - pes-rpp/rpp-simulink.git/blobdiff - rpp/blocks/sfunction_frayreceive.c
Change license to MIT
[pes-rpp/rpp-simulink.git] / rpp / blocks / sfunction_frayreceive.c
index 3982ed8ae9cf7af4d2dbe9e4ba1fe2dec21a8e2b..0bb87f2d70f00df89da1333c433cf7a1f19e7bde 100644 (file)
@@ -3,10 +3,26 @@
  * Authors:
  *     - Michal Horn <hornimch@fel.cvut.cz>
  *
- * This document contains proprietary information belonging to Czech
- * Technical University in Prague. Passing on and copying of this
- * document, and communication of its contents is not permitted
- * without prior written authorization.
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
  *
  * File : sfunction_frayreceive.c
  * Abstract:
@@ -23,8 +39,8 @@
 /*
 %YAML 1.2
 ---
-Name: Configure RX buffer block
-Category: FlexRay
+Name: Configure RX buffer
+Category: FlexRayin
 Header: rpp/fr.h
 Mnemonic: FRC
 
@@ -39,22 +55,21 @@ Outputs:
 Parameters:
   - { name: "channel", type: "uint8" }
   - { name: "cycleCounterFiltering", type: "uint8" }
-  - { name: "maxPayload", type: "uint8" }
+  - { name: "maxPayload", type: "uint8", range: "(in half-words)" }
   - { name: "msgBufferInterrupt", type: "bool" }
   - { name: "payloadPreambleIndicatorTr", type: "bool" }
   - { name: "singleTransmit", type: "bool" }
   - { name: "slotId", type: "uint32" }
+  - { name: "bufferId", type: "uint32" }
 
-# Description is in Markdown mark-up
-Description: >
+# Description and Help is in Markdown mark-up
+Description: &desc |
 
   This block ...
 
-Status:
-  Tested:
-  Untested:
-  Not working:
-    - Unknown status
+Help: *desc
+
+Status: Beta
 
 RPP API functions used:
 
@@ -74,6 +89,7 @@ enum params {
        payloadPreambleIndicatorTr_IDX  = 4,
        singleTransmit_IDX                              = 5,
        slotId_IDX                                              = 6,
+       bufferId_IDX                                    = 7,
        PARAM_COUNT
 };
 
@@ -146,6 +162,7 @@ static void mdlSetWorkWidths(SimStruct *S)
     ssRegDlgParamAsRunTimeParam(S, payloadPreambleIndicatorTr_IDX, payloadPreambleIndicatorTr_IDX, "payloadPreambleIndicatorTr", SS_BOOLEAN);
     ssRegDlgParamAsRunTimeParam(S, singleTransmit_IDX, singleTransmit_IDX, "singleTransmit", SS_BOOLEAN);
     ssRegDlgParamAsRunTimeParam(S, slotId_IDX, slotId_IDX, "slotId", SS_UINT32);
+    ssRegDlgParamAsRunTimeParam(S, bufferId_IDX, bufferId_IDX, "bufferId", SS_UINT32);
 }
 #endif