WBTCommandType

Definitions

#include <nitro/wbt.h>

typedef enum {
WBT_CMD_REQ_NONE = 0,
WBT_CMD_REQ_WAIT,
WBT_CMD_REQ_SYNC,
WBT_CMD_RES_SYNC,
WBT_CMD_REQ_GET_BLOCK,
WBT_CMD_RES_GET_BLOCK,
WBT_CMD_REQ_GET_BLOCKINFO,
WBT_CMD_RES_GET_BLOCKINFO,
WBT_CMD_REQ_GET_BLOCK_DONE,
WBT_CMD_RES_GET_BLOCK_DONE,
WBT_CMD_REQ_USER_DATA,
WBT_CMD_RES_USER_DATA,
WBT_CMD_SYSTEM_CALLBACK,
WBT_CMD_PREPARE_SEND_DATA,
WBT_CMD_REQ_ERROR,
WBT_CMD_RES_ERROR,
WBT_CMD_CANCEL
} WBTCommandType;


Description

Shows enum constants that distinguish various commands notified by callback with WBT. Any one of the values below showing the direct cause of callback generation is set in the command member stored in the callback constant WBTCommand.
command value Description
WBT_CMD_REQ_SYNC Callback generated by WBT_RequestSync function.
WBT_CMD_REQ_GET_BLOCK Callback generated by WBT_GetBlock function.
WBT_CMD_REQ_GET_BLOCKINFO Callback generated by WBT_GetBlockInfo function.
WBT_CMD_REQ_USER_DATA Callback generated by WBT_PutUserData function.
WBT_CMD_SYSTEM_CALLBACK Command completion is the callback generated at any time.
Also, any one of the following values showing the callback's concrete cause is set in the event member stored by the callback argument WBTCommand.
event value Description

The following triggers are generated in response to callback functions specified by a callback command.


WBT_CMD_RES_SYNC Indicates completion of the WBT_RequestSync function.
Also indicates that callback argument sync contains valid information.
WBT_CMD_RES_GET_BLOCKINFO Indicates completion of the WBT_GetBlockInfo function.
WBT_CMD_RES_GET_BLOCK Indicates completion of the WBT_GetBlock function.
Also indicates that callback argument get contains valid information.
WBT_CMD_RES_USER_DATA Indicates completion of the WBT_PutUserData function.
WBT_CMD_RES_ERROR Indicates that the command failed for some reason.
WBT_CMD_CANCEL Indicates that the command that was being executed was canceled by the WBT_CancelCurrentCommand function.

The following values are generated by callbacks specified by WBT_InitParent or WBT_InitChild.


WBT_CMD_PREPARE_SEND_DATA Indicates data preparation request when registering WBT_RegisterBlock function with buffer unspecified.
Also indicates that callback argument prepare_send_data contains valid information.
Also, stores the response results in this location and prepares send buffer.
WBT_CMD_REQ_SYNC Indicates that the request was received from the communication destination by the WBT_RequestSync function.
Also indicates that callback argument sync contains valid information.
WBT_CMD_REQ_GET_BLOCKINFO Indicates that the request was received from the communication destination by the WBT_GetBlockInfo function.
WBT_CMD_REQ_GET_BLOCK Indicates that the request was received from the communication destination by the WBT_GetBlock function.
WBT_CMD_REQ_GET_BLOCK_DONE Indicates that the request was completed by the WBT_GetBlock function from the communication destination.
Also indicates that callback function blockdone contains valid information.
WBT_CMD_REQ_USER_DATA Indicates that data was received from the communication destination by the WBT_PutUserData function.
Also indicates that callback argument user_data contains valid information.
WBT_CMD_REQ_ERROR Indicates that the request from the communication destination failed for some reason.
WBT_CMD_REQ_NONE The defined value indicating no command.
WBT_CMD_REQ_WAIT Used internally in the library.

See Also

WBTCallback, WBTCommand

Revision History

09/21/2004 Initial version