/* BEGIN_FILE_HDR ******************************************************************************** * NOTICE * This software is the property of HiRain Technologies. Any information * contained in this doc should not be reproduced, or used, or disclosed * without the written authorization from HiRain Technologies. ******************************************************************************** * File Name : Nm.h ******************************************************************************** * Project/Product : AUTOSAR R21-11 * Title : Nm.h * Author : Hirain ******************************************************************************** * Description : Nm.h ******************************************************************************** * Limitations : None * ******************************************************************************** * ******************************************************************************** * Revision History: * Reference to Core C File ******************************************************************************** * END_FILE_HDR*/ #ifndef NM_H #define NM_H /******************************************************************************* * Includes *******************************************************************************/ #include "NmStack_Types.h" #include "Nm_Version.h" /******************************************************************************* * Macro *******************************************************************************/ /*Development Error*/ #if(STD_ON == NM_DEV_ERROR_DETECT) /*SWS_Nm_00232*/ #define NM_E_UNINIT ((uint8)0x00) #define NM_E_INVALID_CHANNEL ((uint8)0x01) #define NM_E_PARAM_POINTER ((uint8)0x02) /*EAS Special*/ #define NM_E_INIT_FAILED ((uint8)0x11) /*API ID*/ #define NM_INIT_APIID ((uint8)0x00) #define NM_PASSIVESTARTUP_APIID ((uint8)0x01) #define NM_NETWORKREQUEST_APIID ((uint8)0x02) #define NM_NETWORKRELEASE_APIID ((uint8)0x03) #define NM_DISABLECOMMUNICATION_APIID ((uint8)0x04) #define NM_ENABLECOMMUNICATION_APIID ((uint8)0x05) #define NM_REQSYNCPNCSHUTDOWN_APIID ((uint8)0x24) #define NM_UPDATEIRA_APIID ((uint8)0x26) #define NM_SETUSERDATA_APIID ((uint8)0x06) #define NM_GETUSERDATA_APIID ((uint8)0x07) #define NM_GETPDUDATA_APIID ((uint8)0x08) #define NM_REPEATEMESSAGEREQUEST_APIID ((uint8)0x09) #define NM_GETNODEIDENTIFIER_APIID ((uint8)0x0a) #define NM_GETLOCALNODEIDENTIFIER_APIID ((uint8)0x0b) #define NM_CHECKREMOTESLEEPINDICATION_APIID ((uint8)0x0d) #define NM_GETSTATE_APIID ((uint8)0x0e) #define NM_GETVERSIONINFO_APIID ((uint8)0x0f) /*Callback functions*/ #define NM_NETWORKSTARTINDICATION_APIID ((uint8)0x11) #define NM_NETWORKMODE_APIID ((uint8)0x12) #define NM_PREPAREBUSSLEEPMODE_APIID ((uint8)0x13) #define NM_BUSSLEEPMODE_APIID ((uint8)0x14) #define NM_SYNCHRONIZEMODE_APIID ((uint8)0x21) #define NM_REMOTESLEEPINDICATION_APIID ((uint8)0x17) #define NM_REMOTESLEEPCANCELLATION_APIID ((uint8)0x18) #define NM_SYNCHRONIZATIONPOINT_APIID ((uint8)0x19) #define NM_COORDREADYTOSLEEPINDICATION_APIID ((uint8)0x1e) #define NM_COORDREADYTOSLEEPCANCELLATION_APIID ((uint8)0x1f) #define NM_FORWARDSYNCPNCSHUTDOWN_APIID ((uint8)0x28) #define NM_PNCBITVECTORRXINDICATION_APIID ((uint8)0x25) #define NM_PNCBITVECTORTXINDICATION_APIID ((uint8)0x27) #define NM_CANIFCHECKPNVALID_APIID ((uint8)0x28)/*EAS defined*/ #define NM_PDURXINDICATION_APIID ((uint8)0x15) #define NM_STATECHANGENOTIFICATION_APIID ((uint8)0x16) #define NM_REPEATMESSAGEINDICATION_APIID ((uint8)0x1a) #define NM_TXTIMEOUTEXCEPTION_APIID ((uint8)0x1b) #define NM_CARWAKEUPINDICATION_APIID ((uint8)0x1d) #define NM_MAINFUNCTION_APIID ((uint8)0x10) #endif /******************************************************************************* * Global Function Declaration *******************************************************************************/ #define NM_START_SEC_CODE #include "Nm_MemMap.h" /*SWS_Nm_00030*/ extern FUNC(void, NM_CODE) Nm_Init ( P2CONST(Nm_ConfigType, AUTOMATIC, NM_CONST) ConfigPtr ); /*SWS_Nm_00031*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_PassiveStartUp ( NetworkHandleType NetworkHandle ); /*SWS_Nm_00032*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_NetworkRequest ( NetworkHandleType NetworkHandle ); /*SWS_Nm_00046*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_NetworkRelease ( NetworkHandleType NetworkHandle ); /*SWS_Nm_00134*//*SWS_Nm_00136*/ #if(STD_ON == NM_COM_CONTROL_ENABLED) /*SWS_Nm_00033*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_DisableCommunication ( NetworkHandleType NetworkHandle ); /*SWS_Nm_00034*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_EnableCommunication ( NetworkHandleType NetworkHandle ); #endif #if(STD_ON == NM_PN_SUPPORT_ENABLED) #if(STD_ON == NM_SYNC_PNC_SHUTDOWN_ENABLED) /*SWS_Nm_91005*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_RequestSynchronizedPncShutdown ( NetworkHandleType NetworkHandle, PNCHandleType PncId ); #endif /*SWS_Nm_91007*/ extern FUNC(void, NM_CODE) Nm_UpdateIRA ( NetworkHandleType NetworkHandle, P2CONST(uint8, AUTOMATIC, NM_CONST) PncBitVectorPtr ); #endif /*SWS_Nm_00138*//*SWS_Nm_00140*/ #if(STD_ON == NM_USER_DATA_ENABLED) /*SWS_Nm_00035*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_SetUserData ( NetworkHandleType NetworkHandle, P2CONST(uint8, AUTOMATIC, NM_CONST) nmUserDataPtr ); /*SWS_Nm_00036*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_GetUserData ( NetworkHandleType NetworkHandle, P2VAR(uint8, AUTOMATIC, NM_APPL_DATA) nmUserDataPtr ); #endif /*SWS_Nm_00037*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_GetPduData ( NetworkHandleType NetworkHandle, P2VAR(uint8, AUTOMATIC, NM_APPL_DATA) nmPduData ); /*SWS_Nm_00038*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_RepeatMessageRequest ( NetworkHandleType NetworkHandle ); /*SWS_Nm_00039*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_GetNodeIdentifier ( NetworkHandleType NetworkHandle, P2VAR(uint8, AUTOMATIC, NM_APPL_DATA) nmNodeIdPtr ); /*SWS_Nm_00040*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_GetLocalNodeIdentifier ( NetworkHandleType NetworkHandle, P2VAR(uint8, AUTOMATIC, NM_APPL_DATA) nmNodeIdPtr ); /*SWS_Nm_00150*/ #if(STD_ON == NM_REMOTE_SLEEP_IND_ENABLED) /*SWS_Nm_00042*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_CheckRemoteSleepIndication ( NetworkHandleType NetworkHandle, P2VAR(boolean, AUTOMATIC, NM_APPL_DATA) nmRemoteSleepIndPtr ); #endif /*SWS_Nm_00043*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_GetState ( NetworkHandleType NetworkHandle, P2VAR(Nm_StateType, AUTOMATIC, NM_APPL_DATA) nmStatePtr, P2VAR(Nm_ModeType, AUTOMATIC, NM_APPL_DATA) nmModePtr ); #if(NM_VERSION_INFO_API == STD_ON) /*SWS_Nm_00044*/ extern FUNC(void, NM_CODE) Nm_GetVersionInfo ( P2VAR(Std_VersionInfoType, AUTOMATIC, NM_APPL_DATA) nmVerInfoPtr ); #endif /*SWS_Nm_00502*/ #if(NM_DYN_PNC_SUPPORT == STD_ON) /*SWS_Nm_91003*/ extern FUNC(Std_ReturnType, NM_CODE) Nm_PnLearningRequest ( NetworkHandleType NetworkHandle ); #endif /*SWS_Nm_00118*/ extern FUNC(void, NM_CODE) Nm_MainFunction ( void ); #define NM_STOP_SEC_CODE #include "Nm_MemMap.h" #endif/*NM_H*/