function [mapName, relativePathToMapFile, found] = getBlockHelpMapNameAndPath(block_type)
%  Returns the mapName and the relative path to the map file for this block_type

% Internal note: 
%   First column is the "System object name", corresponding to the block, 
%   Second column is the anchor ID, the doc uses for the block.
%   For core blocks, the first column is the 'BlockType'.

% Copyright 2011-2019 The MathWorks, Inc.

blks = {... % System blocks
  'comm.AGC'                                  'agc'                            ;...
  'comm.BarkerCode'                           'barker_code_generator'          ;...
  'comm.BasebandFileReader',                  'basebandreader'                 ;...
  'comm.BasebandFileWriter',                  'basebandwriter'                 ;...
  'comm.CarrierSynchronizer'                  'carrier_synchronizer'           ;...
  'comm.CoarseFrequencyCompensator'           'coarse_frequency_compensator'   ;...  
  'comm.internal.DecisionFeedbackEqualizerSL' 'decision_feedback_equalizer'    ;...
  'comm.EVM'                                  'evmmeasurement'                 ;...  
  'comm.FMBroadcastModulator'                 'fm_broadcast_modulator'         ;...
  'comm.FMBroadcastDemodulator'               'fm_broadcast_demodulator'       ;...
  'comm.FMDemodulator'                        'fm_demodulator'                 ;... 
  'comm.FMModulator'                          'fm_modulator'                   ;...
  'comm.HadamardCode'                         'hadamard_code_generator'        ;...
  'comm.HDLCRCDetector'                       'general_crc_detector_hdl'       ;...
  'comm.HDLCRCGenerator'                      'general_crc_generator_hdl'      ;...
  'comm.HDLRSDecoder'                         'integer-output_rs_decoder_hdl'  ;...
  'comm.HDLRSEncoder'                         'integer-input_rs_encoder_hdl'   ;...
  'comm.IQImbalanceCompensator'               'i_q_imbalance_compensator'      ;...
  'comm.internal.LinearEqualizerSL'           'linear_equalizer'               ;...
  'comm.MER'                                  'mermeasurement'                 ;...  
  'comm.OFDMDemodulator'                      'ofdm_demodulator'               ;...
  'comm.OFDMModulator'                        'ofdm_modulator'                 ;...
  'comm.OVSFCode'                             'ovsf_code_generator'            ;...
  'comm.PhaseNoise'                           'phase_noise'                    ;...
  'comm.PreambleDetector'                     'preamble_detector'              ;...
  'comm.SphereDecoder'                        'sphere_decoder'                 ;...
  'comm.SymbolSynchronizer'                   'symbol_synchronizer',           ;...
  'comm.TurboDecoder'                         'turbo_decoder'                  ;...
  'comm.TurboEncoder'                         'turbo_encoder'                  ;...
  'comm.WalshCode'                            'walsh_code_generator'           ;...
  'comm.internal.APSKDemodulator'             'mapsk_demodulator_baseband'     ;...
  'comm.internal.APSKModulator'               'mapsk_modulator_baseband'       ;...
  'comm.internal.BernoulliBinaryGenerator'    'bernoulli_binary_generator'     ;...
  'comm.internal.BinarySymmetricChannel'      'binary_symmetric_channel'       ;...
  'comm.internal.DPD'                         'digital_predistortion'          ;...
  'comm.internal.DPDCoefficientEstimator'     'dpd_coefficient_estimator'      ;...
  'comm.internal.DVBSAPSKDemodulator'         'dvbs_apsk_demodulator_baseband' ;...
  'comm.internal.DVBSAPSKModulator'           'dvbs_apsk_modulator_baseband'   ;...
  'comm.internal.MIL188QAMDemodulator'        'mil188_qam_demodulator_baseband';...
  'comm.internal.MIL188QAMModulator'          'mil188_qam_modulator_baseband'  ;...
  'comm.internal.MIMOFadingChannel'           'mimo_fading_channel'            ;...
  'comm.internal.PoissonIntegerGenerator',    'poisson_integer_generator'      ;...
  'comm.internal.RandomIntegerGenerator',     'random_integer_generator'       ;...
  'comm.internal.SISOFadingChannel',          'siso_fading_channel'            ;...
  'comm.internal.TPCDecoder',                 'tpc_decoder'                    ;...
  'comm.internal.TPCEncoder',                 'tpc_encoder'                    ;...
  'rf.Amplifier',                             'amplifier'                      ;...
  ...  % Core blocks
  'ConstellationDiagram'                      'constellation_diagram'          ;...
  };

relativePathToMapFile = '/comm/comm.map';
found = false;
% See whether or not the block is a Communications Toolbox core or built-in
i = strcmp(block_type, blks(:,1));

if ~any(i)
  mapName = 'User Defined';
else
  found = true;
  mapName = blks(i,2);
end
