00001 /*This file has been prepared for Doxygen automatic documentation generation.*/ 00019 /* Copyright (c) 2009 Atmel Corporation. All rights reserved. 00020 * 00021 * Redistribution and use in source and binary forms, with or without 00022 * modification, are permitted provided that the following conditions are met: 00023 * 00024 * 1. Redistributions of source code must retain the above copyright notice, this 00025 * list of conditions and the following disclaimer. 00026 * 00027 * 2. Redistributions in binary form must reproduce the above copyright notice, 00028 * this list of conditions and the following disclaimer in the documentation 00029 * and/or other materials provided with the distribution. 00030 * 00031 * 3. The name of Atmel may not be used to endorse or promote products derived 00032 * from this software without specific prior written permission. 00033 * 00034 * 4. This software may only be redistributed and used in connection with an Atmel 00035 * AVR product. 00036 * 00037 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 00038 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00039 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 00040 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 00041 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00042 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00043 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00044 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00045 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00046 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 00047 * 00048 */ 00049 00050 #ifndef __ACTUATOR_H__ 00051 #define __ACTUATOR_H__ 00052 00053 #include "compiler.h" 00054 #include "FreeRTOS.h" 00055 00056 #include "cptime.h" 00057 00058 //_____ M A C R O S ________________________________________________________ 00059 00060 00061 //_____ D E C L A R A T I O N S ____________________________________________ 00062 00064 extern const signed portCHAR *const ACTUATOR_ERRMSG_SETVAL_SYNTAXERROR; 00065 00066 /* \brief The get actuator value command: get value(s) from an actuator. 00067 * Takes one parameter, the actuator name. 00068 * Format: get_actuator_value actuator 00069 * 00070 * \note This function must be of the type pfShellCmd defined by the shell module. 00071 * 00072 * \param xModId Input. The module that is calling this function. 00073 * \param FsNavId Ignored. 00074 * \param ac Input. The argument counter. For this command, should be 1. 00075 * \param av Input. The argument vector. 00076 * \param ppcStringReply Input/Output. The response string. 00077 * If Input is NULL, no response string will be output. 00078 * Else a malloc for the response string is performed here; 00079 * the caller must free this string. 00080 * 00081 * \return the status of the command execution. 00082 */ 00083 eExecStatus e_actuator_cmd_get_value( eModId xModId, signed short FsNavId, 00084 int ac, signed portCHAR *av[], 00085 signed portCHAR **ppcStringReply ); 00086 00087 00088 /* \brief The set actuator value command: set the value(s) or state(s) of an actuator. 00089 * Takes up to seven parameters 00090 * The first parameter is the actuator's name, the second parameter is 00091 * a config field name, the third parameter is its value, the fourth is 00092 * another config field name(optional), the fifth is its value(optional), 00093 * the sixth is the time parameter(optional), the seventh is the time 00094 * value(optional). 00095 * Format: set_actuator_value actuatorname field1=value [field2=value] [time=date] 00096 * 00097 * \note This function must be of the type pfShellCmd defined by the shell module. 00098 * 00099 * \param xModId Input. The module that is calling this function. 00100 * \param FsNavId Ignored. 00101 * \param ac Input. The argument counter. For this command, should be 00102 * at least 3, at most 7. 00103 * \param av Input. The argument vector. 00104 * \param ppcStringReply Input/Output. The response string. 00105 * If Input is NULL, no response string will be output. 00106 * Else a malloc for the response string is performed here; 00107 * the caller must free this string. 00108 * 00109 * \return the status of the command execution. 00110 */ 00111 eExecStatus e_actuator_cmd_set_value( eModId xModId, signed short FsNavId, 00112 int ac, signed portCHAR *av[], 00113 signed portCHAR **ppcStringReply ); 00114 00115 00129 eExecStatus e_actuator_ScheduleCmdSet( eSchedCmdId CmdId, 00130 int ac, signed portCHAR *av[], 00131 signed portCHAR **ppcStringReply ); 00132 00133 00134 /* \brief The actuator command: display the actuators available shell commands. 00135 * Format: help 00136 * 00137 * \note This function must be of the type pfShellCmd defined by the shell module. 00138 * 00139 * \param xModId Input. The module that is calling this function. 00140 * \param FsNavId Ignored. 00141 * \param ac Ignored. 00142 * \param av Ignored. 00143 * \param ppcStringReply Input/Output. The response string. 00144 * If Input is NULL, no response string will be output. 00145 * Else a malloc for the response string is performed here; 00146 * the caller must free this string. 00147 * 00148 * \return the status of the command execution. 00149 */ 00150 eExecStatus e_actuator_help( eModId xModId, signed short FsNavId, 00151 int ac, signed portCHAR *av[], 00152 signed portCHAR **ppcStringReply ); 00153 00154 00155 #endif // __ACTUATOR_H__