none
What do these errors mean and how can I fix them? RRS feed

  • Question

  • I'm working on a tutorial on devx.com. The link for the tutorial is this: devx.com/dotnet/Article/38954. I wrote the code exactly as they said and the code works for my friend but when I try to run it on my computer, I get the following two errors: 

    1. The best overloaded method match for 'Microsoft.Ccr.Core.PortSet<Microsoft.Dss.ServiceModel.Dssp.DsspDefaultLookup,Microsoft.Dss.

    ServiceModel.Dssp.DsspDefaultDrop,LineFollowing.Get>.Post(Microsoft.Dss.ServiceModel.Dssp.

    DsspDefaultLookup)' has some invalid arguments

     

    2. Argument '1': cannot convert from 'Microsoft.Robotics.Services.WebCam.UpdateFrame' to 

    'Microsoft.Dss.ServiceModel.Dssp.DsspDefaultLookup'

     

    They are both for the line "_mainPort.Post(new webcam.UpdateFrame());" for the void CheckForUpdate(DateTime time) method. 

    Monday, May 24, 2010 3:49 PM

Answers

  • I can't see the source code without registering on DevX. However, the code you have does not make sense. The error message indicates that you are not posting to the correct port because the portset is for a Line Follower (with Lookup, Drop and Get operations) and you are trying to send it an UpdateFrame message which is for a Webcam. I think you need to double-check that you have copied the code correctly. I suspect you have mixed up a line or two of code.

    Trevor

     

    Tuesday, May 25, 2010 6:44 AM

All replies

  • I can't see the source code without registering on DevX. However, the code you have does not make sense. The error message indicates that you are not posting to the correct port because the portset is for a Line Follower (with Lookup, Drop and Get operations) and you are trying to send it an UpdateFrame message which is for a Webcam. I think you need to double-check that you have copied the code correctly. I suspect you have mixed up a line or two of code.

    Trevor

     

    Tuesday, May 25, 2010 6:44 AM
  • I am also trying those examples as canttellyou and I have the same errors, I can`t figure it out why are the errors. Here is the code: 

     

    void CheckForUpdate(DateTime time)
    
            {
    
                if (_entity == null)
    
                    return; // the entity is gone, no more updates
    
                _mainPort.Post(new webcam.UpdateFrame());
    
                //_mainPort.PostUnknownType(new webcam.UpdateFrame());
    
                Activate(Arbiter.Receive(
    
                   false, TimeoutPort(100), CheckForUpdate));
    
            }
    

     

     

    The method CheckForUpdate is called in the Start method

     

     

    protected override void Start()
    
            {
    
    
    
                // Issue Subscribe, which allows us to receive 
    
                // notifications from service partners
    
                _notificationTarget =
    
                    new simengine.SimulationEnginePort();
    
                simengine.SimulationEngine.GlobalInstancePort.Subscribe(
    
                   ServiceInfo.PartnerList, _notificationTarget);
    
                SetupCamera();
    
                PopulateWorld();
    
    
    
                Activate(Arbiter.Receive(false, TimeoutPort(100),
    
                   CheckForUpdate));
    
            }
    

    What should I do?

    Please Help!

     

    Friday, June 10, 2011 10:01 AM