|
Fast Research Interface Library
Manual and Documentation
|
Implementation file containing OS-specific functions (MacOS) More...
#include <OSAbstraction.h>#include <time.h>#include <string.h>#include <strings.h>#include <stdio.h>#include <stdlib.h>#include <termios.h>#include <unistd.h>#include <sys/time.h>Go to the source code of this file.
Enumerations | |
| enum | { RESET, RAW } |
Functions | |
| int | DisableSingleCharacterInput (void) |
| int | EnableSingleCharacterInput (void) |
| void | delay (const int &TimeInMilliseconds) |
| int | stricmp (const char *s1, const char *s2) |
| unsigned char | WaitForKBCharacter (bool *Abort) |
| Waits for one single keyboard stroke. | |
| unsigned char | CheckForKBCharacter (void) |
| Checks for one single keyboard stroke. | |
| float | GetSystemTimeInSeconds (const bool &Reset) |
| Returns a time value in seconds. | |
Variables | |
| static struct termios termattr | save_termattr |
| static int | ttysavefd = -1 |
| static bool | GetSystemTimeInSecondsCalledFirstTime = true |
| timeval | StoredSystemTimeInSeconds |
| static enum { ... } | ttystate |
Implementation file containing OS-specific functions (MacOS)
GNU Public License
This file is part of the Fast Research Interface Library.
The Fast Research Interface Library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Fast Research Interface Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the Fast Research Interface Library. If not, see http://www.gnu.org/licenses/.
Stanford University
Department of Computer Science
Artificial Intelligence Laboratory
Gates Computer Science Building 1A
353 Serra Mall
Stanford, CA 94305-9010
USA
http://cs.stanford.edu/groups/manips
Definition in file MACOSAbstraction.cpp.
| anonymous enum |
Definition at line 89 of file MACOSAbstraction.cpp.
| unsigned char CheckForKBCharacter | ( | void | ) |
Checks for one single keyboard stroke.
The function returns immediately.
Definition at line 241 of file MACOSAbstraction.cpp.
| void delay | ( | const int & | TimeInMilliseconds | ) |
Definition at line 98 of file MACOSAbstraction.cpp.
| int DisableSingleCharacterInput | ( | void | ) |
| int EnableSingleCharacterInput | ( | void | ) |
| float GetSystemTimeInSeconds | ( | const bool & | Reset | ) |
Returns a time value in seconds.
Operating system independent function to return the value of the system time in seconds.
| Reset | If this flag is set, the value of this system time will be set to zero. |
Definition at line 267 of file MACOSAbstraction.cpp.
| int stricmp | ( | const char * | s1, |
| const char * | s2 | ||
| ) |
Definition at line 105 of file MACOSAbstraction.cpp.
| unsigned char WaitForKBCharacter | ( | bool * | Abort | ) |
Waits for one single keyboard stroke.
The function returns after the stroke or if Abort becomes set. If Abort is set at the call of the function, the function only checks once, if a key has been pressed.
| Abort | Pointer to a boolean values, which lets the function terminate |
Definition at line 181 of file MACOSAbstraction.cpp.
bool GetSystemTimeInSecondsCalledFirstTime = true [static] |
Definition at line 78 of file MACOSAbstraction.cpp.
struct termios termattr save_termattr [static] |
Definition at line 73 of file MACOSAbstraction.cpp.
| timeval StoredSystemTimeInSeconds |
Definition at line 80 of file MACOSAbstraction.cpp.
int ttysavefd = -1 [static] |
Definition at line 76 of file MACOSAbstraction.cpp.
enum { ... } ttystate [static] |