#include <nitro/wm.h>typedef struct WMPortSendCallback
{
u16 apiid;
u16 errcode;
u16 wlCmdID;
u16 wlResult;
u16 state;
u16 port;
u16 destBitmap;
u16 restBitmap;
u16 sentBitmap;
u16 rsv;
const u16 *data;
u16 length;
u16 seqNo;
WMCallbackFunc callback;
void *arg;
} WMPortSendCallback;
| apiid | ID of the API that acts as the source for the callback generation. It is equivalent to the WMApiid enumerated type. Here, apiid is set to WM_APIID_SET_MP_DATA. |
| errcode | Result of the asynchronous process. It is equivalent to the WMErrCode enumerated type. |
| wlCmdID | If errcode is WM_ERRCODE_FAILED, this stores the ID of the command that caused the wireless-firmware error. |
| wlResult | If errcode is WM_ERRCODE_FAILED, this stores the code of what caused the error in the wireless firmware. |
| state | If errcode is WM_ERRCODE_SUCCESS, this stores the state code generated by the callback. Currently, only WM_STATECODE_PORT_SEND is generated. |
| port | Port that sends the data. |
| destBitmap | Bitmap of the association IDs (AIDs) assigned to the send destinations. |
| restBitmap | Bitmap of the association IDs (AIDs) of the send destinations for which retries are necessary. The bitmap will not include any AIDs for which it is clear that the send will not succeed for reasons such as disconnection or no connection having been established. |
| sentBitmap | Bitmap of those AIDs for the communications partners to which data was actually sent (among the send destinations designated by destBitmap). Although it is guaranteed that the data will have arrived at communications partners included in sentBitmap, there is no guarantee that data will not have arrived at communications partners not included in sentBitmap. |
| rsv | Reserved. |
| data | Address of the buffer that sent the data. |
| length | Data length that was sent. |
| seqNo | Sequence number. |
| callback | Field that the library uses internally. The address of the called callback function is stored here. |
| arg | Argument that is specified by the WM_SetPortCallback function. |
This is a structure passed to the callback function for each of the WM_SetMPDataToPort, WM_SetMPDataToPortEx, and WM_SetMPData functions.
WM_ERRCODE_SUCCESS goes in the errcode field if the send was a success, WM_ERRCODE_SEND_FAILED goes in if the send failed, and WM_ERRCODE_SEND_QUEUE_FULL goes in if the send queue is full. Note that even if the destinations specified with destBitmap include AIDs where data cannot be sent to due to a disconnection during the send or a connection not yet existing, WM_ERRCODE_SUCCESS will be returned if everything was sent to the remaining communications partners to which data could be sent. Compare the destBitmap and the sentBitmap to confirm that everything was actually sent to the designated send destinations.
2009/09/29 Corrected an error regarding the description of apiid.
2005/03/04 Initial version.
CONFIDENTIAL