IBM Support

PI59395: S-FUNCTIONS WON'T COMPILE WITH ENUM TYPES AS INPUT

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • when using an enum type as an input to the generated S-Function,
    you
    will encounter a compilation error says that the conversion from
    real_t
    to enum is no longer supported. This seems to be related to
    visual
    studio (2010), that does not support this type of conversion.
    The error
    happens inside the S-Function wrapper.
    To make it work, I had to modify the wrapper, casting the signal
    to int
    first. See the following code (check TEMPORARY FIX).
    I know this is dependent upon visual studio, but since it is a
    supported compiler, I would expect the code to actually work.
    Thanks!
    
    
      const real_T* in8 = (const real_T*)ssGetInputPortSignal(S, 8);
      int tmpIn8=(int)in8[0]; //TEMPORARY FIX
      if(p_SFunctionBlockML5->get_itsControl_Compressor_State_SP())
    
    p_SFunctionBlockML5->get_itsControl_Compressor_State_SP()->SetVa
    lue
    ((ON_OFF_State)tmpIn8);
    
    
    
    So, code has to be manually modified every time the S-Function
    is re-generated.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Rhapsody users                                               *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * S-FUNCTIONS WON'T COMPILE WITH ENUM TYPES AS INPUT           *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • Fixed in Rhapsody 8.2
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI59395

  • Reported component name

    TLOGIC RHAPSODY

  • Reported component ID

    5724V74RP

  • Reported release

    812

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-03-18

  • Closed date

    2016-12-05

  • Last modified date

    2016-12-05

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    TLOGIC RHAPSODY

  • Fixed component ID

    5724V74RP

Applicable component levels

  • R812 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SS7P9W","label":"Rational Rhapsody"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.1.2","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
05 December 2016