Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

alanb's Content

There have been 28 items by alanb (Search limited from 29-June 23)


By content type

See this member's


Sort by                Order  

#9638 Fixing wires into a netduino

Posted by alanb on 16 February 2011 - 06:48 PM in General Discussion

Hi, When I got an N+ for christmas, I also asked for a Screwshield see http://wingshieldind...s/screwshield/. This is two little pcbs that plug into either side of my N+ allowing for quick and easy connections. Mine needed soldering together before it can be used but I got my son to do that. Alan



#9694 How do you create software events

Posted by alanb on 17 February 2011 - 06:42 PM in General Discussion

Hi,

So far I have created a display manager class, that internally creates a thread listening on a socket for commands. That all works fine, the main thread generates numbers on a display and sending a message from a client on my pc will display that message on the display.

Now when my displaymanager recieves a command code on the socket I want to pass that command back to the main program. On the pc I would usually use an event. When I looked for EventHandler<> I could only find something called NativeEventHandler. Is that the N+ equivalent of EventHandler?

What is the equivalent of my pc code
public event EventHandler<StringEventArgs> ReceivedCommand;

...

In Some function

if (ReceivedCommand != null)
   ReceivedCommand(this, new StringEventArgs(command));

Or, as is highly probable, am I going about this in the wrong way.

By the way, a lot of this code is by others from the forum so if you recognise your own code, profound thanks. I will reference everyone in the finished article.
Alan

Attached Files




#9715 How do you create software events

Posted by alanb on 17 February 2011 - 09:02 PM in General Discussion

Have a look the changes I did to the RDIF code here: http://forums.netdui..._7220#entry7220 (look after //(** new **))

There I use delegate and event in NETMF.


Thanks for the information, now all working correctly. Thanks also to Dan for the same solution.

Alan




home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.