WBTCommandType

Definition

#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 the WBT_RequestSync function.
WBT_CMD_REQ_GET_BLOCK Callback generated by the WBT_GetBlock function.
WBT_CMD_REQ_GET_BLOCKINFO Callback generated by the WBT_GetBlockInfo function.
WBT_CMD_REQ_USER_DATA Callback generated by the 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 the callback argument's sync member 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 currently executing command(s) were canceled by the WBT_CancelCurrentCommand function.

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


WBT_CMD_PREPARE_SEND_DATA Indicates data preparation requests when a WBT_RegisterBlock function has been registered with no buffer specified.
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 a request by the WBT_RequestSync function was received from the communication destination.
Also indicates that the callback argument's sync member contains valid information.
WBT_CMD_REQ_GET_BLOCKINFO Indicates that a request by the WBT_GetBlockInfo function was received from the communication destination.
WBT_CMD_REQ_GET_BLOCK Indicates that a request by the WBT_GetBlock function was received from the communication destination.
WBT_CMD_REQ_GET_BLOCK_DONE Indicates that a request from the communication destination by the WBT_GetBlock function was completed.
Also indicates that callback function blockdone contains valid information.
WBT_CMD_REQ_USER_DATA Indicates that data sent by the WBT_PutUserData function was received from the communication destination.
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

2004/09/21 Initial version.


CONFIDENTIAL