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.
Dependents: HelloWorld_PLC01A1
PLCOutput.h
00001 /** 00002 ****************************************************************************** 00003 * @file PLCOutput.h 00004 * @author AST/CL 00005 * @version V1.0.0 00006 * @date Feb 4th, 2016 00007 * @brief This file contains the abstract class describing the interface of a 00008 * PLC output component. 00009 ****************************************************************************** 00010 * @attention 00011 * 00012 * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> 00013 * 00014 * Redistribution and use in source and binary forms, with or without modification, 00015 * are permitted provided that the following conditions are met: 00016 * 1. Redistributions of source code must retain the above copyright notice, 00017 * this list of conditions and the following disclaimer. 00018 * 2. Redistributions in binary form must reproduce the above copyright notice, 00019 * this list of conditions and the following disclaimer in the documentation 00020 * and/or other materials provided with the distribution. 00021 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00022 * may be used to endorse or promote products derived from this software 00023 * without specific prior written permission. 00024 * 00025 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00026 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00027 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00028 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00029 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00030 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00031 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00032 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00033 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00034 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00035 * 00036 ****************************************************************************** 00037 */ 00038 00039 00040 /* Define to prevent from recursive inclusion --------------------------------*/ 00041 00042 #ifndef __PLCOUTPUT_CLASS_H 00043 #define __PLCOUTPUT_CLASS_H 00044 00045 00046 /* Includes ------------------------------------------------------------------*/ 00047 00048 #include <Component.h> 00049 00050 00051 /* Classes ------------------------------------------------------------------*/ 00052 00053 /** An abstract class for PLCOutut component. 00054 */ 00055 class PLCOutput : public Component 00056 { 00057 public: 00058 00059 /** 00060 * @brief Set output channels state 00061 * @param Output channel data 00062 * @retval None 00063 */ 00064 virtual void set_channels(uint8_t Out_array) = 0; 00065 00066 /** 00067 * @brief Get output fault status 00068 * @param None 00069 * @retval Output channel fault data 00070 */ 00071 virtual uint8_t manage_fault(void) = 0; 00072 00073 /** 00074 * @brief Get DC-DC status of the output channels component 00075 * @param None 00076 * @retval Feedback status, 1 if OK else 0 00077 */ 00078 virtual uint8_t check_dcdc_status(void) = 0; 00079 00080 /** 00081 * @brief Get temperature warning status 00082 * @param None 00083 * @retval Temperature warning status, 1 if over temperature 00084 */ 00085 virtual uint8_t temperature_warning(void) = 0; 00086 00087 /** 00088 * @brief Get parity check status 00089 * @param None 00090 * @retval Parity check flag 00091 */ 00092 virtual uint8_t check_parity(void) = 0; 00093 00094 /** 00095 * @brief Get power supply status 00096 * @param None 00097 * @retval Power good bit, 1 in case of power good 00098 */ 00099 virtual uint8_t check_power_good(void) = 0; 00100 00101 /** 00102 * @brief Get parity bits for input data 00103 * @param None 00104 * @retval Parity bits 00105 */ 00106 virtual uint8_t check_comm_error(void) = 0; 00107 00108 /** 00109 * @brief Set output for output channels component 00110 * @param TX buffer 00111 * @retval None 00112 */ 00113 virtual void ssrelay_set_output(uint8_t *outputArray) = 0; 00114 00115 /** 00116 * @brief Destructor. 00117 */ 00118 virtual ~PLCOutput() {}; 00119 }; 00120 00121 #endif /* __PLCOUTPUT_CLASS_H */ 00122 00123 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Fri Jul 15 2022 00:11:30 by
1.7.2
X-NUCLEO-PLC01A1 Programmable Logic Controller