PROFIBUS over 802.11b

by

 

03 Nov 2003 (Updated )

Polling based PROFIBUS MAC layer over a 802.11 PHY.

wPROFIBUS_WT_menu(Block, action, varargin)
function varargout = wPROFIBUS_WT_menu(Block, action, varargin)

s = 'wPROFIBUS_WT_Init';

switch (action)
case 'init'
    
%*********************************************************************
% Switch:           cbShowLLI
% Description:       
%*********************************************************************
case 'cbShowLLI'
    disp('Set WT LLI Parameters')
    % -- Get variables from mask
    En   = get_param(Block, 'MaskEnables');
    Vis  = get_param(Block, 'MaskVisibilities');
    Vals = get_param(Block, 'MaskValues');
    
    % -- Set Index to Mask parameters
    setfieldindexnumbers(Block);    
    
    % -- Set Visibilities
     switch(Vals{idxLLI_preferences})        
        case 'on'
            idxOn = [idxFiletype idxLLI_data_file idxLLI_received_data_file];
            switch(Vals{idxFiletype})
                case 'ASCII file'
                    idxOn = [idxOn idxDelimiter];
                case 'Matlab .mat file'
                    idxOff = [idxFiletype idxDelimiter];
                    [Vis{idxOff}, En{idxOff}]   = deal('off');
            end    
            [Vis{idxOn}, En{idxOn}]     = deal('on');
        case 'off'
            idxOff = [idxFiletype idxDelimiter idxLLI_data_file idxLLI_received_data_file];
            [Vis{idxOff}, En{idxOff}]   = deal('off');
     end
     
     % --- Update parameters
    set_param(Block, 'MaskVisibilities',Vis, 'MaskEnables',En);
 

 
%*********************************************************************
% Switch:           cbShowPHY
% Description:       
%*********************************************************************
case 'cbShowPHY'
    disp('Set WT PHY Parameters')
    % -- Get variables from mask
    En   = get_param(Block, 'MaskEnables');
    Vis  = get_param(Block, 'MaskVisibilities');
    Vals = get_param(Block, 'MaskValues');
    
    % -- Set Index to Mask parameters
    setfieldindexnumbers(Block);    
    
    % -- Set Visibilities
     switch(Vals{idxPHY_preferences})        
        case 'on'
            idxOn = [idxDatarate_menu idxPreamble_menu idxModulation_menu idxCCA_mode];
            [Vis{idxOn}, En{idxOn}]     = deal('on');
        case 'off'
            idxOff = [idxDatarate_menu idxPreamble_menu idxModulation_menu idxCCA_mode];
            [Vis{idxOff}, En{idxOff}]   = deal('off');
     end
     
     % --- Update parameters
    set_param(Block, 'MaskVisibilities',Vis, 'MaskEnables',En);    
 
%*********************************************************************
% Switch:           cbShowRF
% Description:       
%*********************************************************************
case 'cbShowRF'
    disp('Set WT RF Parameters')
    % -- Get variables from mask
    En   = get_param(Block, 'MaskEnables');
    Vis  = get_param(Block, 'MaskVisibilities');
    Vals = get_param(Block, 'MaskValues');
    
    % -- Set Index to Mask parameters
    setfieldindexnumbers(Block);    
    
    % -- Set Visibilities
     switch(Vals{idxRF_preferences})        
        case 'on'
            idxOn = [idxTX_powerlevel idxTX_powerlevel_vector idxAntenna_select ...
                    idxTX_noise_temp idxRRC_Rolloff_factor idxFilter_order idxOversampling_factor ...
                    idxTX_phase_noise idxTX_frequency_offset];
            [Vis{idxOn}, En{idxOn}]     = deal('on');
        case 'off'
            idxOff = [idxTX_powerlevel idxTX_powerlevel_vector idxAntenna_select ...
                     idxTX_noise_temp idxRRC_Rolloff_factor idxFilter_order idxOversampling_factor ...
                     idxTX_phase_noise idxTX_frequency_offset];
            [Vis{idxOff}, En{idxOff}]   = deal('off');
     end
     
     % --- Update parameters
    set_param(Block, 'MaskVisibilities',Vis, 'MaskEnables',En);   
    
   
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% end function varargout = wPROFIBUS_InitMask(Block, action, varargin)  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    
    
    
    
    
    
    
    

Contact us