本文整理汇总了C++中HandleStatus函数的典型用法代码示例。如果您正苦于以下问题:C++ HandleStatus函数的具体用法?C++ HandleStatus怎么用?C++ HandleStatus使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了HandleStatus函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EnableNetworkManager
void EnableNetworkManager()
{
try
{
HandleStatus(RunCmdRedirect(START_NETWORK_MANAGER_COMMAND),ERROR_MSG_ENABLING_NETWORK_MANAGER);
HandleStatus(RunCmdRedirect(DISABLE_FIREWALL),ERROR_DISABLING_FW);
}
catch (CException & error)
{
SLogger::getInstance().Log(error.what());
SLogger::getInstance().Log(__PRETTY_FUNCTION__);
throw;
}
}
示例2: HandleEvent
/* Handle an event, passing it to widgets until they return a status */
void
GUI:: HandleEvent(const SDL_Event *event)
{
int i;
GUI_status status;
switch (event->type) {
/* SDL_QUIT events quit the GUI */
case SDL_QUIT:
status = GUI_QUIT;
break;
/* Keyboard and mouse events go to widgets */
case SDL_KEYDOWN:
case SDL_KEYUP:
case SDL_MOUSEMOTION:
case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP:
/* Go through widgets, topmost first */
status = GUI_PASS;
for (i=numwidgets-1; (i>=0)&&(status==GUI_PASS); --i) {
if ( widgets[i]->Status() == WIDGET_VISIBLE ) {
status = widgets[i]->HandleEvent(event);
}
}
break;
/* Ignore unhandled events */
default:
status = GUI_PASS;
break;
}
HandleStatus(status);
}
示例3: HandleStatus
bool nifpga::Close(uint32_t attribute) {
bool status = false;
if (sessionOpen) {
if (sessionRunning) status = Abort();
status = HandleStatus(NiFpga_Close(sessionHandle,attribute));
if (status) sessionOpen = false;
}
return status;
}
示例4: DisableNetworkManager
/**
* Calling System to disabled the Network Manager service in order for the emulation
* to determine IP's subnet masks and more.
*
* If the Manager couldn't be stopped an exception will be throw
* and the emulation will be terminated.
*/
void DisableNetworkManager()
{
try
{
HandleStatus(RunCmdRedirect(STOP_NETWORK_MANAGER_COMMAND,false),ERROR_MSG_DISABLING_NETWORK_MANAGER);
HandleStatus(RunCmdRedirect(STOP_IP_FORWARDING),ERROR_MSG_DISABLING_IP_FORWARDING);
HandleStatus(RunCmdRedirect(STOP_ICMP_RESPONSE),ERROR_MSG_DISABLING_ICMP_RESPONSE);
HandleStatus(RunCmdRedirect(ENABLE_FIREWALL),ERROR_FW);
HandleStatus(RunCmdRedirect(STOP_ALL_INCOMING_PACKETS),ERROR_DISABLING_PACKETS_TRAFFIC);
HandleStatus(RunCmdRedirect(STOP_ALL_OUTGOING_PACKETS),ERROR_DISABLING_PACKETS_TRAFFIC);
}
catch (CException & error)
{
SLogger::getInstance().Log(error.what());
SLogger::getInstance().Log(__PRETTY_FUNCTION__);
throw;
}
}
示例5: GetPeerToPeerFifoEndpoint
bool nifpga::GetPeerToPeerFifoEndpoint(uint32_t fifo, uint32_t* endpoint) {
if (sessionOpen && sessionRunning) return HandleStatus(NiFpga_GetPeerToPeerFifoEndpoint(sessionHandle, fifo, endpoint));
return false;
}
示例6:
bool nifpga::AcquireFifoWriteElementsU64(uint32_t fifo, uint64_t** elements, size_t elementsRequested, uint32_t timeout, size_t* elementsAcquired, size_t* elementsRemaining) {
if (sessionOpen && sessionRunning) return HandleStatus(NiFpga_AcquireFifoWriteElementsU64(sessionHandle, fifo, elements, elementsRequested, timeout, elementsAcquired, elementsRemaining));
return false;
}
示例7: ConfigureFifo
bool nifpga::ConfigureFifo(uint32_t fifo, size_t requestedDepth, size_t* actualDepth) {
if (sessionOpen) return HandleStatus(NiFpga_ConfigureFifo2(sessionHandle, fifo, requestedDepth, actualDepth));
return false;
}
示例8: AcknowledgeIrqs
bool nifpga::AcknowledgeIrqs(uint32_t irqs) {
if (sessionOpen && sessionRunning) return HandleStatus(NiFpga_AcknowledgeIrqs(sessionHandle, irqs));
return false;
}
示例9: Abort
bool nifpga::Abort() {
bool status = false;
if (sessionOpen && sessionRunning) status = HandleStatus(NiFpga_Abort(sessionHandle));
if (status) sessionRunning = false;
return status;
}
示例10: Run
bool nifpga::Run(uint32_t attribute) {
bool status = false;
if (sessionOpen && !sessionRunning) status = HandleStatus(NiFpga_Run(sessionHandle, attribute));
if (status) sessionRunning = true;
return status;
}
示例11: Open
bool nifpga::Open(char* bitfile, char* signature, char* resource, uint32_t attribute) {
bool status = false;
if (driverInitialized && !sessionOpen) status = HandleStatus(NiFpga_Open(bitfile, signature, resource, attribute, &sessionHandle));
if (status) sessionOpen = true;
return status;
}
示例12: Finalize
bool nifpga::Finalize() {
bool status = false;
if (driverInitialized) status = HandleStatus(NiFpga_Finalize());
if (status) driverInitialized = false;
return status;
}
示例13: Initialize
bool nifpga::Initialize() {
bool status = false;
if (!driverInitialized) status = HandleStatus(NiFpga_Initialize());
if (status) driverInitialized = true;
return status;
}
示例14: UnreserveIrqContext
bool nifpga::UnreserveIrqContext(NiFpga_IrqContext context) {
if (sessionOpen && sessionRunning) return HandleStatus(NiFpga_UnreserveIrqContext(sessionHandle, context));
return false;
}
示例15: WaitOnIrqs
bool nifpga::WaitOnIrqs(NiFpga_IrqContext context, uint32_t irqs, uint32_t timeout, uint32_t* irqsAsserted, NiFpga_Bool* timedOut) {
if (sessionOpen && sessionRunning) return HandleStatus(NiFpga_WaitOnIrqs(sessionHandle, context, irqs, timeout, irqsAsserted, timedOut));
return false;
}