app/demo-sn-gpio/sapl/sapl.c
/**
 *
 * The function is called by the openSAFETY Stack (unit SNMTS) to indicate that a SN state transition from
 * PRE-OPERATIONAL to OPERATIONAL was requested by the SCM. To be able to respond the requested state
 * transition the openSAFETY Application has to admit the transition  by calling the function SNMTS_EnterOpState().
 *
 * @attention To inform the SNMTS about the API confirmation of switching into state OPERATIONAL application
 * must call the API function SNMTS_EnterOpState(). This API function MUST NOT be called within this callback function.
 *
 * @param        b_instNum        instance number, valid range: 0 .. &lt;EPLS_cfg_MAX_INSTANCES&gt; - 1
 *
 */
The function is called by the openSAFETY Stack (unit SNMTS) to indicate that a SN state transition from
PRE-OPERATIONAL to OPERATIONAL was requested by the SCM. To be able to respond the requested state
transition the openSAFETY Application has to admit the transition  by calling the function SNMTS_EnterOpState().

@attention To inform the SNMTS about the API confirmation of switching into state OPERATIONAL application
must call the API function SNMTS_EnterOpState(). This API function MUST NOT be called within this callback function.

@param        b_instNum        instance number, valid range: 0 ..
The function is called by the openSAFETY Stack ( unit SNMTS ) to indicate that a SN state transition from PRE - OPERATIONAL to OPERATIONAL was requested by the SCM . To be able to respond the requested state transition the openSAFETY Application has to admit the transition by calling the function SNMTS_EnterOpState () . @attention To inform the SNMTS about the API confirmation of switching into state OPERATIONAL application must call the API function SNMTS_EnterOpState () . This API function MUST NOT be called within this callback function . @param b_instNum instance number valid range : 0 ..
void SAPL_SNMTS_SwitchToOpReqClbk(BYTE_B_INSTNUM)
{
#if (EPLS_cfg_MAX_INSTANCES > 1)
    b_instNum = b_instNum; 
#endif
    if(saplInstance_l.fParamCrcValid_m == TRUE  &&
       saplInstance_l.activeTasks_m == 0         )
    {
        saplInstance_l.fParamCrcValid_m = FALSE;
        stateh_setEnterOpFlag(TRUE);
    }
}
void SAPL_SNMTS_SwitchToOpReqClbk ( BYTE_B_INSTNUM ) { #if ( EPLS_cfg_MAX_INSTANCES > 1 ) b_instNum = b_instNum ; #endif if ( saplInstance_l . fParamCrcValid_m == TRUE && saplInstance_l . activeTasks_m == 0 ) { saplInstance_l . fParamCrcValid_m = FALSE ; stateh_setEnterOpFlag ( TRUE ) ; } }
The function is called by the openSAFETY Stack (unit SNMTS) to indicate that a SN state transition from
 PRE-OPERATIONAL to OPERATIONAL was requested by the SCM.
The function is called by the openSAFETY Stack ( unit SNMTS ) to indicate that a SN state transition from PRE - OPERATIONAL to OPERATIONAL was requested by the SCM .
/* To avoid warnings */ /*
     * Verify if the parameter checksum is indeed valid
     * and all SAPL tasks are finished!
     */