Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Components/Interfaces/PLCOutput.h@5:0845d4141a01, 2017-07-13 (annotated)
- Committer:
- Davidroid
- Date:
- Thu Jul 13 16:43:31 2017 +0000
- Revision:
- 5:0845d4141a01
Aligning to ARM mbed coding style.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Davidroid | 5:0845d4141a01 | 1 | /** |
| Davidroid | 5:0845d4141a01 | 2 | ****************************************************************************** |
| Davidroid | 5:0845d4141a01 | 3 | * @file PLCOutput.h |
| Davidroid | 5:0845d4141a01 | 4 | * @author AST/CL |
| Davidroid | 5:0845d4141a01 | 5 | * @version V1.0.0 |
| Davidroid | 5:0845d4141a01 | 6 | * @date Feb 4th, 2016 |
| Davidroid | 5:0845d4141a01 | 7 | * @brief This file contains the abstract class describing the interface of a |
| Davidroid | 5:0845d4141a01 | 8 | * PLC output component. |
| Davidroid | 5:0845d4141a01 | 9 | ****************************************************************************** |
| Davidroid | 5:0845d4141a01 | 10 | * @attention |
| Davidroid | 5:0845d4141a01 | 11 | * |
| Davidroid | 5:0845d4141a01 | 12 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
| Davidroid | 5:0845d4141a01 | 13 | * |
| Davidroid | 5:0845d4141a01 | 14 | * Redistribution and use in source and binary forms, with or without modification, |
| Davidroid | 5:0845d4141a01 | 15 | * are permitted provided that the following conditions are met: |
| Davidroid | 5:0845d4141a01 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
| Davidroid | 5:0845d4141a01 | 17 | * this list of conditions and the following disclaimer. |
| Davidroid | 5:0845d4141a01 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
| Davidroid | 5:0845d4141a01 | 19 | * this list of conditions and the following disclaimer in the documentation |
| Davidroid | 5:0845d4141a01 | 20 | * and/or other materials provided with the distribution. |
| Davidroid | 5:0845d4141a01 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
| Davidroid | 5:0845d4141a01 | 22 | * may be used to endorse or promote products derived from this software |
| Davidroid | 5:0845d4141a01 | 23 | * without specific prior written permission. |
| Davidroid | 5:0845d4141a01 | 24 | * |
| Davidroid | 5:0845d4141a01 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| Davidroid | 5:0845d4141a01 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| Davidroid | 5:0845d4141a01 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| Davidroid | 5:0845d4141a01 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| Davidroid | 5:0845d4141a01 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| Davidroid | 5:0845d4141a01 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| Davidroid | 5:0845d4141a01 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| Davidroid | 5:0845d4141a01 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| Davidroid | 5:0845d4141a01 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| Davidroid | 5:0845d4141a01 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| Davidroid | 5:0845d4141a01 | 35 | * |
| Davidroid | 5:0845d4141a01 | 36 | ****************************************************************************** |
| Davidroid | 5:0845d4141a01 | 37 | */ |
| Davidroid | 5:0845d4141a01 | 38 | |
| Davidroid | 5:0845d4141a01 | 39 | |
| Davidroid | 5:0845d4141a01 | 40 | /* Define to prevent from recursive inclusion --------------------------------*/ |
| Davidroid | 5:0845d4141a01 | 41 | |
| Davidroid | 5:0845d4141a01 | 42 | #ifndef __PLCOUTPUT_CLASS_H |
| Davidroid | 5:0845d4141a01 | 43 | #define __PLCOUTPUT_CLASS_H |
| Davidroid | 5:0845d4141a01 | 44 | |
| Davidroid | 5:0845d4141a01 | 45 | |
| Davidroid | 5:0845d4141a01 | 46 | /* Includes ------------------------------------------------------------------*/ |
| Davidroid | 5:0845d4141a01 | 47 | |
| Davidroid | 5:0845d4141a01 | 48 | #include <Component.h> |
| Davidroid | 5:0845d4141a01 | 49 | |
| Davidroid | 5:0845d4141a01 | 50 | |
| Davidroid | 5:0845d4141a01 | 51 | /* Classes ------------------------------------------------------------------*/ |
| Davidroid | 5:0845d4141a01 | 52 | |
| Davidroid | 5:0845d4141a01 | 53 | /** An abstract class for PLCOutut component. |
| Davidroid | 5:0845d4141a01 | 54 | */ |
| Davidroid | 5:0845d4141a01 | 55 | class PLCOutput : public Component |
| Davidroid | 5:0845d4141a01 | 56 | { |
| Davidroid | 5:0845d4141a01 | 57 | public: |
| Davidroid | 5:0845d4141a01 | 58 | |
| Davidroid | 5:0845d4141a01 | 59 | /** |
| Davidroid | 5:0845d4141a01 | 60 | * @brief Set output channels state |
| Davidroid | 5:0845d4141a01 | 61 | * @param Output channel data |
| Davidroid | 5:0845d4141a01 | 62 | * @retval None |
| Davidroid | 5:0845d4141a01 | 63 | */ |
| Davidroid | 5:0845d4141a01 | 64 | virtual void set_channels(uint8_t Out_array) = 0; |
| Davidroid | 5:0845d4141a01 | 65 | |
| Davidroid | 5:0845d4141a01 | 66 | /** |
| Davidroid | 5:0845d4141a01 | 67 | * @brief Get output fault status |
| Davidroid | 5:0845d4141a01 | 68 | * @param None |
| Davidroid | 5:0845d4141a01 | 69 | * @retval Output channel fault data |
| Davidroid | 5:0845d4141a01 | 70 | */ |
| Davidroid | 5:0845d4141a01 | 71 | virtual uint8_t manage_fault(void) = 0; |
| Davidroid | 5:0845d4141a01 | 72 | |
| Davidroid | 5:0845d4141a01 | 73 | /** |
| Davidroid | 5:0845d4141a01 | 74 | * @brief Get DC-DC status of the output channels component |
| Davidroid | 5:0845d4141a01 | 75 | * @param None |
| Davidroid | 5:0845d4141a01 | 76 | * @retval Feedback status, 1 if OK else 0 |
| Davidroid | 5:0845d4141a01 | 77 | */ |
| Davidroid | 5:0845d4141a01 | 78 | virtual uint8_t check_dcdc_status(void) = 0; |
| Davidroid | 5:0845d4141a01 | 79 | |
| Davidroid | 5:0845d4141a01 | 80 | /** |
| Davidroid | 5:0845d4141a01 | 81 | * @brief Get temperature warning status |
| Davidroid | 5:0845d4141a01 | 82 | * @param None |
| Davidroid | 5:0845d4141a01 | 83 | * @retval Temperature warning status, 1 if over temperature |
| Davidroid | 5:0845d4141a01 | 84 | */ |
| Davidroid | 5:0845d4141a01 | 85 | virtual uint8_t temperature_warning(void) = 0; |
| Davidroid | 5:0845d4141a01 | 86 | |
| Davidroid | 5:0845d4141a01 | 87 | /** |
| Davidroid | 5:0845d4141a01 | 88 | * @brief Get parity check status |
| Davidroid | 5:0845d4141a01 | 89 | * @param None |
| Davidroid | 5:0845d4141a01 | 90 | * @retval Parity check flag |
| Davidroid | 5:0845d4141a01 | 91 | */ |
| Davidroid | 5:0845d4141a01 | 92 | virtual uint8_t check_parity(void) = 0; |
| Davidroid | 5:0845d4141a01 | 93 | |
| Davidroid | 5:0845d4141a01 | 94 | /** |
| Davidroid | 5:0845d4141a01 | 95 | * @brief Get power supply status |
| Davidroid | 5:0845d4141a01 | 96 | * @param None |
| Davidroid | 5:0845d4141a01 | 97 | * @retval Power good bit, 1 in case of power good |
| Davidroid | 5:0845d4141a01 | 98 | */ |
| Davidroid | 5:0845d4141a01 | 99 | virtual uint8_t check_power_good(void) = 0; |
| Davidroid | 5:0845d4141a01 | 100 | |
| Davidroid | 5:0845d4141a01 | 101 | /** |
| Davidroid | 5:0845d4141a01 | 102 | * @brief Get parity bits for input data |
| Davidroid | 5:0845d4141a01 | 103 | * @param None |
| Davidroid | 5:0845d4141a01 | 104 | * @retval Parity bits |
| Davidroid | 5:0845d4141a01 | 105 | */ |
| Davidroid | 5:0845d4141a01 | 106 | virtual uint8_t check_comm_error(void) = 0; |
| Davidroid | 5:0845d4141a01 | 107 | |
| Davidroid | 5:0845d4141a01 | 108 | /** |
| Davidroid | 5:0845d4141a01 | 109 | * @brief Set output for output channels component |
| Davidroid | 5:0845d4141a01 | 110 | * @param TX buffer |
| Davidroid | 5:0845d4141a01 | 111 | * @retval None |
| Davidroid | 5:0845d4141a01 | 112 | */ |
| Davidroid | 5:0845d4141a01 | 113 | virtual void ssrelay_set_output(uint8_t *outputArray) = 0; |
| Davidroid | 5:0845d4141a01 | 114 | |
| Davidroid | 5:0845d4141a01 | 115 | /** |
| Davidroid | 5:0845d4141a01 | 116 | * @brief Destructor. |
| Davidroid | 5:0845d4141a01 | 117 | */ |
| Davidroid | 5:0845d4141a01 | 118 | virtual ~PLCOutput() {}; |
| Davidroid | 5:0845d4141a01 | 119 | }; |
| Davidroid | 5:0845d4141a01 | 120 | |
| Davidroid | 5:0845d4141a01 | 121 | #endif /* __PLCOUTPUT_CLASS_H */ |
| Davidroid | 5:0845d4141a01 | 122 | |
| Davidroid | 5:0845d4141a01 | 123 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |