P
Hi,
Just thought I would add a bit here , hope I am welcome. I have been working on PLC type software for a while and have produced 3 or 4 engines.
I have also been working with a very experienced co worker Rick Jafrate who is from the GE Fanuc stable and was originally designing these things a few years ago.
We can help here and bring some solid software tools and techniques to the table if you wish.
Once again I hope we are welcome.
As far as structures are concerned I use a lot of " pointerless" structures. These can exist in shared memory and can me mapped into different
addresses by different programs. Each "pointer" is in fact an int offset from the head of the structure.
A simple macro pointer2Addr will create a void * pointer from the integer " pointer" using the base address.
e.g.
char * base_address = mapthememory();
void * ptr = pointer2Addr(index)
void * pointer2Addr(int index)
{
return (void *) &base_address[index];
}
this makes every thing easy.
You can also dump the memory to disk and use it on another system if needed.
As far as structures are concerned I have a standard head for any structure.
the head members are:-
int magic; /* what am I */
int size; /* how big I am */
int this; /* where I am useful believe me */
int next; /* the next one like me */
int prev; /* the last one like me */
int child; /* a child if I have one */
int parent; /* a parent if I have one */
char name[xx]; /* my name */
Doing this you can write a set of generic software routines to navigate any list.
The actual goodies in the structure appear after the standard header.
There may be too much in the header for your needs but I thing that memory is cheaper now so this should not matter.
A last point I use a generic shared memory package from the Real Time Linux guys.
Look in
http://crds.chemie.unibas.ch/PCI-MIO-E/
This allows you to simple share named memry regions between programs.
Any comments ???
I only browse the digests to get back direct to flame etc...
Thanks
Phil Wilshire
_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
Just thought I would add a bit here , hope I am welcome. I have been working on PLC type software for a while and have produced 3 or 4 engines.
I have also been working with a very experienced co worker Rick Jafrate who is from the GE Fanuc stable and was originally designing these things a few years ago.
We can help here and bring some solid software tools and techniques to the table if you wish.
Once again I hope we are welcome.
As far as structures are concerned I use a lot of " pointerless" structures. These can exist in shared memory and can me mapped into different
addresses by different programs. Each "pointer" is in fact an int offset from the head of the structure.
A simple macro pointer2Addr will create a void * pointer from the integer " pointer" using the base address.
e.g.
char * base_address = mapthememory();
void * ptr = pointer2Addr(index)
void * pointer2Addr(int index)
{
return (void *) &base_address[index];
}
this makes every thing easy.
You can also dump the memory to disk and use it on another system if needed.
As far as structures are concerned I have a standard head for any structure.
the head members are:-
int magic; /* what am I */
int size; /* how big I am */
int this; /* where I am useful believe me */
int next; /* the next one like me */
int prev; /* the last one like me */
int child; /* a child if I have one */
int parent; /* a parent if I have one */
char name[xx]; /* my name */
Doing this you can write a set of generic software routines to navigate any list.
The actual goodies in the structure appear after the standard header.
There may be too much in the header for your needs but I thing that memory is cheaper now so this should not matter.
A last point I use a generic shared memory package from the Real Time Linux guys.
Look in
http://crds.chemie.unibas.ch/PCI-MIO-E/
This allows you to simple share named memry regions between programs.
Any comments ???
I only browse the digests to get back direct to flame etc...
Thanks
Phil Wilshire
_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc