Comments (5)
same goes for DPT 18.1 and valueToBusValueSceneControl().
from knx.
The logic of the index is as follows:
DPT 3.7 consists of two parts:
- c 1 bit Increase/Decrease (index 0)
- bbb 3 bit Stepcode (000b - 111b) (index 1)
The whole DPT-Encoding stuff was taken from a knxd branch. It would probably b easier to understand if every complex dpt would get a struct.
In case of DPT 3.7 a signed char would do the job just fine.
Feel free this ;)
from knx.
oh, so I've got to create 2 group object to handle a, for example "scene control" DTP? something like this?
GroupObject& sceneLearn = knx.getGroupObject(2);
sceneLearn.dataPointType(Dpt(18, 1, 0));
GroupObject& sceneNumber = knx.getGroupObject(2);
sceneLearn.dataPointType(Dpt(18, 1, 1));
sceneLearn.value(1);
sceneNumber.value(5);
right?
and, if i want to manage it myself i can just use another DTP? like 5.10 ?
GroupObject& scene = knx.getGroupObject(2);
scene.dataPointType(Dpt(5,10));
scene.value(0x85);
would it be alright? (I donno much about KNX protocol so im not sure if its okey to use another DPT there)
from knx.
No the group object is the same.
Something like:
GroupObject& scene = knx.getGroupObject(2);
learn = scene.value(Dpt(18,1,0));
number = scene.value(Dpt(18,1,1));
should work.
When you write a group object you have to set the first components with GroupObject::valueNoSend
and only the last component with GroupObject::value
.
GroupObject& scene = knx.getGroupObject(2);
scene.valueNoSend(1, Dpt(18,1,0));
scene.value(37, Dpt(18,1,1));
If you want to decode the data yourself,, you can get a raw pointer with GroupObject::valueRef
and the size of the data with GroupObject::valueSize
.
The better way would be custom structs for complex datapoints.
from knx.
Thanks!
from knx.
Related Issues (20)
- Can only read 18 Bytes of parameter data from ETS HOT 7
- TPUART - Strange connection issue with Samd21 & TP HOT 1
- Unhandled service identifier: 20B on ESP8266 HOT 1
- is it possible to get knx product certification using this stack. HOT 1
- Device programming via ETS HOT 3
- getting error communicating with NCN HOT 1
- DPT 1.24 and 1.100 missing
- Transmitting Telegrams Over KNX Bus Error HOT 1
- cemi_frame.cpp
- big flash size though eeprom warning
- Issue on decoding DPT 10.001 values - "Index" HOT 3
- callbacks missing occasionally HOT 1
- Pass through KNX-bus to Serial with H8C09 board HOT 6
- Debug message since commit 338aa1b of 2023-05-28 maybe inconsistent ? HOT 8
- Update PlatformIO Registry Version and Example Projects HOT 2
- Arduino ethernet sheild supported?. HOT 1
- CI Pipeline broken HOT 1
- Basic documentation HOT 6
- Missing ARDUINO_ARCH_RP2040 in knx/bits.h HOT 7
- KNX-Demo no prog status in ETS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knx.