KDK_BLUETOOTH_GET_PACKETTYPE(3)

NAME
kdk_bluetooth_get_packettype - 获取蓝牙的数据包类型

SYNOPSIS
#include <libkybluetooth.h>

extern char* kdk_bluetooth_get_packettype(int id);

Link with -lkybluetooth.

Detailed Description
The main function of the interface is to obtain the packet type of Bluetooth.

The argument id is the device ID of Bluetooth.

RETURN VALUE
On success, returns the Bluetooth packet type of type char*; The returned string needs to be released by free

On error, return NULL.

EXAMPLES
    #include "libkybluetooth.h"
    #include <stdio.h>
    #include <stdlib.h>

    int main()
    {
        int i = 0;
        char *manufacturer = " ";
        char *version = " ";
        char *name = " ";
        char *address = " ";
        char *link_mode  =" ";
        char *link_policy =" ";
        char *scomtu = " ";
        char *alcmtu = " ";
        char *packettype = " ";
        char *features = " ";
        char *bus = " ";
        int **id = kdk_bluetooth_get_device_id();
        do
        {
            printf("id = %d,id[i]);
            manufacturer = kdk_bluetooth_get_manufacturer(i);
            printf("manufacturer: %s, manufacturer);
            free(manufacturer);
            version = kdk_bluetooth_get_dev_version(i);
            printf("version: %s, version);
            free(version);
            name = kdk_bluetooth_get_name(id[i]);
            printf("name: %s, name);
            address = kdk_bluetooth_get_address(id[i]);
            printf("address: %s, address);
            link_mode = kdk_bluetooth_get_link_mode(id[i]);
            printf("link_mode: %s, link_mode);
            link_policy = kdk_bluetooth_get_link_policy(id[i]);
            printf("link_policy: %s, link_policy);
            scomtu = kdk_bluetooth_get_scomtu(id[i]);
            printf("scomtu: %s, scomtu);
            alcmtu = kdk_bluetooth_get_alcmtu(id[i]);
            printf("alcmtu: %s, alcmtu);
            packettype = kdk_bluetooth_get_packettype(id[i]);
            printf("packettype: %s, packettype);
            features = kdk_bluetooth_get_features(id[i]);
            printf("features: %s, features);
            bus = kdk_bluetooth_get_bus(id[i]);
            printf("bus: %s, bus);
            i++;
        }while(id[i]);
        return 0;
    }

CONFORMING TO
These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: kdk_bluetooth_get_device_id(), kdk_bluetooth_get_manufacturer(), kdk_bluetooth_get_dev_version(), kdk_bluetooth_get_name(), kdk_bluetooth_get_address(), kdk_bluetooth_get_link_mode(), kdk_bluetooth_get_link_policy(), kdk_bluetooth_get_bus(), kdk_bluetooth_get_scomtu(), kdk_bluetooth_get_alcmtu() and kdk_bluetooth_get_features().

SEE ALSO
kdk_bluetooth_get_device_id(3), kdk_bluetooth_get_manufacturer(3), kdk_bluetooth_get_dev_version(3), kdk_bluetooth_get_name(3), kdk_bluetooth_get_address(3), kdk_bluetooth_get_link_mode(3), kdk_bluetooth_get_link_policy(3), kdk_bluetooth_get_bus(3), kdk_bluetooth_get_scomtu(3), kdk_bluetooth_get_alcmtu(3) and kdk_bluetooth_get_features(3).