Do you have any dsects or #define files for any data stream files implemented? if so can I see one?
I got a list of all the the OBD1 and 1.5 data stream files and have been going thru then, I think I have come up with a programming model to allow ALL fields on all models.
the problem is, between different 'families' incl 160 vs 8192B, the same fields logically, might not be in the same location or even have the same name, and Pascal and C are poor language choices to model this, however, I teach C and used to use Pascal and think I can implement something like IBMS AR facility (application requestor) to create self defining positional parameters for a generic scan program, and since it will work for the TCM, BCM and ABM, I can give access to all fields on a laptop...
right now Im in the 'requirements' phase but this is the data model Im gonna use:
since mode1 msg 0...n is simply a byte stream, I will create a C struct or Pascal record (to tell the truth, the progam might be a bit of both) that looks like this:
struct element
{
Databyte:char;
Fieldname:char[10];
BitMask:Boolean;
ContainsErrors:Boolean;
BitMaskArray:short[8];
Pad:char;
}
Mode1Msg0:element[128];
Mode1Msg1:element[128]; etc
How it will work is thus: the relative positioned byte will be loaded into 'data byte', at initializatin, when the car/motor is determined (Ill just use the VIN) I will read from the proper 'Axxx.dat' file and fill in the proper fieldname and set the boolean if it is a bitmask, if it is, I will load into the second byte of each int (by casting it as char) the proper equate either for an error code or a simple flag, for example
#define C24 EQU 24 ;error code 24
then all I have to do when accessing codes or switches (most scan tools only list gear, ac demand and TCC switches - I can give em all) is a simple loop like:
x = databyte;
for i=0 to 7; i++
{
If (x AND 1) then
{
memcpy(output buffer, (int) bitmaskarray[i]+1,1)
}
SRL(x,1)
}
then as I go thru each byte of output buffer later, set up a define file that contains the text for error code 24 in the case above or the switch value etc.
Any rate, right now Im grouping the different data stream files by commonality, I think I have found 4 distinct 'patterns'
I got a list of all the the OBD1 and 1.5 data stream files and have been going thru then, I think I have come up with a programming model to allow ALL fields on all models.
the problem is, between different 'families' incl 160 vs 8192B, the same fields logically, might not be in the same location or even have the same name, and Pascal and C are poor language choices to model this, however, I teach C and used to use Pascal and think I can implement something like IBMS AR facility (application requestor) to create self defining positional parameters for a generic scan program, and since it will work for the TCM, BCM and ABM, I can give access to all fields on a laptop...
right now Im in the 'requirements' phase but this is the data model Im gonna use:
since mode1 msg 0...n is simply a byte stream, I will create a C struct or Pascal record (to tell the truth, the progam might be a bit of both) that looks like this:
struct element
{
Databyte:char;
Fieldname:char[10];
BitMask:Boolean;
ContainsErrors:Boolean;
BitMaskArray:short[8];
Pad:char;
}
Mode1Msg0:element[128];
Mode1Msg1:element[128]; etc
How it will work is thus: the relative positioned byte will be loaded into 'data byte', at initializatin, when the car/motor is determined (Ill just use the VIN) I will read from the proper 'Axxx.dat' file and fill in the proper fieldname and set the boolean if it is a bitmask, if it is, I will load into the second byte of each int (by casting it as char) the proper equate either for an error code or a simple flag, for example
#define C24 EQU 24 ;error code 24
then all I have to do when accessing codes or switches (most scan tools only list gear, ac demand and TCC switches - I can give em all) is a simple loop like:
x = databyte;
for i=0 to 7; i++
{
If (x AND 1) then
{
memcpy(output buffer, (int) bitmaskarray[i]+1,1)
}
SRL(x,1)
}
then as I go thru each byte of output buffer later, set up a define file that contains the text for error code 24 in the case above or the switch value etc.
Any rate, right now Im grouping the different data stream files by commonality, I think I have found 4 distinct 'patterns'
Comment