Code covered by the BSD License  

Highlights from
Address Specific Parameter Custom Storage Class

Address Specific Parameter Custom Storage Class

by

 

14 May 2007 (Updated )

MemMap: A custom storage class that allows the user to specify the memory addresses of parameters in

csc_registration(action)
function defs = csc_registration(action)

%   Copyright 1994-2006 The MathWorks, Inc.
%   $Revision: $  $Date: $


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NOTE:
% - This file was automatically generated by the Simulink custom storage class
%   designer.
% - The contents of this file are arranged so that the Simulink custom storage
%   class designer can load the associated classes for editing.
% - Hand modification of this file is not recommended as it may prevent the
%   Simulink custom storage class designer from loading the associated classes.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% - Generated on:   12-Dec-2006 12:23:05
% - MATLAB version: 7.3.0.267 (R2006b)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


switch action

  case 'CSCDefn'
    defs = [];

    h = Simulink.CSCDefn;
    set(h, 'Name', 'MemoryAddress');
    set(h, 'OwnerPackage', 'MemMap');
    set(h, 'CSCType', 'Other');
    set(h, 'MemorySection', 'MemConst');
    set(h, 'IsMemorySectionInstanceSpecific', false);
    set(h, 'IsGrouped', false);
        set(h.DataUsage, 'IsParameter', true);
        set(h.DataUsage, 'IsSignal', false);
    set(h, 'DataScope', 'Auto');
    set(h, 'IsDataScopeInstanceSpecific', false);
    set(h, 'DataInit', 'Auto');
    set(h, 'IsDataInitInstanceSpecific', false);
    set(h, 'DataAccess', 'Direct');
    set(h, 'IsDataAccessInstanceSpecific', false);
    set(h, 'HeaderFile', '');
    set(h, 'IsHeaderFileInstanceSpecific', false);
    set(h, 'CommentSource', 'Specify');
    set(h, 'TypeComment', '/* Type for Memory Address specific parameters */');
    set(h, 'DeclareComment', '/* Declaration of Memory Address specific parameters */');
    set(h, 'DefineComment', '/* Definition of Memory Address specific parameters */');
    set(h, 'CSCTypeAttributesClassName', 'MemMap.cscattributes');
% %         set(h.CSCTypeAttributes, 'MemoryRange', '');
        set(h.CSCTypeAttributes, 'MemoryAddress', '');
    set(h, 'TLCFileName', 'MemMap.tlc');
    defs = [defs; h];

  case 'MemorySectionDefn'
    defs = [];

    h = Simulink.MemorySectionDefn;
    set(h, 'Name', 'MemConst');
    set(h, 'OwnerPackage', 'MemMap');
    set(h, 'Comment', '');
    set(h, 'PragmaPerVar', false);
    set(h, 'PrePragma', '');
    set(h, 'PostPragma', '');
    set(h, 'IsConst', true);
    set(h, 'IsVolatile', false);
    set(h, 'Qualifier', '');
    defs = [defs; h];

  otherwise
    error('Invalid action');
end  

%EOF

Contact us