Komisaris
Modul ini mencakup fungsi untuk peran Thread Commissioner.
Ringkasan
Enumerasi |
|
---|---|
otCommissionerJoinerEvent
|
enum Mendefinisikan Peristiwa Penggabungan di Commissioner. |
otCommissionerState{
|
enum Mendefinisikan Negara Komisaris. |
otJoinerInfoType{
|
enum Mendefinisikan Jenis Info Penyambung. |
Typedef |
|
---|---|
otCommissionerEnergyReportCallback)(uint32_t aChannelMask, const uint8_t *aEnergyList, uint8_t aEnergyListLength, void *aContext)
|
typedefvoid(*
Pointer dipanggil saat Komisaris menerima Laporan Energi. |
otCommissionerJoinerCallback)(otCommissionerJoinerEvent aEvent, const otJoinerInfo *aJoinerInfo, const otExtAddress *aJoinerId, void *aContext)
|
typedefvoid(*
Pointer dipanggil setiap kali status joiner berubah. |
otCommissionerJoinerEvent
|
typedef Mendefinisikan Peristiwa Penggabungan di Commissioner. |
otCommissionerPanIdConflictCallback)(uint16_t aPanId, uint32_t aChannelMask, void *aContext)
|
typedefvoid(*
Pointer dipanggil saat Commissioner menerima pesan Konflik ID PAN. |
otCommissionerState
|
typedefenum otCommissionerState
Mendefinisikan Negara Komisaris. |
otCommissionerStateCallback)(otCommissionerState aState, void *aContext)
|
typedefvoid(*
Pointer dipanggil setiap kali status komisioner berubah. |
otCommissioningDataset
|
typedefstruct otCommissioningDataset
Merepresentasikan Set Data Commissioning. |
otJoinerInfo
|
typedefstruct otJoinerInfo
Merepresentasikan Info Penggabungan. |
otJoinerInfoType
|
typedefenum otJoinerInfoType
Mendefinisikan Jenis Info Penyambung. |
otJoinerPskd
|
typedefstruct otJoinerPskd
Merepresentasikan Joiner PSKd. |
otSteeringData
|
typedefstruct otSteeringData
Menampilkan data pengarahan. |
Fungsi |
|
---|---|
otCommissionerAddJoiner(otInstance *aInstance, const otExtAddress *aEui64, const char *aPskd, uint32_t aTimeout)
|
Menambahkan entri Penyambung.
|
otCommissionerAddJoinerWithDiscerner(otInstance *aInstance, const otJoinerDiscerner *aDiscerner, const char *aPskd, uint32_t aTimeout)
|
Menambahkan entri Joiner dengan nilai Joiner Discerner tertentu.
|
otCommissionerAnnounceBegin(otInstance *aInstance, uint32_t aChannelMask, uint8_t aCount, uint16_t aPeriod, const otIp6Address *aAddress)
|
Mengirim pesan Mulai Diumumkan.
|
otCommissionerEnergyScan(otInstance *aInstance, uint32_t aChannelMask, uint8_t aCount, uint16_t aPeriod, uint16_t aScanDuration, const otIp6Address *aAddress, otCommissionerEnergyReportCallback aCallback, void *aContext)
|
Mengirim pesan Kueri Pemindaian Energi.
|
otCommissionerGetId(otInstance *aInstance)
|
const char *
Menampilkan ID Commissioner.
|
otCommissionerGetNextJoinerInfo(otInstance *aInstance, uint16_t *aIterator, otJoinerInfo *aJoiner)
|
Dapatkan info joiner di posisi aIterator.
|
otCommissionerGetProvisioningUrl(otInstance *aInstance)
|
const char *
Mendapatkan URL Penyediaan.
|
otCommissionerGetSessionId(otInstance *aInstance)
|
uint16_t
Menampilkan ID Sesi Komisaris.
|
otCommissionerGetState(otInstance *aInstance)
|
Menampilkan Status Komisaris.
|
otCommissionerPanIdQuery(otInstance *aInstance, uint16_t aPanId, uint32_t aChannelMask, const otIp6Address *aAddress, otCommissionerPanIdConflictCallback aCallback, void *aContext)
|
Mengirim pesan Kueri ID PAN.
|
otCommissionerRemoveJoiner(otInstance *aInstance, const otExtAddress *aEui64)
|
Menghapus entri Penyambung.
|
otCommissionerRemoveJoinerWithDiscerner(otInstance *aInstance, const otJoinerDiscerner *aDiscerner)
|
Menghapus entri Penyambung.
|
otCommissionerSendMgmtGet(otInstance *aInstance, const uint8_t *aTlvs, uint8_t aLength)
|
Mengirim MGMT_COMMISSIONER_GET.
|
otCommissionerSendMgmtSet(otInstance *aInstance, const otCommissioningDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength)
|
Mengirim MGMT_COMMISSIONER_SET.
|
otCommissionerSetId(otInstance *aInstance, const char *aId)
|
Menetapkan ID Commissioner.
|
otCommissionerSetProvisioningUrl(otInstance *aInstance, const char *aProvisioningUrl)
|
Menetapkan URL Penyediaan.
|
otCommissionerStart(otInstance *aInstance, otCommissionerStateCallback aStateCallback, otCommissionerJoinerCallback aJoinerCallback, void *aCallbackContext)
|
Mengaktifkan peran Komisaris Thread.
|
otCommissionerStop(otInstance *aInstance)
|
Menonaktifkan peran Thread Commissioner.
|
Struct |
|
---|---|
otCommissioningDataset |
Merepresentasikan Set Data Commissioning. |
otJoinerInfo |
Merepresentasikan Info Penggabungan. |
otJoinerPskd |
Merepresentasikan Joiner PSKd. |
otSteeringData |
Menampilkan data pengarahan. |
Enumerasi
otCommissionerJoinerEvent
otCommissionerJoinerEvent
Mendefinisikan Peristiwa Penggabungan di Commissioner.
otCommissionerState
otCommissionerState
Mendefinisikan Negara Komisaris.
Properti | |
---|---|
OT_COMMISSIONER_STATE_ACTIVE
|
Peran komisaris aktif. |
OT_COMMISSIONER_STATE_DISABLED
|
Peran Komisaris dinonaktifkan. |
OT_COMMISSIONER_STATE_PETITION
|
Saat ini mengajukan petisi untuk menjadi Komisaris. |
otJoinerInfoType
otJoinerInfoType
Mendefinisikan Jenis Info Penyambung.
Properti | |
---|---|
OT_JOINER_INFO_TYPE_ANY
|
Terima Joiner apa pun (tidak ada EUI64 atau Discerner yang ditentukan). |
OT_JOINER_INFO_TYPE_DISCERNER
|
Joiner Discerner ditentukan ( |
OT_JOINER_INFO_TYPE_EUI64
|
Penyambung EUI-64 ditentukan ( |
Typedef
otCommissionerEnergyReportCallback
void(* otCommissionerEnergyReportCallback)(uint32_t aChannelMask, const uint8_t *aEnergyList, uint8_t aEnergyListLength, void *aContext)
Pointer dipanggil saat Komisaris menerima Laporan Energi.
Detail | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameter |
|
otCommissionerJoinerCallback
void(* otCommissionerJoinerCallback)(otCommissionerJoinerEvent aEvent, const otJoinerInfo *aJoinerInfo, const otExtAddress *aJoinerId, void *aContext)
Pointer dipanggil setiap kali status joiner berubah.
Detail | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameter |
|
otCommissionerJoinerEvent
enum otCommissionerJoinerEvent otCommissionerJoinerEvent
Mendefinisikan Peristiwa Penggabungan di Commissioner.
otCommissionerPanIdConflictCallback
void(* otCommissionerPanIdConflictCallback)(uint16_t aPanId, uint32_t aChannelMask, void *aContext)
Pointer dipanggil saat Commissioner menerima pesan Konflik ID PAN.
Detail | |||||||
---|---|---|---|---|---|---|---|
Parameter |
|
otCommissionerStateCallback
void(* otCommissionerStateCallback)(otCommissionerState aState, void *aContext)
Pointer dipanggil setiap kali status komisioner berubah.
Detail | |||||
---|---|---|---|---|---|
Parameter |
|
otCommissioningDataset
struct otCommissioningDataset otCommissioningDataset
Merepresentasikan Set Data Commissioning.
Fungsi
otCommissionerAddJoiner
otError otCommissionerAddJoiner( otInstance *aInstance, const otExtAddress *aEui64, const char *aPskd, uint32_t aTimeout )
Menambahkan entri Penyambung.
Detail | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameter |
|
||||||||
Nilai Pengembalian |
|
otCommissionerAddJoinerWithDiscerner
otError otCommissionerAddJoinerWithDiscerner( otInstance *aInstance, const otJoinerDiscerner *aDiscerner, const char *aPskd, uint32_t aTimeout )
Menambahkan entri Joiner dengan nilai Joiner Discerner tertentu.
Detail | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameter |
|
||||||||
Nilai Pengembalian |
|
otCommissionerAnnounceBegin
otError otCommissionerAnnounceBegin( otInstance *aInstance, uint32_t aChannelMask, uint8_t aCount, uint16_t aPeriod, const otIp6Address *aAddress )
Mengirim pesan Mulai Diumumkan.
Detail | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameter |
|
||||||||||
Nilai Pengembalian |
|
otCommissionerEnergyScan
otError otCommissionerEnergyScan( otInstance *aInstance, uint32_t aChannelMask, uint8_t aCount, uint16_t aPeriod, uint16_t aScanDuration, const otIp6Address *aAddress, otCommissionerEnergyReportCallback aCallback, void *aContext )
Mengirim pesan Kueri Pemindaian Energi.
Detail | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameter |
|
||||||||||||||||
Nilai Pengembalian |
|
otCommissionerGetId
const char * otCommissionerGetId( otInstance *aInstance )
Menampilkan ID Commissioner.
Detail | |||
---|---|---|---|
Parameter |
|
||
Hasil |
ID Komisaris.
|
otCommissionerGetNextJoinerInfo
otError otCommissionerGetNextJoinerInfo( otInstance *aInstance, uint16_t *aIterator, otJoinerInfo *aJoiner )
Dapatkan info joiner di posisi aIterator.
Detail | |||||||
---|---|---|---|---|---|---|---|
Parameter |
|
||||||
Nilai Pengembalian |
|
otCommissionerGetProvisioningUrl
const char * otCommissionerGetProvisioningUrl( otInstance *aInstance )
Mendapatkan URL Penyediaan.
Detail | |||
---|---|---|---|
Parameter |
|
||
Hasil |
Pointer ke string URL.
|
otCommissionerGetSessionId
uint16_t otCommissionerGetSessionId( otInstance *aInstance )
Menampilkan ID Sesi Komisaris.
Detail | |||
---|---|---|---|
Parameter |
|
||
Hasil |
ID sesi komisioner saat ini.
|
otCommissionerGetState
otCommissionerState otCommissionerGetState( otInstance *aInstance )
Menampilkan Status Komisaris.
Detail | |||||||
---|---|---|---|---|---|---|---|
Parameter |
|
||||||
Nilai Pengembalian |
|
otCommissionerPanIdQuery
otError otCommissionerPanIdQuery( otInstance *aInstance, uint16_t aPanId, uint32_t aChannelMask, const otIp6Address *aAddress, otCommissionerPanIdConflictCallback aCallback, void *aContext )
Mengirim pesan Kueri ID PAN.
Detail | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameter |
|
||||||||||||
Nilai Pengembalian |
|
otCommissionerRemoveJoiner
otError otCommissionerRemoveJoiner( otInstance *aInstance, const otExtAddress *aEui64 )
Menghapus entri Penyambung.
Detail | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameter |
|
||||||||
Nilai Pengembalian |
|
otCommissionerRemoveJoinerWithDiscerner
otError otCommissionerRemoveJoinerWithDiscerner( otInstance *aInstance, const otJoinerDiscerner *aDiscerner )
Menghapus entri Penyambung.
Detail | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameter |
|
||||||||
Nilai Pengembalian |
|
otCommissionerSendMgmtGet
otError otCommissionerSendMgmtGet( otInstance *aInstance, const uint8_t *aTlvs, uint8_t aLength )
Mengirim MGMT_COMMISSIONER_GET.
Detail | |||||||
---|---|---|---|---|---|---|---|
Parameter |
|
||||||
Nilai Pengembalian |
|
otCommissionerSendMgmtSet
otError otCommissionerSendMgmtSet( otInstance *aInstance, const otCommissioningDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength )
Mengirim MGMT_COMMISSIONER_SET.
Detail | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameter |
|
||||||||
Nilai Pengembalian |
|
otCommissionerSetId
otError otCommissionerSetId( otInstance *aInstance, const char *aId )
Menetapkan ID Commissioner.
Detail | |||||||
---|---|---|---|---|---|---|---|
Parameter |
|
||||||
Nilai Pengembalian |
|
otCommissionerSetProvisioningUrl
otError otCommissionerSetProvisioningUrl( otInstance *aInstance, const char *aProvisioningUrl )
Menetapkan URL Penyediaan.
Detail | |||||
---|---|---|---|---|---|
Parameter |
|
||||
Nilai Pengembalian |
|
otCommissionerStart
otError otCommissionerStart( otInstance *aInstance, otCommissionerStateCallback aStateCallback, otCommissionerJoinerCallback aJoinerCallback, void *aCallbackContext )
Mengaktifkan peran Komisaris Thread.
Detail | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameter |
|
||||||||
Nilai Pengembalian |
|
otCommissionerStop
otError otCommissionerStop( otInstance *aInstance )
Menonaktifkan peran Thread Commissioner.
Detail | |||||
---|---|---|---|---|---|
Parameter |
|
||||
Nilai Pengembalian |
|
Makro
OT_COMMISSIONING_PASSPHRASE_MAX_SIZE
OT_COMMISSIONING_PASSPHRASE_MAX_SIZE 255
Ukuran maksimum Frasa Sandi Commissioning.
OT_COMMISSIONING_PASSPHRASE_MIN_SIZE
OT_COMMISSIONING_PASSPHRASE_MIN_SIZE 6
Ukuran minimum Frasa Sandi Commissioning.
OT_JOINER_MAX_PSKD_LENGTH
OT_JOINER_MAX_PSKD_LENGTH 32
Panjang string maksimum PSKd Joiner (tidak termasuk karakter null).
OT_PROVISIONING_URL_MAX_SIZE
OT_PROVISIONING_URL_MAX_SIZE 64
Ukuran maksimum (jumlah karakter) dalam string URL Penyediaan (tidak termasuk karakter null).
OT_STEERING_DATA_MAX_LENGTH
OT_STEERING_DATA_MAX_LENGTH 16
Panjang data pengarah maksimum (byte)
Referensi
Topik Referensi OpenThread API berasal dari kode sumber yang tersedia di GitHub. Untuk informasi selengkapnya, atau untuk berkontribusi pada dokumentasi kami, lihat Referensi.