Click here to Skip to main content
15,504,830 members
Home / Discussions / C#
   

C#

 
GeneralRe: Why SqlCommandBuilder Pin
Krishna Varadharajan8-Mar-13 6:55
Krishna Varadharajan8-Mar-13 6:55 
GeneralRe: Why SqlCommandBuilder Pin
Eddy Vluggen8-Mar-13 8:12
professionalEddy Vluggen8-Mar-13 8:12 
AnswerRe: Why SqlCommandBuilder Pin
PIEBALDconsult8-Mar-13 4:38
professionalPIEBALDconsult8-Mar-13 4:38 
GeneralRe: Why SqlCommandBuilder Pin
Krishna Varadharajan8-Mar-13 4:59
Krishna Varadharajan8-Mar-13 4:59 
GeneralRe: Why SqlCommandBuilder Pin
PIEBALDconsult8-Mar-13 6:42
professionalPIEBALDconsult8-Mar-13 6:42 
GeneralRe: Why SqlCommandBuilder Pin
Krishna Varadharajan8-Mar-13 6:56
Krishna Varadharajan8-Mar-13 6:56 
QuestionWireless Sensor Node Simulation Time in C# Pin
Nico Encarnacion7-Mar-13 15:45
Nico Encarnacion7-Mar-13 15:45 
AnswerRe: Wireless Sensor Node Simulation Time in C# Pin
Gerry Schmitz7-Mar-13 19:49
mveGerry Schmitz7-Mar-13 19:49 
Unless NODE has some sort of interrupt mechanism (Sleep; I/O; etc.), once one is “Run”, it will hog the (one) thread indefinitely.

I would suggest putting the “timing” code in a separate class (or in static methods of the NODE base class), and use a “Timer” instead of a “for” loop for invoking “sleep”, “awake”, etc. states.

Prior to creating and “running” a NODE, start the “timing” object / static methods.

As a NODE is created, it should subscribe to (state-change) events in the timing object that call the “Sleep”, “Awake”, etc. event handlers in a subscribing NODE.

In this way, the timing object will call the “Sleep”, “Awake”, etc. methods in each (subscribing) NODE with each “state” change (i.e. x number of ticks of the Timer).

This of course assumes you want all NODEs to be “asleep” or “awake”, etc. at the same time.

You will need some sort of (message) queuing mechanism to actually “communicate” between these NODEs; since if they are all “sending” at the same time (state-wise), they can also not be “receiving” at the same time.
GeneralRe: Wireless Sensor Node Simulation Time in C# Pin
Nico Encarnacion12-Mar-13 21:05
Nico Encarnacion12-Mar-13 21:05 
GeneralRe: Wireless Sensor Node Simulation Time in C# Pin
Gerry Schmitz13-Mar-13 13:10
mveGerry Schmitz13-Mar-13 13:10 
QuestionExplicit type-casting of pointer Pin
Flo_897-Mar-13 12:18
Flo_897-Mar-13 12:18 
AnswerRe: Explicit type-casting of pointer Pin
Gerry Schmitz7-Mar-13 13:23
mveGerry Schmitz7-Mar-13 13:23 
GeneralRe: Explicit type-casting of pointer Pin
Flo_897-Mar-13 13:24
Flo_897-Mar-13 13:24 
AnswerRe: Explicit type-casting of pointer Pin
Matt T Heffron7-Mar-13 13:34
professionalMatt T Heffron7-Mar-13 13:34 
AnswerRe: Explicit type-casting of pointer Pin
harold aptroot7-Mar-13 22:57
harold aptroot7-Mar-13 22:57 
QuestionHow to highlight word in word document using C# Pin
Tridip Bhattacharjee7-Mar-13 4:56
professionalTridip Bhattacharjee7-Mar-13 4:56 
AnswerRe: How to highlight word in word document using C# Pin
Richard MacCutchan7-Mar-13 6:13
mveRichard MacCutchan7-Mar-13 6:13 
GeneralRe: How to highlight word in word document using C# Pin
Tridip Bhattacharjee8-Mar-13 2:46
professionalTridip Bhattacharjee8-Mar-13 2:46 
GeneralRe: How to highlight word in word document using C# Pin
Richard MacCutchan8-Mar-13 3:16
mveRichard MacCutchan8-Mar-13 3:16 
QuestionRe: How to highlight word in word document using C# Pin
Alan N7-Mar-13 6:17
Alan N7-Mar-13 6:17 
AnswerRe: How to highlight word in word document using C# Pin
Tridip Bhattacharjee8-Mar-13 2:47
professionalTridip Bhattacharjee8-Mar-13 2:47 
GeneralRe: How to highlight word in word document using C# Pin
Alan N8-Mar-13 4:12
Alan N8-Mar-13 4:12 
QuestionC# file access Pin
classy_dog7-Mar-13 2:52
classy_dog7-Mar-13 2:52 
AnswerRe: C# file access Pin
Dave Kreskowiak7-Mar-13 3:30
mveDave Kreskowiak7-Mar-13 3:30 
AnswerRe: C# file access Pin
Matt T Heffron7-Mar-13 9:49
professionalMatt T Heffron7-Mar-13 9:49 

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.