I am currently working on a project that is accessing a piece of hardware using tons of hard coded memory locations. These locations can change based upon the electrical engineer's whim, so I'm looking to generate code from the engineer's memory map. Let's say the map is a simple text file like:
Name, Type, Address, Description
Foo, int, A001, Foo integer variable
Bar, float, A002, Bar float variable
I would like to automatically generate code (not IL) similar to:
class MachineMap
{
/// <summary>
/// Foo integer variable
/// </summary>
public readonly Addressable<int> Foo = new Addressable<int>("A001");
/// <summary>
/// Bar float variable
/// </summary>
public readonly Addressable<float> Bar = new Addressable<float>("A002");
}
Does anyone have ideas on tools that would make this task easy, or easier?