Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

Device.cpp

Go to the documentation of this file.
00001 /*************************************************/
00002 /*! \file Device.cpp
00003 *  \brief Implementation of the Device superclass.
00004 *  \@author $@author: nilspace $
00005 *  \version $Revision: 1.1 $
00006 *  \date    $@date 2003/03/26 16:38:58 $
00007 **************************************************/
00008 /*! 
00009 */
00010 
00011 #include "Device.h"
00012 
00013 /***********************************
00014 * Construction/Destruction
00015 ***********************************/
00016 
00017 /** @brief Create an object of type Device.
00018 * @author Andrew Turner
00019 * @date March 25, 1999
00020 * This constructor is called to create an object of type Device and sets
00021 *       the initial state to c_bNotActive
00022 * Assumptions: The default state of a device is c_bNotActive
00023 */
00024 Device::Device()
00025 {
00026         SetActive(c_bNotActive);
00027 }
00028 
00029 /** @brief Create a copy of object type Device.
00030 * @author Andrew Turner
00031 * @date March 25, 1999
00032 * This constructor copies the m_bActiveState
00033 * External Methods Called: SetActive(bool)
00034 * Assumptions: None
00035 */
00036 Device::Device(Device& _rdevDevice)
00037 {
00038         SetActive(_rdevDevice.IsActive());
00039 }
00040 
00041 /** @brief Uninitializes and removes Device from memory.
00042 * @author Andrew Turner
00043 * @date March 25, 1999
00044 * This constructor calls Device::Deinitialize
00045 * Assumptions: None
00046 */
00047 Device::~Device()
00048 {
00049     Deinitialize();
00050 }
00051 
00052 /** @brief Returns the current state of m_bActiveState.
00053     * @author Andrew Turner
00054     * @date March 25, 1999
00055     * This member function is used to inspect the state of the device
00056     * External Methods Called: None
00057     * Assumptions: None
00058     */
00059 bool Device::IsActive()
00060 {
00061         return m_bActiveState;
00062 }
00063 
00064 /** @brief Specify the physical location of the device with respect to whorl body coordinates.
00065     * @param newDeviceLocation Physical center of the device [x,y,z]^T (meters).
00066     */
00067 void Device::SetLocation(const Vector& newDeviceLocation)
00068 {
00069     m_Location = newDeviceLocation;
00070 }
00071 
00072 /** @brief Returns the physical location of the device with respect to whorl body coordinates.
00073     * @return Physical center of the device [x,y,z]^T (meters).
00074     */
00075 Vector Device::GetLocation() const
00076 {
00077     return m_Location;
00078 }
00079 
00080 /** @brief Sets the value of m_bActiveState to _bActiveState.
00081     * @author Andrew Turner
00082     * @date March 25, 1999
00083     * This member function is used to set the current state of the device
00084     * External Methods Called: None
00085     * Assumptions: None
00086     */
00087 int Device::SetActive(bool _bActiveState)
00088 {
00089         m_bActiveState = _bActiveState;
00090         return NO_ERROR;
00091 }
00092 
00093 /** @brief Initializes the device for use.
00094     * @author Andrew Turner
00095     * @date March 25, 1999
00096     * Allows the device to be used now that it is Active
00097     * External Methods Called: SetActive(bool)
00098     * Assumptions: None
00099     */
00100 int Device::Initialize()
00101 {
00102         SetActive(c_bActive);
00103         return NO_ERROR;
00104 }
00105 
00106 /** @brief Deinitializes the device from further use.
00107 * @author Andrew Turner
00108 * @date March 25, 1999
00109 * Prevents the device from being used.
00110 * External Methods Called: SetActive(bool)
00111 * Assumptions: None
00112 */
00113 int Device::Deinitialize()
00114 {
00115         SetActive(c_bNotActive);
00116         return NO_ERROR;
00117 }
00118 
00119 
00120 // Do not change the comments below - they will be added automatically by CVS
00121 /*****************************************************************************
00122 *       $Log: Device.cpp,v $
00123 *       Revision 1.1  2003/07/04 14:08:05  simpliciter
00124 *       Rearranged directory tree.
00125 *       
00126 *       Revision 1.1.1.1  2003/06/06 18:44:15  simpliciter
00127 *       Initial submission.
00128 *       
00129 *       Revision 1.2  2003/06/06 17:45:30  simpliciter
00130 *       Removed spurious @detail tags.
00131 *       
00132 *       Revision 1.1.1.1  2003/06/06 14:44:14  simpliciter
00133 *       Initial import.
00134 *       
00135 *
00136 ******************************************************************************/

Generated on Wed Sep 5 12:54:19 2007 for DSACSS Operational Code by  doxygen 1.3.9.1