25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

46 satır
886 B

  1. #include "Connector.h"
  2. #include "GlobalDefine.h"
  3. CConnector::CConnector()
  4. {
  5. mPinCount = 0;
  6. mIOModuleRangeBegin = mIOModuleRangeEnd = 0;
  7. mIOInterfaceHandle = 0;
  8. }
  9. int CConnector::SetIOInterface(CIOModulesInterface *IFHandle)
  10. {
  11. mIOInterfaceHandle = IFHandle;
  12. return RET_OK;
  13. }
  14. int CConnector::GetPinCount()
  15. {
  16. return mPinCount;
  17. }
  18. int CConnector::SetConnectorType(CConnectorDefs::eConnectorType type)
  19. {
  20. mConnectorType = type;
  21. mPinCount = CConnectorDefs::GetPinCount(type);
  22. mIOModuleRangeBegin = CConnectorDefs::GetConnectorIOMappingStart(type);
  23. mIOModuleRangeEnd = CConnectorDefs::GetConnectorIOMappingEnd(type);
  24. return RET_OK;
  25. }
  26. bool CConnector::IsConnectorDefined()
  27. {
  28. if(mPinCount == 0)
  29. {
  30. return false;
  31. }
  32. return true;
  33. }
  34. CConnectorDefs::eConnectorType CConnector::GetConnectorType()
  35. {
  36. return mConnectorType;
  37. }