Search found 101 matches

by sulliwk06
Wed Apr 01, 2020 10:14 am
Forum: NetBurner Software
Topic: thread safe and non-blocking log function
Replies: 6
Views: 194

Re: thread safe and non-blocking log function

If you make the log strings local they would be on the stack for each task, but if you remove the task lock the print statement could be interrupted by a higher priority task, which would mangle your messages a bit having some in the middle of others. What I typically have done in this type of situa...
by sulliwk06
Thu Mar 12, 2020 1:21 pm
Forum: NetBurner Software
Topic: Writing SmartTraps to a file
Replies: 2
Views: 163

Re: Writing SmartTraps to a file

I have been able to do this in some of my projects. Basically I grabbed the entire EnableSmartTraps() function from the Netburner libraries and everything that came with it, and pasted it into my code under a different namespace. From there I just tweaked things a bit and sprintf the data into a glo...
by sulliwk06
Tue Feb 04, 2020 7:47 am
Forum: NetBurner Software
Topic: ambiguous error with Pins
Replies: 1
Views: 122

Re: ambiguous error with Pins

I would be surprised if the "WORD val = ( Pins[23] ) ? 1:0;" didn't work. I think the PinIO class just only implements the conversion operators for int, BYTE, and bool. That 3rd example should be using the bool conversion and assigning 1 or 0 to your WORD, does it give that same conversion error? I ...
by sulliwk06
Fri Jan 31, 2020 1:07 pm
Forum: NetBurner Software
Topic: Crash implementing dual-stack
Replies: 22
Views: 697

Re: Crash implementing dual-stack

Well if the values are correct at the end of your init function on the inside, but when you leave the init function the values are corrupt, that suggests to me a stack corruption issue. I would slowly start commenting out things within your init and reset functions until the corruption stops.
by sulliwk06
Thu Jan 30, 2020 1:54 pm
Forum: NetBurner Software
Topic: Crash implementing dual-stack
Replies: 22
Views: 697

Re: Crash implementing dual-stack

The only other thing I can think of is to verify what types of objects each of your IPADDR's is and check their sizeof(). I would also probably do a clean before the build to make sure everything is up to date.
by sulliwk06
Thu Jan 30, 2020 10:31 am
Forum: NetBurner Software
Topic: Crash implementing dual-stack
Replies: 22
Views: 697

Re: Crash implementing dual-stack

Are you certain your idle timer pointer is being initialized? idle = new c_interval(300000); // 300,000 msec = 5 minutes There was one example you posted where you said it broke and there weren't even any references to the IPADDR object there. If the idle pointer wasn't valid, I could see it behavin...
by sulliwk06
Tue Jan 28, 2020 1:33 pm
Forum: NetBurner Software
Topic: Crash implementing dual-stack
Replies: 22
Views: 697

Re: Crash implementing dual-stack

What exactly is the crash error that you're getting? Is it an Access Error, or maybe Divide by Zero?
by sulliwk06
Fri Nov 22, 2019 1:57 pm
Forum: NetBurner Software
Topic: how to debug a silent crash
Replies: 9
Views: 608

Re: how to debug a silent crash

For the systems I've made, I typically use the watchdog to ensure the code is still running. I'll also add a timer that watches a dummy task at the lowest priority to make sure it has had a chance to run at least every so many seconds/minutes to prove that all my tasks are blocking correctly, If I d...
by sulliwk06
Fri Nov 22, 2019 10:20 am
Forum: NetBurner Software
Topic: how to debug a silent crash
Replies: 9
Views: 608

Re: how to debug a silent crash

I think the smart trap diagnostics always go out the default uart, regardless of whether you redirect stdout
by sulliwk06
Tue Oct 22, 2019 11:16 am
Forum: NetBurner Software
Topic: TCP Data Received CallBack or Interrupt
Replies: 2
Views: 216

Re: TCP Data Received CallBack or Interrupt

I always read my TCP data in a select() call. If I have to work with a lot of different TCP connections I make an entire task dedicated to accepting and reading from connections in a select() call and I register my own callbacks there. Looking at the RegisterFDCallBack function it looks like that is...