Esempio n. 1
0
static inline Std_ReturnType ComM_Internal_Enter_ReadySleep(const ComM_ChannelType* ChannelConf,
															ComM_Internal_ChannelType* ChannelInternal) {
	Std_ReturnType status = E_OK;

	if (ChannelInternal->Mode != COMM_FULL_COMMUNICATION)
	{
		ChannelInternal->RequestedSubMode = COMM_FULL_COM_READY_SLEEP;
		status = ComM_Internal_PropagateComMode(ChannelConf, COMM_FULL_COMMUNICATION);
	}
	else
	{
		ChannelInternal->SubMode = COMM_FULL_COM_READY_SLEEP;
		status = ComM_Internal_NotifyNm(ChannelConf);
	}

	return status;
}
Esempio n. 2
0
static inline Std_ReturnType ComM_Internal_Enter_NetworkRequested(const ComM_ChannelType* ChannelConf,
																ComM_Internal_ChannelType* ChannelInternal) {
	Std_ReturnType status = E_OK;

	if (ChannelInternal->SubMode == COMM_NO_COM_NO_PENDING_REQUEST)
	{
		ChannelInternal->SubMode = COMM_NO_COM_REQUEST_PENDING; /** @req COMM875 */ /** @req COMM894 */ /** @req COMM876 */
	}

	if (ChannelInternal->CommunicationAllowed == TRUE)
	{
		status = ComM_Internal_PropagateComMode(ChannelConf, COMM_FULL_COMMUNICATION);
		if(status == E_OK) {
	        ChannelInternal->RequestedSubMode = COMM_FULL_COM_NETWORK_REQUESTED;
		}
	}

	return status;
}
Esempio n. 3
0
static inline Std_ReturnType ComM_Internal_Enter_ReadySleep(const ComM_ChannelType* ChannelConf,
															ComM_Internal_ChannelType* ChannelInternal) {
	boolean propagateToBusSM = (ChannelInternal->Mode != COMM_FULL_COMMUNICATION);
	ChannelInternal->LightTimeoutTimeLeft = ChannelConf->LightTimeout;
	ChannelInternal->Mode = COMM_FULL_COMMUNICATION;
	ChannelInternal->SubMode = COMM_SUBMODE_READY_SLEEP;

	Std_ReturnType status, globalStatus = E_OK;
	status = ComM_Internal_NotifyNm(ChannelConf);  /**< @req COMM133.1 */
	if (status > globalStatus){
		globalStatus = status;
	}
	if (propagateToBusSM) {
		status = ComM_Internal_PropagateComMode(ChannelConf);
		if (status > globalStatus){
			globalStatus = status;
		}
	}
	return globalStatus;
}
Esempio n. 4
0
static inline Std_ReturnType ComM_Internal_Enter_NetworkRequested(const ComM_ChannelType* ChannelConf,
																ComM_Internal_ChannelType* ChannelInternal) {
	boolean propagateToBusSM = (ChannelInternal->Mode != COMM_FULL_COMMUNICATION);
	ChannelInternal->FullComMinDurationTimeLeft = COMM_T_MIN_FULL_COM_MODE_DURATION;
	ChannelInternal->Mode = COMM_FULL_COMMUNICATION;
	ChannelInternal->SubMode = COMM_SUBMODE_NETWORK_REQUESTED;

	Std_ReturnType status, globalStatus = E_OK;
	status = ComM_Internal_NotifyNm(ChannelConf);  /**< @req COMM129.2 */
	if (status > globalStatus){
		globalStatus = status;
	}
	if (propagateToBusSM) {
		status = ComM_Internal_PropagateComMode(ChannelConf);
		if (status > globalStatus){
			globalStatus = status;
		}
	}
	return globalStatus;
}
Esempio n. 5
0
static inline Std_ReturnType ComM_Internal_Enter_SilentCom(const ComM_ChannelType* ChannelConf,
														ComM_Internal_ChannelType* ChannelInternal) {
	ChannelInternal->Mode = COMM_SILENT_COMMUNICATION;
	return ComM_Internal_PropagateComMode(ChannelConf);
}
Esempio n. 6
0
static inline Std_ReturnType ComM_Internal_Enter_NoCom(const ComM_ChannelType* ChannelConf,
													ComM_Internal_ChannelType* ChannelInternal) {
	ChannelInternal->RequestedSubMode = COMM_NO_COM_NO_PENDING_REQUEST;
	return ComM_Internal_PropagateComMode(ChannelConf, COMM_NO_COMMUNICATION);
}