Introduction
Robotics4.NET library implements the core services of the Robotics4.NET framework. The library provides programming abstractions and classes to define the software representation of the body of a robot. The framework sugests to define one or more roblets whose responsibility is to build abstractions of some body part (let's say organ). Roblets continuosly pushes information towards the body map in the form of XML messages, that are serialized data structures. They may also receive XML messages from the body map. How roblets read, control and process sensors and actuators define the software view of the robot body. The "brain" is the control program that reason on the abstract world defined by the body map. This software reads and write XML mesasges not depending on the types used by the roblets.
Notes
BodyMapTestApp is a simple implementation of a brain that simply prints on the console all the messages received through the body map.
Robotics4.NET relies on the extensible configuration architecture of .NET to control robolets to be started and other information about network communications.
Why is in Robotics4.NET?
Wonder why? We wonder if this section should be here or not (for consistency reasons... you know...).
Example
The following example (more will come) shows a minimal roblet that implements the heartbeat.
Show
namespace RobletTest {
public class Beat : RobletMessage {
public long tick = DateTime.Now.Ticks;
}
[OutputMessage(typeof(Beat))]
public class TestRoblet : RobletBase {
public const string RobletName = "TestRoblet";
public FuffaRoblet() : base(RobletName) {}
protected override void Run() {
while (true) {
SendState(new Beat());
System.Threading.Thread.Sleep(1000);
}
}
}
}
Roblets running in the same CLR instance communicate with outside processes through the RobletBroker, a class responsible for implementing communication infrastructure. The broker is responsible for instantiating roblets and running them.