locked
Service selection with DSS RRS feed

  • Question

  • Hello,

    I am interested about a simple robotic example : moving a robot to a destination by use of a localization service. I would like to use different type of localization systems (laser range finder + map, ceiling cameras, another robot in assistance, etc.) and to select one of them online, depending of my position and be able to replace it after a while if necessary.

    I have seen from Tutorial #7 (http://msdn.microsoft.com/en-us/library/bb483059.aspx) that I could pre-define a list of partners and to select one of them from its name (the one I gave). Is there a mecanism to discover such service list dynamically without manually writing it in a manifest file?

    Best regards

    B.

    Wednesday, February 20, 2013 3:31 PM

Answers

  • For "can I programmatically find a list of services that can be used as partners at instantiate one of them at runtime?",  you need to look at the DssEnvironment methods (http://msdn.microsoft.com/en-us/library/bb797061.aspx), specifically QueryServiceContract, and DirectoryQuery methods.  I think that should get you what you want.

    -G

    • Proposed as answer by Gershon Parent Wednesday, February 20, 2013 9:23 PM
    • Marked as answer by Gershon Parent Wednesday, February 27, 2013 8:10 PM
    Wednesday, February 20, 2013 9:23 PM

All replies

  • First of all, it sounds to me like what you want is to create a "Generic Service Declaration" for a localization service (Tutorial 8)http://msdn.microsoft.com/en-us/library/bb727256.aspx

    From then on, you will implement new services that implement the Generic Localization Services' contract and thereby enable any of them be plugged in as the current localization service. (Tutorial 9)
    http://msdn.microsoft.com/en-us/library/bb727257.aspx

    As for the discovery part, I'm not exactly sure what you are asking:

    if you are asking "can I see a filtered list of the services that can be used as partners to a service when I create my manifest", then yes you can in the "DSS Manifest Editor". It shows only the services that match the contract of the partner selected in the GUI. That is where the Generic Service Contract comes in.  Any service that implements that contract can be used.  You can create multiple manifests, one for each kind of localization.  You are still essentially editing the manifest, just not "by hand". 

    If you are asking "can I programmatically find a list of services that can be used as partners at instantiate one of them at runtime?",  I'm not certain right now how to do that, but I am investigating.  Let me know if this is not what you need to know.

    -Gershon

    • Proposed as answer by Gershon Parent Wednesday, February 20, 2013 9:23 PM
    Wednesday, February 20, 2013 8:57 PM
  • For "can I programmatically find a list of services that can be used as partners at instantiate one of them at runtime?",  you need to look at the DssEnvironment methods (http://msdn.microsoft.com/en-us/library/bb797061.aspx), specifically QueryServiceContract, and DirectoryQuery methods.  I think that should get you what you want.

    -G

    • Proposed as answer by Gershon Parent Wednesday, February 20, 2013 9:23 PM
    • Marked as answer by Gershon Parent Wednesday, February 27, 2013 8:10 PM
    Wednesday, February 20, 2013 9:23 PM
  • I have not heard back from you in a while.  Hopefully you question has been answered.

    If you have more questions, please start a new thread, as answered threads do not get as much attention.

    Wednesday, February 27, 2013 8:11 PM