This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

能否使用AF_DataRequest 发送自定义的结构体?

afStatus_t AF_DataRequest( afAddrType_t *dstAddr, endPointDesc_t *srcEP,
uint16 cID, uint16 len, uint8 *buf, uint8 *transID,
uint8 options, uint8 radius )

如题,想利用AF_DataRequest 发送一个自定义的结构体,比如

typedef struct{

  uint8 type;

 float capacity;

 uint8 onoff;

}socket_resoponse_t;

这样一个结构体能直接传输这个结构体的指针赋给uint8 *buf 呢?