Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

87 řádky
4.3 KiB

  1. #include "CableTestBenchDefs.h"
  2. const int CConnectorDefs::ConnIOMapping[CConnectorDefs::NB_CONNECTOR_TYPE][2] = { //Connectors pins mapping (zero based index)
  3. {0,0}, //Unknown
  4. {96,101}, //in 6 pins
  5. {90,103}, //in 14 pins
  6. {72,95}, //in 24 pins
  7. {0,71}, //in 72 pins
  8. {0,89}, //in 90 pins
  9. {0,107}, //in 108 pins
  10. {0,107}, //in 120 pins
  11. {96,101}, //out 6 pins
  12. {90,103}, //out 14 pins
  13. {72,95}, //out 24 pins
  14. {0,71}, //out 72 pins
  15. {0,107}, //out 108 pins
  16. };
  17. const int CConnectorDefs::ConnPinCount[NB_CONNECTOR_TYPE] = {0, 6, 14, 24, 72, 90, 108, 120, 6, 14, 24, 72, 108};
  18. const char* CConnectorDefs::ConnectorDescription[NB_CONNECTOR_TYPE] = {"Connecteur inconnu ou invalide",
  19. "Connecteur circulaire 6 contacts",
  20. "Connecteur circulaire 14 contacts",
  21. "Connecteur Amphenol rectangulaire 24 contacts",
  22. "Connecteur Amphenol rectangulaire 72 contacts",
  23. "Connecteur Souriau rectangulaire 90 contacts",
  24. "Connecteur Amphenol rectangulaire 108 contacts",
  25. "Connecteur Souriau rectangulaire 120 contacts",
  26. "Connecteur circulaire 6 contacts",
  27. "Connecteur circulaire 14 contacts",
  28. "Connecteur Amphenol rectangulaire 24 contacts",
  29. "Connecteur Amphenol rectangulaire 72 contacts",
  30. "Connecteur Amphenol rectangulaire 108 contacts"};
  31. const int CConnectorDefs::GetPinCount(eConnectorType type)
  32. {
  33. if(type < 0 || type >= NB_CONNECTOR_TYPE)
  34. {
  35. return 0;
  36. }
  37. return ConnPinCount[type];
  38. }
  39. const int CConnectorDefs::GetConnectorIOMappingStart(eConnectorType type)
  40. {
  41. if(type < 0 || type >= NB_CONNECTOR_TYPE)
  42. {
  43. return ConnIOMapping[UNKNOWN_CONNECTOR_TYPE][IO_MAPPING_START_INDEX];
  44. }
  45. return ConnIOMapping[type][IO_MAPPING_START_INDEX];
  46. }
  47. const int CConnectorDefs::GetConnectorIOMappingEnd(eConnectorType type)
  48. {
  49. if(type < 0 || type >= NB_CONNECTOR_TYPE)
  50. {
  51. return ConnIOMapping[UNKNOWN_CONNECTOR_TYPE][IO_MAPPING_END_INDEX];
  52. }
  53. return ConnIOMapping[type][IO_MAPPING_END_INDEX];
  54. }
  55. const int * CConnectorDefs::GetConnectorIOMapping(eConnectorType type)
  56. {
  57. if(type < 0 || type >= NB_CONNECTOR_TYPE)
  58. {
  59. return ConnIOMapping[UNKNOWN_CONNECTOR_TYPE];
  60. }
  61. return ConnIOMapping[type];
  62. }
  63. const char * CConnectorDefs::GetConnectorDescription(eConnectorType type)
  64. {
  65. if(type < 0 || type >= NB_CONNECTOR_TYPE)
  66. {
  67. return ConnectorDescription[UNKNOWN_CONNECTOR_TYPE];
  68. }
  69. return ConnectorDescription[type];
  70. }