00001 ///////////////////////////////////////////////////////////////////////////// 00002 /*! \file PhysicalRelay.cpp 00003 * \brief The Physical Relay class. 00004 * \author $Author: jayhawk_hokie $ 00005 * \version $Revision: 1.1 $ 00006 * \date $Date: 2006/07/05 21:04:21 $ 00007 *///////////////////////////////////////////////////////////////////////////// 00008 /* 00009 */ 00010 00011 /* Borrowed from PhysicalThruster.cpp */ 00012 00013 #include "PhysicalRelay.h" 00014 00015 PhysicalRelay::PhysicalRelay() 00016 { 00017 Initialize(); 00018 } 00019 00020 PhysicalRelay::~PhysicalRelay() 00021 { 00022 } 00023 00024 void PhysicalRelay::PowerOn(BYTE signal, int bank) 00025 { 00026 00027 DIOOutputByte(m_DAQCard->m_cardData,bank,signal); // sends signal to whatever bank is desired, bank 0 is devices and 2 is thrusters 00028 } 00029 00030 00031 void PhysicalRelay::PowerOff() // currently kills every bank to cover all bases 00032 { 00033 DIOOutputByte(m_DAQCard->m_cardData,2,0); // remove any of these lines 00034 DIOOutputByte(m_DAQCard->m_cardData,1,0); // if you wish to not kill 00035 DIOOutputByte(m_DAQCard->m_cardData,0,0); // a specific bank 00036 00037 } 00038 00039 void PhysicalRelay::Initialize() 00040 { 00041 m_DAQCard = DAQCard::Instance(); 00042 } 00043 00044 // Do not change the comments below - they will be added automatically by CVS 00045 /***************************************************************************** 00046 * $Log: PhysicalRelay.cpp,v $ 00047 * Revision 1.1 2006/07/05 21:04:21 jayhawk_hokie 00048 * Initial submission for power management of Whorl's. 00049 * 00050 * 00051 * 00052 ******************************************************************************/ 00053