34 lines
643 B
C++
34 lines
643 B
C++
#include "Connector.h"
|
|
#include "GlobalDefine.h"
|
|
|
|
CConnector::CConnector()
|
|
{
|
|
mPinCount = 0;
|
|
mIOModuleRangeBegin = mIOModuleRangeEnd = 0;
|
|
}
|
|
|
|
int CConnector::GetPinCount()
|
|
{
|
|
return mPinCount;
|
|
}
|
|
|
|
int CConnector::SetConnectorType(CConnectorDefs::eConnectorType type)
|
|
{
|
|
mConnectorType = type;
|
|
mPinCount = CConnectorDefs::GetPinCount(type);
|
|
mIOModuleRangeBegin = CConnectorDefs::GetConnectorIOMappingStart(type);
|
|
mIOModuleRangeEnd = CConnectorDefs::GetConnectorIOMappingEnd(type);
|
|
|
|
return RET_OK;
|
|
}
|
|
|
|
bool CConnector::IsConnectorDefined()
|
|
{
|
|
if(mPinCount == 0)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|