1.Start Visualstudio 2008 and then select File , New, Project, Visual C#,Robotics, DSS Service(1.5), DssService1
2.Add a new using statement:
using .....
using dssservice1 = Robotics.DssService1;
using System.Threading;
3. Insert the preceding code:
protected override void Start()
{
//
// Add service specific initialization here
//
base.Start();
// Add service specific initialization here.
// Wait until the service has started up completely.
Wait(2000);
Console.WriteLine("Main Thread {0}", Thread.CurrentThread.ManagedThreadId);
// Call the Example
ExampleFunction(0);
}
void ExampleFunction()
{
// Example code goes here
}
/// <summary>
/// Handles Subscribe messages
/// </summary>
/// <param name="subscribe">the subscribe request</param>
[ServiceHandler]
public void SubscribeHandler(Subscribe subscribe)
{
SubscribeHelper(_submgrPort, subscribe.Body, subscribe.ResponsePort);
}
}
}
4. Then run it in the debugger. There is an error, "unfind the class or namespace"Robotics"(lack using command or programme set) "