beautypg.com

3 - rac6182 ce sdk, Overview, Rac6182 ce sdk – Rockwell Automation 6182 SDK User Manual

Page 39: Chapter

background image

RAC6182 CE SDK

RAC6182 CE SDK

RAC6182 CE SDK

RAC6182 CE SDK

The RAC6182 SDK provides developers with access to an extensive set
of functions that are specific to the RAC6182 hardware and constitute
extensions of the standard Windows CE API. These functions, like the
standard Windows CE functions, are implemented in the C language and
can be called directly from C or C++ programs.

Basic programs can also call these functions. However, Basic programs
must declare the functions in the proper form before invoking them. For
example, a Basic program might contain the following

‘ Basic declaration of the C library function Watchdog_Tag()

Const WATCHDOG_OK = &0
Declare Function Watchdog_Tag Lib "watchdog.lib" Alias "Watchdog_Tag"

(ByVal dwTimeout As Long) As Long
....

‘ Invocation of the function
if (Watchdog_Tag(3000) equ WATCHDOG_OK) then
‘ do something

endif

A file called “6182api.txt” is included in the RAC6182 SDK. This file
includes Basic declarations for all the constants, data structures and
functions associated with the RAC6182 SDK C language libraries.
Basic programmers can copy declarations from this file into their
programs as needed, just as they can copy the declarations for the
standard CE functions from a Microsoft provided file called
“winceapi.txt”.

C/C++ language developers should note that the headers included the
RAC6182 SDK contain conditionals that allow them to be included in C
and C++ modules without modification. A C++ program should include
a #define __cplusplus directive prior to an #include
directive, or else the __cplusplus macro should be defined on the
compiler command line. Users of the Microsoft Visual C++ 6.0 IDE
will not have to make any special provisions in their programs, since this
IDE makes C++ is default for a new project and defines this macro for
them.

Chapter

Chapter

Chapter

Chapter

3

Overview

This manual is related to the following products: