Eric Wu / Mbed 2 deprecated WifiRobot

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

irobotError.h File Reference

irobotError.h File Reference

iRobot error handling and codes. More...

Go to the source code of this file.

Functions

int32_t irobot_StatusMerge (int32_t *const status, const int32_t newStatus)
 Conditionally sets the status to a new value.

Detailed Description

iRobot error handling and codes.

Author:
Jeff C. Jensen
Date:
2013-12-09 Copyright (C) 2013, Jeff C. Jensen, Edward A. Lee, and Sanjit A. Seshia. This software accompanies An Introductory Lab in Embedded and Cyber-Physical Systems and is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. See http://leeseshia.org/lab.

Definition in file irobotError.h.


Function Documentation

int32_t irobot_StatusMerge ( int32_t *const   status,
const int32_t  newStatus 
)

Conditionally sets the status to a new value.

The previous status is preserved unless the new status is more of an error, which means that warnings and errors overwrite successes, and errors overwrite warnings. New errors do not overwrite older errors, and new warnings do not overwrite older warnings.

Parameters:
statusstatus to conditionally set
newStatusnew status value that may be set
Returns:
the resulting status

Definition at line 3 of file irobotError.cpp.