Click here to Skip to main content
15,915,869 members
Home / Discussions / C#
   

C#

 
GeneralRe: changing the database after addition to the project ? Pin
Mubeen.asim26-Mar-09 4:50
Mubeen.asim26-Mar-09 4:50 
GeneralRe: changing the database after addition to the project ? Pin
Vimalsoft(Pty) Ltd26-Mar-09 4:57
professionalVimalsoft(Pty) Ltd26-Mar-09 4:57 
GeneralRe: changing the database after addition to the project ? Pin
Mubeen.asim26-Mar-09 5:01
Mubeen.asim26-Mar-09 5:01 
GeneralRe: changing the database after addition to the project ? Pin
Vimalsoft(Pty) Ltd26-Mar-09 5:07
professionalVimalsoft(Pty) Ltd26-Mar-09 5:07 
GeneralRe: changing the database after addition to the project ? Pin
Mubeen.asim26-Mar-09 6:39
Mubeen.asim26-Mar-09 6:39 
GeneralRe: changing the database after addition to the project ? Pin
Vimalsoft(Pty) Ltd26-Mar-09 19:57
professionalVimalsoft(Pty) Ltd26-Mar-09 19:57 
Questionhow to disable globel mouse and Keyboard event.. [modified] Pin
prem194226-Mar-09 3:30
prem194226-Mar-09 3:30 
GeneralPerformance problem when implementing driversin state machine model Pin
ayyappa4902126-Mar-09 3:12
ayyappa4902126-Mar-09 3:12 
Hi,

I have implemented a device driver in state machine model using C# i.e based on the previous states output new state has to be initiated in one module.in every state i am sending info to Reader connected through serial port.Timer will be running parelally and checking for the data received event of Serial port and once data received state will be moved to nextstate.Its working fine but very inconsistent.Say executing some states and stopping there and waiting for the reply from Serial port.I cant understand whether its Timer problem or serial port problem.Can any one please reply .I will post the code used here which i used for stop module.


private void tmrCOMM_Tick(object sender, EventArgs e)

{

try

{

tmrCOMM.Enabled = false;

#region " Timeout "

if (blnCheckTimeOut)

{

intTimeout++;

if (intTimeout == 200) // 50 * 100 ms

{

AddLog("Timeout, no response from reader!");

intTimeout = 0;

intNextState = STATE_NOTHING;

intState = STATE_NOTHING;

tmrCOMM.Enabled = true;

blnCheckTimeOut = false;

Array.Resize(ref gblbMsgIn, 0);

return;

}

}

#endregion

switch (intState)

{



case STATE_STOP:

lstLOG.Items.Clear();

AddLog("STOP VarioSens...");

RetryCntr = 0;

intState = STATE_STOP_SND_GET_INV;

break;

case STATE_STOP_SND_GET_INV:

{

RetryCntr++;

StopVarioSens sv = (StopVarioSens)pMain.Controls[0];

sv.lblUID.Text = "";

Array.Resize(ref gblbMsgOut, CommandSet.bInventory().Length);

gblbMsgOut = CommandSet.bInventory();

blnRecordReceived = false;

blnCheckTimeOut = true;

intTimeout = 0;

intState = STATE_STOP_RCV_GET_INV;

AddLog(">> Inventory: " + Helper.ConvertToHexString(gblbMsgOut));

Array.Resize(ref gblbMsgIn, 0);

serialPort1.Write(gblbMsgOut, 0, gblbMsgOut.Length);

}

break;

case STATE_STOP_RCV_GET_INV:

if (blnRecordReceived)

{

blnRecordReceived = false;

if (gblbRecord[4] == 0)

{

RetryCntr = 0;

AddLog("<< Reply: " + Helper.ConvertToHexString(gblbRecord));

StopVarioSens sv = (StopVarioSens)pMain.Controls[0];

sv.lblUID.Text = "";

Array.Resize(ref gblbUID, 0);

for (int i = 0; i < 8; i++)

{

sv.lblUID.Text += string.Format("{0:x2}", gblbRecord[13-i]).ToUpper();

if (i < (gblbRecord.Length - 1))

sv.lblUID.Text += " ";

Array.Resize(ref gblbUID, gblbUID.Length+1);

gblbUID[gblbUID.Length - 1] = gblbRecord[6+i];

}

intState = STATE_STOP_SND_SET_PASSIVE;

}

else

{

AddLog("<< Reply: " + sGetVarioSensErrorDescription(gblbRecord[4]));

if (RetryCntr < 3)

{

intState = STATE_STOP_SND_GET_INV;

}

else

{

intState = STATE_NOTHING;

}

}

}

break;


}
}

Ayyappa Konakalla

QuestionIcons Disapear from taskebar Pin
udikantz26-Mar-09 2:59
udikantz26-Mar-09 2:59 
QuestionRe: Icons Disapear from taskebar Pin
Cracked-Down26-Mar-09 3:22
Cracked-Down26-Mar-09 3:22 
AnswerRe: Icons Disapear from taskebar Pin
Eddy Vluggen26-Mar-09 3:41
professionalEddy Vluggen26-Mar-09 3:41 
GeneralRe: Icons Disapear from taskebar Pin
udikantz26-Mar-09 3:46
udikantz26-Mar-09 3:46 
GeneralRe: Icons Disapear from taskebar Pin
Xmen Real 26-Mar-09 3:49
professional Xmen Real 26-Mar-09 3:49 
GeneralRe: Icons Disapear from taskebar Pin
Cracked-Down26-Mar-09 3:56
Cracked-Down26-Mar-09 3:56 
GeneralRe: Icons Disapear from taskebar Pin
Xmen Real 26-Mar-09 3:58
professional Xmen Real 26-Mar-09 3:58 
GeneralRe: Icons Disapear from taskebar Pin
Cracked-Down26-Mar-09 3:59
Cracked-Down26-Mar-09 3:59 
GeneralRe: Icons Disapear from taskebar Pin
Xmen Real 26-Mar-09 4:02
professional Xmen Real 26-Mar-09 4:02 
AnswerRe: Icons Disapear from taskebar Pin
musefan26-Mar-09 4:13
musefan26-Mar-09 4:13 
GeneralRe: Icons Disapear from taskebar Pin
Cracked-Down26-Mar-09 4:18
Cracked-Down26-Mar-09 4:18 
GeneralRe: Icons Disapear from taskebar Pin
Cracked-Down26-Mar-09 3:51
Cracked-Down26-Mar-09 3:51 
GeneralRe: Icons Disapear from taskebar Pin
Henry Minute26-Mar-09 6:31
Henry Minute26-Mar-09 6:31 
AnswerRe: Icons Disapear from taskebar Pin
Eddy Vluggen26-Mar-09 9:21
professionalEddy Vluggen26-Mar-09 9:21 
GeneralRe: Icons Disapear from taskebar Pin
Cracked-Down26-Mar-09 18:00
Cracked-Down26-Mar-09 18:00 
QuestionCsharp with Oracle 10g Passing Arrays as an Output Parameter to the SP: Need Help URGENT Pin
srinivas_0626-Mar-09 2:52
srinivas_0626-Mar-09 2:52 
Questionsend the xml through socket Pin
lnmca26-Mar-09 2:14
lnmca26-Mar-09 2:14 

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.