CreateKnxProd icon indicating copy to clipboard operation
CreateKnxProd copied to clipboard

how to assigned the dpt to specfied sub-dpt type

Open leoujz opened this issue 2 years ago • 4 comments

now in the tool, dpt can be assigned to 1bit, 1byte, 2byte, etc. is there a way to assign specified sub-dpt type, such as 5.001, 5.005

leoujz avatar May 29 '22 02:05 leoujz

I just dig out the source code, and did not find the type values for specified sub-dpt value.

leoujz avatar May 29 '22 02:05 leoujz

Datapoint type and size are two different properties of a group object. For Datapoint types you need to parse the knx_master.xml. There should already be some code to fetch and parse it. All that remains would be to add the UI for and binding for it. See #13

thelsing avatar May 29 '22 08:05 thelsing

Datapoint type and size are two different properties of a group object - thanks for the information, I'll try that. There should already be some code to fetch and parse it - is there a hint or link of where the code is? #13 - I know that in ETS user can assign the DPT manually, but it's very inconvenient. And UI is not necessary for me, I can do it with code if there's a way

leoujz avatar May 30 '22 10:05 leoujz

_model.Masterdata.DatapointTypes in MainWindowViewModel.cs should have the types. _model.Masterdata should be an object representation of https://update.knx.org/data/XML/project-20/knx_master.xml You just need extend the partial class ComObject_T with a property that returns the valid Datapoint for the size of the ComObject and add a DataGridComboBoxColumn to the DataGrid to select the DatapointType.

thelsing avatar May 31 '22 18:05 thelsing