Closed RealByron closed 7 months ago
Hi,
thanks for your previous commit. I'm on vacations and don't have full access to my system to respond to this question. But I'll get back to you mid august.
Gilles
No worry, enjoy your vacations
Indeed this is not obvious. Actually, you would have to set the 6bits flag of the KNXDataBuffer so that the message is correctly formatted. Currently, this flag is only set if no type specified or type 1
sixBits(): boolean {
if (this.info == null) { return true; }
return this.info.type.type === '1';
}
Then when constructing the NPDU we check the 6bits flag and the length of the message should be 1
if (data.sixBits() && data.length === 1 && data.value.readUInt8(0) < 0x3F) {
this.apci = (this.apci & 0xC0) | data.value.readUInt8(0);
this._data = null;
return;
}
So, to answer your question you should construct a buffer with a single byte and the value should be less than 0x3F.
Gilles.
Hi there, Thank you for your project . I didn't find a way to specify how to construct a KNXDataBuffer for values less or more that 6 bits values I would like to force value to be xrite in additionnal byte like DPT5 for example
Could you give me some hints ?