MOOS 0.2375
Public Member Functions | Public Attributes | Protected Member Functions
CRelayBoard Class Reference

#include <RelayBoard.h>

Inheritance diagram for CRelayBoard:
Inheritance graph
[legend]
Collaboration diagram for CRelayBoard:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool UpdateRelay (CMOOSMsg &Msg)
bool Stop ()
bool Record ()
bool IsPowered (std::string sRelay)
 CRelayBoard ()
virtual ~CRelayBoard ()

Public Attributes

RELAY_FUNCTION_2_TOGGLE_MAP m_RelayToggleMap
RELAY_FUNCTION_2_CHECK_MAP m_RelayCheckMap
INPUT_NAME_2_INT_MAP m_InputNameMap
std::string m_sRECORDING
std::string m_sRECORD
std::string m_sSTOPPED
std::string m_sSTOP
std::string m_sON
std::string m_sOFF
std::string m_sCAMERA_POWER
std::string m_sBOARD_POWER
std::string m_sVCR_POWER
std::string m_sLIGHT_POWER
std::string m_sLIGHT
std::string m_sDARK

Protected Member Functions

bool ShowRelayBoardStatus ()
int CheckAllRelayStates ()
bool ToggleRelaySwitch (std::string sRelay, std::string sDesiredState)
bool InitialiseSensor ()
bool Iterate ()
bool OnNewMail (MOOSMSG_LIST &NewMail)
bool OnConnectToServer ()
bool OnStartUp ()
bool GetData ()
bool PublishData ()
bool SetRelayHi (short val)
bool SetRelayLo (short val)
int CheckRelayState (short val)
int CheckInputState (short val)

Detailed Description

Definition at line 86 of file RelayBoard.h.


Constructor & Destructor Documentation

CRelayBoard::CRelayBoard ( )

Definition at line 44 of file RelayBoard.cpp.

CRelayBoard::~CRelayBoard ( ) [virtual]

Definition at line 79 of file RelayBoard.cpp.


Member Function Documentation

int CRelayBoard::CheckAllRelayStates ( ) [protected]
Returns:
the status of all relays in decimal format

Definition at line 546 of file RelayBoard.cpp.

int CRelayBoard::CheckInputState ( short  val) [protected]

Allows querying of an individual input

Definition at line 306 of file RelayBoard.cpp.

int CRelayBoard::CheckRelayState ( short  val) [protected]
Returns:
either 1 to represent the ON state of the relay or 0 to indicate the relay is OFF -1 indicates error

Definition at line 264 of file RelayBoard.cpp.

bool CRelayBoard::GetData ( ) [protected]

Definition at line 200 of file RelayBoard.cpp.

bool CRelayBoard::InitialiseSensor ( ) [protected, virtual]

called from OnStartUp - overload to execute custom start up code for sensor

Reimplemented from CMOOSInstrument.

Definition at line 193 of file RelayBoard.cpp.

bool CRelayBoard::IsPowered ( std::string  sRelay)
Returns:
whether or not a particular relay switch has power

Definition at line 489 of file RelayBoard.cpp.

bool CRelayBoard::Iterate ( ) [protected, virtual]

this is where it all happens..

Reimplemented from CMOOSApp.

Definition at line 89 of file RelayBoard.cpp.

bool CRelayBoard::OnConnectToServer ( ) [protected, virtual]

Called when the class has succesully connected to the server. Overload this function and place use it to register for notification when variables of interest change

Reimplemented from CMOOSApp.

Definition at line 181 of file RelayBoard.cpp.

bool CRelayBoard::OnNewMail ( MOOSMSG_LIST NewMail) [protected, virtual]

called when new mail has arrived. Overload this method in a derived class to process new mail. It will be called at approximately 1/CommsTick Hz. In this function you'll most likely interate over the collection of mail message received or call a m_Comms::PeekMail() to look for a specific named message.

Parameters:
NewMaila list of new mail messages

Reimplemented from CMOOSApp.

Definition at line 142 of file RelayBoard.cpp.

bool CRelayBoard::OnStartUp ( ) [protected, virtual]

CMOOSApp overide

Reimplemented from CMOOSInstrument.

Definition at line 101 of file RelayBoard.cpp.

bool CRelayBoard::PublishData ( ) [protected]

Definition at line 174 of file RelayBoard.cpp.

bool CRelayBoard::Record ( )

Starts the video system recording

Definition at line 347 of file RelayBoard.cpp.

bool CRelayBoard::SetRelayHi ( short  val) [protected]

Definition at line 226 of file RelayBoard.cpp.

bool CRelayBoard::SetRelayLo ( short  val) [protected]

Definition at line 510 of file RelayBoard.cpp.

bool CRelayBoard::ShowRelayBoardStatus ( ) [protected]

Definition at line 572 of file RelayBoard.cpp.

bool CRelayBoard::Stop ( )

Definition at line 383 of file RelayBoard.cpp.

bool CRelayBoard::ToggleRelaySwitch ( std::string  sRelay,
std::string  sDesiredState 
) [protected]

Main access point for toggling a switch on the relay board

Definition at line 451 of file RelayBoard.cpp.

bool CRelayBoard::UpdateRelay ( CMOOSMsg Msg)

Definition at line 418 of file RelayBoard.cpp.


Member Data Documentation

Definition at line 94 of file RelayBoard.h.

Definition at line 93 of file RelayBoard.h.

Definition at line 92 of file RelayBoard.h.

Definition at line 103 of file RelayBoard.h.

Definition at line 102 of file RelayBoard.h.

std::string CRelayBoard::m_sDARK

Definition at line 107 of file RelayBoard.h.

std::string CRelayBoard::m_sLIGHT

Definition at line 106 of file RelayBoard.h.

Definition at line 105 of file RelayBoard.h.

std::string CRelayBoard::m_sOFF

Definition at line 101 of file RelayBoard.h.

std::string CRelayBoard::m_sON

Definition at line 100 of file RelayBoard.h.

Definition at line 97 of file RelayBoard.h.

Definition at line 96 of file RelayBoard.h.

std::string CRelayBoard::m_sSTOP

Definition at line 99 of file RelayBoard.h.

Definition at line 98 of file RelayBoard.h.

Definition at line 104 of file RelayBoard.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines