C
Hi all,
I was so excited, I had to leap upon this small and fragile bit of consensus right away and start at a level it's hard to argue about. For the I/O work I have been doing, I am using the simplest possible map. Basically only setting the data types:
struct map
{
unsigned short ins[256];
unsigned short outs[256];
unsigned int ctr[128];
float algi[128];
float algo[32];
int flags;
} lmap;
Those of you who looked at the map display code will see that I have split ins and outs and added an array for counters so each array has only
one representation. ins and outs hold 4096 points each as Linux shorts are 16 bits.
128 32 bit counters as ints.
128 analog ins as IEEE ? floats;
32 analog outs as IEEE ? floats;
Proposed that atributes be added as arrays with a matching index to their corresponding member.
Issue: should we store dio as bits or ints?
My feeling is that we are trading the cost of copying a map verses doing bitwise operations. Bitwise ops in C are very fast. OTOH we wouldn't be copying maps very often. I opted for small.
Could we limit the debate to basics?
Regards
cww
_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
I was so excited, I had to leap upon this small and fragile bit of consensus right away and start at a level it's hard to argue about. For the I/O work I have been doing, I am using the simplest possible map. Basically only setting the data types:
struct map
{
unsigned short ins[256];
unsigned short outs[256];
unsigned int ctr[128];
float algi[128];
float algo[32];
int flags;
} lmap;
Those of you who looked at the map display code will see that I have split ins and outs and added an array for counters so each array has only
one representation. ins and outs hold 4096 points each as Linux shorts are 16 bits.
128 32 bit counters as ints.
128 analog ins as IEEE ? floats;
32 analog outs as IEEE ? floats;
Proposed that atributes be added as arrays with a matching index to their corresponding member.
Issue: should we store dio as bits or ints?
My feeling is that we are trading the cost of copying a map verses doing bitwise operations. Bitwise ops in C are very fast. OTOH we wouldn't be copying maps very often. I opted for small.
Could we limit the debate to basics?
Regards
cww
_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc