ROS Serial C client library
osal/include/ros_os.h File Reference

ROS Serial C OS abstraction layer. More...

#include "ros_types.h"
Include dependency graph for ros_os.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

rosReturnCode_t osInit ()
 Initialize OS.
rosReturnCode_t osLockCritical ()
 Lock OS critical.
rosReturnCode_t osUnlockCritical ()
 Unlock OS critical.
void osMSleep (uint32_t ms)
 Sleep milliseconds.
void osUSleep (uint32_t us)
 Sleep microseconds.
void osDelayUntil (uint32_t *last_wake_time, uint32_t time_increment)
 Delay OS until given timestamp.
rosReturnCode_t osStartNode (osROSNode_t *node)
 Start ROS Node in OS way.

Detailed Description

ROS Serial C OS abstraction layer.

Date:
04/19/2013
Author:
Peter Rudolph

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

License:
This library is released under LGPLv3.

Function Documentation

void osDelayUntil ( uint32_t *  last_wake_time,
uint32_t  time_increment 
)

Delay OS until given timestamp.

Delay OS from last wake time until achieving given time increment. To work as thought last_wake_time has to be updated every time, the function is called. While using OS, the implemention is needed by rosSleepRate(rosRate* rate).

Parameters:
last_wake_timeLast time thread was woken up.
time_incrementDelay till next wake up.

Here is the call graph for this function:

Here is the caller graph for this function:

Initialize OS.

If your OS needs to initialize something special you can do it here.

Here is the call graph for this function:

Here is the caller graph for this function:

Lock OS critical.

While message operations on interfaces are done OS needs to be locked.

Here is the call graph for this function:

Here is the caller graph for this function:

void osMSleep ( uint32_t  ms)

Sleep milliseconds.

Sleep given time in milliseconds.

Parameters:
msMilliseconds to sleep.

Here is the call graph for this function:

Here is the caller graph for this function:

Start ROS Node in OS way.

Wrapper for starting a ROS Node as a OS task. This function can be called automatically by defining ROS_START_NODES_WITH_OS.

Here is the call graph for this function:

Here is the caller graph for this function:

Unlock OS critical.

Unlock previously locked OS.

Here is the call graph for this function:

Here is the caller graph for this function:

void osUSleep ( uint32_t  us)

Sleep microseconds.

Sleep given time in microseconds.

Parameters:
usMicroseconds to sleep.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines