cmmmain.c

来自「2410下面通过MOTO手台录音程序;自己用的」· C语言 代码 · 共 69 行

C
69
字号
#include <vxWorks.h>
#include <ioLib.h>
#include <stdio.h>
#include <string.h>
#include <sockLib.h> 
#include <socket.h>
#include <time.h>
#include "fioLib.h"
#include "CmmCom.h"
#include "Nmmglobal.h"
#include "smmmsg.h"
/*** DEF ALL MESSAGE****/


M700_STATUS_MACHE g_RCDmachine={0,NULL,"uninit"};
M700_STATUS_MACHE g_M700machine={0,NULL,"uninit"};
M700_STATUS_MACHE g_RSmachine={0,NULL,"uninit"};


/****************************************************************
	description:	Add all command to the command structure one  by one
	InPut:		Non
	OutPut:		Non
	Return:		The result of add all command 
				
				
****************************************************************/
void Cmm_main()
{
  printf("run status start\n");
  RCD_IO_init();
 
  taskSpawn ("tUART", UART1_TSK_PRI, 0, CMM_MSG_STACK_SIZE,
                 (FUNCPTR)CMM_M700_TSK,0,0,0,0,0,0,0,0,0,0);
  
}
void cmm_msg_receive(void)
{
    MSG		imsg,omsg,omsg1;
    int result;
    int type;
  
	do
	{	
		result = msgQReceive(g_msgQCMM_Receive,(char *)&imsg,sizeof(imsg),WAIT_FOREVER);
		if(result == ERROR)
			{
				logMsg("cmm Receive msg failed,pls check\n",0,0,0,0,0,0);
				continue;
			}	
		if( result > 0 )
			{
				type = imsg.msg_header.MsgType;
				switch( type )
					{
						case NMM_IPCONFIG:								
													
							break;						
						case NMM_SMM_SAVE:								
													
							break;	
						default:
							break;

					}

			}
	}while(1);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?