* Authors:
* - Carlos Jenkins <carlos@jenkins.co.cr>
*
- * 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_sdrw.c
* Abstract:
/*
%YAML 1.2
---
-Name: xxx
-
-Mnemonic: XXX
+Name: SD-RAM Log Data
+Category: Logging
+Header: rpp/sdc.h
+Mnemonic: SDRW
Inputs:
+ - { name: "Data", type: "double" }
Outputs:
+ - { name: "ErrFlag", type: "bool" }
Parameters:
+ - { name: "Block ID", type: "uint8", range: "[0-255]" }
+ - { name: "Printf format for logging", type: "string", range: "(include specifiers)" }
+
+# Description and Help is in Markdown mark-up
+Description: &desc |
+
+ This block allows to log a double value to the SD-RAM. User needs to provide a valid PrintFormat
+ string to format and register the double value on the log. The PrintFormat string should include
+ two specifiers:
+ 1. For the block ID. Any valid integer specifier.
+ 2. For the value to log. Any valid double specifier.
-# Description is in Markdown mark-up
-Description: >
+ Note that the value of PrintFormat is inserted raw between quotes on code generation and thus there
+ is no validation on it. Error to provide a valid PrintFormat could generate compilation errors or
+ even run-time errors (normally this generates a warning on compile time). Note that the function
+ for logging used is `rpp_sdr_printf()`, which is a blocking call, and can potentially overrun the
+ step. The ErrFlag will set if `rpp_sdr_printf()` returns an error (for example out of memory),
+ but will clear back if the next step the call to this function is successful.
- This block ...
+Help: *desc
-Status:
- Tested:
- Untested:
- Not working:
+Status: Beta
RPP API functions used:
+ - rpp_sdr_printf()
Relevant demos:
+ - log_analog_input
...
*/