Click here to Skip to main content
15,899,025 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Capture specific area on screen... Pin
priyank_ldce6-Mar-07 6:12
priyank_ldce6-Mar-07 6:12 
GeneralRe: Capture specific area on screen... Pin
Ravi Bhavnani6-Mar-07 6:16
professionalRavi Bhavnani6-Mar-07 6:16 
GeneralRe: Capture specific area on screen... Pin
Blake Miller6-Mar-07 6:44
Blake Miller6-Mar-07 6:44 
AnswerRe: Capture specific area on screen... Pin
Mark Salsbery6-Mar-07 15:13
Mark Salsbery6-Mar-07 15:13 
QuestionHow to show tool tip help for tool bar items? Pin
Aryan S6-Mar-07 5:14
Aryan S6-Mar-07 5:14 
AnswerRe: How to show tool tip help for tool bar items? Pin
led mike6-Mar-07 5:28
led mike6-Mar-07 5:28 
AnswerRe: How to show tool tip help for tool bar items? Pin
Ravi Bhavnani6-Mar-07 5:33
professionalRavi Bhavnani6-Mar-07 5:33 
QuestionReal Time Application - Server Socket Pin
ScotDolan6-Mar-07 4:45
ScotDolan6-Mar-07 4:45 
I am developing a flight simulator application that has a MDI interface to entry settings and read some status information. However, I am little lost where i should place the main state machine/loop that controls all of the motion based incoming UDP sockets messasges. Right now, I envision creating a class that starts it's own thread calling running that will recieve and process all the motions movement. Is this a good way to setup a systems. The UDP socket can recieve up to 30 motion commands per second.

//Peusodo Code

 	<br />
<br />
// This function is a seprates thread 	<br />
void service_motion::Runnning( void )   <br />
{<br />
       //Recieve Commands, This object has it's own thread thread the parse incoming packets<br />
       UDP_Socket.GetPacket( &cmdpkt );<br />
<br />
	switch( state )<br />
	{<br />
<br />
	case BOARDING:<br />
		// Checks for Inputs to be in the correct state. <br />
                // Seat Belts, E-Stop, Door Close<br />
                if( inputs == OK ) <br />
                    state = DOCKED_DOWN;<br />
		break;<br />
<br />
	case DOCKED_DOWN:<br />
		// Checks for Inputs to be in the correct state. <br />
                  if( cmdpkt.opcode == START_GAME )<br />
                        state = RUNNING;<br />
		break;<br />
<br />
<br />
	case PAUSED:<br />
		// Accept, End, Level, <br />
		break;<br />
<br />
	case RUNNING:<br />
		// Accepts any pitch and roll command<br />
                if( cmdpkt.opcode == PAUSE )<br />
                     state = PAUSED;<br />
<br />
                if( cmdpkt.opcode == STOP)<br />
                 {<br />
                    stop_motion();<br />
                    state = PAUSED;<br />
                 }<br />
<br />
		break;<br />
<br />
	case EMERGENCY:<br />
		// Disables Networks Commands.<br />
<br />
		break;<br />
<br />
	case RECOVERY:<br />
		// Invertor Control UI, disables Network Commands. <br />
		break;<br />
<br />
<br />
<br />


Scott Dolan
Jernie Corporation
Engineering & Manufacturing
Software, Hardware, & Enclosures

AnswerRe: Real Time Application - Server Socket Pin
led mike6-Mar-07 4:53
led mike6-Mar-07 4:53 
GeneralRe: Real Time Application - Server Socket Pin
Ravi Bhavnani6-Mar-07 5:36
professionalRavi Bhavnani6-Mar-07 5:36 
GeneralRe: Real Time Application - Server Socket Pin
led mike6-Mar-07 5:56
led mike6-Mar-07 5:56 
GeneralRe: Real Time Application - Server Socket Pin
ScotDolan6-Mar-07 8:02
ScotDolan6-Mar-07 8:02 
GeneralRe: Real Time Application - Server Socket Pin
led mike6-Mar-07 8:33
led mike6-Mar-07 8:33 
GeneralRe: Real Time Application - Server Socket Pin
Mark Salsbery6-Mar-07 15:16
Mark Salsbery6-Mar-07 15:16 
GeneralRe: Real Time Application - Server Socket Pin
led mike7-Mar-07 4:26
led mike7-Mar-07 4:26 
GeneralRe: Real Time Application - Server Socket Pin
Mark Salsbery7-Mar-07 5:23
Mark Salsbery7-Mar-07 5:23 
QuestionTheory Pin
shiraztk6-Mar-07 4:22
shiraztk6-Mar-07 4:22 
AnswerRe: Theory Pin
toxcct6-Mar-07 4:45
toxcct6-Mar-07 4:45 
JokeRe: Theory Pin
shiraztk6-Mar-07 5:17
shiraztk6-Mar-07 5:17 
AnswerRe: Theory Pin
Ravi Bhavnani6-Mar-07 5:38
professionalRavi Bhavnani6-Mar-07 5:38 
GeneralRe: Theory Pin
shiraztk6-Mar-07 5:53
shiraztk6-Mar-07 5:53 
AnswerRe: Theory Pin
Hamid_RT6-Mar-07 7:04
Hamid_RT6-Mar-07 7:04 
Questionnetsh mfc -- please help me Pin
deeps_cute6-Mar-07 4:20
deeps_cute6-Mar-07 4:20 
QuestionRe: netsh mfc -- please help me Pin
David Crow6-Mar-07 5:08
David Crow6-Mar-07 5:08 
AnswerRe: netsh mfc -- please help me Pin
deeps_cute6-Mar-07 5:26
deeps_cute6-Mar-07 5:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.