Steps taken to build a simple service to partner with a webcam RRS feed

  • General discussion

  • To Whom It May Concern:


    I was having some trouble partnering with a webcam service, so as an exercise, I created a proof of concept service that simply partnered with a webcam service.  In the process I enumerated all my steps so that I could refer back to them later.  It occurred to me that others might be interested in these steps, so I thought I would pop them in here.  I hope it helps.


    I am very open to suggestions and critiques.  I’m sure there are better ways and would love to hear them.






    *   start VS2008

    *   create new project

    *   in New Project window:

    *       select Visual C# -> Microsoft Robotics -> DSS Service (2.0)

    *       provide name (POC_UsingWebcam) optional

    *       location (C:\Projects\RDS 2.0\POC) optional

    *       check Create directory for solution, optional

    *   click the OK button

    *   on New DSS Service window, Service tab:

    *       modify the default namespace if necessary

    *       modify Organization domain if necessary remembering to ONLY USE LOWERCASE

    *   on New DSS Service window, Partners tab:

    *       select Generic Webcam (not Webcam) from list and click the Add Partner button

    *       check the add notification port, optional but recommended

    *       click the OK button

    *   in the Solution Explorer make sure the References have no little yellow triangles

    *   in the Solution Explorer right click on the manifest file (POC_UsingWebcam.manifest.xml) and click Exclude From Project

    *   outside of VS2008, move the manifest file to the "samples/config" directory under the RDS 2.0 installation

    *   in VS2008 in the Solution Explorer right click on the project and select Add -> Existing Item

    *   on the Add Existing Item window:

    *       browse the folder that you moved the manifest file to

    *       select "all files" in the "Objects of type" dropdown and select your manifest file

    *       click on the little arrow on the right edge of the Add button and select Add As Link

    *       if you get an error saying that the file already exists, try the steps for adding it again

    *   outside of VS2008 start the DSS Manifest Editor 2008 from the start menu

    *   in the Manifest Editor:

    *       click File -> Open and in the Open window browse to and select your manifest file then click the OK button

    *       you should see your service and under your service and indented you should see the Generic Webcam

    *       if you do not see the second line try clicking the little box in front of your service

    *       click and highlight the Generic Webcam line, you should see a small list in the services box to the left

    *       drag and drop the Webcam service onto your Generic Webcam, this will add a new line representing the partner service

    *       notice that this is the MultiDeviceWebcamService

    *       optionally, you can set up an initial state on the right side, but you could come back and do this later

    *       click "File -> Save" then "File -> Exit"

    *   in VS2008 in the Solution Explorer right click on the project and select Properties

    *   in the Debug tab of the Properties window select the contents of Command line arguments field and copy it into an editor such as notepad

    *   change the command line argument "/m:" to refer to the location to which you move the manifest file

    *   it should look some thing like: [/p:50000 /t:50001 /m:"samples/config/POC_UsingWebcams.manifest.xml"]

    *   replace this new text into the Command line arguments field of the Debug tab of the projects Properties page

    *   in VS2008 build the solution

    *   if you have a webcam hooked up to your machine you should now be able to run the service in debug mode and the webcam light should come on

    *   this is only the starting point - you now need to subscribe to the webcam service and deal with messages

    *   you can use the Blob Tracker as an example in http://msdn.microsoft.com/en-us/library/cc998456.aspx

    Friday, April 3, 2009 5:18 PM