ROS Serial C client library
|
ROS Serial C OS abstraction layer. More...
#include "ros_types.h"
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. |
ROS Serial C OS abstraction layer.
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.
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).
last_wake_time | Last time thread was woken up. |
time_increment | Delay till next wake up. |
Initialize OS.
If your OS needs to initialize something special you can do it here.
Lock OS critical.
While message operations on interfaces are done OS needs to be locked.
void osMSleep | ( | uint32_t | ms | ) |
Sleep milliseconds.
Sleep given time in milliseconds.
ms | Milliseconds to sleep. |
rosReturnCode_t osStartNode | ( | osROSNode_t * | node | ) |
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.
Unlock OS critical.
Unlock previously locked OS.
void osUSleep | ( | uint32_t | us | ) |
Sleep microseconds.
Sleep given time in microseconds.
us | Microseconds to sleep. |