OCRepPayload has a field called OCRepPayloadValue which is just a simple linked list. While there is no C API that I know that acts like Java?s Map.keySet(), you can iterate through the linked list and check the ?name? field in OCRepPayloadValue and check the type from the OCRepPayloadPropType. The relevant structs are in resource/csdk/stack/include/octypes.h
From: iotivity-dev-bounces at lists.iotivity.org [mailto:[email protected]] On Behalf Of Morten Nielsen Sent: Tuesday, December 13, 2016 10:17 AM To: iotivity-dev at lists.iotivity.org Subject: [dev] Getting all the keys of an OCRepPayload I don?t see any methods in the C-API code that returns a list of all the value keys, or a way to interrogate the value type of a key. It seems to me you have to magically know which values will be there, and what type they are. Am I missing just something here, and there?s a completely different way to do this? Thanks /Morten -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161213/6f2c08c5/attachment.html>
