コード例 #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;
}
コード例 #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;
}
コード例 #3
0
ファイル: ComM.c プロジェクト: uincore/OpenSAR
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;
}
コード例 #4
0
ファイル: ComM.c プロジェクト: uincore/OpenSAR
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;
}
コード例 #5
0
ファイル: ComM.c プロジェクト: uincore/OpenSAR
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);
}
コード例 #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);
}