programming CV For MFX under BiDi

http://www.opendcc.de
http://www.bidib.org

Re: programming CV For MFX under BiDi

Postby rjversluis » 11.01.2018, 17:15

peter_moulin wrote:Please read the doc from Stefan Krauss first!

why should I? I do not know this person.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: programming CV For MFX under BiDi

Postby rjversluis » 11.01.2018, 17:16

peter_moulin wrote:
rjversluis wrote:Hi Peter,

I do not see the need for a different approach.
Its all the same get/set with pom/xpom.
Why did you not map the DCC pom in your code? It make no sense to make a diff in Rocrail.
Or is the Bidib protocol not complex enough?

Rocrail source access is not for building locally only, and not to patch it with your own code.
Code is only changed by me.

Changes and additions should be discussed here, and I will implement it in case it makes sense.

not it is not "Its all the same get/set with pom/xpom."
The opcode is different

The Opcode is the same but the parameter is different.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: programming CV For MFX under BiDi

Postby rjversluis » 11.01.2018, 17:18

BTW, you have no source access. Where did you get the Rocrail sources?
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: programming CV For MFX under BiDi

Postby peter_moulin » 11.01.2018, 17:21

smitt48 wrote:Hi Rob,

In the ECoS there are no CVs you can read for mfx(m4). It just does not work the same way as DCC.

mfg Tom


Thanks for the info about ECOS.

Cordialement
Pierre
peter_moulin
 

Re: programming CV For MFX under BiDi

Postby peter_moulin » 11.01.2018, 17:22

rjversluis wrote:
peter_moulin wrote:Please read the doc from Stefan Krauss first!

why should I? I do not know this person.

But I send you an interesting link!
peter_moulin
 

Re: programming CV For MFX under BiDi

Postby peter_moulin » 11.01.2018, 17:28

rjversluis wrote:
peter_moulin wrote:
rjversluis wrote:Hi Peter,

I do not see the need for a different approach.
Its all the same get/set with pom/xpom.
Why did you not map the DCC pom in your code? It make no sense to make a diff in Rocrail.
Or is the Bidib protocol not complex enough?

Rocrail source access is not for building locally only, and not to patch it with your own code.
Code is only changed by me.

Changes and additions should be discussed here, and I will implement it in case it makes sense.

not it is not "Its all the same get/set with pom/xpom."
The opcode is different

The Opcode is the same but the parameter is different.


If I may get your attention, When I want to read a CV, I am in front of rocrail. No display attach to GBM, no Loco base in GBM.
The loco format is in Rocrail loco table.
So Rocrail need to tell me the format I need to apply for my reading/writting,
This is done with the opcode, call it parameter should you wish.
peter_moulin
 

Re: programming CV For MFX under BiDi

Postby rjversluis » 11.01.2018, 17:36

Peter,

1. where did you get access to the rocrail sources?
2. The Bidib POM message does not have a byte to specify a format like in the Speed and Function.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: programming CV For MFX under BiDi

Postby Bergi » 11.01.2018, 17:45

Hello Rob,
IIRC you had granted Pierre source access here.
rjversluis wrote:The Bidib POM message does not have a byte to specify a format like in the Speed and Function.
That's why we would use the Opcode to specify the format, and not use the same as for DCC POM.
rjversluis wrote:Request with one number/index the train ID should respond with an array of bytes, not with a 16 bit value.
The number/index would be coded in the 3 "CV address" bytes, and the array of bytes follows as the DATA parameter. What exact format would you prefer? We have not yet settled on anything. If you can point me to the docs of the Ecos protocol, we can make it as similar to that as possible so that you can easily handle the data alike.
Last edited by Bergi on 11.01.2018, 17:47, edited 1 time in total.
viele Grüße
⋄ Andreas Bergmaier - http://bidib.org/
Bergi
 

Re: programming CV For MFX under BiDi

Postby peter_moulin » 11.01.2018, 17:46

rjversluis wrote:Peter,

1. where did you get access to the rocrail sources?
2. The Bidib POM message does not have a byte to specify a format like in the Speed and Function.


Hi Rob,

answer to 1) from yourself
answer to 2) there is a specific opcode
#define BIDIB_CS_POM4_RD_BYTE1................0xC0
which is not
#define BIDIB_CS_POM_RD_BYTE.........1 // bit 2,3: no. of bytes to write (-1)
peter_moulin
 

Re: programming CV For MFX under BiDi

Postby rjversluis » 11.01.2018, 18:11

Hi Andreas,

ESU does not like to document anything. (Its a common habit)
If a Firmware update did came out, you have to look up an OS who still supports telnet. If you have one you are lost in the help function to find out... :roll:

Back to the thread issue: If BiDiB is not sure how to implement an MfX Read, how should I be able to implement it!?
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: programming CV For MFX under BiDi

Postby Bergi » 11.01.2018, 21:49

Hi Rob!
rjversluis wrote:if you have one you are lost in the help function to find out... :roll:

Oh, I forgot about that. Is the online help more helpful than the PDF (latest one from 2011)? I don't have an Ecos readily available but might get to one, I just had hoped you might have some offline file where you could look it up.
All I can find is
Code: Select all
Listenobjekt Lok (id=dynamisch)
get(id, cv[nr]) CV nr ausgeben.
set(id, cv[nr, val]) CV nr auf val setzen. Die neuen Werte werden nur in der ECoS gespeichert und nicht auf die Dekoder programmiert.
and that the "Basisobjekt Programmiergleis (id=5)" ist still "in Planung".
rjversluis wrote:If BiDiB is not sure how to implement an MfX Read, how should I be able to implement it!?
Maybe help us set a standard :-) The simplest approach is reading byte by byte. If you think that's not useful and you'd rather have an array of values (you seem to be more knowledgeable about this) we can implement it better of course.
viele Grüße
⋄ Andreas Bergmaier - http://bidib.org/
Bergi
 

Previous

Return to OpenDCC & BiDiB