CreateKnxProd
CreateKnxProd copied to clipboard
how to assigned the dpt to specfied sub-dpt type
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
I just dig out the source code, and did not find the type values for specified sub-dpt value.
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
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
_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.