SampleCode to configure and start rest-hosting (https://mfrcf.codeplex.com/SourceControl/latest#mfRCF.NetduinoPlus2.TestApp/Program.cs ):

public static void Main()
{
//initialize network (out-of-the-rcf-box)
mfNetworkInitialization.InitializeNetworkInfrastructure();

//register specified rcf-commands
mfRcf.Instance.Commands.Add(new RssGetCommand("/rss"));
mfRcf.Instance.Commands.Add(new StateGetCommand("/state"));
mfRcf.Instance.Commands.Add(new DateGetCommand("/date"));
mfRcf.Instance.Commands.Add(new DatePostCommand("/date"));
mfRcf.Instance.Commands.Add(new OnboardLedGetCommand("/led"));

//initialize & start rcf
var rcfPlattformProvider = new mfRcfPlattformProvider();
mfRcf.Instance.PlattformProvider = rcfPlattformProvider;
mfRcf.Instance.Start();
}

Last edited Feb 24, 2014 at 6:12 PM by DStegmaier, version 1