PROFIBUS over 802.11b

by

 

03 Nov 2003 (Updated )

Polling based PROFIBUS MAC layer over a 802.11 PHY.

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

s = 'wPROFIBUS_PHY_Init';

switch (action)
case 'init'
 
%*********************************************************************
% Switch:           cbShowPHY
% Description:       
%*********************************************************************
case 'cbShowPHY'
    % -- 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 idxPreamble idxModulation idxCCA_mode];
            [Vis{idxOn}, En{idxOn}]     = deal('on');
        case 'off'
            idxOff = [idxDatarate idxPreamble idxModulation idxCCA_mode idxSFD_size];
            [Vis{idxOff}, En{idxOff}]   = deal('off');
     end
     
     % --- Update parameters
    set_param(Block, 'MaskVisibilities',Vis, 'MaskEnables',En);
    
    
%*********************************************************************
% Switch:           cbShowPHY_internas
% Description:       
%*********************************************************************
case 'cbShowPHY_internas'
    % -- 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_internas})        
        case 'on'
            idxOn = [idxSFD_size idxSIGNAL_size ...
                    idxSFD idxSERVICE_size idxLENGTH_size idxCRC_size_PHY idxCRC_polynom_PHY ...
                    idxCRC_init_vector_PHY idxScrambler_polynom idxScrambler_init_vector_short ...
                    idxScrambler_init_vector_long idxBarker_sequenz idxLevel_RSSI idxLevel_dBm];
            [Vis{idxOn}, En{idxOn}]     = deal('on');
        case 'off'
            idxOff = [idxSFD_size idxSIGNAL_size ...
                     idxSFD idxSERVICE_size idxLENGTH_size idxCRC_size_PHY idxCRC_polynom_PHY ...
                     idxCRC_init_vector_PHY idxScrambler_polynom idxScrambler_init_vector_short ...
                     idxScrambler_init_vector_long idxBarker_sequenz idxLevel_RSSI idxLevel_dBm];
            [Vis{idxOff}, En{idxOff}]   = deal('off');
     end
     
     % --- Update parameters
    set_param(Block, 'MaskVisibilities',Vis, 'MaskEnables',En);    
 
%*********************************************************************
% Switch:           cbShowRF
% Description:       
%*********************************************************************
case 'cbShowRF'
    % -- 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_dB idxAntenna_select ...
                    idxTX_noise_temp idxTX_phase_noise idxTX_frequency_offset idxRRC_Rolloff_factor ...
                    idxFilter_order idxOversampling_factor];
            [Vis{idxOn}, En{idxOn}]     = deal('on');
        case 'off'
            idxOff = [idxTX_powerlevel idxTX_powerlevel_vector_dB idxAntenna_select ...
                     idxTX_noise_temp idxTX_phase_noise idxTX_frequency_offset idxRRC_Rolloff_factor ...
                     idxFilter_order idxOversampling_factor];
            [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