SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
The SimpleLink device can return a list of peer services, which are stored in the device, without issuing any queries (relying on previously collected data stored in the cache). The list is in a form of a service structure, which can include full-service parameters with text, partial-service parameters, or short-service parameters (port and IP only), dedicated for hosts with memory limitations (for different size of buffers). The list size can store up to eight services, and when a new service is discovered, the oldest service entry is replaced. The list is cleared when mDNS service is disabled or if Wi-Fi disconnects.
The host can retrieve different levels of detail to support memory reduction in the host application:
Example:
_i16 Status;
SlNetAppGetShortServiceIpv4List_t listMdns[6];
/* Get a list of discovered services */
Status = sl_NetAppGetServiceList(0, 6, /* Maximum number of services to receive */
SL_NETAPP_FULL_SERVICE_WITH_TEXT_IPV6_TYPE, /* receive full ipv6 services with text */
(_i8*) &listMdns6[0], sizeof(listMdns));
if( Status )
{
/* Error */
}