No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 

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