IOTechSystems / iotech-c-utils

Apache License 2.0
9 stars 7 forks source link

XRT 2749 feat: Add in iot_data_length function #324

Closed luke-shields closed 8 months ago

luke-shields commented 8 months ago

Functionality required for alternative approach to bug fix https://github.com/IOTechSystems/xrt/pull/1791 whereby XRT crashes on attempted transform of rebirth_json. This function would then be used to make the sparkplug transforms accept both lists and vectors for complex data types.

Happy to discuss if this is the right approach as I realise slightly odd to be getting the 'size' of an iterator.

luke-shields commented 8 months ago

@dpazj @SteveOss Changes made

luke-shields commented 8 months ago

@SteveOss added binary support

SteveOss commented 8 months ago

@dpazj @edward-scott @luke-shields Might be an argument for this function returning 1 for basic types rather than asserting ?

dpazj commented 8 months ago

@dpazj @edward-scott @luke-shields Might be an argument for this function returning 1 for basic types rather than asserting ?

I think this makes the most sense if it is a generic function that can be applied to all iot_data_t

luke-shields commented 8 months ago

@SteveOss Change made