code/WPILib/SolenoidBase.cpp
/**
 * Constructor
 * 
 * @param slot The slot that this SolenoidBase accesses.
 */
Constructor

@param slot The slot that this SolenoidBase accesses.
Constructor @param slot The slot that this SolenoidBase accesses .
SolenoidBase::SolenoidBase(UINT32 slot)
	: m_chassisSlot (slot)
{
	m_refCount++;
	if (m_refCount == 1)
	{
		m_semaphore = semMCreate(SEM_Q_PRIORITY | SEM_DELETE_SAFE | SEM_INVERSION_SAFE);
		m_fpgaSolenoidModule = new tSolenoid(&status);
	}
	wpi_assertCleanStatus(status);
}
SolenoidBase :: SolenoidBase ( UINT32 slot ) : m_chassisSlot ( slot ) { m_refCount ++ ; if ( m_refCount == 1 ) { m_semaphore = semMCreate ( SEM_Q_PRIORITY | SEM_DELETE_SAFE | SEM_INVERSION_SAFE ) ; m_fpgaSolenoidModule = new tSolenoid ( & status ) ; } wpi_assertCleanStatus ( status ) ; }
Constructor
Constructor
// Needs to be global since the protected resource spans all Solenoid objects.