11.12.3.4.36. Function iot_agent_service_get_service_descriptor_of_service

11.12.3.4.36.1. Function Documentation

iot_agent_status_t iot_agent_service_get_service_descriptor_of_service(const iot_agent_datastore_t *datastore, size_t offset, nxp_iot_ServiceDescriptor *service_descriptor)

Get the service descriptor of a service specified by offset.

Pre

The configuration data associated to the context is valid.

Post

In case of success, the service_descriptor structure is filled and needs to be freed after usage by calling iot_agent_free_service_descriptor. In case of failure no freeing is required. Also in case of failures, the contents of service_descriptor are not guaranteed to remain intact.

See

iot_agent_is_service_configuration_data_valid

Parameters
  • [in] ctx: The datastore to query for the service.

  • [in] offset: The offset of the service - the memory location in the given datastore.

  • [out] service_descriptor: Structure for holding a service descriptor. Must point to a valid service descriptor object upon invocation. Any FT_POINTER fields in the service descriptor are freed before changing the contents to the service_descriptor of the selected service.

Return Value
  • IOT_AGENT_SUCCESS: Upon success