Managing system timing, Managing operating system tasks, Debugging operating system functions – Echelon LonTal Stack User Manual

Page 203

Advertising
background image

LonTalk Stack Developer’s Guide

191

Managing System Timing

To manage system timing, the OSAL provides the functions listed in the

following table:

Function

Description

OsalGetTickCount()

Gets the current system tick count.

OsalGetTicksPerSecond() Gets the number of ticks in a second.

Managing Operating System Tasks

To manage operating system tasks or threads, the OSAL provides the functions

listed in the following table.

Function

Description

OsalCreateTask()

Creates a task.

OsalCloseTaskHandle() Closes the handle for a task.

OsalGetTaskId()

Gets the task ID of the current task.

OsalGetTaskIndex()

Gets the task index of the current task.

OsalSleep()

Causes a task to sleep for a specified number of ticks.

OsalTaskEntryPoint()

Sets the entry point for a task.

Debugging Operating System Functions

To provide debugging capability for the OSAL, including tracing and statistics,

the OSAL provides the functions listed in the following table.

Function

Description

OsalClearStatistics() Clears the current operating system statistics.

OsalGetLastOsError() Gets the most recent error from the operating system.

OsalGetStatistics()

Gets operating system statistics.

OsalGetTraceLevel()

Gets the current OSAL tracing level.

OsalSetTraceLevel()

Sets the OSAL tracing level.

Advertising