Welcome to the EyeBot  Version 7 - RPi1
A Controller For Various Hardware IO
Functions
system.h File Reference

Header file for system functions. More...

#include "types.h"
#include "string.h"
#include <sys/sysinfo.h>
#include <stdio.h>

Go to the source code of this file.

Functions

void strcpy_n (char *__dest, const char *__src, size_t __n)
 
char * OSExecute (char *command)
 Executes a system command and obtains the string returned after the command. More...
 
char * OSVersion (void)
 Returns string containing running RoBIOS version. More...
 
int OSMachineSpeed (void)
 Inform the user how fast the processor runs. More...
 
int OSMachineType (void)
 Inform the user in which environment the program runs. More...
 
char * OSMachineName (void)
 Inform the user with which name the Eyebot is titled. More...
 
unsigned char OSMachineID (void)
 Inform the user with which ID the Eyebot is titled. More...
 
int OSError (char *msg, int number, bool deadend)
 Print message and number to display then stop processor (deadend) or wait for key. More...
 
int OSInfoCPU (INFO_CPU *infoCPU)
 Collects infos about the CPU – name, speed, architecture and bogusMips. More...
 
int OSInfoMem (INFO_MEM *infoMem)
 Collects infos about the memory. More...
 
int OSInfoProc (INFO_PROC *infoProc)
 Collects infos about processes. More...
 
int OSInfoMisc (INFO_MISC *infoMisc)
 Collects system’s miscellaneous infos – uptime, vbatt. More...
 

Detailed Description

Header file for system functions.

Author
Remi KEAT & Marcus Pham

Function Documentation

int OSError ( char *  msg,
int  number,
bool  deadend 
)

Print message and number to display then stop processor (deadend) or wait for key.

Parameters
msga pointer to message
numberthe error number
deadendswitch to choose deadend or keywait

Valid values are:

  • 0 = no deadend
  • 1 = deadend
    Returns
    int retVal : Always 0
char* OSExecute ( char *  command)

Executes a system command and obtains the string returned after the command.

Parameters
commandthe command to run
Returns
the string returned after execution
int OSInfoCPU ( INFO_CPU infoCPU)

Collects infos about the CPU – name, speed, architecture and bogusMips.

Parameters
infoCPUa pointer to a structure containing the cpu infos
Returns
always 0
int OSInfoMem ( INFO_MEM infoMem)

Collects infos about the memory.

Parameters
infoMem: pointer to a structure which contains the memory infos
Returns
always 0
int OSInfoMisc ( INFO_MISC infoMisc)

Collects system’s miscellaneous infos – uptime, vbatt.

Parameters
infoMisc: pointer to a structure which contains the misc infos
Returns
always 0
int OSInfoProc ( INFO_PROC infoProc)

Collects infos about processes.

Parameters
INFO_PROCinfoProc : pointer to a structure which contains the process infos
Returns
int retVal : always 0
unsigned char OSMachineID ( void  )

Inform the user with which ID the Eyebot is titled.

Returns
the ID of actual Eyebot
char* OSMachineName ( void  )

Inform the user with which name the Eyebot is titled.

Returns
the Name of actual Eyebot
int OSMachineSpeed ( void  )

Inform the user how fast the processor runs.

Returns
the actual clockrate of CPU in Hz
int OSMachineType ( void  )

Inform the user in which environment the program runs.

Returns
the Type of used hardware

Valid values are: VEHICLE, PLATFORM, WALKER

char* OSVersion ( void  )

Returns string containing running RoBIOS version.

Returns
the OS version

Example: "3.1b"