您好,我正在尝试在 main.c 中启动 SRP(服务注册协议)客户端。我在 openthread/srp_client.h 中找到了以下描述”
* This function starts the SRP client operation.
SRP client will prepare and send "SRP Update" message to the SRP server once all the following
conditions are met:
- The SRP client is started - `otSrpClientStart()` is called.
- Host name is set - `otSrpClientSetHostName()` is called.
- At least one host IPv6 address is set - `otSrpClientSetHostName()` is called.
- At least one service is added - `otSrpClientAddService()` is called.
It does not matter in which order these functions are called. When all conditions are met, the
SRP client will wait for a short delay before preparing an "SRP Update" message and sending to
server.
* @param[in] aInstance A pointer to the OpenThread instance.
* @param[in] aServerSockAddr The socket address (IPv6 address and port number) of the SRP
* server.
*
* @retval OT_ERROR_NONE SRP client operation started successfully or it is already
running with same server
* socket address and callback.
* @retval OT_ERROR_BUSY SRP client is busy running with a different socket address.
* @retval OT_ERROR_FAILED Failed to open/connect the client's UDP socket.
*/
otError otSrpClientStart(otInstance *aInstance, const otSockAddr *aServerSockAddr);
srp_client.h
otError otSrpClientStart(otInstance *aInstance, const otSockAddr *aServerSockAddr)
otError otSrpClientSetHostName(otInstance *aInstance, const char *aName)
otError otSrpClientAddService(otInstance *aInstance, otSrpClientService *aService)
我的 Main.c
#include <openthread/srp_client.h>
static void SrpClientInit(void){
otSrpClientStart(**What comes in here?**, **How can i Use the EUI64 as IP?**)
otSrpClientSetHostName(**What comes in here?**, 'SrpTest')
otSrpClientAddService(**What comes in here?**,**What comes in here?**)
}
int main(int argc, char *argv[]){
....
SrpClientInit();
....
}
有人可以解释我如何定义函数的参数吗?